Author |
Topic |
|
jmccann
VP-CART New User
United Kingdom
131 Posts |
Posted - September 03 2006 : 11:03:42
|
Hi,
Occasionally when viewing a site, product prices are displayed as zero. On other visits the price is displayed correctly.
Products have been double checked to ensure prices have been set up correctly.
Has any one else come across this intermittent problem?
I have posted a ticket with VPASP support but and also ask here to see if anyone else has experienced this.
regards,
jim mccann
|
|
devshb
Senior Member
United Kingdom
1904 Posts |
Posted - September 03 2006 : 12:00:21
|
yep; I've found it's quite common, but only for sqlserver. It'll happen more often on sqlserver2005 than sqlserver2000. It's down to the recordset size being restricted (a sqlserver/microsoft "feature"), and it means that you'll need to change your products table's definition. If on sql2000 then it'll usually show a proper error as a vbscript error and hence you can then find/track it. If on sql2005 then it just blanks out the value without showing an error.
It took us absolutely ages to find the root cause, because just referencing a cursor value can effect the storage of that cursor in memory, so one minute a variable is fine and the next minute on the same chain of processing the variable will be blank.
in this instance, it's blanking out the variable, and then the formatcurrency function is therefore interpreting it as zero and showing it as $0.00.
The most common symptom seems to be showing zero prices on cross-selling/also-bought/inventory chunks; if that happens then you know you need to readjust the products table definition.
Simon Barnaby Developer [email protected] www.BigYellowZone.com Web Design, Online Marketing and VPASP addons |
Edited by - devshb on September 03 2006 12:01:04 |
|
|
jmccann
VP-CART New User
United Kingdom
131 Posts |
Posted - September 03 2006 : 13:25:38
|
Hi Simon,
I'm not using SQL server. The DB is MySQL, so I assume it's the same issue.
How do I readjust the products table definition?
jim |
|
|
devshb
Senior Member
United Kingdom
1904 Posts |
Posted - September 03 2006 : 14:09:15
|
ah; it's probably a different issue then; make sure your patches are up to date and you'll probably be ok.
Simon Barnaby Developer [email protected] www.BigYellowZone.com Web Design, Online Marketing and VPASP addons |
|
|
support
Administrator
4679 Posts |
Posted - September 03 2006 : 21:47:00
|
Hi!
The problem was to do with there not being a conversion value - a simple change to shopproductsubs2.asp fixed it -
Change the Function Currencypriceconvert to the one below -
Function Currencypriceconvert(price) if GetSess("Conversionvalue") = "" OR isnull(GetSess("Conversionvalue")) then Currencypriceconvert = price else Currencypriceconvert=price*GetSess("Conversionvalue") end if End Function
Kind regards, Claire VP-ASP Support |
|
|
|
Topic |
|