Skip to main content

Redirect to other page when item added to cart

More
13 years 6 days ago #124616 by Ortix
-- HikaShop version -- : 1.6
-- Joomla version -- :2.5
-- PHP version -- : 5.3

I'm wondering how I can redirect to another page instead of the checkout when a product is added to the cart with a URL.

The URL is:
index.php?option=com_hikashop&ctrl=product&task=updatecart&quantity=1&checkout=1&product_id=24&Itemid=212
Can I pass a parameter to redirect it to another page? Thanks!

Please Log in or Create an account to join the conversation.

More
13 years 6 days ago #124699 by Xavier
Hi,

I think that the best way is to create a little plugin based on the function:
Code:
onAfterCartUpdate(&$this,&$cart,$product_id,$quantity,$add,$type,$resetCartWhenUpdate,$force)
Here is some documentation:
www.hikashop.com/support/documentation/6...umentation.html#cart

Else you can edit the file: "components/com_hikashop/views/product/view.html.php" function "init()" and replace:
Code:
$url = $this->_getCheckoutURL();
in the "checkout" case by:
Code:
index.php?option=com_hikashop&ctrl=product&task=updatecart&quantity=1&checkout=1&product_id=24&Itemid=212
Be careful, with the second option when you update HikaShop the changes will be lost.
The following user(s) said Thank You: Ortix

Please Log in or Create an account to join the conversation.

Time to create page: 0.147 seconds
Powered by Kunena Forum