Je veux montrer la quantité en stock sur la page de paiement. Mais quand plus de 15 en stock montrent 15+.Afficher l'inventaire du produit simple dans Magento
J'ai le correctif de produit configurable mais le simple ne fonctionne pas.
<?php } elseif($custom->getTypeId() == 'configurable') { ?>
<?php
$children = $custom->getTypeInstance()->getUsedProducts();
$totaal = count($children);
$i = 0;
$childStockQty = 0;
if ($totaal > 0) {
foreach ($children as $child) {
$i++;
$childStock = $child->getStockItem();
$childStockQty = $childStock->getQty();
$childStockPid = $childStock->getProductId();
$childStockQty_tot = $childStockQty_tot + $childStockQty;
echo Mage::getModel('catalog/product')->load($child->getEntityId())->getAttributeText('kleur');
if($childStockQty > 15)
{
echo ': 15+';
}
else
{
echo ': ' . round($childStockQty, 0);
}
if($i != $totaal)
{
echo '</br>';
}
}
//echo $childStockQty_tot;
}
?>
Quelle est votre question. S'il vous plaît élaborer – TBI