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,536

Results 1,461 to 1,480 of 3,609
24 Feb 2012, 6:44 PM
#1462
garmour avatar

garmour

New Zenner

Join Date:
Jan 2012
Posts:
5
Plugin Contributions:
0

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

Okay, I figured out that I needed to change the name of the "admin" folder in the addon to the name of the Admin folder in my Zen cart installation. After that, the installation went smoothly.

I ran the SQL script in Zen Cart (Tools/Install SQL Patches) and then uploaded the module files with FileZilla. Note that I backed up my database before doing this.

There is now a new menu choice on the Catalog dropdown, "Products with Attributes Stock" that enables the admin to add quantities to his various product sizes.

So, if you have renamed your Zen Cart Admin folder (and you should), rename the "admin" folder in the unzipped files to exactly match the name on the server. Hopefully, the author will add this small but important bit of information to the install instructions.

24 Feb 2012, 7:16 PM
#1463
divavocals avatar

divavocals

Totally Zenned

Join Date:
Jan 2007
Location:
Los Angeles, California, United States
Posts:
10,011
Plugin Contributions:
3

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

No one has updated those instructions in YEARS.. but it's sort of a known deal with most mods.. So most storeowner figure it out..

GArmour:

Okay, I figured out that I needed to change the name of the "admin" folder in the addon to the name of the Admin folder in my Zen cart installation. After that, the installation went smoothly.

I ran the SQL script in Zen Cart (Tools/Install SQL Patches) and then uploaded the module files with FileZilla. Note that I backed up my database before doing this.

There is now a new menu choice on the Catalog dropdown, "Products with Attributes Stock" that enables the admin to add quantities to his various product sizes.

So, if you have renamed your Zen Cart Admin folder (and you should), rename the "admin" folder in the unzipped files to exactly match the name on the server. Hopefully, the author will add this small but important bit of information to the install instructions.

24 Feb 2012, 9:54 PM
#1464
ec_web avatar

ec_web

New Zenner

Join Date:
Feb 2011
Posts:
89
Plugin Contributions:
0

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

I had a problem with the shopping cart letting customers add too many products to cart with no warning (non attribute products). But the cart would not let them check out and it didn't say why. This solution worked for me, maybe it can help others too. I replaced the code in includes/modules/pages/shopping_cart/header_php.php :clap:

This was done with SBA version 1.4.13 in zen 1.3.9h

athena:

I changed all the "Out of Stock" text in my cart by running a case sensitive search being careful to choose the display text incidents of the phrase to "More on Order".

BTW - In case anyone is looking for this file, I fixed many problems, as Chris suggested above, by replacing my includes/modules/pages/shopping_cart/header_php.php with the one below from an earlier version of stock by attributes, namely stock_by_attributes_4-7MULTIADD.

No other modification needed. I'm running 1.3.9h upgrading from 1.3.8a

<?php /** * shopping_cart header_php.php * * @package page * @copyright Copyright 2003-2007 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 0000 2007-12-02 00:00:00Z kuroi $ */ // 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']; if (STOCK_CHECK == 'true') { $flagStockCheck = zen_check_stock($products[$i]['id'], $products[$i]['quantity']); if ($flagStockCheck == true) { $flagAnyOutOfStock = true; } $stockAvailable = zen_get_products_stock($products[$i]['id']); } // 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 = $products[$i]['attributes_values'][$option]; } 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'] = zen_output_string_protected($attr_value) ; $attrArray[$option]['options_values_price'] = $attributes_values->fields['options_values_price']; $attrArray[$option]['price_prefix'] = $attributes_values->fields['price_prefix']; } 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 = ''; } // End change $stock_check = zen_check_stock($products[$i]['id'], $products[$i]['quantity'],$attributes); if (zen_not_null($stock_check)) { $flagAnyOutOfStock = true; $flagStockCheck = $stock_check; $stockAvailable = zen_get_products_stock($products[$i]['id'], $attributes); } } } //end foreach [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']); $productsPrice = $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) : ''); $productArray[$i] = array('attributeHiddenField'=>$attributeHiddenField, 'flagStockCheck'=>$flagStockCheck, 'flagShowFixedQuantity'=>$showFixedQuantity, 'linkProductsImage'=>$linkProductsImage, 'linkProductsName'=>$linkProductsName, 'stockAvailable'=>$stockAvailable, 'productsImage'=>$productsImage, 'productsName'=>$productsName, 'showFixedQuantity'=>$showFixedQuantity, 'showFixedQuantityAmount'=>$showFixedQuantityAmount, 'showMinUnits'=>$showMinUnits, 'quantityField'=>$quantityField, 'buttonUpdate'=>$buttonUpdate, 'productsPrice'=>$productsPrice, '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'); ?>
25 Feb 2012, 12:46 AM
#1465
perezosoo avatar

