Author Topic: Displayed: COM_VIRTUEMART_UNIT_SYMBOL_pièce  (Read 335 times)

Mister Paul

  • Jr. Member
  • **
  • Posts: 215
  • Joomla! 3.9.6 - VirtueMart 3.4.2
Displayed: COM_VIRTUEMART_UNIT_SYMBOL_pièce
« on: September 04, 2019, 17:45:43 pm »
Hi,

In category listed products and in product page I see this text : COM_VIRTUEMART_UNIT_SYMBOL_pièce:
https://www.cjoint.com/doc/19_09/IIeptTPShiU_Capture-2019-09-04-à-17.15.36.jpg
https://www.cjoint.com/data/IIepvnAlDmU_Capture-2019-09-04-à-17.15.01.jpg

I don't know how I could act on this text:
- I can't know why this extra line is displayed: I don't see any checkbox with the option to show the price per item. And other products from other categories don't have this extraline.
- If I try to edit the language file /language/fr-FR/fr-FR.com_virtuemart.ini on this line: COM_VIRTUEMART_UNIT_SYMBOL_PIECE="pièce"
it doesn't affects the displayed text
(by the way I don't have any /language/en-GB/en-GB.com_virtuemart.ini but I have /components/com_virtuemart/languages/en-GB/en-GB.com_virtuemart.ini)

Any help?
 :-[

Thanks
Paul

StefanSTS

  • Global Moderator
  • Full Member
  • *
  • Posts: 518
  • VirtueMart Version: VM 4.2 on Joomla 4.5
Re: Displayed: COM_VIRTUEMART_UNIT_SYMBOL_pièce
« Reply #1 on: September 04, 2019, 18:25:24 pm »
Check in VM config what is written in the field for applicable units. Maybe send a screenshot like in the attachment.
--
Stefan Schumacher
www.jooglies.com - VirtueMart Invoice Layouts

Please use only stable versions with even numbers for your live shop! Use Alpha versions only if you know what risk you are taking.

Mister Paul

  • Jr. Member
  • **
  • Posts: 215
  • Joomla! 3.9.6 - VirtueMart 3.4.2
Re: Displayed: COM_VIRTUEMART_UNIT_SYMBOL_pièce
« Reply #2 on: September 04, 2019, 19:27:21 pm »
You put me on the way. Thanks!

I had to uncheck "Unit price" on configuration.
So now we don't see anymore this "COM_VIRTUEMART_UNIT_SYMBOL_pièce" in the page.
Perhaps some en-GB files are missing...

By the way, for "Applicable units", I have "KG,100G,M,SM,CUBM,L,100ML,P".
Not your "KG,100G,M,SM,CUBM,L,100ML,PC,AL"

StefanSTS

  • Global Moderator
  • Full Member
  • *
  • Posts: 518
  • VirtueMart Version: VM 4.2 on Joomla 4.5
Re: Displayed: COM_VIRTUEMART_UNIT_SYMBOL_pièce
« Reply #3 on: September 04, 2019, 20:30:52 pm »
Looks like strtoupper() is not working on your special character.

The full string should be in uppercase, but the accent breaks the function.
--
Stefan Schumacher
www.jooglies.com - VirtueMart Invoice Layouts

Please use only stable versions with even numbers for your live shop! Use Alpha versions only if you know what risk you are taking.

Milbo

  • Virtuemart Projectleader
  • Administrator
  • Super Hero
  • *
  • Posts: 9973
  • VM3.2 Cached and Optimized
    • VM3 Extensions
  • VirtueMart Version: VirtueMart 3 on joomla 3
Re: Displayed: COM_VIRTUEMART_UNIT_SYMBOL_pièce
« Reply #4 on: September 04, 2019, 21:23:02 pm »
I cannot access the images anylonger.
$unitPriceDescription = vmText::sprintf ('COM_VIRTUEMART_PRODUCT_UNITPRICE', vmText::_('COM_VIRTUEMART_UNIT_SYMBOL_'.strtoupper($product->product_unit)));

the product_unit should be here PC or AL, but not Piece or so.
I should fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

StefanSTS

  • Global Moderator
  • Full Member
  • *
  • Posts: 518
  • VirtueMart Version: VM 4.2 on Joomla 4.5
Re: Displayed: COM_VIRTUEMART_UNIT_SYMBOL_pièce
« Reply #5 on: September 05, 2019, 00:41:44 am »

By the way, for "Applicable units", I have "KG,100G,M,SM,CUBM,L,100ML,P".
Not your "KG,100G,M,SM,CUBM,L,100ML,PC,AL"

Is it possible, that the pièce is hidden behind that "...100ML,P...(here somewhere)", because the input field is too short?

My AL is a fictuous unit called Alumni to show how to make "your own" units like here:
https://php72.sts-hosting.de/vm3/de/diverses/alumni-einheit-detail
--
Stefan Schumacher
www.jooglies.com - VirtueMart Invoice Layouts

Please use only stable versions with even numbers for your live shop! Use Alpha versions only if you know what risk you are taking.

Mister Paul

  • Jr. Member
  • **
  • Posts: 215
  • Joomla! 3.9.6 - VirtueMart 3.4.2
Re: Displayed: COM_VIRTUEMART_UNIT_SYMBOL_pièce
« Reply #6 on: September 05, 2019, 09:40:53 am »
For me the images are displayed by clicking on the link.

I modified /components/com_virtuemart/sublayouts/prices.php with your code.
I get now: Prix / COM_VIRTUEMART_UNIT_SYMBOL_PIèCE:

I made some Google PHP research and replaced your code by:
Code: [Select]
$unitPriceDescription = vmText::sprintf ('COM_VIRTUEMART_PRODUCT_UNITPRICE', vmText::_('COM_VIRTUEMART_UNIT_SYMBOL_'.strtoupper(\Transliterator::create('NFD; [:Nonspacing Mark:] Remove; NFC')
->transliterate($product->product_unit))));

I don't know if that's the best way to do,
but it works fine now.

Thank you Stefan & Milbo!