Moderator: madimar

Post by agenziarc@yahoo.com » Sat May 21, 2022 11:27 pm

Ciao devo riportare i quantitativi a un decimale, cancellare i tre 0 dopo la virgola. Come devo fare? dal db non riesco....

Attachments

Screenshot_3.png

Screenshot_3.png (25.38 KiB) Viewed 1992 times


New member

Posts

Joined
Sun Jan 02, 2022 10:40 pm

Post by by mona » Sat May 21, 2022 11:39 pm

There are a number of ways to do that and it also will depend on your OC version but search for “number rounding" in google - it will provide php versions but it can also be done in twig.

DISCLAIMER:
You should not modify core files .. if you would like to donate a cup of coffee I will write it in a modification for you.


https://www.youtube.com/watch?v=zXIxDoCRc84


User avatar
Expert Member

Posts

Joined
Mon Jun 10, 2019 9:31 am

Post by agenziarc@yahoo.com » Sat May 21, 2022 11:56 pm

oc 3.0.3.8 mi dici dove posso andare a modificare?

New member

Posts

Joined
Sun Jan 02, 2022 10:40 pm

Post by by mona » Sun May 22, 2022 3:54 am

per favore suona così bello in italiano :-\

admin/view/template/catalog/product_form.twig

change

Code: Select all

value="{{ minimum }}" 
to

Code: Select all

value="{{ minimum|number_format(2) }}" 
You may have some other edit to it already so check your modification folders and remember to refresh cache.

DISCLAIMER:
You should not modify core files .. if you would like to donate a cup of coffee I will write it in a modification for you.


https://www.youtube.com/watch?v=zXIxDoCRc84


User avatar
Expert Member

Posts

Joined
Mon Jun 10, 2019 9:31 am
Who is online

Users browsing this forum: No registered users and 71 guests