Author |
Topic  |
|
bully456
Starting Member
United Kingdom
21 Posts |
Posted - October 28 2016 : 06:08:52
|
I am trying to improve the stock display for the extended product description. I have followed the VPASP help note to change the stock level display to say More than 10 in stock if I have more than 10, but I''m now trying to also add in the if the stock is 0 it changes to ''New Release'' as well as the out of stock message.
I have tried to edit the code, with limited success, as seen below.
First image shows the "more than 15 in stock" message, but the actual amount (131 in this case)has also reappeared.
http://www.cheltenhammodelcentre.com/images/Stock%20Question%201.png
This is a product that I would like to say "New Release" as well as the out of stock message (as seen in the picture) but I would like, if possible, to remove the 0 from here
http://www.cheltenhammodelcentre.com/images/Stock%20Question%202.png
This is the code as I have modified it.
quote:
sub Handle_productstock (value, parsearray,parseRS) dim cstockvalue dim cstock cstockvalue = parseRS("cstock") if isnull(cstockvalue) then cstockvalue = 0 if cdbl(cstockvalue) >= 15 then response.write "More Than 15" end if if isnull(cstockvalue) then cstockvalue = 0 if cdbl(cstockvalue) = 0 then response.write "New Release" else response.write cstockvalue end if
Does anyone have any idea what I have done wrong with this code please? Or anything else that is preventing this from working.
Thnaks
James |
|
serjtankian
VP-CART Super User
 
Armenia
378 Posts |
Posted - November 24 2016 : 10:40:47
|
i tried to add this in shopproductformat.asp below the following routine: (around line 654-658)
else HtmlWrite "<td class=""ac"">" & GetLang("langOutOfStock") display_stocknotification_info HtmlWrite "</td>" end if
adding the following code around line 660-668
if lngcstock>clng(0) then exit sub if productwithhtml = "Yes" then response.write GetLang("langcelek") display_stocknotification_info else HtmlWrite "<td class=""ac"">" & GetLang("langcelek") display_stocknotification_info HtmlWrite "</td>" end if
it will displaying ''langcelek'' caption which is ''New Release'' caption. However it will only displaying in product category page, not in extended page, need to test it again with extended page
*peace - serj* |
 |
|
bully456
Starting Member
United Kingdom
21 Posts |
Posted - December 07 2016 : 12:18:57
|
Thank you for looking Serj, I have tried multiple things and have found no improvement. I will keep trying and will report back if I find anything.
James |
 |
|
serjtankian
VP-CART Super User
 
Armenia
378 Posts |
Posted - December 13 2016 : 10:04:48
|
great, can''t wait to hear your update
*peace - serj* |
 |
|
|
Topic  |
|