ProductCart E-Commerce Solutions Homepage
Forum Home Forum Home > ProductCart > Customizing ProductCart
  New Posts New Posts RSS Feed - Add to Cart in ViewCategories.asp
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Add to Cart in ViewCategories.asp

 Post Reply Post Reply Page  12>
Author
Message
fidjiti View Drop Down
Senior Member
Senior Member


Joined: 30-November-2006
Location: United States
Status: Offline
Points: 0
Post Options Post Options   Thanks (0) Thanks(0)   Quote fidjiti Quote  Post ReplyReply Direct Link To This Post Topic: Add to Cart in ViewCategories.asp
    Posted: 29-May-2007 at 10:02pm
Does anyone know how to add the "add to cart" buttons to each product by the "more details" link area in the category pages before actually going to the product pages.

I don't need the qty box, just the add to cart button which will add a default number (1) of that item to their cart.

I downloaded the file which is found on the developers page which talks about putting an add to cart button anywhere: http://www.earlyimpact.com/productcart/support/developers.as p
But I don't know what I am supposed to do with it because there isn't a read-me file included. :(

I would like my category pages:
http://www.fidjiti.com/shop/pc/viewCategories.asp?idCategory =311
to have the add to cart button like this one below:
http://www.thesimpleleaf.com/ec/pc/viewcat_p.asp?idCategory= 3

Maybe there is a simple code I can add to the viewCategories.asp file. Please help if you can.
Thanks!!!!
 
Linda - I wish I knew ASP.
To view my ever evolving site click the "www" button below. :)
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: 30-May-2007 at 7:26am

For the horizontal layout, you need to modify: pcShowProductH.asp
At the bottom of the routine, look for the following code:


  <p class="pcShowProductLink">
   <a href="viewPrd.asp?idcategory=<%=pIdCategory%>&idpr oduct=<%=pIdProduct%>" <%if scStoreUseToolTip="1" then%>onmouseover="javascript:document.getPrd.idproduct.v alue='<%=pIdProduct%>'; sav_callxml='1'; return runXML1('prd_<%=pIdProduct%>');" onmouseout="javascript: sav_callxml=''; hidetip();"<%end if%>><img src="<%=rslayout("morebtn")%>"></a>
  </p>

and change it to:


<p class="pcShowProductLink">
   <a href="viewPrd.asp?idcategory=<%=pIdCategory%>&idpr oduct=<%=pIdProduct%>" <%if scStoreUseToolTip="1" then%>onmouseover="javascript:document.getPrd.idproduct.v alue='<%=pIdProduct%>'; sav_callxml='1'; return runXML1('prd_<%=pIdProduct%>');" onmouseout="javascript: sav_callxml=''; hidetip();"<%end if%>><img src="<%=rslayout("morebtn")%>"></a>
      <% '== Add to Cart button on category pages %>
   <br>
      <a href="instPrd.asp?idproduct=<%=pIdProduct%>"><im g src="<%=rslayout("addtocart")%>"></a>
</p>

Make sure to change "im g src" to "img src". For some reason the editor is adding extra spaces.

Here is the web site we made the modification to:
http://www.myteamwatches.com/store/pc/home.asp



Edited by netprofits - 30-May-2007 at 7:32am
NetProfits Internet Consulting

Certified ProductCart Developer

Our Site
Back to Top
fidjiti View Drop Down
Senior Member
Senior Member


Joined: 30-November-2006
Location: United States
Status: Offline
Points: 0
Post Options Post Options   Thanks (0) Thanks(0)   Quote fidjiti Quote  Post ReplyReply Direct Link To This Post Posted: 30-May-2007 at 4:25pm
Netprofits, you my friend, are a genius! I couldn't look like a pro without you. :) Thanks for the fabulous help.

Oh and you'll have to delete the space between: "&idpr oduct=<%" so the word product would be 1 word.

Check mine out: http://www.fidjiti.com/shop/pc/viewCategories.asp?idCategory =3

(I still need to edit the stock button images)




