ProductCart E-Commerce Solutions Homepage
Forum Home Forum Home > ProductCart > Customizing ProductCart
  New Posts New Posts RSS Feed - Conditional images based on category
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Conditional images based on category

 Post Reply Post Reply
Author
Message
thrion View Drop Down
Groupie
Groupie
Avatar

Joined: 27-October-2005
Location: United States
Status: Offline
Points: 0
Post Options Post Options   Thanks (0) Thanks(0)   Quote thrion Quote  Post ReplyReply Direct Link To This Post Topic: Conditional images based on category
    Posted: 05-August-2007 at 7:19pm
We are selling via google checkout, and google has asked us to display a particular graphic on the page of some items based on the product category.

We are using the viewprdL.asp page and want to add some asp code that will conditionally display the google image, but it's not quite working right.  Could someone take a look at this code snipet and help me figure out what I did wrong?

We are placing the code right after:

<!-- End Quantity and Add to Cart -->


and the code we wrote is:

<% ' If google asks show this image
        if pcIDCategory in (32, 33) then %>
        <td>
        <img src="http://checkout.google.com/buttons/checkout.gif?merchan t_id=234782597607506&w=180&h=46&style=white& variant=disabled&loc=en_US">
        </td>
<%     end if %>


Thanks in advance for any help!
Back to Top
netprofits View Drop Down
Certified ProductCart Developers
Certified ProductCart Developers


Joined: 05-January-2006
Location: United States
Status: Offline
Points: 22
Post Options Post Options   Thanks (0) Thanks(0)   Quote netprofits Quote  Post ReplyReply Direct Link To This Post Posted: 06-August-2007 at 9:02am

The line:
if pcIDCategory in (32, 33) then
is not valid vbscript. It is closer to an SQL statement.

Use something like this:
If InStr("32,33",cStr(pcIDCategory)) Then

If you need help with ASP and VBScript, Javascript, etc. check out:
http://www.w3schools.com/vbscript/

NetProfits Internet Consulting

Certified ProductCart Developer

Our Site
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.063 seconds.