Global on Listings only for one subcategory

  • Posts: 3
  • Thank you received: 0
9 years 11 months ago #217837

-- HikaShop version -- : 2.6.0
-- Joomla version -- : 3.4.4

I was not able to find the full answer in this forum and it seems that something has been changed with HS 2.6.0. I have different categories and subcategories all with the same product listing (also with override). I want one subcategory a complete different layout (more columns and rows, less info on products) with also the quantity field display set on "Global on listings". But the latter only for this subcategory, all other categores should remain "Normal input". In the previous versions you had associated products listings but that seems not working anymore.

Can you help? Thanks.

Forgot to mention that I want to enter this subcategory by clicking on this subcategory in the category list (in he content), so not via a seperate menu.

Last edit: 9 years 11 months ago by peterwijn.

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

  • Posts: 13201
  • Thank you received: 2322
9 years 11 months ago #217907

Hi,

The best way will be to edit directly the view "product / listing_div" (or listing_table, listing_list based on your settings) and force a setting based on the category, something like:

if($this->row->product_category == 'XX'){
    $this->params->set('show_quantity_field',2);
    // same thing for the other settings
}

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

  • Posts: 3
  • Thank you received: 0
9 years 11 months ago #217945

Hi Xavier,

Thanks a lot. I did a small change:
if(in_array($this->element->category_id,array('XX')))

And this works great.

Thanks again,
Peter.

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

Time to create page: 0.071 seconds
Powered by Kunena Forum