Unit in "price per unit" should be different per category

  • Posts: 80
  • Thank you received: 2
  • Hikashop Business
6 months 1 week ago #356028

-- url of the page with the problem -- : crux.nl/outdoor/gezinsprogrammas
-- HikaShop version -- : 4.7.4.
-- Joomla version -- : 4.3.2

Hi,

Depending on the product (the category the product is in) the Unit-name should be sometimes "per person" and sometimes "per family".
Is there an easy way to get that done?



Kind regards

Attachments:

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

  • Posts: 81590
  • Thank you received: 13079
  • MODERATOR
6 months 1 week ago #356029

Hi,

The simplest is to follow the instructions in the section "I sell packed products, how can I change "each" text in the product page ?" of our FAQ:
www.hikashop.com/support/documentation/106-faq.html

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

  • Posts: 80
  • Thank you received: 2
  • Hikashop Business
2 months 3 weeks ago #358850

I have tried the above way, and it worked half. I have been trying and trying.

But I cannot get it to work properly. It doesn't show the translation, but the value (in my case PER_PERSON in stead of per persoon).

Also the PRICE_BEGINNING is no longer been shown.

I am not a very good php programmer, but usually can read and understand what is going on.... But now....
I add the view as a attachment

File Attachment:

File Name: viewlisting_price.txt
File Size:11 KB

Attachments:
Last edit: 2 months 3 weeks ago by ezomerdijk.

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

  • Posts: 81590
  • Thank you received: 13079
  • MODERATOR
2 months 3 weeks ago #358853

Hi,

If you see the text "PER_PERSON" with that code, it means that the problem is with your translation overrides, not the PHP code.
You must have missed something in there.

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

  • Posts: 80
  • Thank you received: 2
  • Hikashop Business
2 months 3 weeks ago #358876

hi,

I think you are right. The weird thing is, that is doesn't seem to pick up the translation in de override file.
And now I see that there is never a translation from the override file.....What could be the problem there?

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

  • Posts: 80
  • Thank you received: 2
  • Hikashop Business
2 months 3 weeks ago #358881

OK, I turned on the "debug language" option and turns out I have some "enters" in the text. I'm pretty sure it wasn't a problem before (or I had something else there, that got lost somehow), but solved it now.

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

  • Posts: 81590
  • Thank you received: 13079
  • MODERATOR
2 months 3 weeks ago #358889

Hi,

Yes, old versions of Joomla used their own parser for language files and thus it accepted line returns inside text, even though it was not valid (as per Joomla documentation on that).
Newer versions of Joomla have switched to the parse_ini_file function of PHP for this, and it can't parse the files if they have line returns inside the text.

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

Time to create page: 0.060 seconds
Powered by Kunena Forum