Zen Cart Logo
Forums / All Other Contributions/Addons / Stock by Attribute v4.0 addon for v1.3.5-1.3.9

Stock by Attribute v4.0 addon for v1.3.5-1.3.9

Views: 658,718

Results 1,061 to 1,080 of 3,609
27 Jan 2011, 4:53 PM
#1061
chrisd24 avatar

chrisd24

New Zenner

Join Date:
Jan 2011
Posts:
37
Plugin Contributions:
0

Stock by Attribute v4.0 addon for v1.3.5-1.3.9

balticccreations:

lol yeah i know its got to be something simple. my issue is it not showing the number available anywhere for each attribute. only the total units available.

Only total units available for attribute products in your cart or on the products page?

27 Jan 2011, 4:54 PM
#1062
balticccreations avatar

balticccreations

New Zenner

Join Date:
Jan 2011
Location:
Laguna Vista TX
Posts:
42
Plugin Contributions:
0

Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9

ChrisD24:

Only total units available for attribute products in your cart or on the products page?

only on the products page

27 Jan 2011, 4:59 PM
#1064
balticccreations avatar

balticccreations

New Zenner

Join Date:
Jan 2011
Location:
Laguna Vista TX
Posts:
42
Plugin Contributions:
0

Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9

ChrisD24:

I'll look into this one and see - hopefully it is programmed similarly.

let me know what you figure out. I haven't downloaded a file compare system yet so I'm lost lol

27 Jan 2011, 5:00 PM
#1065
chrisd24 avatar

chrisd24

New Zenner

Join Date:
Jan 2011
Posts:
37
Plugin Contributions:
0

Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9

balticccreations:

let me know what you figure out. I haven't downloaded a file compare system yet so I'm lost lol

I'll let you know - it will be a little bit. I'm using KDiff3.

27 Jan 2011, 5:07 PM
#1066
balticccreations avatar

balticccreations

New Zenner

Join Date:
Jan 2011
Location:
Laguna Vista TX
Posts:
42
Plugin Contributions:
0

Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9

ChrisD24:

I'll let you know - it will be a little bit. I'm using KDiff3.

Thanks! I downloaded it now to figure out how to use it lol

27 Jan 2011, 8:15 PM
#1067
chrisd24 avatar

chrisd24

New Zenner

Join Date:
Jan 2011
Posts:
37
Plugin Contributions:
0

Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9

balticccreations:

Thanks! I downloaded it now to figure out how to use it lol

Holy cow I think I figured it out. Please tell me this works for you!

<?php 
/** 
 * shopping_cart header_php.php 
 * 
 * @package page 
 * @copyright Copyright 2003-2010 Zen Cart Development Team 
 * @copyright Portions Copyright 2003 osCommerce 
 * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0 
 * @version $Id: header_php.php 17948 2010-10-13 20:33:18Z drbyte $ 
 */ 

// This should be first line of the script: 
$zco_notifier->notify('NOTIFY_HEADER_START_SHOPPING_CART'); 

require(DIR_WS_MODULES . zen_get_module_directory('require_languages.php')); 
$breadcrumb->add(NAVBAR_TITLE); 

// Validate Cart for checkout 
$_SESSION['valid_to_checkout'] = true; 
$_SESSION['cart_errors'] = ''; 
$_SESSION['cart']->get_products(true); 

if (!$_SESSION['valid_to_checkout']) { 
  $messageStack->add('shopping_cart', ERROR_CART_UPDATE . $_SESSION['cart_errors'] , 'caution'); 
} 

