Hi, I am back with this vbscript pricing array I have developed. It works great on an item details page, that is, on a single item page. It now needs to work on a page of search results with multiple items.
The way I have it configured it runs the array once and then gives me a runtime error...
onpnt...
Dim outletPrice2(1,1)
outletPrice2(0,0) = "515304GS"
outletPrice2(0,1) = "45"
savings = "22.50"
alert FormatPercent((savings / outletPrice2(0,1)), 0)
this example above is the 0 entry in the array and it is the one that will come out right, that is, 50%...
onpnt...
What you are describing is similar to what is happening. The origPrice on the entire sale was set up to be all 50% off initially.
For example:
outletPrice : $8.96
origPrice : $4.48
outputs: (savings: $4.48) 452%
However: the following numbers work:
outletPrice : $45.00
origPrice...
Hi, I am admittedly new to vbscript. When posted to our site the following script appears to be reading the variables correctly but is calculating the percentages wrong. I am really hoping someone can help me with what is wrong. Thanks!!! suez
Note that this is only a sample of the array used...
Just a quick note: the script I am trying to pull these variables from is the following:
Dim itmav1
dim mcount
itmedp = trim(trans01.GetValue("ItemEdp",0))
imgovr = trim(trans01.GetValue("ItmImageOvrd",0))
itmdes = (trans01.GetValue("ItemDescription",0))...
Hi!! Progress at last and I do appreciate your help.
I have corrected the quotes and a couple of other things and the script is now as follows (same array):
Dim sku
sku = itmno 'with fixed variable (51FJ1475) script works
Dim origPrice
origPrice = itmpri
For i = LBound(outletPrice) to...
I am admittedly new and I apologize for that. I have the following script and am trying to pick up variables that are in the page and feed into the script after reading the array. Fairly simple. Need to read the data from the array into the page. Script will read the array but won't pass the sku...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.