// Change sentence "Allow seperated package"

This commit is contained in:
mDeflotte
2011-11-28 16:47:50 +00:00
parent fda491a781
commit 01c2498f69
2 changed files with 17 additions and 1 deletions
+14
View File
@@ -2520,5 +2520,19 @@ class CartCore extends ObjectModel
return false;
}
/**
* Return false is some product from the cart are out of stock
*/
public function isAllProductsInStock()
{
foreach ($this->getProducts() as $product)
{
elog($product);
if (isset($product['out_of_stock']) && (int)$product['out_of_stock'])
return false;
}
return true;
}
}
+3 -1
View File
@@ -312,10 +312,12 @@
{/foreach}
</ul>
{/if}
{if !$cart->isAllProductsInStock()}
<p>
<input type="checkbox" name="allow_seperated_package" id="allow_seperated_package" {if $cart->allow_seperated_package}checked="checked"{/if} />
<label for="allow_seperated_package">{l s="allow seperated package"}</label>
<label for="allow_seperated_package">{l s="Send the available products first"}</label>
</p>
{/if}
<form action="{if $opc}{$link->getPageLink('order-opc', true)}{else}{$link->getPageLink('order', true)}{/if}" method="post" id="voucher">
<fieldset>
<h4>{l s='Vouchers'}</h4>