// Change sentence "Allow seperated package"

git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10718 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
mDeflotte
2011-11-28 16:47:50 +00:00
parent e474dc01b5
commit 7577e5ff0f
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>