continue shopping button forwards to wrong page

  • Posts: 137
  • Thank you received: 2
13 years 4 months ago #20377

Hi!

I already changed the value in the field "Continue shopping button's URL" in Hikashops Backend configuration, but if you click on the button you are forwarded to a weird page with the URL "http:/.../home/checkout/notice/index.php?option=com_hikashop&view=product&layout=listing&Itemid=111" and the content of the popup is displayed on the website (see attached screenshot).

Best regards

Attachments:

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

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
13 years 4 months ago #20411

The option "Continue shopping button's URL" if only for the continue button on the checkout.Not for the one in the popup. The one in the popup should just close the popup.
What's happening is that you have a javascript error on the page and when you click on the link, it can't close the popup and just display the notice view.

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

  • Posts: 137
  • Thank you received: 2
13 years 4 months ago #20483

So I used the original view and now the notice pop-up just closes when clicking on continue shopping. Is it possible, that this button forwards to a given URL?

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

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
13 years 4 months ago #20520

Yes. Edit the file notice of the view checkout via the menu Display->Views and change the line:
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"');

to:
echo $this->cartClass->displayButton(JText::_('CONTINUE_SHOPPING'),'continue_shopping',$this->params,'','window.top.location=\' mywebsite.com/mylink\';return false;','id="hikashop_add_to_cart_continue_button"');

Last edit: 13 years 4 months ago by nicolas.

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

  • Posts: 137
  • Thank you received: 2
13 years 4 months ago #20537

this code doesn't work!

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

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
13 years 4 months ago #20563

Try like that:
echo $this->cartClass->displayButton(JText::_('CONTINUE_SHOPPING'),'continue_shopping',$this->params,'','window.top.location=\'mywebsite.com/mylink\';return false;','id="hikashop_add_to_cart_continue_button"');

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

  • Posts: 137
  • Thank you received: 2
13 years 4 months ago #20601

This code opens this URL: http://.../mybio/home/checkout/notice/mywebsite.com/mylink and looks exactly like the screenshot in my first post!

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

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
13 years 4 months ago #20626

Of course, you need to replace the text mywebsite.com/mylink by your link...

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

  • Posts: 137
  • Thank you received: 2
13 years 4 months ago #20676

This code doesn't open link mywebsite.com/mylink it opens http://..../mybio/home/checkout/notice/mywebsite.com/mylink and therefore doesn't work!

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

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
13 years 4 months ago #20693

You need to add http:// at the beginning of your link, otherwise the SEF system of joomla prepends the url of your page to your link.

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

  • Posts: 137
  • Thank you received: 2
13 years 1 month ago #27511

nicolas wrote:

You need to add http:// at the beginning of your link, otherwise the SEF system of joomla prepends the url of your page to your link.

Is there another solution? It's a bit of an issue if a user accesses our website with https and is suddenly forwarded to http when clicking the "continue shopping"-button.

Best regards

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

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
13 years 1 month ago #27512

Well, you can add https:// at the beginning then.

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

  • Posts: 137
  • Thank you received: 2
13 years 1 month ago #27571

nicolas wrote:

Well, you can add https:// at the beginning then.

We would like to have a solution which DOESN'T change the protocol ;-)

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

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
13 years 1 month ago #27584

Then you should just change the code to use the current protocol...like that:
echo $this->cartClass->displayButton(JText::_('CONTINUE_SHOPPING'),'continue_shopping',$this->params,'','window.top.location=\'http'.(hikashop_isSSL()? 's' : '').'://mywebsite.com/mylink\';return false;','id="hikashop_add_to_cart_continue_button"');

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

  • Posts: 137
  • Thank you received: 2
13 years 1 month ago #27693

Thanks, works perfect!

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

  • Posts: 137
  • Thank you received: 2
13 years 2 days ago #30684

Is it possible to change the code, that it does not contain the URL? We have different servers for development, testing and production and the "continue shopping" button now always links to the production server.

Best regards

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

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
13 years 1 day ago #30726

Maybe.
You can try that:
echo $this->cartClass->displayButton(JText::_('CONTINUE_SHOPPING'),'continue_shopping',$this->params,'','window.top.location=\''.JRoute::_('index.php?option=com_content').'\';return false;','id="hikashop_add_to_cart_continue_button"');
where index.php?option=com_content is your URL without the website URL.
But if that doesn't work, then it's not possible.

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

  • Posts: 137
  • Thank you received: 2
12 years 11 months ago #31192

Hi!

I used

echo $this->cartClass->displayButton(JText::_('CONTINUE_SHOPPING'),'continue_shopping',$this->params,'','window.top.location=\''.JRoute::_('index.php').'\';return false;','id="hikashop_add_to_cart_continue_button"');

and it works.

I do have the same problem with the "continue shopping" button in the checkout view "step". How can I solve the problem there?

Best regards

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

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
12 years 11 months ago #31220

The continue shopping button on the checkout uses the URL that you set in the option "Continue shopping button's URL" of the configuration.
You can set it to index.php for example and it will work on any domain name.

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

  • Posts: 137
  • Thank you received: 2
12 years 11 months ago #31971

After setting the option to "index.php", you will be forwarded to " site.com/component/hikashop/ " which is a blank site only with the navigation.

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

Time to create page: 0.082 seconds
Powered by Kunena Forum