- Posts: 73
- Thank you received: 1
Redirect to other page when item added to cart
13 years 6 days ago #124616
by Ortix
Redirect to other page when item added to cart was created 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!
-- 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.
13 years 6 days ago #124699
by Xavier
Replied by Xavier on topic Redirect to other page when item added to cart
Hi,
I think that the best way is to create a little plugin based on the function:
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:
in the "checkout" case by:
Be careful, with the second option when you update HikaShop the changes will be lost.
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)
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();
Code:
index.php?option=com_hikashop&ctrl=product&task=updatecart&quantity=1&checkout=1&product_id=24&Itemid=212
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