Jump to content

Recommended Posts

HI!

Is there a way to disable round price option in prestashop?

I want  prices stay stable without rounding in any direction at all.

 

 

Share this post


Link to post
Share on other sites

I might be mistaken, but I think you should remove every single instance of Tools:ps_round(), and other rounding functions you find in every file :(

Share this post


Link to post
Share on other sites

Hi Nemo,

 

as you said, for example for this line of code : 

 

$product['total_wt'] = Tools::ps_round($product['total_wt'] - $product['price_wt'], (int)$currency->decimals * _PS_PRICE_DISPLAY_PRECISION_);

 

how will it be at the end ?

 

Regards,

Share this post


Link to post
Share on other sites

I just thought that it might be enough to modify the core function and simply return the same content it's inputted, so you don't have to change every occurrence. THis way there will never be any rounding though

Share this post


Link to post
Share on other sites

I just thought that it might be enough to modify the core function and simply return the same content it's inputted, so you don't have to change every occurrence. THis way there will never be any rounding though

Hi !

 

In Prestashop 1.6. go into localization->Currencies. Pick up your currency and edit it. You need to enable decimal.

For Prestashop 1.5.x go into localization->Currencies. Pick up your currency and edit it. Please select appropriate Currency Format.

 

Thanks

 

Bhavesh

www.digitalmodule.net 

  • Like 2

Share this post


Link to post
Share on other sites

Hello,

 

Will you please elaborate on how to disable the rounding feature in the cart?

 

Which files need to be edited?

 

Will commenting out the line of code be sufficient?

 

How will this line of code look after it is edited? $product['total_wt'] = Tools::ps_round($product['total_wt'] - $product['price_wt'], (int)$currency->decimals * _PS_PRICE_DISPLAY_PRECISION_);

 

Rounding up the weight is fine because carriers will do this when they calculate the shipping cost. I only want to disable rounding up/down the product pricing and product discounts.

 

Thanks in advance for your reply.

Share this post


Link to post
Share on other sites

Hello,

 

Will you please elaborate on how to disable the rounding feature in the cart?

 

Which files need to be edited?

 

Will commenting out the line of code be sufficient?

 

How will this line of code look after it is edited? $product['total_wt'] = Tools::ps_round($product['total_wt'] - $product['price_wt'], (int)$currency->decimals * _PS_PRICE_DISPLAY_PRECISION_);

 

Rounding up the weight is fine because carriers will do this when they calculate the shipping cost. I only want to disable rounding up/down the product pricing and product discounts.

 

Thanks in advance for your reply.

you can access admin. 

 

localization->currency ==>edit you currency(ex: dolla,vnd...)

then check at Decimals.

i'm sorry,my english very bad,

'.()

Share this post


Link to post
Share on other sites

We have to disable rounding because we use prices like 35,37 Ft (Tax Excluded) but the presta show just 35 Ft.The customer see if he buy 100 pieces: 3537 Ft.

We think this is frustrating for the customers.

 

Can any one explain how to disable it in 1.6.1.4?

 

Thank you!

Share this post


Link to post
Share on other sites

HI!

Is there a way to disable round price option in prestashop?

I want  prices stay stable without rounding in any direction at all.

 

Hello, did you find a solution for this?

Having the same problem...

Share this post


Link to post
Share on other sites

Some kind of rounding is inevitable, prices cannot display like 3.438593476958

Share this post


Link to post
Share on other sites

Some kind of rounding is inevitable, prices cannot display like 3.438593476958

 

Hello NemoPS,

I agree with you, but how do we explain the situation to the costumer?

 

In our case for ex:

 

Product A -> price per unit -> 1.38€ -> qtd 12 -> 16.56€

Product B -> price per unit -> 1.22€ -> qtd 6 -> 7.32€

 

 

Total should be 16.56€ + 7.32€ = 23.88€

We are getting 16.56€ + 7.32€ = 23.91€

 

Any advise on this?

Or how should it be configured to at least be as accurate as possible :(

 

 

Tks

Share this post


Link to post
Share on other sites

I understand your frustration. Unfortunately, rounding has always been an issue with prestashop. What I did in a few cases was going through the code, especially for PriceCalculation of the Product.php class, and remove all instances manually, then use it at the very end of the function

Share this post


Link to post
Share on other sites

I understand your frustration. Unfortunately, rounding has always been an issue with prestashop. What I did in a few cases was going through the code, especially for PriceCalculation of the Product.php class, and remove all instances manually, then use it at the very end of the function

 

Hummm.... Well, thanks for the feedback!

Since i'm not a programmer this will be an impossible task for me.

 

Thank you!

Share this post


Link to post
Share on other sites

Same problem and for me.

I  want the prices stay stable and to disable round price option in 1.7.6.1.

Any solution or any module to do this?

Edited by hairmania (see edit history)

Share this post


Link to post
Share on other sites

Hi,

I also have an issue with rounded numbers. Prestashop 1.7.6.1 using "Round up to nearest value" "Number of decimals: 0". 

In product pages the price is show ok, like 18,00. The problem is, when a client click "Add to cart" in the windows that pops-up, right under the item the not-rounded price is displayed. Then also in the email that the client receives with that table containing his order, the Prier per Unit is displayed as not-rounded price. And because of this we are still unable to go live with the shop. Anybody have any idea on how to fix this? Thanks 

Annotation 2019-11-09 231241.jpg

Share this post


Link to post
Share on other sites

Hello 

I updated the module shopping cart to the latest version and the prices comes again to  normal.

 

Giannis

Share this post


Link to post
Share on other sites
22 minutes ago, hairmania said:

Hello 

I updated the module shopping cart to the latest version and the prices comes again to  normal.

 

Giannis

Just did that. Issue is still there.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More