// Change sentence "Allow seperated package"
This commit is contained in:
@@ -2520,5 +2520,19 @@ class CartCore extends ObjectModel
|
|||||||
|
|
||||||
return false;
|
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;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -312,10 +312,12 @@
|
|||||||
{/foreach}
|
{/foreach}
|
||||||
</ul>
|
</ul>
|
||||||
{/if}
|
{/if}
|
||||||
|
{if !$cart->isAllProductsInStock()}
|
||||||
<p>
|
<p>
|
||||||
<input type="checkbox" name="allow_seperated_package" id="allow_seperated_package" {if $cart->allow_seperated_package}checked="checked"{/if} />
|
<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>
|
</p>
|
||||||
|
{/if}
|
||||||
<form action="{if $opc}{$link->getPageLink('order-opc', true)}{else}{$link->getPageLink('order', true)}{/if}" method="post" id="voucher">
|
<form action="{if $opc}{$link->getPageLink('order-opc', true)}{else}{$link->getPageLink('order', true)}{/if}" method="post" id="voucher">
|
||||||
<fieldset>
|
<fieldset>
|
||||||
<h4>{l s='Vouchers'}</h4>
|
<h4>{l s='Vouchers'}</h4>
|
||||||
|
|||||||
Reference in New Issue
Block a user