Simple URL to category listing

  • Posts: 31
  • Thank you received: 3
11 years 6 months ago #69855

Can anyone help me create a url to a HikaShop category listing (ie all the products in one category). I can do this via a menu fine, but in one page I need to proved a URL instead.. obviously something like:

<a href="index.php?option=com_hikashop&view=category&layout=listing">Clothing</a>

rather than
<a href="/myshop/productname">Clothing</a>

Many thanks

Steve

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

  • Posts: 12953
  • Thank you received: 1778
11 years 6 months ago #69859

Hi Steve,

You should maybe :
- Go to "Hikashop->System->Configuration->Main"
- Use "Simplified breadcrumbs" and "Activate smaller url" options

Hope this will help you.

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

  • Posts: 31
  • Thank you received: 3
11 years 6 months ago #69861

Hi Mohamed,

Yes, these are enabled. I have no problem with the URL's which are SEF etc

My question is actually probably simpler than you think.

I want to add a URL in an article that will get me all the products in a category in HikaShop. I could of course just put

<a href="/shop/category-name">Category name</a>
but if I change the category name or the menu item that links here then the link will no longer work.

Instead I thought it might be possible to code into the article something like
<a href="index.php?option=com_hikashop&view=category&layout=listing&categoryID=32">Category name</a>
which will always result in the link going to that category ID and getting all the products, (the same as my menu item does).

Steve

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

  • Posts: 81564
  • Thank you received: 13074
  • MODERATOR
11 years 6 months ago #70031

yes you can use such links:
<a href="index.php?option=com_hikashop&view=category&layout=listing&cid=32&Itemid=XXX">Category name</a>

where 32 is your category id and XXX is the id of a category listing menu from which HikaShop will use the display options for the listing.

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

  • Posts: 31
  • Thank you received: 3
11 years 6 months ago #70241

Thanks for the response.

For anyone else tryining this, it kind of works - in that the link Nicolas suggests will get you to the correct listing, but I was hoping Joomla would also translate it into the menu item path. It doesn't - it gives you something like shop/clothing/category/cid-13

ie you have a menu called 'shop' which has a sub item called 'clothing' and the link that Jooomla creates from that menu item uses the menu item name ie yourswebsite.com/shop/clothing

On another page on the site I wanted to create a link to yourswebsite.com/shop/clothing without hard-coding the /shop/clothing bit (in case the naming changes to say 'mens clothing' in a year or so)

It isn't a big deal, and is probably my basic understanding of Joomla that is at fault.

Steve

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

Time to create page: 0.074 seconds
Powered by Kunena Forum