Eaystore 3.0 Discounts Display - Question | JoomShaper

is live, now with multi-currency selling.

Eaystore 3.0 Discounts Display

Stephane Hanrez

Stephane Hanrez

EasyStore 1 week ago

Since updating EasyStore to version 3.0.0, discount values are displayed with 5 decimal places. It looks like it's due to the fact you updated the DB field to allow 5 decimals, which is fine, but is annoying in terms of diplay on a webpage.

For example, a discount that should normally appear as:

10.00%

is displayed as:

10.00000%

Could you please check this and either force to 2 decimal or add a way for users to select what they want to display?

Thank you.

0
6 Answers
Toufiq
Toufiq
Accepted Answer
Senior Staff 1 week ago #234301

Hi there,

Thank you for reaching out, and I apologize for any inconvenience caused by this oversight. Please make sure that your settings as like as screenshot.

https://prnt.sc/yoEr4cgipnwM

Best regards,

Toufiqur Rahman (Team Lead, Support)

0
Stephane Hanrez
Stephane Hanrez
Accepted Answer
1 week ago #234303

I checked and my settings are indeed as in your screenshots (decimals for currency set to 2).

The issue is not with currency but with discounts %, instead of showing "10.00% off", the badge is showing "10.00000% off".

0
Toufiq
Toufiq
Accepted Answer
Senior Staff 1 week ago #234305

Could you kindly grant me access to your Joomla administrator area so that I can investigate the issue you're experiencing? Prior to providing access, please ensure that you have backed up your site. Additionally, it's important to note that providing login credentials is entirely voluntary on your part; we respect your decision either way. However, if you do choose to share the login details, it would greatly expedite the resolution process. Thank you for your cooperation.

0
Toufiq
Toufiq
Accepted Answer
Senior Staff 1 week ago #234395

I am waiting for your response. Thanks

0
Stephane Hanrez
Stephane Hanrez
Accepted Answer
1 week ago #234419

Hi,

Sorry, I missed your message.

Anyway, you won't see much on my website because in the meantime I have added an override to correct this.

I have simply changed in file templates/allura/html/layouts/com_easystore/badge.php

$discount_value . '%' to number_format((float) $discount_value, 2, '.', '') . '%'

In Easystore 2.1.0, this was ok, because the column in the DB table was only allowing 2 decimals. In 3.0.0, you changed the column to 5 decimals, and as far as you just push the value as it is, it was showing as 10.0000%

0
Toufiq
Toufiq
Accepted Answer
Senior Staff 5 days ago #234449

I will share this information to our developer team to check this issue. Thank you

0