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

Round total price

Started by aravir, June 30, 2020, 14:19:53 PM

Previous topic - Next topic

aravir

Hello,
is it possible to round total order price to integers? I know there is very complex section for rounding of product prices in virtuemart settings, but i didnt found rounding total price.
I need to round final product prices to 2 decimal place, which works fine, and total price to 0 decimal places (whitch i dont know how to set).

Example:
I have 2 products, each 2 pieces in cart, 1st one cost 22.29 and 2nd one cost 10.29.
Now total is 2*22.29 + 2*10.29 = 65,16
i need to round it to 65.

It has to be really rounded (not only front-end displayed number), because when customer pays online, i need him to pay exactly 65, not 65,16.

Thanks for help
Mojmír

widcater

Hi,
      Basically,  You need to customize the codes of cart part  ,  But you still need to consider how to deal with the tax and shipping fee and make sure the invoice in backend is same fee .


Kevin
www.vm2x.com
Pinterest Rich Pin Plugin Extension For VM3
Adyen Card payment plugin for VM3
Facebook Commerce Catalog CSV Creator For VM3
Saferpay Payment Plugin for VM3

aravir

#2
Quote from: widcater on July 01, 2020, 06:13:15 AM
Hi,
      Basically,  You need to customize the codes of cart part  ,  But you still need to consider how to deal with the tax and shipping fee and make sure the invoice in backend is same fee .


Kevin

Thx for reply. We will manage, but i have hoped, there is existing solution. In this particular case, virtuemart invoices arent issue fortunately.

Actually i cant believe that there is not built-in feature for that. In Czech republic (and i believe in many other countries) its normal to have invoices (total price to be paid) rounded to integers (we even dont have coins/banknotes with value less then 1 Kč). For many B2C e-shops its fine to round product prices to integers as well, but for wholesale B2B e-shop selling many pieces of cheap products or e-shops with weighed goods etc., thats not possible.

I guess it would be better to be "core" function, is there possibility to add it somewhere as nice-to-have future feature?


pinochico

I like the term nice-to-have future feature.
It sounds like 50 programming hours without an economic result, because one minority in the Czech Republic wants it

Make no mistake, there are many e-shops in the Czech Republic that sell in Euros and there, it is bad to round the total amount to whole numbers.
At the same time, there are many e-shops in the Czech Republic, where the creation of an invoice takes place outside the e-shop and payment by bank transfer.

You just want your insight.
We always deal with it as an override template. Try it too.
www.minijoomla.org  - new portal for Joomla!, Virtuemart and other extensions
XML Easy Feeder - feeds for FB, GMC,.. from products, categories, orders, users, articles, acymailing subscribers and database table
Virtuemart Email Manager - customs email templates
Import products for Virtuemart - from CSV and XML
Rich Snippets - Google Structured Data
VirtueMart Products Extended - Slider with products, show Others bought, Products by CF ID and others filtering products