Post by aboutwd » Thu Jan 05, 2012 2:17 am

index.php?route=checkout/cart&product_id=603

I simply need an <a href="" style link that will automatically add products to the cart on our site.

The format above was working perfectly in version 1.4. Now I've upgraded to 1.5 and this no longer adds products to the cart at all.

We have affiliates that are linking to us. How can I get this working again?

Please help.

Thanks
Rob

Newbie

Posts

Joined
Fri Jan 21, 2011 1:43 am

Post by aboutwd » Thu Jan 05, 2012 2:55 am

One option is this... (although I don't like it at all)

Add this to the top of the cart's INDEX.PHP page.

Code: Select all

if($_GET['route']=="checkout/cart" && $_GET['product_id'] > 0){
		?>
		<form action="index.php?route=checkout/cart" id="frm" method="post">
<input type="hidden" name="product_id" value="<?php echo $_REQUEST['product_id']; ?>">
<input type="hidden" name="quantity" value="1">
<input type="hidden" name="tracking" value="<?php echo $_GET['tracking']; ?>">
</form>
<body onload="document.getElementById('frm').submit()"></body>
<?php
}

Newbie

Posts

Joined
Fri Jan 21, 2011 1:43 am

Post by tmas73 » Wed Apr 24, 2013 7:54 am

Where can I find this index.php file?

Thanks

Newbie

Posts

Joined
Mon Feb 13, 2012 12:01 pm
Who is online

Users browsing this forum: 7cswinery and 79 guests