Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls
 

Add to Cart button on Wishlist Page

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 10-26-2003, 02:33 PM
  BoomBoomBap's Avatar 
BoomBoomBap BoomBoomBap is offline
 

Senior Member
  
Join Date: Nov 2002
Location: San Francisco
Posts: 184
 

Default Add to Cart button on Wishlist Page

I've searched around for an answer to this question but couldnt find one.

How can I add an "Add to Cart" button for each item on the wishlist page?

Here's the code I've tried adding to /modules/Wishlist/wishlist.tpl with no success

Code:
<FORM method=post name="orderform" action="cart.php"> <INPUT type=hidden name=mode value="add"> <INPUT type=hidden name=productid value="{$wl_products[product].productid}&quantity={$wl_products[product].amount}"> {include file="buttons/add_to_cart.tpl"} </form>

When I try this I get a Javascript error.
I've tried using a regular submit button as well but the item does not get added to the cart.

Thanks for the help !
__________________
Site 1 > XCART LIVE 3.4.12

Site 2 > XCART LIVE 4.0.17
Reply With Quote
  #2  
Old 10-26-2003, 07:12 PM
  adpboss's Avatar 
adpboss adpboss is offline
 

X-Man
  
Join Date: Feb 2003
Location: Ontario, Canada
Posts: 2,389
 

Default

You will have to disect my code. This is from my listing in the products.tpl.

Code:
<tr valign="top"> <td><form name=orderform_{%product.index%} method=post action="cart.php?mode=add"> <a href="javascript: document.orderform_{%product.index%}.submit()"> {include file="buttons/add_to_cart1.tpl"}</a> <input type=hidden name=amount value=1> <input type=hidden name=mode value=add> <input type=hidden name=productid value="{$products[product].productid}"> <input type=hidden name=cat value="{$smarty.get.cat}"> <input type=hidden name=page value="{$smarty.get.page}"> </form></td></tr>
Reply With Quote
  #3  
Old 10-26-2003, 08:46 PM
  BoomBoomBap's Avatar 
BoomBoomBap BoomBoomBap is offline
 

Senior Member
  
Join Date: Nov 2002
Location: San Francisco
Posts: 184
 

Default

Hmm.... This doesnt work for me. Im using Xcart 3.4.8

Anyone else have any ideas?

Thanks for the help !
__________________
Site 1 > XCART LIVE 3.4.12

Site 2 > XCART LIVE 4.0.17
Reply With Quote
  #4  
Old 11-30-2003, 02:36 PM
  BoomBoomBap's Avatar 
BoomBoomBap BoomBoomBap is offline
 

Senior Member
  
Join Date: Nov 2002
Location: San Francisco
Posts: 184
 

Default

Here's a very simple solution that worked for me.
May not work for everyone.
This is on 3.4.10

__________________
Site 1 > XCART LIVE 3.4.12

Site 2 > XCART LIVE 4.0.17
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 04:00 PM.

   

 
X-Cart forums © 2001-2020