continue shopping button

  • Posts: 222
  • Thank you received: 1
9 years 2 months ago #212990

-- HikaShop version -- : 2.5.0
-- Joomla version -- : latest

Hi,

I need, that continue shopping button returns two urls back, because one url back is product page and two urls back is product listing page. I need to return to product listing page. I have placed in step.php this code (it returns to product page):

echo $this->cart->displayButton(JText::_('CONTINUE_SHOPPING'),'continue_shopping',$this->params,$_SESSION['previous_url'],'window.location=\''.$_SESSION['previous_url'].'\';return false;','id="hikashop_checkout_shopping_button"');

It works perfect, but it is not that I need. Please, help me to make changes in this code to get what I need.

Thanks in advance,
Vero

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

  • Posts: 82910
  • Thank you received: 13379
  • MODERATOR
9 years 2 months ago #212998

Hi,

There is no need to change or add any code then.
Remove your change and just enter the URL of your products listing in the "Continue shopping button's URL" setting of the configuration.

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

  • Posts: 222
  • Thank you received: 1
9 years 2 months ago #213069

Hi Nicolas,
It seems you do not understand me. I do not have a products listing page with all the products (what link than should I place?). I have many specific categories for their own customer with their own products listing page. Customer usually buys more products from the same category. Therefore, he must return to the same category, if he decides to buy more after viewing his cart.

Last edit: 9 years 2 months ago by Vero.

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

  • Posts: 82910
  • Thank you received: 13379
  • MODERATOR
9 years 2 months ago #213077

Hi,

There is no system to know the URL of the last category listing page the customer was on before searching for the products and the purchasing them, and then going to the checkout.
It could potentially be added with custom coding by storing the URLs in the session on the listings and then using it for the button on the checkout.
I guess you could try to add such code in the listing file of the products view:

$_SESSION['previous_url'] = hikashop_currentUrl();

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

Time to create page: 0.063 seconds
Powered by Kunena Forum