perezosoo

New Zenner

Join Date:
Feb 2012
Posts:
1
Plugin Contributions:
0

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

I want to install stock by attributes on v.1.5.0
I seem like this doesn't work. I NEED this module for my site.
When and where can I get this to work?

25 Feb 2012, 1:14 AM
#1466
divavocals avatar

divavocals

Totally Zenned

Join Date:
Jan 2007
Location:
Los Angeles, California, United States
Posts:
10,011
Plugin Contributions:
3

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

It's AMAZING what you find when you look up the page just a few posts..

creinold:

creinold stocks by attribute zc 1.5.0 alpha version:

http://www.zen-cart.com/forum/showpost.php?p=1106389&postcount=1091

creinold:

New update:

http://www.zen-cart.com/forum/showpost.php?p=1106527&postcount=1099

perezosoo:

I want to install stock by attributes on v.1.5.0
I seem like this doesn't work. I NEED this module for my site.
When and where can I get this to work?

26 Feb 2012, 8:21 PM
#1467
bigwavemaui avatar

bigwavemaui

New Zenner

Join Date:
Mar 2008
Posts:
4
Plugin Contributions:
0

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

Hi, I updated my cart (version v1.3.9e) with Version: 1.4.14 of Stock by Attributes

This update fixes an XHTML error which causes the inline editing of quantities to not get saved. Only one file affected (see readme.html).

I renamed stuff as directed for my template and checked to see that all the files were over written but I still can't save attribute quantities,

Any help would be appreciated. A easy work-around would be great!

Sorry if this is a duplicate, I can't seem to find anything specific to my problem using search.

Thanks

27 Feb 2012, 8:33 AM
#1468
slyrick avatar

slyrick

New Zenner

Join Date:
Feb 2012
Posts:
5
Plugin Contributions:
0

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

creinold:

New update:

http://www.zen-cart.com/forum/showpost.php?p=1106527&postcount=1099

Hey Creinold,

I've installed your latest alpha of this module (I'm running zencart v1.5) and it doesn't show up at all, I've made sure the template folder was renamed and installed the SQL patch in zencart's admin area as per the instructions.

I've used a previous version of the module for a old install of zencart (1.37 or 1.38 I think??) would this affect the install of the alpha?

28 Feb 2012, 4:14 PM
#1469
creinold avatar

creinold

Zen Follower

Join Date:
Sep 2008
Location:
North Highlands, California 95660
Posts:
287
Plugin Contributions:
0

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

SlyRick:

Hey Creinold,

I've installed your latest alpha of this module (I'm running zencart v1.5) and it doesn't show up at all, I've made sure the template folder was renamed and installed the SQL patch in zencart's admin area as per the instructions.

I've used a previous version of the module for a old install of zencart (1.37 or 1.38 I think??) would this affect the install of the alpha?

What version of zen-cart are you installing this on?

28 Feb 2012, 6:00 PM
#1470
creinold avatar

creinold

Zen Follower

Join Date:
Sep 2008
Location:
North Highlands, California 95660
Posts:
287
Plugin Contributions:
0

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

Okay I see the problem. Got to fix the SQL insert for admin page registration. Will do later tonight. Sorry about that ;)

29 Feb 2012, 12:57 AM
#1471
slyrick avatar

slyrick

New Zenner

Join Date:
Feb 2012
Posts:
5
Plugin Contributions:
0

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

creinold:

What version of zen-cart are you installing this on?

The latest version, 1.5. As I said in my post I had SBA installed for v1.39 of Zen-cart (Can remember version number of SBA) would this be affecting the version of your's I've installed?

29 Feb 2012, 12:58 AM
#1472
slyrick avatar

slyrick

New Zenner

Join Date:
Feb 2012
Posts:
5
Plugin Contributions:
0

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

creinold:

Okay I see the problem. Got to fix the SQL insert for admin page registration. Will do later tonight. Sorry about that ;)

