
Originally Posted by
cropinstop
If "Fast and Easy Checkout"is installed when running Stock by Attributes, the shopping cart will proceed to successful checkout when the quantity of an attribute ordered exceeds the quantity provisioned with Stock by Attributes.
Found the solution.
An "attribute stock exceeded" check is missing from "includes/modules/pages/checkout/header_php.php". This file is unique to the "Fast and Easy Checkout" contribution.
Change
// Stock Check
if ( (STOCK_CHECK == 'true') && (STOCK_ALLOW_CHECKOUT != 'true') ) {
$products = $_SESSION['cart']->get_products();
for ($i=0, $n=sizeof($products); $i<$n; $i++) {
if (zen_check_stock($products[$i]['id'], $products[$i]['quantity'])) {
zen_redirect(zen_href_link(FILENAME_SHOPPING_CART));
to
// Stock Check
if ( (STOCK_CHECK == 'true') && (STOCK_ALLOW_CHECKOUT != 'true') ) {
$products = $_SESSION['cart']->get_products();
for ($i=0, $n=sizeof($products); $i<$n; $i++) {
// Added to allow individual stock of different attributes
unset($attributes);
if(is_array($products[$i]['attributes'])) {
$attributes = $products[$i]['attributes'];
} else {
$attributes = '';
}
// End change
if (zen_check_stock($products[$i]['id'], $products[$i]['quantity'], $attributes)) {
zen_redirect(zen_href_link(FILENAME_SHOPPING_CART));
Bookmarks