The URL of my product detail page

  • Posts: 252
  • Thank you received: 1
7 years 4 months ago #255331

-- HikaShop version -- : 2.6.4

Hi,
I wrote a plugin to show a specific product in my page.
It works fine but when I link into the product detail, it hows the url with parameters, like:
index.php?option=com_hikashop&view=product&layout=show&cid=761
instead of alias, like it links directory from the hikashop product list, :
/index.php/product/772-tv熱銷安全車牌框

what should I do in my plugin, so my linkedin product shows the product name as the alias url.
Thanks in advance


Best regards

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

  • Posts: 81378
  • Thank you received: 13037
  • MODERATOR
7 years 4 months ago #255384

Hi,

You should have such code:

include_once(rtrim(JPATH_ADMINISTRATOR,DIRECTORY_SEPARATOR).DIRECTORY_SEPARATOR.'components'.DIRECTORY_SEPARATOR.'com_hikashop'.DIRECTORY_SEPARATOR.'helpers'.DIRECTORY_SEPARATOR.'helper.php');
echo hikashop_contentLink('product&task=show&cid=761&name=tv熱銷安全車牌框&Itemid=XXX');
Where XXX is the id of the default menu item id of your website.

The following user(s) said Thank You: twscott

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

Time to create page: 0.054 seconds
Powered by Kunena Forum