Translate dimension on product listing page

  • Posts: 77
  • Thank you received: 10
  • Hikaserial Standard Hikashop Business
2 years 10 months ago #341026

-- HikaShop version -- : 4.4.3

Dear Hika team,

I always had the weight and dimensions shown on the product listing page using this code in the listing_img_title view:

<?php echo round($this->row->product_weight, 2) . ' ' . $this->row->product_weight_unit; ?>

Now I have made the dimension cl a language string as I am in the process of making my site multilingual. It is translated now on the product detail page, but not on the product listing page.

Can I add something to the code in the view so that it also appears as translated on the product list?

Thanks in advance

Attachments:

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

  • Posts: 83402
  • Thank you received: 13495
  • MODERATOR
2 years 10 months ago #341027

Hi,

You need to change:
$this->row->product_weight_unit
to:
hikashop_translate($this->row->product_weight_unit)

The following user(s) said Thank You: HSD

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

  • Posts: 77
  • Thank you received: 10
  • Hikaserial Standard Hikashop Business
2 years 10 months ago #341043

Thank you very much Nicolas.
Works like a charm!

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

Time to create page: 0.055 seconds
Powered by Kunena Forum