// build shipping with Tare included 
$shipping_weight = $_SESSION['cart']->show_weight(); 
/* 
  $shipping_weight = 0; 
  require(DIR_WS_CLASSES . 'order.php'); 
  $order = new order; 
  require_once('includes/classes/http_client.php'); // shipping in basket 
  $total_weight = $_SESSION['cart']->show_weight(); 
  $total_count = $_SESSION['cart']->count_contents(); 
  require(DIR_WS_CLASSES . 'shipping.php'); 
  $shipping_modules = new shipping; 
  $quotes = $shipping_modules->quote(); 
*/ 
$totalsDisplay = ''; 
switch (true) { 
  case (SHOW_TOTALS_IN_CART == '1'): 
  $totalsDisplay = TEXT_TOTAL_ITEMS . $_SESSION['cart']->count_contents() . TEXT_TOTAL_WEIGHT . $shipping_weight . TEXT_PRODUCT_WEIGHT_UNIT . TEXT_TOTAL_AMOUNT . $currencies->format($_SESSION['cart']->show_total()); 
  break; 
  case (SHOW_TOTALS_IN_CART == '2'): 
  $totalsDisplay = TEXT_TOTAL_ITEMS . $_SESSION['cart']->count_contents() . ($shipping_weight > 0 ? TEXT_TOTAL_WEIGHT . $shipping_weight . TEXT_PRODUCT_WEIGHT_UNIT : '') . TEXT_TOTAL_AMOUNT . $currencies->format($_SESSION['cart']->show_total()); 
  break; 
  case (SHOW_TOTALS_IN_CART == '3'): 
  $totalsDisplay = TEXT_TOTAL_ITEMS . $_SESSION['cart']->count_contents() . TEXT_TOTAL_AMOUNT . $currencies->format($_SESSION['cart']->show_total()); 
  break; 
} 

// testing/debugging 
//  require(DIR_WS_MODULES . 'debug_blocks/shopping_cart_contents.php'); 

$flagHasCartContents = ($_SESSION['cart']->count_contents() > 0); 
$cartShowTotal = $currencies->format($_SESSION['cart']->show_total()); 

