How to change the "Back" link

  • Posts: 114
  • Thank you received: 4
7 years 5 months ago #270698

-- HikaShop version -- : 3.1
-- Joomla version -- : 3.7
-- PHP version -- : 7.1

In all the views like ...?ctrl=order&task=show... there is a "Back" link displayed. I would need that button to link to the user profile, which in my case is provided by CB. Where can I cange that link?

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

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
7 years 5 months ago #270703

Hi,

That should already be the case.
I suppose that you have installed the integration with have with CB.
In that case, when you click on the link to access the order from the CB orders listing, the link has a parameter cancel_url which contains the CB profile URL so that when the user clicks on the cancel button, he is redirected to that URL.

If you want to force that URL, you can edit the file "show" of the view "order" via the menu Display>Views and change the line:

<input type="hidden" name="cancel_url" value="<?php echo JRequest::getString('cancel_url'); ?>" />

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

  • Posts: 114
  • Thank you received: 4
7 years 5 months ago #270978

Thanks. I installed the CB plugin but it says "This plugin is not compatible with your current CB version. This plugin may still be used, but it may not function properly."
Currently it seems to work but it could collaps with every new CB update. Might be a good idea to update your code soon?

EDIT: I reinstalled the CB plugin. Now it displays v 2.0.0 and CB does not give that warning anymore.

Last edit: 7 years 5 months ago by peteo.

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

  • Posts: 114
  • Thank you received: 4
7 years 5 months ago #272032

The correct "back" url is only displayed when the user is already on the website. When a user comes from the order notification email to that page it leads to the hikashop panel and not to the CB profile page as it should.

Last edit: 7 years 5 months ago by peteo.

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

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
7 years 5 months ago #272045

Hi,

When you access the order from the email, the system has no idea that you want to go to the profile of CB when you click on the back button. So no it's not "as it should", but "as you would like".

That's why I told you:

If you want to force that URL, you can edit the file "show" of the view "order" via the menu Display>Views and change the line:

<input type="hidden" name="cancel_url" value="<?php echo JRequest::getString('cancel_url'); ?>" />

So that way, you can force the URL you want for the back button, so that it always redirect to the CB profile, regardless of where you accessed the order from.

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

Time to create page: 0.063 seconds
Powered by Kunena Forum