Welcome, Guest ( Customer Panel | Login )




 All Forums
 VPCart Forum
 Problems and bugs
 Wishlist Problem
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

carfin
VP-CART Expert

United Kingdom
948 Posts

Posted - July 22 2010 :  04:59:19  Show Profile  Reply with Quote
Hi,
I've been using v6.5 for a couple of years now and yesterday came across a problem with the customers' wishlists. The only reason that it came to light was that one of our customers managed to order an item that had been discontinued, hidden, zero price and the ccode value changed to Not Available. I found out from the savedcarts table that the customer had added this product to his wishlist early last year. It has since been discontinued but the wishlist allowed him to order the product by placing it directly into the cart. He would have seen the discontinued message in the product description but was probably curious to see if he could still order it, and he could.
I have now added a product check in shopwishlist.asp so that the 'order' link will not appear next to any item in the wishlist that is currently unavailable.
Perhaps the developers could look into adding checks to this file for the next update.
Regards,

Carrol
www.deanston-electrical.co.uk

chrisredco
VP-CART Super User

282 Posts

Posted - July 22 2010 :  14:43:39  Show Profile  Visit chrisredco's Homepage  Reply with Quote
I'd be curious if you are willing to forward me what you did to make this work, as I have run into the same problem a few times. It took a while for me to discover how someone was ordering a hidden item.

Thanks,
Chris
Go to Top of Page

carfin
VP-CART Expert

United Kingdom
948 Posts

Posted - July 23 2010 :  07:09:20  Show Profile  Reply with Quote
Hi Chris,

it's a really easy fix to shopwishlist.asp and I'll post it in here for any others that may want to add it. It stops the user from seeing the "View" and "Order Now" links on any product where the cname matches "Not Available". And I also added a stock column to the wish list so that the customer can see how many are in stock and if the stock is 0 the "Order Now" link is removed. We have quite a few customers who use the Wishlist for items that they order on a regular basis so it seemed like a good time for an overhaul. For any product that you hide, you change the cname field to Not Available but keep the description as is so the customer can see what the product was. Better to let the customer know why the "Order Now" link is hidden. We occasionally have to hide products even though they may still be in stock, so the stock check alone is not enough.

Right, here's the code

Open shopwishlist.asp (make a backup copy just in case)

Find Sub Formatwishlistentry (line 125 approx.)

Add the code highlighted in red (and green if you want to add a stock column)

Sub Formatwishlistentry (conn, catalogid)
dim rc, price, fieldvalue
dim my_link
CartGetProduct catalogid, rc
if rc>0 then exit sub
response.write "<tr>"
FormatProductcolumn strcname
FormatProductcolumn memcdescription
price=shopformatcurrency(curcprice, getconfig("xdecimalpoint"))
FormatProductcolumn price
FormatProductcolumn lngcstock
'
my_link="shopwishlist.asp?action=delete&id=" & catalogid
my_link=addwebsess(my_link)
fieldvalue="<a href=""" & my_link & """>" &  getlang("LangCommonDelete") & "</a>"
FormatProductcolumn fieldvalue

If strcname<>"Not Available" then
my_link="shopquery.asp?catalogid=" & catalogid
my_link=addwebsess(my_link)
fieldvalue="<a href=""" & my_link & """>" &  getlang("LangCommonView") & "</a>"
FormatProductcolumn fieldvalue
else
FormatProductcolumn " "                 ' no view
end if

If strinventoryproducts="" AND strcname<>"Not Available" AND lngcstock>0 then
 my_link="shopaddtocart.asp?catalogid=" & catalogid
 my_link=addwebsess(my_link)
 fieldvalue="<a href=""" & my_link & """>" &  getlang("LangCommonOrderNow") & "</a>"
 FormatProductcolumn fieldvalue
else
 FormatProductcolumn " "                 ' no buy
end if 
response.write "</tr>"
end sub


If you want to add a stock column find sub WriteWishlistheaders (line 170 approx) and add the code highlighted in green

Sub WriteWishlistheaders
dim i
Fieldnames="cname,cdescription,cprice,cstock"
parserecord fieldnames, fields, fieldcount,","
Captions(0)=getlang("langproductname")
Captions(1)=getlang("Langproductdescription")
Captions(2)=getlang("Langproductprice")
Captions(3)=getlang("Langproductstock")
Captions(fieldcount)=" "
fieldcount=fieldcount+1
Captions(fieldcount)=" "
fieldcount=fieldcount+1
Captions(fieldcount)=" "
response.write ReportTableDef
response.write ReportHeadRow 
for i = 0 to fieldcount
  Response.write ReportHeadColumn & Captions(i) & ReportHeadColumnEnd
next 
response.write ReportRowEnd
end sub


Here's a screen shot of our wishlist with 3 products all with a different status. I use the ccode field instead of the cname field

http://www.deanston-electrical.co.uk/WishlistScreenShot.htm


However, there is another way that the customers can order hidden products - through links to products from Google to shopexd.asp. Please have a look at this thread for a fix to that - thanks to Steve for posting this

http://www.vpasp.com/virtprog/vpaspforum/topic.asp?TOPIC_ID=13908

I hope all this helps,

Regards,

Carrol
www.deanston-electrical.co.uk
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
Snitz Forums 2000
0 Item(s)
$0.00