Ah sweet as will be good to get this sorted for my client (She's pregnant and overdue so stress levels are whacked :shocking: ) and have it back up and running fine as.

1 Mar 2012, 12:13 AM
#1473
creinold avatar

creinold

Zen Follower

Join Date:
Sep 2008
Location:
North Highlands, California 95660
Posts:
287
Plugin Contributions:
0

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

Not sure what is happening, I got it to show up on my Admin menu on my clients live site without a problem, with my test site: that's a whole new story. It won't show.

I decided to move all the configuration setting into the "stock" settings in admin. IE: Configuration --> Stock

The settings have to deal with stock so I felt they best go there. Best of all don't have to register the page in Admin page since that by default is already registered.

Now getting it to show up to work in the Catalog --> Products with Stock is making me mad. LOL So for a work around type the url to get to it. (Make sure you log in to your admin first)

YourDomain.com/Admin/products_with_attributes_stock.php

I'll keep working on getting it to register on the Admin menu. I am just baffled why I can get to work on one site but not my others?

Here is an update SQL that puts the settings into the admin Stock Configuration:

CREATE TABLE products_with_attributes_stock (stock_id INT NOT NULL AUTO_INCREMENT, products_id INT NOT NULL, stock_attributes VARCHAR( 255 ) NOT NULL, quantity FLOAT NOT NULL, sort INT NOT NULL, PRIMARY KEY ( `stock_id` ));

ALTER TABLE products_options 
  ADD products_options_track_stock tinyint(4) default '1' not null
  AFTER products_options_name;

INSERT IGNORE INTO configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES ('Display Images in Admin', 'STOCK_SHOW_IMAGE', 'false','Display image thumbnails on Products With Attributes Stock page? (warning, setting this to true can severly slow the loading of this page):','9','6',NULL,now(),NULL,"zen_cfg_select_option(array('true', 'false'),");

INSERT IGNORE INTO configuration_group (configuration_group_id, configuration_group_title, configuration_group_description, sort_order, visible) VALUES (9, 'Stocks With Attributes', 'Stocks With Attributes', 9, 1);

INSERT IGNORE INTO configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES ('Show available stock level in cart when less than order', 'STOCK_SHOW_LOW_IN_CART', 'false', 'When customer places more items in cart than are available, show the available amount on the shopping cart page:', '9', '1', NULL, now(), NULL, "zen_cfg_select_option(array('true', 'false'),");

INSERT IGNORE INTO configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added, use_function, set_function) VALUES ('Product Info Single Attribute Display Plugin', 'PRODINFO_ATTRIBUTE_PLUGIN_SINGLE', 'multiple_dropdowns', 'The plugin used for displaying attributes on the product information page.', 9, 1, now(), NULL, 'zen_cfg_select_option(array(\'single_radioset\', \'single_dropdown\',\'multiple_dropdowns\',\'sequenced_dropdowns\'),');

INSERT IGNORE INTO configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added, use_function, set_function) VALUES ('Product Info Multiple Attribute Display Plugin', 'PRODINFO_ATTRIBUTE_PLUGIN_MULTI', 'sequenced_dropdowns', 'The plugin used for displaying attributes on the product information page.', 9, 1, now(), NULL, 'zen_cfg_select_option(array(\'single_radioset\', \'single_dropdown\',\'multiple_dropdowns\',\'sequenced_dropdowns\'),');

INSERT IGNORE INTO configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added, use_function, set_function) VALUES ('Show Out of Stock Attributes', 'PRODINFO_ATTRIBUTE_SHOW_OUT_OF_STOCK', 'True', 'Controls the display of out of stock attributes.', 9, 10, now(), NULL, 'zen_cfg_select_option(array(\'True\', \'False\'),');

INSERT IGNORE INTO configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added, use_function, set_function) VALUES ('Mark Out of Stock Attributes', 'PRODINFO_ATTRIBUTE_MARK_OUT_OF_STOCK', 'Right', 'Controls how out of stock attributes are marked as out of stock.', 9, 20, now(), NULL, 'zen_cfg_select_option(array(\'None\', \'Right\', \'Left\'),');

INSERT IGNORE INTO configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added, use_function, set_function) VALUES ('Display Out of Stock Message Line', 'PRODINFO_ATTRIBUTE_OUT_OF_STOCK_MSGLINE', 'True', 'Controls the display of a message line indicating an out of stock attributes is selected.', 9, 30, now(), NULL, 'zen_cfg_select_option(array(\'True\', \'False\'),');

INSERT IGNORE INTO configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added, use_function, set_function) VALUES ('Prevent Adding Out of Stock to Cart', 'PRODINFO_ATTRIBUTE_NO_ADD_OUT_OF_STOCK', 'True', 'Prevents adding an out of stock attribute combination to the cart.', 9, 40, now(), NULL, 'zen_cfg_select_option(array(\'True\', \'False\'),');

