Merge pull request #5270 from atm-maxime/fix_pmp_when_stock_enabled

Fix pmp when stock enabled
This commit is contained in:
Laurent Destailleur 2016-06-04 00:12:53 +02:00
commit b9feae0883

View File

@ -125,9 +125,11 @@ if ($idprod > 0)
}
}
// Add price for pmp
$price=$producttmp->pmp;
$prices[] = array("id" => 'pmpprice', "price" => $price, "label" => $langs->trans("PMPValueShort").': '.price($price,0,$langs,0,0,-1,$conf->currency), "title" => $langs->trans("PMPValueShort").': '.price($price,0,$langs,0,0,-1,$conf->currency));
if(!empty($conf->stock->enabled)) {
// Add price for pmp
$price=$producttmp->pmp;
$prices[] = array("id" => 'pmpprice', "price" => $price, "label" => $langs->trans("PMPValueShort").': '.price($price,0,$langs,0,0,-1,$conf->currency), "title" => $langs->trans("PMPValueShort").': '.price($price,0,$langs,0,0,-1,$conf->currency));
}
}
echo json_encode($prices);