$flagAnyOutOfStock = false; 
$products = $_SESSION['cart']->get_products(); 
for ($i=0, $n=sizeof($products); $i<$n; $i++) { 
  if (($i/2) == floor($i/2)) { 
    $rowClass="rowEven"; 
  } else { 
    $rowClass="rowOdd"; 
  } 
  switch (true) { 
    case (SHOW_SHOPPING_CART_DELETE == 1): 
    $buttonDelete = true; 
    $checkBoxDelete = false; 
    break; 
    case (SHOW_SHOPPING_CART_DELETE == 2): 
    $buttonDelete = false; 
    $checkBoxDelete = true; 
    break; 
    default: 
    $buttonDelete = true; 
    $checkBoxDelete = true; 
    break; 
    $cur_row++; 
  } // end switch 
  $attributeHiddenField = ""; 
  $attrArray = false; 
  $productsName = $products[$i]['name']; 
  // Push all attributes information in an array 
  if (isset($products[$i]['attributes']) && is_array($products[$i]['attributes'])) { 
    if (PRODUCTS_OPTIONS_SORT_ORDER=='0') { 
      $options_order_by= ' ORDER BY LPAD(popt.products_options_sort_order,11,"0")'; 
    } else { 
      $options_order_by= ' ORDER BY popt.products_options_name'; 
    } 
    foreach ($products[$i]['attributes'] as $option => $value) { 
      $attributes = "SELECT popt.products_options_name, poval.products_options_values_name, pa.options_values_price, pa.price_prefix 
                     FROM " . TABLE_PRODUCTS_OPTIONS . " popt, " . TABLE_PRODUCTS_OPTIONS_VALUES . " poval, " . TABLE_PRODUCTS_ATTRIBUTES . " pa 
                     WHERE pa.products_id = :productsID 
                     AND pa.options_id = :optionsID 
                     AND pa.options_id = popt.products_options_id 
                     AND pa.options_values_id = :optionsValuesID 
                     AND pa.options_values_id = poval.products_options_values_id 
                     AND popt.language_id = :languageID 
                     AND poval.language_id = :languageID " . $options_order_by; 

      $attributes = $db->bindVars($attributes, ':productsID', $products[$i]['id'], 'integer'); 
      $attributes = $db->bindVars($attributes, ':optionsID', $option, 'integer'); 
      $attributes = $db->bindVars($attributes, ':optionsValuesID', $value, 'integer'); 
      $attributes = $db->bindVars($attributes, ':languageID', $_SESSION['languages_id'], 'integer'); 
      $attributes_values = $db->Execute($attributes); 
      //clr 030714 determine if attribute is a text attribute and assign to $attr_value temporarily 
      if ($value == PRODUCTS_OPTIONS_VALUES_TEXT_ID) { 
        $attributeHiddenField .= zen_draw_hidden_field('id[' . $products[$i]['id'] . '][' . TEXT_PREFIX . $option . ']',  $products[$i]['attributes_values'][$option]); 
        $attr_value = htmlspecialchars($products[$i]['attributes_values'][$option], ENT_COMPAT, CHARSET, TRUE); 
      } else { 
        $attributeHiddenField .= zen_draw_hidden_field('id[' . $products[$i]['id'] . '][' . $option . ']', $value); 
        $attr_value = $attributes_values->fields['products_options_values_name']; 
      } 

      $attrArray[$option]['products_options_name'] = $attributes_values->fields['products_options_name']; 
      $attrArray[$option]['options_values_id'] = $value; 
      $attrArray[$option]['products_options_values_name'] = $attr_value; 
      $attrArray[$option]['options_values_price'] = $attributes_values->fields['options_values_price']; 
      $attrArray[$option]['price_prefix'] = $attributes_values->fields['price_prefix']; 
    } 
  } //end foreach [attributes] 

		if ( STOCK_CHECK == 'true' ) {

			// Added to allow individual stock of different attributes
			unset($attributes);
			if(is_array($products[$i]['attributes'])){
				$attributes = $products[$i]['attributes'];
			} else {
				$attributes = '';
			}

			$stock_check = zen_check_stock($products[$i]['id'], $products[$i]['quantity'],$attributes);
			$flagStockCheck = NULL;
			if (zen_not_null($stock_check))
			{
				$flagAnyOutOfStock = true;
				$flagStockCheck = $stock_check;
			  $stockAvailable = zen_get_products_stock($products[$i]['id'], $attributes);		
			}
		}

  $linkProductsImage = zen_href_link(zen_get_info_page($products[$i]['id']), 'products_id=' . $products[$i]['id']); 
  $linkProductsName = zen_href_link(zen_get_info_page($products[$i]['id']), 'products_id=' . $products[$i]['id']); 
  $productsImage = (IMAGE_SHOPPING_CART_STATUS == 1 ? zen_image(DIR_WS_IMAGES . $products[$i]['image'], $products[$i]['name'], IMAGE_SHOPPING_CART_WIDTH, IMAGE_SHOPPING_CART_HEIGHT) : ''); 
  $show_products_quantity_max = zen_get_products_quantity_order_max($products[$i]['id']); 
  $showFixedQuantity = (($show_products_quantity_max == 1 or zen_get_products_qty_box_status($products[$i]['id']) == 0) ? true : false); 
//  $showFixedQuantityAmount = $products[$i]['quantity'] . zen_draw_hidden_field('products_id[]', $products[$i]['id']) . zen_draw_hidden_field('cart_quantity[]', 1); 
//  $showFixedQuantityAmount = $products[$i]['quantity'] . zen_draw_hidden_field('cart_quantity[]', 1); 
  $showFixedQuantityAmount = $products[$i]['quantity'] . zen_draw_hidden_field('cart_quantity[]', $products[$i]['quantity']); 
  $showMinUnits = zen_get_products_quantity_min_units_display($products[$i]['id']); 
  $quantityField = zen_draw_input_field('cart_quantity[]', $products[$i]['quantity'], 'size="4"'); 
  $buttonUpdate = ((SHOW_SHOPPING_CART_UPDATE == 1 or SHOW_SHOPPING_CART_UPDATE == 3) ? zen_image_submit(ICON_IMAGE_UPDATE, ICON_UPDATE_ALT) : '') . zen_draw_hidden_field('products_id[]', $products[$i]['id']); 
  $tmp =  zen_add_tax($products[$i]['final_price'],zen_get_tax_rate($products[$i]['tax_class_id'])); 
//  $productsPriceEach = $currencies->rateAdjusted($tmp); 
//  $productsPriceTotal = $productsPriceEach * $products[$i]['quantity']; 
  $productsPriceTotal = $currencies->display_price($products[$i]['final_price'], zen_get_tax_rate($products[$i]['tax_class_id']), $products[$i]['quantity']) . ($products[$i]['onetime_charges'] != 0 ? '<br />' . $currencies->display_price($products[$i]['onetime_charges'], zen_get_tax_rate($products[$i]['tax_class_id']), 1) : ''); 
  $productsPriceEach = $currencies->display_price($products[$i]['final_price'], zen_get_tax_rate($products[$i]['tax_class_id']), 1) . ($products[$i]['onetime_charges'] != 0 ? '<br />' . $currencies->display_price($products[$i]['onetime_charges'], zen_get_tax_rate($products[$i]['tax_class_id']), 1) : ''); 
//  $productsPriceTotal = $currencies->display_price($products[$i]['final_price'], zen_get_tax_rate($products[$i]['tax_class_id']), $products[$i]['quantity']) . ($products[$i]['onetime_charges'] != 0 ? '<br />' . $currencies->display_price($products[$i]['onetime_charges'], zen_get_tax_rate($products[$i]['tax_class_id']), 1) : ''); 
//  echo  $currencies->rateAdjusted($tmp); 
  $productArray[$i] = array('attributeHiddenField'=>$attributeHiddenField, 
                            'stockAvailable'=>$stockAvailable, 
                'flagStockCheck'=>$flagStockCheck, 
                            'flagShowFixedQuantity'=>$showFixedQuantity, 
                            'linkProductsImage'=>$linkProductsImage, 
                            'linkProductsName'=>$linkProductsName, 
                            'productsImage'=>$productsImage, 
                            'productsName'=>$productsName, 
                            'showFixedQuantity'=>$showFixedQuantity, 
                            'showFixedQuantityAmount'=>$showFixedQuantityAmount, 
                            'showMinUnits'=>$showMinUnits, 
                            'quantityField'=>$quantityField, 
                            'buttonUpdate'=>$buttonUpdate, 
                            'productsPrice'=>$productsPriceTotal, 
                            'productsPriceEach'=>$productsPriceEach, 
                            'rowClass'=>$rowClass, 
                            'buttonDelete'=>$buttonDelete, 
                            'checkBoxDelete'=>$checkBoxDelete, 
                            'id'=>$products[$i]['id'], 
                            'attributes'=>$attrArray); 
} // end FOR loop 

