New Zenner
- Join Date:
- Feb 2009
- Location:
- UK
- Posts:
- 29
- Plugin Contributions:
- 0
Stocks by attributes
cropinstop:
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 Checkto
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));
// 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));
Damn. Thought I'd found the solution, but this hasn't worked either :(
https://www.sockblanks.co.uk
Zen Cart 1.3.8a | PHP Version: 5.2.8 | Database: MySQL 5.0.67
Mods: FEC | Google Analytics | SBA | Newsletter Sub | Lightbox