├── qr-donate.png
├── .github
└── FUNDING.yml
├── view
└── frontend
│ ├── requirejs-config.js
│ └── web
│ └── js
│ └── price-utils.js
├── registration.php
├── etc
├── module.xml
├── config.xml
├── acl.xml
├── adminhtml
│ ├── di.xml
│ └── system.xml
└── di.xml
├── Model
├── ConfigInterface.php
├── PricePrecisionConfigTrait.php
├── Plugin
│ ├── OrderPlugin.php
│ ├── PriceFormatPluginAbstract.php
│ ├── Currency.php
│ ├── Local
│ │ └── Format.php
│ └── PriceCurrency.php
├── Currency.php
└── Config.php
├── Block
└── System
│ └── Config
│ └── Form
│ └── Field
│ └── Precision.php
├── composer.json
├── Test
└── Unit
│ └── Plugin
│ └── Model
│ └── PriceCurrencyTest.php
├── README.md
├── Ui
└── DataProvider
│ └── Product
│ └── Modifier
│ └── Price.php
└── LICENSE.txt
/qr-donate.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lillik/magento2-price-decimal/HEAD/qr-donate.png
--------------------------------------------------------------------------------
/.github/FUNDING.yml:
--------------------------------------------------------------------------------
1 | # These are supported funding model platforms
2 |
3 | github: [lillik]
4 | custom: ['https://www.paypal.com/donate/?hosted_button_id=LKAG7L4HWMVSL']
5 |
--------------------------------------------------------------------------------
/view/frontend/requirejs-config.js:
--------------------------------------------------------------------------------
1 | var config = {
2 | map: {
3 | '*': {
4 | 'Magento_Catalog/js/price-utils' : 'Lillik_PriceDecimal/js/price-utils'
5 | }
6 | }
7 | };
--------------------------------------------------------------------------------
/registration.php:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/Model/ConfigInterface.php:
--------------------------------------------------------------------------------
1 | moduleConfig;
17 | }
18 |
19 | /**
20 | * @return int|mixed
21 | */
22 | public function getPricePrecision()
23 | {
24 | if ($this->getConfig()->canShowPriceDecimal()) {
25 | return $this->getConfig()->getPricePrecision();
26 | }
27 |
28 | return 0;
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/etc/config.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | 2
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 | 0
15 |
16 |
17 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/Model/Plugin/OrderPlugin.php:
--------------------------------------------------------------------------------
1 | getConfig()->isEnable()) {
20 | //change the precision
21 | $args[1] = $this->getPricePrecision();
22 | }
23 |
24 | return $args;
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/Model/Plugin/PriceFormatPluginAbstract.php:
--------------------------------------------------------------------------------
1 | moduleConfig = $moduleConfig;
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/Block/System/Config/Form/Field/Precision.php:
--------------------------------------------------------------------------------
1 | '', 'label' => '