continue shopping button - redirection not workig

  • Posts: 13201
  • Thank you received: 2316
  • MODERATOR
3 years 10 months ago #175912

Hi,

And what about that code:

<?php echo $this->cartClass->displayButton(JText::_('CONTINUE_SHOPPING'),'continue_shopping',$this->params,'','window.parent.location.href = "www.yoursite.com"; return false;','id="hikashop_add_to_cart_continue_button"'); ?>

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

  • Posts: 6
  • Thank you received: 0
  • Hikashop Essential
3 years 10 months ago #176172

Nothing happens. The popup notice remains.

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

  • Posts: 13201
  • Thank you received: 2316
  • MODERATOR
3 years 10 months ago #176340

Hi,

And this code ?

<?php echo $this->cartClass->displayButton(JText::_('CONTINUE_SHOPPING'),'continue_shopping',$this->params,'','window.parent.hikashop.closeBox(); window.parent.location.href = "www.yoursite.com"; return false;','id="hikashop_add_to_cart_continue_button"'); ?>

It's strange that sometimes the cart is cleared, that should not be the case. The code do only a redirection, it does nothing on the update cart.

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

  • Posts: 22
  • Thank you received: 0
  • Hikashop Business
3 years 9 months ago #176402

Where do I have to place this code?

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

  • Posts: 6
  • Thank you received: 0
  • Hikashop Essential
3 years 9 months ago #176409

That last code definitely does not work. The notice window does not close at all.
What I am using at the moment that seems to work with Explorer, but not with firefox and Chrome, at least on my two computers, is this code. It will close the notice box and on the second try, and updates the shopping cart. Now if I clear all history in (both chrome and firefox), the notice box performs correctly, closing and updating the shopping cart. Can't expect our customers to do that though. I hope we can find the reason for this, but I'm out of time for the moment.
Using this code in checkout>notice.php (I've included the entire div line to help Edgar68 understand where it goes also:

<div id="hikashop_add_to_cart_continue_div">
     <?php echo $this->cartClass->displayButton(JText::_('CONTINUE_SHOPPING'),'continue_shopping',$this->params,'','window.top.location.href=\'www.yoursite.com\'; return false;','id="hikashop_add_to_cart_continue_button"');?>
  </div>

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

  • Posts: 13201
  • Thank you received: 2316
  • MODERATOR
3 years 9 months ago #176454

Hi,

Don't you have any cache enabled which could interact with the cart content ?
I just tried the code on my end again, and no issue, the popup is well closed on any browsers, the cart is correctly updated.

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

  • Posts: 138
  • Thank you received: 1
  • Hikashop Business
1 year 4 months ago #267470

Hi,

problem fixed

Last Edit: 1 year 4 months ago by extreme.

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

  • Posts: 12
  • Thank you received: 0
  • Hikashop Business
3 months 4 days ago #292809

Hi !

I'm in the same situation with the last version of Hikashop. Not able to make it work with solutions proposed before ....
An idea of the problem ?

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

  • Posts: 1809
  • Thank you received: 249
  • MODERATOR
3 months 4 days ago #292819

Hello,

Since the start of this topics lots of things change, so right now it's difficult to have theory.
In order to progress can you provide an url link to process some tests ?

Don't forget to check you Url insert, here :



Awaiting news from you.
Regards

Last Edit: 3 months 4 days ago by Philip.

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

  • Posts: 12
  • Thank you received: 0
  • Hikashop Business
3 months 4 days ago #292835

thx for your answer ! I did it and it's working in the checkout page ....but its not working in the pop up button which appear when i put a product in the cart....don't know why..
You can have a look here

An idea of the problem ?

Thx for your help

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

  • Posts: 11723
  • Thank you received: 1626
  • MODERATOR
3 months 3 days ago #292839

Hello,

The "Continue shopping" button through the add to cart popup is only supposed to close the popup, if you want change it, you'll have to edit the "Notice" file of the "Checkout" view of your front-end template.

Best regards,
Mohamed Thelji.

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

  • Posts: 12
  • Thank you received: 0
  • Hikashop Business
2 months 6 days ago #294088

Thx for your answer.
An idea of what i have to put in this file to custom the URL ?

Thx for your help

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

  • Posts: 63031
  • Thank you received: 9058
  • MODERATOR
2 months 6 days ago #294100

Hi,

I think Mohamed overlooked the fact that you're using the new add to cart system and not the legacy one.
The checkout/notice.php view file is only used with the legacy add to cart system so changing something there won't help in your case.
You would have to edit the line:

{text:"'.JText::_('CONTINUE_SHOPPING', true).'",type:"submit",className:"vex-dialog-button-primary",click:function continueClick(){}}
and change it to something like:
{text:"'.JText::_('CONTINUE_SHOPPING', true).'",type:"submit",className:"vex-dialog-button-primary",click:function  proceedClick(){window.location="XXX";}}
in the file plugins/hikashop/cartnotify/cartnotify.php where XXX is the URL that you want when you click on the "continue shopping" button.

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

  • Posts: 12
  • Thank you received: 0
  • Hikashop Business
2 months 5 days ago #294132

Super ! Merci ça répond à ma question et ça fonctionne.

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

Time to create page: 0.129 seconds
Powered by Kunena Forum