Skip to content

Commit 13aa4d7

Browse files
author
Matthieu Rolland
committed
move id attribute check before calling getProductProperties
1 parent 946eeaf commit 13aa4d7

1 file changed

Lines changed: 3 additions & 5 deletions

File tree

classes/Hook/HookActionCartUpdateQuantityBefore.php

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -66,16 +66,14 @@ public function run()
6666
// Format product and standardize ID
6767
$product = (array) $this->params['product'];
6868
$product['id_product'] = $product['id'];
69-
$product['id_product_attribute'] = $this->params['id_product_attribute'];
70-
71-
// Get some basic information
72-
$product = Product::getProductProperties($this->context->language->id, $product);
73-
7469
// Add information about attribute
7570
if (!empty($this->params['id_product_attribute'])) {
7671
$product['id_product_attribute'] = (int) $this->params['id_product_attribute'];
7772
}
7873

74+
// Get some basic information
75+
$product = Product::getProductProperties($this->context->language->id, $product);
76+
7977
// Add information about quantity difference
8078
$product['quantity'] = (int) $this->params['quantity'];
8179

0 commit comments

Comments
 (0)