Redirect to other page when item added to cart

  • Posts: 73
  • Thank you received: 1
11 years 2 months ago #124616

-- 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.

  • Posts: 13201
  • Thank you received: 2322
11 years 2 months ago #124699

Hi,

I think that the best way is to create a little plugin based on the function:

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:
$url = $this->_getCheckoutURL();
in the "checkout" case by:
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.068 seconds
Powered by Kunena Forum