Giter VIP home page Giter VIP logo

magento2-price-decimal's Introduction

Introduction

The «Price Decimal Precision» Magento 2 extension allows a store administrator to setup a custom display decimal precision for the prices and other currency values (discounts, taxes, sales amounts, etc.) both for the frontend and the backend areas. The price display settings are individual per currency and per store. The extension supports an unlimited number of currencies.

alt text

The «Price Decimal Precision» extension allows you to change or delete the decimal number (precision) in a price, that is displayed in the front office of your store. The extentension supports multi store and multi website configuration and can be useful in managing multiwebsites / multisore shops. The ** "Price Decimal Precision" ** extension is a free and fully configurable and can be helpful for your business.

What can the extension do for you?

Remove decimal precision from price

Price with one decimal precision

Features

  • Free and open source and fully configurable extension;
  • Easy to install and unistall;
  • Easy to configurate;
  • Remove or change the price precision from a specific website or store;
  • Supports English translation.

Installation

The preferred way of installing lillik/magento2-price-decimal is through Composer. Simply add lillik/magento2-price-decimal as a dependency:

php composer.phar require lillik/magento2-price-decimal

Configuration

Stores -> Configuration -> Catalog

Contribution

If you have any issues, please contact me or open a bug report in GitHub's issue tracker.

License

The code is licensed under Apache-2.0 License.

TODO

  • Remove decimals in cart and checkout
  • Remove only zero decimal option (description)

Donation

If this project help you reduce time to develop, you can give me a cup of coffee :)paypal

img

magento2-price-decimal's People

Contributors

archipel avatar dudzio12 avatar fritzmg avatar jaydolphinweb avatar lillik avatar mykolaoleksiuk avatar novakivskiy avatar npluimers avatar tufahu avatar wapone avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

magento2-price-decimal's Issues

Problem when asking more precision than default currency precision

Thank you for your Magento 2 extension.
When I activate your extension and use for example "4" as decimal length, I have 2 issues:

  • Admin backend still uses 2 as decimal length (as default when using Euro as currency). So nothing has changed at the backend.
  • Frontend shows 4 decimals but round every price to 2 decimals (e.g. price 36.9050 in the database becomes 36.9100 on the frontend).

Can you help me? Did I configure something wrong? Or is this a bug in the extension? Thanks in advance.

Not working in product page

Hi,
Price decimal is not updating in product details page and also in admin side many place its not working,
Please reply

this is not working for $

This is working only for INR but I have another store with a currency of $ which is not working. Can you please suggest?

Missing required argument $options of Lillik\PriceDecimal\Model\Currency.

Great contribution, thank you! But I got this exception after installation:

`1 exception(s):
Exception #0 (BadMethodCallException): Missing required argument $options of Lillik\PriceDecimal\Model\Currency.

Exception #0 (BadMethodCallException): Missing required argument $options of Lillik\PriceDecimal\Model\Currency.
#0 /var/www/html/vendor/magento/framework/ObjectManager/Factory/Dynamic/Developer.php(34): Magento\Framework\ObjectManager\Factory\AbstractFactory->resolveArgumentsInRuntime('Lillik\PriceDec...', Array, Array)
#1 /var/www/html/vendor/magento/framework/ObjectManager/Factory/Dynamic/Developer.php(59): Magento\Framework\ObjectManager\Factory\Dynamic\Developer->_resolveArguments('Lillik\PriceDec...', Array, Array)
#2 /var/www/html/vendor/magento/framework/ObjectManager/ObjectManager.php(70): Magento\Framework\ObjectManager\Factory\Dynamic\Developer->create('Lillik\PriceDec...')
#3 /var/www/html/app/code/Magestore/Affiliateplus/Helper/HelperAbstract.php(216): Magento\Framework\ObjectManager\ObjectManager->get('Lillik\PriceDec...')`

Currency Issue with Mutiple Website

Hi

While using the module to adjust the price decimal precision there are a serious issue with the Website Currency.
Website 1 with currency: BHD
Website 2 with currency: QAR

While creating orders in backend it showing up QAR while creating order in Website 1. Also while loading frontend, the currency display is wired. I think there need a fix to get the Store Currency.