// This should be last line of the script: 
$zco_notifier->notify('NOTIFY_HEADER_END_SHOPPING_CART'); 
?>
27 Jan 2011, 8:22 PM
#1068
balticccreations avatar

balticccreations

New Zenner

Join Date:
Jan 2011
Location:
Laguna Vista TX
Posts:
42
Plugin Contributions:
0

Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9

ChrisD24:

Holy cow I think I figured it out. Please tell me this works for you!

<?php /** * shopping_cart header_php.php * * @package page * @copyright Copyright 2003-2010 Zen Cart Development Team * @copyright Portions Copyright 2003 osCommerce * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0 * @version $Id: header_php.php 17948 2010-10-13 20:33:18Z drbyte $ */ // This should be first line of the script: $zco_notifier->notify('NOTIFY_HEADER_START_SHOPPING_CART'); require(DIR_WS_MODULES . zen_get_module_directory('require_languages.php')); $breadcrumb->add(NAVBAR_TITLE); // Validate Cart for checkout $_SESSION['valid_to_checkout'] = true; $_SESSION['cart_errors'] = ''; $_SESSION['cart']->get_products(true); if (!$_SESSION['valid_to_checkout']) { $messageStack->add('shopping_cart', ERROR_CART_UPDATE . $_SESSION['cart_errors'] , 'caution'); } // build shipping with Tare included $shipping_weight = $_SESSION['cart']->show_weight(); /* $shipping_weight = 0; require(DIR_WS_CLASSES . 'order.php'); $order = new order; require_once('includes/classes/http_client.php'); // shipping in basket $total_weight = $_SESSION['cart']->show_weight(); $total_count = $_SESSION['cart']->count_contents(); require(DIR_WS_CLASSES . 'shipping.php'); $shipping_modules = new shipping; $quotes = $shipping_modules->quote(); */ $totalsDisplay = ''; switch (true) { case (SHOW_TOTALS_IN_CART == '1'): $totalsDisplay = TEXT_TOTAL_ITEMS . $_SESSION['cart']->count_contents() . TEXT_TOTAL_WEIGHT . $shipping_weight . TEXT_PRODUCT_WEIGHT_UNIT . TEXT_TOTAL_AMOUNT . $currencies->format($_SESSION['cart']->show_total()); break; case (SHOW_TOTALS_IN_CART == '2'): $totalsDisplay = TEXT_TOTAL_ITEMS . $_SESSION['cart']->count_contents() . ($shipping_weight > 0 ? TEXT_TOTAL_WEIGHT . $shipping_weight . TEXT_PRODUCT_WEIGHT_UNIT : '') . TEXT_TOTAL_AMOUNT . $currencies->format($_SESSION['cart']->show_total()); break; case (SHOW_TOTALS_IN_CART == '3'): $totalsDisplay = TEXT_TOTAL_ITEMS . $_SESSION['cart']->count_contents() . TEXT_TOTAL_AMOUNT . $currencies->format($_SESSION['cart']->show_total()); break; } // testing/debugging // require(DIR_WS_MODULES . 'debug_blocks/shopping_cart_contents.php'); $flagHasCartContents = ($_SESSION['cart']->count_contents() > 0); $cartShowTotal = $currencies->format($_SESSION['cart']->show_total()); $flagAnyOutOfStock = false; $products = $_SESSION['cart']->get_products(); for ($i=0, $n=sizeof($products); $i<$n; $i++) { if (($i/2) == floor($i/2)) { $rowClass="rowEven"; } else { $rowClass="rowOdd"; } switch (true) { case (SHOW_SHOPPING_CART_DELETE == 1): $buttonDelete = true; $checkBoxDelete = false; break; case (SHOW_SHOPPING_CART_DELETE == 2): $buttonDelete = false; $checkBoxDelete = true; break; default: $buttonDelete = true; $checkBoxDelete = true; break; $cur_row++; } // end switch $attributeHiddenField = ""; $attrArray = false; $productsName = $products[$i]['name']; // Push all attributes information in an array if (isset($products[$i]['attributes']) && is_array($products[$i]['attributes'])) { if (PRODUCTS_OPTIONS_SORT_ORDER=='0') { $options_order_by= ' ORDER BY LPAD(popt.products_options_sort_order,11,"0")'; } else { $options_order_by= ' ORDER BY popt.products_options_name'; } foreach ($products[$i]['attributes'] as $option => $value) { $attributes = "SELECT popt.products_options_name, poval.products_options_values_name, pa.options_values_price, pa.price_prefix FROM " . TABLE_PRODUCTS_OPTIONS . " popt, " . TABLE_PRODUCTS_OPTIONS_VALUES . " poval, " . TABLE_PRODUCTS_ATTRIBUTES . " pa WHERE pa.products_id = :productsID AND pa.options_id = :optionsID AND pa.options_id = popt.products_options_id AND pa.options_values_id = :optionsValuesID AND pa.options_values_id = poval.products_options_values_id AND popt.language_id = :languageID AND poval.language_id = :languageID " . $options_order_by; $attributes = $db->bindVars($attributes, ':productsID', $products[$i]['id'], 'integer'); $attributes = $db->bindVars($attributes, ':optionsID', $option, 'integer'); $attributes = $db->bindVars($attributes, ':optionsValuesID', $value, 'integer'); $attributes = $db->bindVars($attributes, ':languageID', $_SESSION['languages_id'], 'integer'); $attributes_values = $db->Execute($attributes); //clr 030714 determine if attribute is a text attribute and assign to $attr_value temporarily if ($value == PRODUCTS_OPTIONS_VALUES_TEXT_ID) { $attributeHiddenField .= zen_draw_hidden_field('id[' . $products[$i]['id'] . '][' . TEXT_PREFIX . $option . ']', $products[$i]['attributes_values'][$option]); $attr_value = htmlspecialchars($products[$i]['attributes_values'][$option], ENT_COMPAT, CHARSET, TRUE); } else { $attributeHiddenField .= zen_draw_hidden_field('id[' . $products[$i]['id'] . '][' . $option . ']', $value); $attr_value = $attributes_values->fields['products_options_values_name']; } $attrArray[$option]['products_options_name'] = $attributes_values->fields['products_options_name']; $attrArray[$option]['options_values_id'] = $value; $attrArray[$option]['products_options_values_name'] = $attr_value; $attrArray[$option]['options_values_price'] = $attributes_values->fields['options_values_price']; $attrArray[$option]['price_prefix'] = $attributes_values->fields['price_prefix']; } } //end foreach [attributes] if ( STOCK_CHECK == 'true' ) { // Added to allow individual stock of different attributes unset($attributes); if(is_array($products[$i]['attributes'])){ $attributes = $products[$i]['attributes']; } else { $attributes = ''; } $stock_check = zen_check_stock($products[$i]['id'], $products[$i]['quantity'],$attributes); $flagStockCheck = NULL; if (zen_not_null($stock_check)) { $flagAnyOutOfStock = true; $flagStockCheck = $stock_check; $stockAvailable = zen_get_products_stock($products[$i]['id'], $attributes); } } $linkProductsImage = zen_href_link(zen_get_info_page($products[$i]['id']), 'products_id=' . $products[$i]['id']); $linkProductsName = zen_href_link(zen_get_info_page($products[$i]['id']), 'products_id=' . $products[$i]['id']); $productsImage = (IMAGE_SHOPPING_CART_STATUS == 1 ? zen_image(DIR_WS_IMAGES . $products[$i]['image'], $products[$i]['name'], IMAGE_SHOPPING_CART_WIDTH, IMAGE_SHOPPING_CART_HEIGHT) : ''); $show_products_quantity_max = zen_get_products_quantity_order_max($products[$i]['id']); $showFixedQuantity = (($show_products_quantity_max == 1 or zen_get_products_qty_box_status($products[$i]['id']) == 0) ? true : false); // $showFixedQuantityAmount = $products[$i]['quantity'] . zen_draw_hidden_field('products_id[]', $products[$i]['id']) . zen_draw_hidden_field('cart_quantity[]', 1); // $showFixedQuantityAmount = $products[$i]['quantity'] . zen_draw_hidden_field('cart_quantity[]', 1); $showFixedQuantityAmount = $products[$i]['quantity'] . zen_draw_hidden_field('cart_quantity[]', $products[$i]['quantity']); $showMinUnits = zen_get_products_quantity_min_units_display($products[$i]['id']); $quantityField = zen_draw_input_field('cart_quantity[]', $products[$i]['quantity'], 'size="4"'); $buttonUpdate = ((SHOW_SHOPPING_CART_UPDATE == 1 or SHOW_SHOPPING_CART_UPDATE == 3) ? zen_image_submit(ICON_IMAGE_UPDATE, ICON_UPDATE_ALT) : '') . zen_draw_hidden_field('products_id[]', $products[$i]['id']); $tmp = zen_add_tax($products[$i]['final_price'],zen_get_tax_rate($products[$i]['tax_class_id'])); // $productsPriceEach = $currencies->rateAdjusted($tmp); // $productsPriceTotal = $productsPriceEach * $products[$i]['quantity']; $productsPriceTotal = $currencies->display_price($products[$i]['final_price'], zen_get_tax_rate($products[$i]['tax_class_id']), $products[$i]['quantity']) . ($products[$i]['onetime_charges'] != 0 ? '<br />' . $currencies->display_price($products[$i]['onetime_charges'], zen_get_tax_rate($products[$i]['tax_class_id']), 1) : ''); $productsPriceEach = $currencies->display_price($products[$i]['final_price'], zen_get_tax_rate($products[$i]['tax_class_id']), 1) . ($products[$i]['onetime_charges'] != 0 ? '<br />' . $currencies->display_price($products[$i]['onetime_charges'], zen_get_tax_rate($products[$i]['tax_class_id']), 1) : ''); // $productsPriceTotal = $currencies->display_price($products[$i]['final_price'], zen_get_tax_rate($products[$i]['tax_class_id']), $products[$i]['quantity']) . ($products[$i]['onetime_charges'] != 0 ? '<br />' . $currencies->display_price($products[$i]['onetime_charges'], zen_get_tax_rate($products[$i]['tax_class_id']), 1) : ''); // echo $currencies->rateAdjusted($tmp); $productArray[$i] = array('attributeHiddenField'=>$attributeHiddenField, 'stockAvailable'=>$stockAvailable, 'flagStockCheck'=>$flagStockCheck, 'flagShowFixedQuantity'=>$showFixedQuantity, 'linkProductsImage'=>$linkProductsImage, 'linkProductsName'=>$linkProductsName, 'productsImage'=>$productsImage, 'productsName'=>$productsName, 'showFixedQuantity'=>$showFixedQuantity, 'showFixedQuantityAmount'=>$showFixedQuantityAmount, 'showMinUnits'=>$showMinUnits, 'quantityField'=>$quantityField, 'buttonUpdate'=>$buttonUpdate, 'productsPrice'=>$productsPriceTotal, 'productsPriceEach'=>$productsPriceEach, 'rowClass'=>$rowClass, 'buttonDelete'=>$buttonDelete, 'checkBoxDelete'=>$checkBoxDelete, 'id'=>$products[$i]['id'], 'attributes'=>$attrArray); } // end FOR loop // This should be last line of the script: $zco_notifier->notify('NOTIFY_HEADER_END_SHOPPING_CART'); ?>


