[Skip to main content](#vessel-content)

#   Round Price in Mass Action Operation

##

- **[NTV](/forum/user/69623-ntv "View NTV's Profile")**
- [![NTV's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/69623-ntv "View NTV's Profile") Topic Author
- [ Offline](/forum/user/69623-ntv)

Less More

- Posts: 47
- Thank you received: 6
-

1 year 5 months ago [\#367029](#367029) by [NTV](/forum/user/69623-ntv "View NTV's Profile")  *[Round Price in Mass Action Operation](/forum/44-mass-actions/909392-round-price-in-mass-action-operation#367029 "-- HikaShop version -- : 5.1.6 -- Joomla version -- : 5.3.0 -- PHP version -- : 8.1.32 -- Browser(s) name and version -- : Firefox 138.0.1 (64-bit)  Hello, due to a percentage based increase in our prices, our price fields in the database have a lot of decimal points.  This has not been an issue for now, but now that we want to display the retail price, it is displayed as such: &quot;Price: 2,65 € (2,65 €)&quot;  When I manually get rid of the excess decimal points we have the behavior we want: &quot;Price: 2,65 €&quot;  How can I specify in a Mass Action to cut the decimal points off so only the first two remain?  Thanks in advance")* was created by *[NTV](/forum/user/69623-ntv "View NTV's Profile")*

-- HikaShop version -- : 5.1.6
-- Joomla version -- : 5.3.0
-- PHP version -- : 8.1.32
-- Browser(s) name and version -- : Firefox 138.0.1 (64-bit)

Hello,
due to a percentage based increase in our prices, our price fields in the database have a lot of decimal points.

This has not been an issue for now, but now that we want to display the retail price, it is displayed as such:
"Price: 2,65 € (2,65 €)"

When I manually get rid of the excess decimal points we have the behavior we want:
"Price: 2,65 €"

How can I specify in a Mass Action to cut the decimal points off so only the first two remain?

Thanks in advance

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQ0LW1hc3MtYWN0aW9ucy85MDkzOTItcm91bmQtcHJpY2UtaW4tbWFzcy1hY3Rpb24tb3BlcmF0aW9uP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86320
- Thank you received: 14279
-
-

1 year 5 months ago [\#367030](#367030) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Round Price in Mass Action Operation](/forum/44-mass-actions/909392-round-price-in-mass-action-operation#367030 "-- HikaShop version -- : 5.1.6 -- Joomla version -- : 5.3.0 -- PHP version -- : 8.1.32 -- Browser(s) name and version -- : Firefox 138.0.1 (64-bit)  Hello, due to a percentage based increase in our prices, our price fields in the database have a lot of decimal points.  This has not been an issue for now, but now that we want to display the retail price, it is displayed as such: &quot;Price: 2,65 € (2,65 €)&quot;  When I manually get rid of the excess decimal points we have the behavior we want: &quot;Price: 2,65 €&quot;  How can I specify in a Mass Action to cut the decimal points off so only the first two remain?  Thanks in advance")*

Hi,

I don't think that the solution is removing excess decimals.
I think that the price display behavior change comes from you manually saving the product in the backend, not changing the price decimals.
Creating a mass action to remove the decimals can be done with an action "update the values" on the "price_value" column, with the "operation" mode and the value: round(price.price_value,2)
But you might still have the problem after running that mass action.

The following user(s) said Thank You: [NTV](/forum/user/69623-ntv "View NTV's Profile")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQ0LW1hc3MtYWN0aW9ucy85MDkzOTItcm91bmQtcHJpY2UtaW4tbWFzcy1hY3Rpb24tb3BlcmF0aW9uP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[NTV](/forum/user/69623-ntv "View NTV's Profile")**
- [![NTV's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/69623-ntv "View NTV's Profile") Topic Author
- [ Offline](/forum/user/69623-ntv)

Less More

- Posts: 47
- Thank you received: 6
-

1 year 5 months ago [\#367036](#367036) by [NTV](/forum/user/69623-ntv "View NTV's Profile")  Replied by *[NTV](/forum/user/69623-ntv "View NTV's Profile")* on topic *[Round Price in Mass Action Operation](/forum/44-mass-actions/909392-round-price-in-mass-action-operation#367036 "-- HikaShop version -- : 5.1.6 -- Joomla version -- : 5.3.0 -- PHP version -- : 8.1.32 -- Browser(s) name and version -- : Firefox 138.0.1 (64-bit)  Hello, due to a percentage based increase in our prices, our price fields in the database have a lot of decimal points.  This has not been an issue for now, but now that we want to display the retail price, it is displayed as such: &quot;Price: 2,65 € (2,65 €)&quot;  When I manually get rid of the excess decimal points we have the behavior we want: &quot;Price: 2,65 €&quot;  How can I specify in a Mass Action to cut the decimal points off so only the first two remain?  Thanks in advance")*

Hi nicolas,

the round() function does exactly what I need and the display changed as expected - thank you!

Out of curiosity: How can I see which other functions are available? Do mass actions just use the mysql database functions or do they have their own code?

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQ0LW1hc3MtYWN0aW9ucy85MDkzOTItcm91bmQtcHJpY2UtaW4tbWFzcy1hY3Rpb24tb3BlcmF0aW9uP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86320
- Thank you received: 14279
-
-

1 year 5 months ago [\#367039](#367039) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Round Price in Mass Action Operation](/forum/44-mass-actions/909392-round-price-in-mass-action-operation#367039 "-- HikaShop version -- : 5.1.6 -- Joomla version -- : 5.3.0 -- PHP version -- : 8.1.32 -- Browser(s) name and version -- : Firefox 138.0.1 (64-bit)  Hello, due to a percentage based increase in our prices, our price fields in the database have a lot of decimal points.  This has not been an issue for now, but now that we want to display the retail price, it is displayed as such: &quot;Price: 2,65 € (2,65 €)&quot;  When I manually get rid of the excess decimal points we have the behavior we want: &quot;Price: 2,65 €&quot;  How can I specify in a Mass Action to cut the decimal points off so only the first two remain?  Thanks in advance")*

Hi,

It indeed just use the MySQL functions.

The following user(s) said Thank You: [NTV](/forum/user/69623-ntv "View NTV's Profile")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQ0LW1hc3MtYWN0aW9ucy85MDkzOTItcm91bmQtcHJpY2UtaW4tbWFzcy1hY3Rpb24tb3BlcmF0aW9uP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[NTV](/forum/user/69623-ntv "View NTV's Profile")**
- [![NTV's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/69623-ntv "View NTV's Profile") Topic Author
- [ Offline](/forum/user/69623-ntv)

Less More

- Posts: 47
- Thank you received: 6
-

1 year 5 months ago -  1 year 5 months ago [\#367044](#367044) by [NTV](/forum/user/69623-ntv "View NTV's Profile")  Replied by *[NTV](/forum/user/69623-ntv "View NTV's Profile")* on topic *[Round Price in Mass Action Operation](/forum/44-mass-actions/909392-round-price-in-mass-action-operation#367044 "-- HikaShop version -- : 5.1.6 -- Joomla version -- : 5.3.0 -- PHP version -- : 8.1.32 -- Browser(s) name and version -- : Firefox 138.0.1 (64-bit)  Hello, due to a percentage based increase in our prices, our price fields in the database have a lot of decimal points.  This has not been an issue for now, but now that we want to display the retail price, it is displayed as such: &quot;Price: 2,65 € (2,65 €)&quot;  When I manually get rid of the excess decimal points we have the behavior we want: &quot;Price: 2,65 €&quot;  How can I specify in a Mass Action to cut the decimal points off so only the first two remain?  Thanks in advance")*

So I guess we're getting AI spam then? ![:unsure:](/media/kunena/emoticons/18.png ":unsure:")

EDIT: Thanks for deleting.

Last edit: 1 year 5 months ago by [NTV](/forum/user/69623-ntv "View NTV's Profile").

The following user(s) said Thank You: [nicolas](/forum/user/63-nicolas "View nicolas's Profile")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQ0LW1hc3MtYWN0aW9ucy85MDkzOTItcm91bmQtcHJpY2UtaW4tbWFzcy1hY3Rpb24tb3BlcmF0aW9uP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

Board Categories HikaShop Install &amp; Update Product &amp; Category Display Content Creation Sales and Orders Orders management Reports &amp; Statistics Customers Checkout Payment Methods Shipping Methods Import &amp; Export (CSV, XLS…) Specific Features Affilation Taxes Wishlist Vote Carousel &amp; Slider Mass Actions Filters &amp; Search Discount &amp; Coupon Feature Request Integrations Showcase General Talk about HikaShop Development HikaShop 3.0 Beta Translation Commercial Jobs HikaShop Components HikaMarket Market: Feature requests Market: How to? Market: Bug Report HikaSerial General talk about HikaSerial Serial: Bug Report Serial: How to? Support en Français de HikaSerial (French Support) HikaSubscription HikaAuction Auction: Feature requests Auction: How to? Auction: Bug report Hikashop around the world Support en Français (French Support) Russian FAQ. Курс выживания с Hikashop. Частые вопросы и о Расширения Hikashop Наши сайты на Hikashop 日本語版サポート(Japanese Support) Thai German Archives Bug Report How to?

[](/forum/topics/feed/mode-topics?format=feed&type=rss)

Time to create page: 0.112 seconds

[Powered by](/forum/credits) [Kunena Forum](https://www.kunena.org)

[](#top)
