how to use one menu(url) for product listing?

  • Posts: 490
  • Thank you received: 2
8 years 6 months ago #257181

-- HikaShop version -- : 2.6.3
-- Joomla version -- : 3.4.5
-- PHP version -- : 5.5
-- Error-message(debug-mod must be tuned on) -- : none

hi

i have created different instances of the product listing menu. My problem now is that one product has many urls.

i know of the canonical url but is it possible to just change the url of the other product listing similar to modules? on the modules there is an option to select a menu.

Can we do this on menu links as well?

thanks

Last edit: 8 years 6 months ago by ronron.

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

  • Posts: 83993
  • Thank you received: 13605
  • MODERATOR
8 years 6 months ago #257192

Hi,

No, there is no option to select another menu for the links of the current menu.
Because normally, you don't want to switch from one menu item to another for the links of the pages of one menu.
The canonical URL is indeed a solution here, and that's the only solution I can see available, unless you change the code of the views in HikaShop.
For example, in the file "listing_img_title" of the view "product", you can see that the link is constructed like that:

$link = hikashop_contentLink('product&task=show&cid='.$this->row->product_id.'&name='.$this->row->alias.$this->itemid.$this->category_pathway,$this->row);
So what you can do is change $this->itemid before that line to set the Itemid parameter yourself.
For example, like that:
$this->itemid = '&Itemid=18';
where 18 is the id of your menu item.
And all the links of all the menu items and modules using the layout "image and title" will use that menu item automatically unless they have a canonical URL and you turned on the "force canonical URLs on listings" setting.

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

Time to create page: 0.052 seconds
Powered by Kunena Forum