Still doesn't show on the actual item page how many are available for each attribute but :clap: it does now show the error with quantity if they order more than what's in stock!!!! YAY!!
27 Jan 2011, 8:44 PM
#1069
nojoke avatar

nojoke

New Zenner

Join Date:
Jan 2011
Posts:
20
Plugin Contributions:
0

Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9

Im having issues with this add on. Everything works fine except when you go to checkout it still allows it even though the stock is not there and the setting to allow checkout is set to false. I have implemented the post up above and still im not getting anywhere.

Not sure whats going on :cry:

27 Jan 2011, 8:47 PM
#1070
chrisd24 avatar

chrisd24

New Zenner

Join Date:
Jan 2011
Posts:
37
Plugin Contributions:
0

Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9

NOJoke:

Im having issues with this add on. Everything works fine except when you go to checkout it still allows it even though the stock is not there and the setting to allow checkout is set to false. I have implemented the post up above and still im not getting anywhere.

Not sure whats going on :cry:

Does it disable checkout on non attribute products? Right now I have it where everything works but on attribute product, checkout is still allowed. Ideally, I want the attribute products to be blocked from checking out, but that is just another bug that I'll attempt to fix - but it is a small bug compared to at least warning them to reduce there stock count.

27 Jan 2011, 8:50 PM
#1071
balticccreations avatar

