Fix extralabels must not be used anymore. #24268
This commit is contained in:
parent
df6dfc34e9
commit
ee30114ed9
@ -124,8 +124,8 @@ class PriceParser
|
|||||||
*/
|
*/
|
||||||
public function parseExpression($product, $expression, $values)
|
public function parseExpression($product, $expression, $values)
|
||||||
{
|
{
|
||||||
global $user;
|
global $user, $hookmanager, $extrafields;
|
||||||
global $hookmanager;
|
|
||||||
$action = 'PARSEEXPRESSION';
|
$action = 'PARSEEXPRESSION';
|
||||||
if ($reshook = $hookmanager->executeHooks('doDynamiPrice', array(
|
if ($reshook = $hookmanager->executeHooks('doDynamiPrice', array(
|
||||||
'expression' => &$expression,
|
'expression' => &$expression,
|
||||||
@ -154,12 +154,17 @@ class PriceParser
|
|||||||
"pmp" => $product->pmp,
|
"pmp" => $product->pmp,
|
||||||
));
|
));
|
||||||
|
|
||||||
//Retrieve all extrafield for product and add it to values
|
// Retrieve all extrafields if not already not know (should not happen)
|
||||||
$extrafields = new ExtraFields($this->db);
|
if (! is_object($extrafields)) {
|
||||||
$extralabels = $extrafields->fetch_name_optionals_label($product->table_element);
|
$extrafields = new ExtraFields($this->db);
|
||||||
|
$extrafields->fetch_name_optionals_label();
|
||||||
|
}
|
||||||
|
|
||||||
$product->fetch_optionals();
|
$product->fetch_optionals();
|
||||||
foreach ($extralabels as $key => $label) {
|
if (is_array($extrafields->attributes[$product->table_element]['label'])) {
|
||||||
$values["extrafield_".$key] = $product->array_options['options_'.$key];
|
foreach ($extrafields->attributes[$product->table_element]['label'] as $key => $label) {
|
||||||
|
$values["extrafield_".$key] = $product->array_options['options_'.$key];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//Process any pending updaters
|
//Process any pending updaters
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user