Linda - I wish I knew ASP.
To view my ever evolving site click the "www" button below. :)
Back to Top
jenbeast View Drop Down
Newbie
Newbie


Joined: 30-October-2006
Status: Offline
Points: 0
Post Options Post Options   Thanks (0) Thanks(0)   Quote jenbeast Quote  Post ReplyReply Direct Link To This Post Posted: 12-June-2007 at 7:22pm
Hi-I wonder if you could help me, too, netprofits? I'm not sure how to apply
the above code to my particular product layout:

http://www.valentinopads.com/productcart/pc/viewCategories.a sp?
idCategory=96

I would also like to put an 'add to cart' button next to each product-your
help is greatly appreciated!
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: 13-June-2007 at 10:43am

You really shouldn't have an add to cart button for each product in that view as it is expecting customers to enter quantities for one or more products and then click the Add To Cart button at the bottom.

You would probably want to use the Display items vertically (list view) which uses pcShowProductP.asp. Find the table cell where you want the add to cart button and just insert this code:

<a href="instPrd.asp?idproduct=<%=pIdProduct%>"><im g src="<%=rslayout("addtocart")%>"></a>

NetProfits Internet Consulting

Certified ProductCart Developer

Our Site
Back to Top
mrondael View Drop Down
Newbie
Newbie


Joined: 03-May-2007
Status: Offline
Points: 0
Post Options Post Options   Thanks (0) Thanks(0)   Quote mrondael Quote  Post ReplyReply Direct Link To This Post Posted: 29-June-2007 at 11:16am

Hello NetProfits

I'm using ProductCart 3.x  I like the vertical view with the add to cart button but would like to customize this view to include simple options.  How would I modify the page.

Thanks!

Back to Top
dwatch View Drop Down
Newbie
Newbie


Joined: 26-February-2006
Status: Offline
Points: 33
Post Options Post Options   Thanks (0) Thanks(0)   Quote dwatch Quote  Post ReplyReply Direct Link To This Post Posted: 23-July-2007 at 11:50am

Netprofits, how can we implement the check to the add to cart code so that if the product has required options it displays an alert and advises the customer to hit more details and select the opitons?



Edited by dwatch - 23-July-2007 at 12:07pm
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: 23-July-2007 at 12:14pm

For these last 2 posts...It would be a lot of work to tweak any of the category views to show product options. You would need to look in the viewPrd.asp, viewPrdCode.asp and probably other files to see what all is needed to work with product options. If you are not an experience developer, I wouldn't recommend this. There are a lot of variables set in different places that would all need to be set correctly in the category display pages to handle options.

In the instPrd.asp (which adds an item to the cart) you would need to find the code in viewPrdCode.asp (most likely) that checks for product options and then add that code to instprd.asp when trying to add an item.

In the end...if you have products with options, it is easier to just not show the add to cart button on category pages.

NetProfits Internet Consulting

Certified ProductCart Developer

Our Site
Back to Top
dwatch View Drop Down
Newbie
Newbie


Joined: 26-February-2006
Status: Offline
Points: 33
Post Options Post Options   Thanks (0) Thanks(0)   Quote dwatch Quote  Post ReplyReply Direct Link To This Post Posted: 23-July-2007 at 12:16pm

hey netprofits, can you provide quote such as:

if the product has options, is apparell or is BTO, then dont display the add to cart button for that product

Back to Top
Matt View Drop Down
Moderator Group
Moderator Group


Joined: 20-July-2006
Location: United States
Status: Offline
Points: 73
Post Options Post Options   Thanks (0) Thanks(0)   Quote Matt Quote  Post ReplyReply Direct Link To This Post Posted: 23-July-2007 at 1:04pm

This feature has been added to ProductCart v3.1.  The "Add to Cart" button will also be hidden when there are required options, fields, or the product is Apparel.  There is no definitive release date for 3.1, though we are expecting sometime in August.   

Back to Top
 Post Reply Post Reply Page  12>
  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.047 seconds.