balticccreations

New Zenner

Join Date:
Jan 2011
Location:
Laguna Vista TX
Posts:
42
Plugin Contributions:
0

Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9

ChrisD24:

Right now I have it where everything works but on attribute product, checkout is still allowed. Ideally, I want the attribute products to be blocked from checking out, but that is just another bug that I'll attempt to fix - but it is a small bug compared to at least warning them to reduce there stock count.

I'll have to make a sold out attribute on mine to see if it will work because I don't have any sold out right now...ill check and see then tell you if mine does that too

ETA works on mine! I set it up on this listing

http://balticcreations.net/index.php?main_page=product_info&products_id=18:1b7bd11004304a38407c3114fa4871ad

the first option "butterscotch" is the sold out one it will now tell them in the cart it is sold out. The ones below it each have 1 item in stock. In the cart it gives an error telling you that the sold out one has 0 in stock and will not allow checkout.

27 Jan 2011, 8:54 PM
#1072
nojoke avatar

nojoke

New Zenner

Join Date:
Jan 2011
Posts:
20
Plugin Contributions:
0

Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9

Yeah if it doesnt have an attribute it wont allow checkout if it has an attribute and the qty is more then what we have then it will allow checkout.

Hope this is fixed soon.. dont want to run into problems with any customers

27 Jan 2011, 8:57 PM
#1073
balticccreations avatar

