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
[*] CORE: Refactor Language::getLanguages calls #2902
Conversation
$resultsArray[$language['id_lang']] = Configuration::get($key, $language['id_lang'], $id_shop_group, $id_shop); | ||
return $resultsArray; | ||
$results_array = array(); | ||
foreach (Language::getLanguages() as $id_lang) |
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.
Hi,
maybe you want to do Language::getIDs(true) as $id_lang
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 do, I missed one :(
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.
Hi @gskema, any news about this ?
best regards.
@@ -224,8 +223,8 @@ public static function createOrderDiscount($order, $productList, $qtyList, $name | |||
// create discount | |||
$voucher = new Discount(); | |||
$voucher->id_discount_type = Discount::AMOUNT; | |||
foreach ($languages as $language) | |||
$voucher->description[$language['id_lang']] = strval($name).(int)($order->id); | |||
foreach (Language::getIDs((bool)$order) as $id_lang) |
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.
It's very odd, there is at least one more place like this. Argument should probably be true
here, but I left it because I wasn't sure. Shall I change it?
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.
No it's ok, I will check make more functional test.
Thanks
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.
Which functional tests ?
The Discount class is obsolete. Do you have functionnal tests on obsolete code ? I'm surprised
I don't understand that obsolete code is optimized .....
Please check again. |
[*] CORE: Refactor Language::getLanguages calls
Hi @gskema Thank you for your contribution. Best regards. |
Hi, please have a look at #2914 Best regards. |
No description provided.