-
-
Notifications
You must be signed in to change notification settings - Fork 68
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Different decimal lenght for cart and checkout -- first version #57
base: master
Are you sure you want to change the base?
Conversation
Model/PricePrecisionConfigTrait.php
Outdated
return $this->getConfig()->getPricePrecision(); | ||
//return $context->getLayout(); | ||
$Val = $this->getConfig()->getPricePrecision(); | ||
$Val = (strstr($_SERVER['PHP_SELF'], 'checkout') > -1 ) ? $this->getConfig()->getPricePrecisionCheckout() : $Val; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't use global variables.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I hope to find the proper variable or object to this. Meanwhile, I'm looking for the solution, please accept this way. I don't want to steal your project. I just want to contribute; that's why I don't want nor try to bring users to my fork, but give them as soon as possible a solution ( even if it's not perfect ). During that time, we'll find the proper way to achieve this code perfectly.
@@ -26,7 +26,11 @@ public function getConfig() | |||
public function getPricePrecision() | |||
{ | |||
if ($this->getConfig()->canShowPriceDecimal()) { | |||
return $this->getConfig()->getPricePrecision(); | |||
//return $context->getLayout(); | |||
$Val = $this->getConfig()->getPricePrecision(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please, declare the local variables according to PSR.
README.md
Outdated
@@ -28,6 +28,8 @@ The preferred way of installing lillik/magento2-price-decimal is through Compose | |||
php composer.phar require lillik/magento2-price-decimal | |||
``` | |||
|
|||
Other way to install: copy all files from here to ./app/code/Lillik/PriceDecimal/ subdirectory ( you'll need to create the directory first). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please, define and describe the steps on this way of installation, to be clear for all other developers that choose this way.
No description provided.