News:

You may pay someone to create your store, or you visit our seminar and become a professional yourself with the silver certification

Main Menu

Displayed: COM_VIRTUEMART_UNIT_SYMBOL_pièce

Started by Mister Paul, September 04, 2019, 17:45:43 PM

Previous topic - Next topic

Mister Paul

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

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

#2
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

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

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.
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

StefanSTS

Quote from: Mister Paul on September 04, 2019, 19:27:21 PM

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

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:$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!