Skip to content
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

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

Patriboom
Copy link

No description provided.

Block/System/Config/Form/Field/PrecisionCart.php Outdated Show resolved Hide resolved
Block/System/Config/Form/Field/PrecisionCheckout.php Outdated Show resolved Hide resolved
return $this->getConfig()->getPricePrecision();
//return $context->getLayout();
$Val = $this->getConfig()->getPricePrecision();
$Val = (strstr($_SERVER['PHP_SELF'], 'checkout') > -1 ) ? $this->getConfig()->getPricePrecisionCheckout() : $Val;
Copy link
Owner

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.

Copy link
Author

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();
Copy link
Owner

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).
Copy link
Owner

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants