Have product links direct to custom url

  • Posts: 32
  • Thank you received: 1
4 years 4 months ago #325477

-- HikaShop version -- : 4.4.0
-- Joomla version -- : 3.9.19
-- PHP version -- : 7.4

Howdy.

I'm using custom pages for my products and want to know if there's a way to direct product links (such as when clicking a product name in the orders page) to this custom page instead of the Hikashop product page.
Obviously this would need to be a different URL for each product, and would need to work site-wide (so if I use a random products module then those links would point to the custom pages too).

Last edit: 4 years 4 months ago by jeffmcbiscuit.

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

  • Posts: 83404
  • Thank you received: 13498
  • MODERATOR
4 years 4 months ago #325484

Hi,

Enter the URL you want in the "canonical URL" setting of the product and activate the "force canonical URL on listings" setting in the HikaShop configuration and everywhere HikaShop displays a link to the product, it will then use the link from the canonical URL field instead of generating the URL dynamically.

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

  • Posts: 32
  • Thank you received: 1
4 years 4 months ago #325516

Amazing! I'll check it out tomorrow

The following user(s) said Thank You: Philip

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

  • Posts: 32
  • Thank you received: 1
4 years 4 months ago #325545

Hi @nicolas, this seems to have worked everywhere except on the file download page, where the product still links back to the hika product page. How do I fix that?

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

  • Posts: 83404
  • Thank you received: 13498
  • MODERATOR
4 years 4 months ago #325550

Hi,

You're correct. We didn't modify the code there to have it take into account the canonical URL.
I've made a patch for that.
Download again the install package of HikaShop on our website and install it on yours and it will add that patch and the link there will then be correct.

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

  • Posts: 32
  • Thank you received: 1
4 years 4 months ago #325561

Do I assume that won't affect any of the view changes I've made?

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

  • Posts: 83404
  • Thank you received: 13498
  • MODERATOR
4 years 4 months ago #325565

Hi,

If you made your changes via the menu Display>Views we provide in the backend, then yes, you won't loose them as they are saved as view overrides in the html folder of your template.
However, if you edit the original views directly via FTP, then you will loose your change if you install the install package, or update HikaShop in the future.

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

  • Posts: 32
  • Thank you received: 1
4 years 4 months ago #325740

Hi Nicolas. I downloaded the Essential package from the site again and installed it but the links in the downloads area are still pointing to the Hika pages and not the canonical.

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

  • Posts: 83404
  • Thank you received: 13498
  • MODERATOR
4 years 4 months ago #325755

Hi,

Then maybe your template has a view override on the view I had to modify.
Check if you have the file templates/YOUR_TEMPLATE/html/com_hikashop/user/downloads.php
If you do, rename it to deactivate the override and it should display fine.
If not, please provide a backend access, a link to the download area and a frontend user account with a download with the issue so that we can check on the issue directly.
You can provide all that along with a link to this thread via our contact form:
www.hikashop.com/support/contact-us.html

The following user(s) said Thank You: jeffmcbiscuit

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

  • Posts: 32
  • Thank you received: 1
4 years 4 months ago #325772

Yep, that sorted it. Cheers man.

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

Time to create page: 0.047 seconds
Powered by Kunena Forum