Buenos,
En si no era un error sino un funcionamiento de prestashop.
Al momento de agregar al carro. se llama desde CartController a
if ($this->id_product_attribute) {
if (!Product::isAvailableWhenOutOfStock($product->out_of_stock) && !Attribute::checkAttributeQty($this->id_product_attribute, $qty_to_check)) {
$this->errors[] = $this->trans('There are not enough products in stock', array(), 'Shop.Notifications.Error');
}
} elseif (!$product->checkQty($qty_to_check)) {
$this->errors[] = $this->trans('There are not enough products in stock', array(), 'Shop.Notifications.Error');
}
la funcion para Null ya que el id Atributo hace referencia al idProducto.
public static function checkAttributeQty($idProductAttribute, $qty, Shop $shop = null)
{
if (!$shop) {
$shop = Context::getContext()->shop;
}
$result = StockAvailable::getQuantityAvailableByProduct(null, (int) $idProductAttribute, $shop->id);
return ($result && $qty <= $result);
}
En mi caso como consumo un webservice externo y me manejo solo con ID me terminaba retornando Error y no me agregaba nada al carro. Espero que se entienda. SAludos