Hide Weight per Unit on certain value?

  • Posts: 59
  • Thank you received: 9
1 year 11 months ago #341305

-- url of the page with the problem -- : avonlifestyle.nl/voordeelsets/sets-dames...ising-vitamine-c-set
-- HikaShop version -- : 4.4.3

Hi Hika team,

I would like to enable the show weight per unit option on the product detail pages.
The problem is that I also sell product sets. I translated the dimension CL into -delig so it shows on the product listing page and the product detail page as for example 4-delig (means 4 pieces).

When I enable show weight per unit then -delig is also shown as per unit.
Is there a way to exlude this somewhere in the view that when the value is -delig than it won't show?

Thanks in advance.

Attachments:

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

  • Posts: 81504
  • Thank you received: 13064
  • MODERATOR
1 year 11 months ago #341308

Hi,

Yes.
You can edit the file product / listing_price via the menu Display>Views and change the line:

if($this->params->get('show_price_weight')){
to:
if($this->params->get('show_price_weight') && !empty($this->row->product_weight_unit) && $this->row->product_weight_unit != 'cl'){

The following user(s) said Thank You: HSD

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

  • Posts: 59
  • Thank you received: 9
1 year 11 months ago #341313

Works like a charm!

Again thank you very much Nicolas.

The following user(s) said Thank You: nicolas

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

Time to create page: 0.061 seconds
Powered by Kunena Forum