Magento 2.3 adminhtml inputs showing rounded value

We have tried this extension in Magento 2.3 project (2.3.1 version, to be exact) cause we need to set up 4 decimals for EUR currency

It is working fine, we can save prices with 4 decimals and they are registered fine in database. In frontend all prices are being displayed with 4 decimals... but there is one big problem. If you open edit product page in backoffice all values are visually rounded to 2 decimals, so if you save the product, the rounded value is sent to form & the 4 decimal value is lost

Is this some bug introduced in newer versions of Magento2?

Problem in installation

Dear
can you help me
when i download the module and added in /var/www/html/app/code/lillik/magento2-price-decimal
after run bin/magento setup:di:compile
get this error
2020-07-10_160913
Why??
Repositories code generation... 1/7 [====>-----------------------] 14% < 1 sec 78.5 MiBPHP Fatal error: Trait 'Lillik\PriceDecimal\Model\PricePrecisionConfigTrait' not found in /var/www/html/app/code/lillik/magento2-price-decimal/Ui/DataProvider/Product/Modifier/Price.php on line 21

Admin product page show 4 decimal failure

Admin product page show 4 decimal failure, and it keeps showing 2 decimal. So when I save the product price in admin it will change the product price to 2 decimal in db so frontend product page it will only show 2 decimal price

Remove decimals in cart and checkout (Timing)

@lillik, your module seems to meet all of my requirements except for the "todo" of removing the additional decimals in the cart, totals, and emails. When do you think this would be something you would add to the module as this is my only blocker.

Thousands

If you have a product with it's price in the thousands, when you modify say of it's attributes the price will be modified and 3 digits will be drop.

Ex: Price: $15,000
After modifying an attribute: Price: $15

Magento does not work with this plugin

Does not work with Magento 2.1.8
This is the error in var/log/system.log:
[2017-09-28 12:51:41] main.CRITICAL: Strict Notice: Lillik\PriceDecimal\Model\Plugin\PriceFormatPluginAbstract and Lillik\PriceDecimal\Model\PricePrecisionConfigTrait define the same property ($moduleConfig) in the composition of Lillik\PriceDecimal\Model\Plugin\PriceFormatPluginAbstract. This might be incompatible, to improve maintainability consider using accessor methods in traits instead. Class was composed in /var/www/vhosts/site/vendor/lillik/magento2-price-decimal/Model/Plugin/PriceFormatPluginAbstract.php on line 51 [] []

Decimal lengh cannnot be more then 4 digits

Database schema is limited to 4digits (decimal(12,4)) for price decimal and shouldn't be text option as it can't hold the value more then 4 decimals.

Suggestion to make this a dropdown option for

Decimal Length

with values
0
1
2
3
4

Complete TODO

I have install the extension and it works perfectly, but i want to ask when you complete TODO features. Those two features will fully complete the extensions.

Thanks

Tax precision

Hi,
How to modify code to not cut decimal values for tax?

question

hello lillik,
is it possible that the plugin do the calculation with 4 decimals and show the result with 2?
thanks.

Remove only zero decimal option?

Hi Lilian,
Can you add new option for this extension. Sometimes, we want to remove only zero numbers from decimal. Now, Does it remove all decimal numbers?. Thank you!

Frontend shows round

Frontend shows 4 decimals but round every price to 2 decimals (e.g. price 36.9050 in the database becomes 36.9100 on the frontend).

how do i can install the extension

Hi Dear,
Could you please explain me how do i install the extension. I am new to magento.
where i should place the files and what i should do exactly ?
thank you very much

Decimals on Payment Gateway

Hello, the module works great, but I have one payment method where I cannot use decimals, but your module doesn't work in this case... the payment method get decimals on the price and taxes

Activate per website

Hi,

First of all great extension.
I would like to know if I can activate the extension per website. For B2C customer I want round prices in the frontend but for the B2B website the decimals are really needed.

Thanks

Decimal config not used when running in cron scope

If price calculations are done in crontab scope the configured decimal is not used.

