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

Fix: Payment price is always shown in checkout #1

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

Conversation

JanWennrichPCSG
Copy link

Calling getPrice() on $paymentmethod returns a price object.
Therefore the if always returns true and the price for the payment option is always shown in checkout.
Apparently OXID/Smarty does not like chaining methods in an if so we can't do ->getPrice()->getBruttoPrice().
Using another if fixes this problem and the price is only shown if a price is set for the payment option.

Calling `getPrice()` on `$paymentmethod` returns a price object.
Therefore the if always returns true and the price for the payment option is always shown in checkout.
Apparently OXID/Smarty does not like chaining methods in an if so we can't do `->getPrice()->getBruttoPrice()`.
Using another if fixes this problem and the price is only shown if a price is set for the payment option.
…yment-price-check

fix: corrects payment price check
@JanWennrichPCSG
Copy link
Author

@payeverdev, any feedback on this pull request?
The issue still persists in the current codebase.

(Sorry for bumping, but it's been almost a year since I opened the pull request)

@gnusmus
Copy link

gnusmus commented Jan 31, 2022

Dear JanWennrichPCSG,

thanks for your contribution! Sorry we didn't reply before, we seem to have overlooked your last comment.

This is not our development repo so we can not merge that in here, but we're going to take a look at your suggested change and if it passes all our tests with no issues, we will include it when launching the next version of our oxid plugin.

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