Skip to main content

Cart module links on shop home page

More
12 years 10 months ago #132523 by zzhumphreyt
-- url of the page with the problem -- : localhost
-- HikaShop version -- : 2.2.2
-- Joomla version -- : 3.2
-- PHP version -- : 5.3.24
-- Browser(s) name and version -- : Firefox 25
-- Error-message(debug-mod must be tuned on) -- : N/A

I've scoured the forums and gotten a lot of help, but one problem I haven't seen fully answered. I want my store to have a home page with some text and then show the list of categories and shopping cart on the sidebar. I also want SEF URLs for the categories and shopping cart even when I'm on this home page. I've gotten this to work by creating a regular Joomla article and a HikaShop Content Module for the categories and a HikaShop Cart Module for the shopping cart. I can set a menu within the options of the Content Module so that any links it displays are SEF even when I'm on the home page.

/store/categories/category1

But I can't set a menu for the Cart Module so if there are any products in the cart the URLs generated have the usual component data, not SEF

/component/hikashop/product/1-product

instead of what I would like

/store/product/1-product

Is this possible? Or to ask another way, why does the Cart Module not have a menu option like the Content Module?

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

More
12 years 10 months ago #132551 by Xavier
Hi,

By default on the HikaShop pages, the cart re-use the current menu, and when you are on Joomla pages, yes it take the standard url with component/hikashop ...

What can be done is editing the view "product / cart" via the menu Display > Views, and at the top of the file change the value for $url_item_id and change it to:
Code:
$url_itemid='&Itemid=YOUR_ID';
where YOUR_ID is the id of the desired menu.
The following user(s) said Thank You: zzhumphreyt

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

More
12 years 10 months ago #132568 by zzhumphreyt
That worked, thanks!

I doubt I'll be changing menus all that often but I still don't like having such a hard coded value in a view like that; seems very fragile and easy to forget I need to change the view as well as the menu. Maybe as a future enhancement you all could add a menu option for the cart module like you have for the content module.

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

Time to create page: 0.153 seconds
Powered by Kunena Forum