I fixed the issue based on #42 in my fork and was about to make pull request, but then realized there is in total 8 different scopes so maybe this is not correct way to fix the issue.

extension issue

TypeError: round() expects parameter 2 to be int, string given in /var/www/vhosts/myorigin.info/httpdocs/app/code/Lillik/PriceDecimal/Model/Plugin/PriceCurrency.php:43 Stack trace: #0

Not an issue, but please correct the readme file

I've not been able to use the php ...phar command and had to install the plugin all by myself.

Please add the following information to readme.md


Install all files ( like they are here ) in the app/code/Lillik/PriceDecimal directory

Backend decimals

It should be possible to decide if the decimals should be removed in frontend or backend or both.
Some stores want backend to display decimals, but frontend should not display decimals.

Remove ,00

Hi,

I have not Iinstalled yet, but is it possible to just remove decimals if they're just zeros?
"50,00" => 50
"50,20" => 50,20

Backend update product error 1,000 to 1

I use on magento 2.1.14 and bellow not have this issue.
On magento 2.1.16 example i set precision = 0
On product set price = 990000
First save ok, second edit, the price auto add "," to 990,000
After save, the price was change to 990

This extension is very helpful, thanks for developers.
I hope this issue will be fix soon.

Rounding off the price on Product edit page(admin) of different store view

Hello,
Magento version: 2.4.2-p1
Extension version: 1.0
There is an issue in which the product edit page from admin contains Price input field is rounded off itself although it is from different store view where the extension is disabled, let us understand with the screenshots.

1.While creating a new product with decimal value:
Screenshot from 2021-07-26 14-30-16
In the above image, the price field contains $25.5, and whiling saving this the price field automatic rounded off itself and converted into $ 26 .

  1. The rounded off price image is below after saving:
    Screenshot from 2021-07-26 14-30-43

3.The below is the product grid(admin) it shows the actual value of price which I assigned with decimal but it won't be reflected on the Product edit section(admin):
Screenshot from 2021-07-26 14-31-19

The main issue is that lillik/magento2-price-decimal extension is disabled for this store view, then why should this rounding off is showing in the Product edit(admin) section. It has to be the same as the product gird(admin) had.
Please help in the resolution of the issue. And connect with me for any question on the issue.

Update price error with no decimals

Hi i have tried your extension with no decimals, congratulations it works very well.

In the storefront works great, but maybe there is a problem with backend.

I have imported products via CSV and the price in backend is correctly showed with no decimals. But when i open and update product, price are updated with error.

For example: I have a price for a product of 1,200 € (one thousand two hundred euro), so the price is updated to 1 € when product is saved. It seems that with no decimals there is a precision error. To update correctly i need to set price to "1200.00".

Can you confirm, or not, that it is an issue?

Thanks in advance.

Error in Quotes page in backend

I'm giving a try to your extension and I got following error in a staging environment in a Magento Commerce v 2.3.2 with Quotes feature enabled:

Argument 1 passed to Lillik\PriceDecimal\Model\Plugin\PriceCurrency::beforeFormat() must be an instance of Magento\Directory\Model\PriceCurrency, instance of Magento\NegotiableQuote\Model\PriceCurrency\Interceptor given, called in /app/***/vendor/magento/framework/Interception/Interceptor.php on line 121

I cannot find any issue with this error.
Is it a known one?

can't install module by composer

hi.
i using composer install module and it's show error :

Could not find package lillik/magento2-price-decimal at any version matching your PHP version 7.1.8.0
how can i fix this ?

Price change in admin when save product

I have installed this extension which is working fine on frontend. But When I am saving the product in admin, product price changed from 7,499 to 7.
I am using Magento 2.1.8

Problem With Thousands

Hello,

When choosing thousands as a price in backend (ex 2511€) the result is 2,411 , as the thousands separator is the comma. Due to this the final price with the extension enabled is 2€. Do you have any fix for this? I saw that someone has already issued this, but there wasn't a solution.

Thank you

Magento2 -3-decimal price select

Hello,
I have used your extension magento2-price-decimal
it working fine
but one query :
show 3 digits when the last digit is 0. just show 2 digits showing it is possible.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.