INSERT IGNORE INTO `configuration` VALUES (1286, 'Disable drop down menu when stock equals zero', 'sba_zero_disable ', 'true', 'Set drop down menu to automatically disable when the attribute quantity equals zero:', 9, 6, '2010-07-25 15:29:27', '2010-07-25 14:44:56', NULL, 'zen_cfg_select_option(array(''true'', ''false''),');

# Register the pages for Admin Access Control
INSERT IGNORE INTO admin_pages (page_key, language_key, main_page, page_params, menu_key, display_on_menu, sort_order) VALUES ('products with attributes stock', 'BOX_CATALOG_PRODUCTS_WITH_ATTRIBUTES_STOCK', 'FILENAME_PRODUCTS_WITH_ATTRIBUTES_STOCK', '', 'catalog', 'Y', 100);
1 Mar 2012, 3:36 PM
#1476
creinold avatar

creinold

Zen Follower

Join Date:
Sep 2008
Location:
North Highlands, California 95660
Posts:
287
Plugin Contributions:
0

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

Need to use phpadmin to delete these table:

CREATE TABLE products_with_attributes_stock (stock_id INT NOT NULL AUTO_INCREMENT, products_id INT NOT NULL, stock_attributes VARCHAR( 255 ) NOT NULL, quantity FLOAT NOT NULL, sort INT NOT NULL, PRIMARY KEY ( stock_id ));

and this column:
ALTER TABLE products_options
ADD products_options_track_stock tinyint(4) default '1' not null
AFTER products_options_name;

Then run the SQL again

I re-uploaded file. Seems to download okay for me?

4 Mar 2012, 1:28 PM
#1477
callmeal avatar

callmeal

New Zenner

Join Date:
Mar 2012
Posts:
42
Plugin Contributions:
0

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

Hi, I updated my cart (version v1.3.9e) with Version: 1.4.14 of Stock by Attributes. I am also using a free template from picaflor.

I'm a total newbie at this so sorry if this is a stupid question. I think I have installed the files correctly, as I'm getting the stock and products with attributes stock menus, and I've tried adding a few quantities for a few attributes (size ones) - but when i get to my website it still doesn't show? I choose a size in the dropdown, but the quantity available doesn't update... effectively in the actual website I can't see anything indicating the stock level by attribute. The website is jibadoo.com.au/products.

Help anybody? :(

5 Mar 2012, 7:10 PM
#1478
sheryll avatar

sheryll

New Zenner

Join Date:
Dec 2009
Location:
New York, NY
Posts:
45
Plugin Contributions:
0

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

To register the page here's the edit:

# Register the pages for Admin Access Control
INSERT IGNORE INTO admin_pages (page_key, language_key, main_page, page_params, menu_key, display_on_menu, sort_order) VALUES ('products with attributes stock', 'BOX_PRODUCTS_WITH_ATTRIBUTES_STOCK', 'FILENAME_PRODUCTS_WITH_ATTRIBUTES_STOCK', '', 'catalog', 'Y', 100);

remove 'CATALOG' from 'language_key': 'BOX_CATALOG_PRODUCTS_WITH_ATTRIBUTES_STOCK' should be 'BOX_PRODUCTS_WITH_ATTRIBUTES_STOCK'

-OR-

To do it manually on Admin Page Registration page, enter the following values:

Page Key: products with attributes stock
Page Name: BOX_PRODUCTS_WITH_ATTRIBUTES_STOCK
Page Filename: FILENAME_PRODUCTS_WITH_ATTRIBUTES_STOCK
Page Parameters: [leave blank]
Menu (select): Catalog
Display on Menu?: [check]
Sort Order: 999

Thank you creinold for your fix, it works for me on v1.5, however, there's just one thing:

On the product info page, I have 2 attributes options. The new drop down versions and the old radio button options. How do I get rid of the old radio button option?

Thanks again for your help, I wouldn't have been able to get this far without your efforts. :clap:

5 Mar 2012, 7:45 PM
#1479
sheryll avatar

sheryll

New Zenner

Join Date:
Dec 2009
Location:
New York, NY
Posts:
45
Plugin Contributions:
0

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

One more thing, I'm assuming the dynamic drop down menu is supposed to be ajax based. The function doesn't seem to be working though for example length + color option. If the user selects the length option first, the colors drop down menu should refresh to display the available colors that are in stock.

This is beyond the scope of my knowledge so I'm unable to troubleshoot further. I wouldn't know how to check if it's an ajax problem or sql problem.

5 Mar 2012, 8:43 PM
#1480
sheryll avatar

sheryll

New Zenner

Join Date:
Dec 2009
Location:
New York, NY
Posts:
45
Plugin Contributions:
0

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

You can ignore the previous post, I got the it to work.