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

Fixed method Order::isVirtual #7222

Merged
merged 1 commit into from Dec 29, 2016
Merged

Fixed method Order::isVirtual #7222

merged 1 commit into from Dec 29, 2016

Conversation

maximebiloe
Copy link
Contributor

@maximebiloe maximebiloe commented Dec 14, 2016

Questions Answers
Branch? develop
Description? The current method check if the product has a download, with "download_hash" and "display_filename" to be considered as virtual; but not every virtual product has a download file, etc. So, simply check if the "is_virtual" index is set to 1 instead of using ProductDownload::getIdFromIdProduct().
Type? bug fix
Category? CO
BC breaks? no
Deprecations? no
Fixed ticket?
How to test? Create an order with a virtual product with a download and an order with a virtual product without a download, then check with (new Order($id_order))->isVirtual();

The current method check if the product has a download, with
"download_hash" and "display_filename" to be considered as virtual; but
not every virtual product has a download file, etc.
So, simply check if the "is_virtual" index is set to 1 instead of using
ProductDownload::getIdFromIdProduct().

(cherry picked from commit b2737c2)
@maximebiloe
Copy link
Contributor Author

Cherry-pick of #6819

@aleeks
Copy link
Contributor

aleeks commented Dec 29, 2016

Thank you @maximebiloe

@aleeks aleeks merged commit 9a29cf7 into PrestaShop:develop Dec 29, 2016
@maximebiloe maximebiloe deleted the order-virtual branch January 17, 2017 15:50
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.

None yet

2 participants