product

  • Posts: 222
  • Thank you received: 1
10 years 1 month ago #208999

-- HikaShop version -- : latest
-- Joomla version -- : latest

Hi,

How can I show different units in different categories on product listing page:
first category: per piece (I made text override "per unit" to " " and now all is goed in that category, is showing just €15)
But in other category I sell per piece, but each product in 3 different packages (bottles):
5 ml (gr) - €5,
15 ml (gr) - €9,
50 ml (gr) - €23
I can't add two overrides, just one is possible.
I want to show all three prices.
Weight is important for shipping too, but I can add just one weight in "RESTRICTIONS AND DIMENSIONS". I see, that I can change price only per Qty and not per volume.

Can you help me?

Thanks, Vero

Last edit: 10 years 1 month ago by Vero.

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

  • Posts: 13201
  • Thank you received: 2322
10 years 1 month ago #209047

Hi,

The best way to handle the weight will be to use the variants, so you can create a characteristic name "volume" for example, and then add this characteristic to your main product, then edit the variants and set the desired weight per variants.

Regarding the units display based on the category it will require some custom code, the view to edit is "product / listing_price".
Then you can use that kind of code:

if($this->row->product_category_id == 'XX'){
echo '<span class="hikashop_product_price_per_unit">'.JText::_('UNIT1').'</span>';
}elseif($this->row->product_category_id == 'YY'){
echo '<span class="hikashop_product_price_per_unit">'.JText::_('UNIT2').'</span>';
}else{
echo '<span class="hikashop_product_price_per_unit">'.JText::_('PER_UNIT').'</span>';
}

Then add translation overrides on the new created keys, and replace 'XX' and 'YY' by the desired category ids.

www.hikashop.com/support/faq.html#tran
www.hikashop.com/support/support/documen...ize-the-display.html

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

Time to create page: 0.063 seconds
Powered by Kunena Forum