balticccreations

New Zenner

Join Date:
Jan 2011
Location:
Laguna Vista TX
Posts:
42
Plugin Contributions:
0

Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9

NOJoke:

Yeah if it doesnt have an attribute it wont allow checkout if it has an attribute and the qty is more then what we have then it will allow checkout.

Hope this is fixed soon.. dont want to run into problems with any customers

which version of the stock by attributes are you using and which version of Zen Cart?

27 Jan 2011, 9:00 PM
#1074
nojoke avatar

nojoke

New Zenner

Join Date:
Jan 2011
Posts:
20
Plugin Contributions:
0

Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9

balticccreations:

which version of the stock by attributes are you using and which version of Zen Cart?

im using 1.3.9h.

if you want you can check it out and see if you can find anything

the link is here

27 Jan 2011, 9:08 PM
#1075
nojoke avatar

nojoke

New Zenner

Join Date:
Jan 2011
Posts:
20
Plugin Contributions:
0

Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9

oh wait duh you mean the version of the attribute addon(stock_by_attributes_1-4-12). im using the one that was released in november of 2010

27 Jan 2011, 9:44 PM
#1076
nojoke avatar

nojoke

New Zenner

Join Date:
Jan 2011
Posts:
20
Plugin Contributions:
0

Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9

balticccreations:

