Skip to main content

Add a "Continue shopping" to the cart module

More
14 years 1 month ago #60725 by bmloho
Nic,

Where do I add

<div id="hikashop_add_to_cart_continue_div">
<?php echo $this->cartClass->displayButton(JText::_('CONTINUE_SHOPPING'),'continue_shopping',$this->params,'','try{ window.top.document.getElementById(\'sbox-window\').close(); }catch(err){ window.top.SqueezeBox.close(); } return false;','id="hikashop_add_to_cart_continue_button"'); ?>

I can't seem to find the view or the module itself

Kind Regards

brad

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

More
14 years 1 month ago #60755 by Jerome
Hi,

The portion of code that you paste is for the popup when a product is added to the cart. It just close the popup.

What do you want to add exactly and where ?
A "continue shopping" button in the checkout page ?

Regards,

Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

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

More
14 years 1 month ago #60758 by bmloho
I want to add it to the "HikaShop Cart Module" so that visitors can either continue shopping or proceed to checkout, via the module.

regards

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

More
14 years 1 month ago #60759 by Jerome
Hi,

So you can edit the view "product | cart".

Regards,

Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

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

More
14 years 1 month ago #60763 by bmloho
At the moment the "HikaShop Cart Module" only has a "Proceed to checkout", I also want to add another button "Continue shopping" like at the very bottom of the register/checkout page.

I imagine that you pull the code from that page and put it in the "HikaShop Cart Module" html file, which I can't find.

Any idea where it is?

Thanks

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

More
14 years 1 month ago #60765 by Jerome
Hi,

You can use this code (which is base on the "checkout | step" view):
Code:
$config =& hikashop_config(); $continueShopping = $config->get('continue_shopping', ''); if(!empty($continueShopping)) { global $Itemid; $url_itemid=''; if(!empty($Itemid)){ $url_itemid='&Itemid='.$Itemid; } if(strpos($continueShopping,'Itemid') === false) { if(strpos($continueShopping,'index.php?') !== false) { $continueShopping .= $url_itemid; } } if(!preg_match('#^https?://#',$continueShopping)) $continueShopping = JURI::base().ltrim($continueShopping,'/'); echo $this->cart->displayButton(JText::_('CONTINUE_SHOPPING'),'continue_shopping',$this->params,JRoute::_($continueShopping),'window.location=\''.JRoute::_($continueShopping).'\';return false;','id="hikashop_checkout_shopping_button"'); }

It would use the "Continue shopping button's URL" option value (System > Configuration > Checkout).
If you don't want to display this button in the checkout, you can remove the "echo $this->cart ..." line in the view "checkout | step" or enter a default value here:
Code:
$continueShopping = $config->get('continue_shopping', '/my_continue_shopping_page.html');

Regards,

Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

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

More
14 years 1 month ago #60766 by bmloho
Thank you, but what file do I put that in to appear in the "HikaShop Cart Module" ?

Thanks

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

More
14 years 1 month ago #60767 by Jerome

Jerome wrote: Hi,

So you can edit the view "product | cart".

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.
The following user(s) said Thank You: bmloho

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

Time to create page: 0.209 seconds
Powered by Kunena Forum