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 number of DL & expiration date being displayed in the download virtual product mail #16049

Conversation

@atomiix
Copy link
Contributor

atomiix commented Oct 21, 2019

Questions Answers
Branch? develop
Description? This fixes #16014 that was merged to soon
Type? bug fix
Category? FO
BC breaks? no
Deprecations? no
Fixed ticket? Fixes #10915
How to test? Order a virtual product with a file and see the text mail sent

This change is Reviewable

@atomiix atomiix requested a review from PrestaShop/prestashop-core-developers as a code owner Oct 21, 2019
Copy link
Contributor

jolelievre left a comment

Nice, this class is getting bigger and bigger One day this will need to be refactored ^^

foreach ($products as $product) {
$p = new Product($product['id_product']);
$results[] = [
'text' => Product::getProductName($product['id_product']),

This comment has been minimized.

Copy link
@jolelievre

jolelievre Oct 21, 2019

Contributor

Can't you get the product name since you instanciated in $p? $p->name ?
And you could rename this variable, either $productEntity or you can change your initial $product array to $productData

This comment has been minimized.

Copy link
@atomiix

atomiix Oct 22, 2019

Author Contributor

Yes, $p was a temporary variable name, forgot to rename it...
I did try to use $p->name but it's an array with all the names for the different translations. Do you think I still should use it?

This comment has been minimized.

Copy link
@jolelievre

jolelievre Oct 22, 2019

Contributor

Oh yes because it contains the localized name in an array No I think it's fine with what you did Just rename the variable it will be enough

@atomiix atomiix force-pushed the atomiix:fix-virutal-product-links-in-mail-template branch from 1658bed to 95de7fc Oct 22, 2019
@atomiix atomiix force-pushed the atomiix:fix-virutal-product-links-in-mail-template branch from 95de7fc to e19fe63 Oct 24, 2019
@Robin-Fischer-PS Robin-Fischer-PS self-assigned this Oct 28, 2019
@Progi1984 Progi1984 added this to the 1.7.7.0 milestone Oct 28, 2019
@Progi1984 Progi1984 merged commit 9819947 into PrestaShop:develop Oct 28, 2019
2 checks passed
2 checks passed
PrettyCI Code formatting
Details
Travis CI - Pull Request Build Passed
Details
@atomiix atomiix deleted the atomiix:fix-virutal-product-links-in-mail-template branch Nov 4, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.