I'll have to make a sold out attribute on mine to see if it will work because I don't have any sold out right now...ill check and see then tell you if mine does that too

ETA works on mine! I set it up on this listing

http://balticcreations.net/index.php?main_page=product_info&products_id=18:1b7bd11004304a38407c3114fa4871ad

the first option "butterscotch" is the sold out one it will now tell them in the cart it is sold out. The ones below it each have 1 item in stock. In the cart it gives an error telling you that the sold out one has 0 in stock and will not allow checkout.

Wow..it does work.. how did you get that to work like that..:lamo:

28 Jan 2011, 1:09 AM
#1077
nojoke avatar

nojoke

New Zenner

Join Date:
Jan 2011
Posts:
20
Plugin Contributions:
0

Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9

Bleh i tried the new beta version and it worked great for the first product..however the second product not so well.

I think i need to delete the old sql patch that was for the other version to install the one for the new version and possibly input that new code that was posted a few pages back.

But what the issue that I ran into with my site is that I have multiple listings that are going to need an attribute called Size(Adult): with the sizes of course. The first listing works great, the second doesnt because it allows the user to purchase how ever many the final qty is of the total size break down.

If you go here http://sportzdirect.com/shop

and look at the black majestic product it works great because there are only 2 small sizes available and when you hit 3 it says to lower it and it doesnt allow checkout, now if you go to the cardinal majestic product and you go to small and type in 16 it wont allow you to buy anymore since the total for all sizes is 15. You should only be able to buy no more then 3 for that one as well.

I dont know what is going on ...:cry:

28 Jan 2011, 4:23 AM
#1078
chrisd24 avatar

chrisd24

New Zenner

Join Date:
Jan 2011
Posts:
37
Plugin Contributions:
0

Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9

NOJoke:

Bleh i tried the new beta version and it worked great for the first product..however the second product not so well.

I think i need to delete the old sql patch that was for the other version to install the one for the new version and possibly input that new code that was posted a few pages back.

But what the issue that I ran into with my site is that I have multiple listings that are going to need an attribute called Size(Adult): with the sizes of course. The first listing works great, the second doesnt because it allows the user to purchase how ever many the final qty is of the total size break down.

If you go here http://sportzdirect.com/shop

and look at the black majestic product it works great because there are only 2 small sizes available and when you hit 3 it says to lower it and it doesnt allow checkout, now if you go to the cardinal majestic product and you go to small and type in 16 it wont allow you to buy anymore since the total for all sizes is 15. You should only be able to buy no more then 3 for that one as well.

I dont know what is going on ...:cry:

So it's just one product that is acting "strange"? I had an issue where the attributes for a product was (for some reason) not allowing more than 1 to be added when there was plenty of stock and the max was 3.

After trying different things I added a new product to replace it, and then it worked perfectly. I am not sure if this is the case, but it's worth a shot if the stocks by attributes is just not working for this one product you have.

28 Jan 2011, 5:20 AM
#1079
nojoke avatar

nojoke

New Zenner

Join Date:
Jan 2011
Posts:
20
Plugin Contributions:
0

Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9

ChrisD24:

So it's just one product that is acting "strange"? I had an issue where the attributes for a product was (for some reason) not allowing more than 1 to be added when there was plenty of stock and the max was 3.

After trying different things I added a new product to replace it, and then it worked perfectly. I am not sure if this is the case, but it's worth a shot if the stocks by attributes is just not working for this one product you have.

Just the one product is not allowing it to use the same attribute as the other.. meaning that the one works fine with it now allowing checkout.. but when i use the same attribute on another product it doesnt work whatsoever

I might have to take and have my site restored a couple days ago and fresh install the sql file and every one of the files but i dont think that has anything to do with it.. idk im getting to my whitts end

28 Jan 2011, 5:31 AM
#1080
nojoke avatar

nojoke

New Zenner

Join Date:
Jan 2011
Posts:
20
Plugin Contributions:
0

Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9

wow.. now its only working for the one product and not for any other ones after i set the attributes..maybe something is missing from my sql file..does anyone know how to remove the sql that was installed in the 4.0 version and how to replace it with the new sql file?