Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9
Quote:
Originally Posted by
DivaVocals
what I highlighted is probably the issue since the error indicates that the products_with_attributes_stock table is missing a column called "sort".. Perhaps updating the SQl is in order..
Thanks! I inserted the file update_1_4_10.sql into my database and the problem went away. The readme file and this forum really didn't have any explanation for that file and made no mention of inserting that sql file when updating from a previous version of SBA. Others have questioned that file as well, someone should put information on it in the Readme next update. Thanks again for the help, great mod!
Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9
Quote:
Originally Posted by
simply_sterling
Thanks! I inserted the file update_1_4_10.sql into my database and the problem went away. The readme file and this forum really didn't have any explanation for that file and made no mention of inserting that sql file when updating from a previous version of SBA. Others have questioned that file as well, someone should put information on it in the Readme next update. Thanks again for the help, great mod!
Rule of thumb: In GENERAL most add-ons that include a SQL file that is usually run as part of the install..
Re: "someone should put information on it in the Readme next update", no one is actively maintaining some of the SBA version available.. it's open source so ANYONE can submit an updated version with updated instructions if they would like to volunteer to do so..
Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9
Not sure if this is the proper place, but I just wanted to mention that I have taken the code v4.14 and merged the changes with my test store using zen-cart 1.5. I had to fix a bug in the file /includes/modules/pages/shopping_cart/header.php to enable the shopping cart to display out of stock messages correctly, and I created a new file /admin/includes/functions/extra_functions/products_with_attributes_stock.php which will register the page in the admin->catalog menu for zen-cart 1.5. I've done a lot of testing with this and it seems to be stable, however, I don't have any dropdown product options in my store, so these are not tested. Radio and Check Boxes work just fine.
I don't have a clean 1.5 installation to create a new package from for the plugin, but I will be happy to list the changes made for anyone who would like to update the plugin.
Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9
Quote:
Originally Posted by
batracy
Not sure if this is the proper place, but I just wanted to mention that I have taken the code v4.14 and merged the changes with my test store using zen-cart 1.5. I had to fix a bug in the file /includes/modules/pages/shopping_cart/header.php to enable the shopping cart to display out of stock messages correctly, and I created a new file /admin/includes/functions/extra_functions/products_with_attributes_stock.php which will register the page in the admin->catalog menu for zen-cart 1.5. I've done a lot of testing with this and it seems to be stable, however, I don't have any dropdown product options in my store, so these are not tested. Radio and Check Boxes work just fine.
I don't have a clean 1.5 installation to create a new package from for the plugin, but I will be happy to list the changes made for anyone who would like to update the plugin.
Hi I was wondering if you could tell me how to fix the bug and make the new function file. I have tried installing this add on but it does not appear to work in Zencart version 1.5.0
Any help greatly appreciated.
Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9
The fix for the includes/modules/pages/shopping_cart/header.php is rather simple, and it may have been a problem with the merge that I did. Just make sure the stock with attributes code is after the second closing bracket "}" as shown below:
Code:
} //end foreach [attributes]
} //end if [attributes]
// stock by 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 = '';
}
$flagStockCheck = zen_check_stock($products[$i]['id'], $products[$i]['quantity'],$attributes);
$stockAvailable = zen_get_products_stock($products[$i]['id'], $attributes);
if ($flagStockCheck == true) {
$flagAnyOutOfStock = true;
}
}
// end stock by attributes
Here is the code for the /admin/includes/functions/extra_functions/products_with_attributes_stock.php
Code:
<?php
if (!defined('IS_ADMIN_FLAG')) {
die('Illegal Access');
}
if (function_exists('zen_register_admin_page')) {
if (!zen_page_key_exists('products_with_attributes_stock')) {
zen_register_admin_page('products_with_attributes_stock', 'BOX_CATALOG_PRODUCTS_WITH_ATTRIBUTES_STOCK','FILENAME_PRODUCTS_WITH_ATTRIBUTES_STOCK', '', 'catalog', 'Y', 6);
}
}
?>
I also found that the ajax part of the code does not work in v1.5 and so I removed it (kept the css file but renamed it). This means that to update the stock, you will have to edit each individually. This is not really a problem for me as I don't have that many products with attributes (less than 30).
Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9
Oh, I almost forgot...
After removing the ajax code, I found an error with the SQL syntax in the saveAtrrib function in the class file /admin/includes/classes/products_with_attributes_stock.php. The SQL should be corrected as follows:
Code:
$sql = "UPDATE ".TABLE_PRODUCTS_WITH_ATTRIBUTES_STOCK." SET quantity = '" . $value . "' WHERE stock_id = " .$id. " LIMIT 1";
correcting the SQL syntax may enable the ajax part of the code to work.
Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9
Hello,
I am using zencart.1.3.9 with stock by attributes 1.4.13,
When at the shopping cart page I get the message at the top saying "Products marked with Sorry, we are currently out of stock of this item are out of stock or there are not enough in stock to fill your order.
Please change the quantity of products marked with (Sorry, we are currently out of stock of this item). Thank you"
But in the cart area below that statement that shows the items, it does NOT show which item is out of stock. It is a problem because I have multiple items selling and the customer does not know what item is out. Below are my stock
attribute settings. Any Suggestions?
Check stock level true
Subtract stock true Info
Allow Checkout false Info
Mark product out of stock Sorry, we are currently out of stock of this item Info
Stock Re-order level 5 Info
Show available stock level in cart when less than order true Info
Display Images in Admin false Info
Products status in Catalog when out of stock should be set to 0 Info
Show Sold Out Image in place of Add to Cart 1 Info
Product Quantity Decimals 0 Info
Show Shopping Cart - Delete Checkboxes or Delete Button 3 Info
Show Shopping Cart - Update Cart Button Location 3 Info
Show New Products on empty Shopping Cart Page 1 Info
Show Featured Products on empty Shopping Cart Page 2 Info
Show Special Products on empty Shopping Cart Page 3 Info
Show Upcoming Products on empty Shopping Cart Page 4 Info
Show Notice of Combining Shopping Cart on Login
my site can be found at and if you wish to test, and the item I am out of is
http://www.ruminaformoms.com/catalog/index.php
The Relaxed Soft Tank - $48.00
• Color - Black
• Size - Large
Below is how I have the attributes set up.
38 TEXT + 0.0000 + 0 0
Display Only Free Default Discounted Base Price Required
$0.00 $0.00 Update Delete
Delete Color
37 Color White + 0.0000 + 0 1
Display Only Free Default Discounted Base Price Required
$0.00 $0.00 Update Delete
36 Color Black + 0.0000 + 0 2
Display Only Free Default Discounted Base Price Required
$0.00 $0.00 Update Delete
Delete Size
32 Size Small + 0.0000 + 0.4625 1
Display Only Free Default Discounted Base Price Required
$0.00 $0.00 Update Delete
34 Size Large + 0.0000 + 0.38 3
Display Only Free Default Discounted Base Price Required
$0.00 $0.00 Update Delete
35 Size X-Large + 0.0000 + 1 4
Display Only Free Default Discounted Base Price Required
$0.00 $0.00 Update Delete
Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9
Gokeypa - you need to apply the fix I outlined in an earlier post for the includes/modules/pages/shopping_cart/header.php file. You need to make sure the stock by attributes code is below the second closing bracket. See my example code in my earlier post.
I was getting the same error and found that the stock by attributes code was placed in the wrong location in the code. Moving it as outlined previously will fix this error. Let me know if you need further assistance.
Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9
Hey guys and gals, I am a noob, (As every one sighes!! Another one!!) Sorry!! I am stuck in a pickle and I'm trying to dig my way out.
After installing ZC 1.5, configured the cart to be fully operational with all my needed settings and looks, I have found that I need a module like Stock by Attribute to help me keep track of multiple attributes in my inventory. This scenario would fall in line with the whole t-shirt sizes and colors attributes analogy very similarly. My problem is that I have already started loading products, yet our catalog menu and options have just trippled over night, which is going to cause a major headache as we grow. Now that I'm to this point, going back to a fresh install to add this module would set me back weeks. Is there anyway I can get some help figuring out how to make changes to the php files without starting from scratch? I would greatly appreciate it!
P.S. I started to do a fresh install on a seperate server if it helps to cut corners, then relocate. Whichever is easier!
Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9
Using ZENCART 1.5
Would like to implement "Stock by Attributes 4.7 multi add"
Unix based server (justhost.com)
Link to site: http://www.american-savage.com/index...roducts_id=254
PROBLEM:
I am selling Women's Shorts in two sizes, and the stocking level for each is unique.
The attributes are only two: (Size small and Size medium).
Is there a simple way to do this? When I say simple, I mean can I use features already built into V1.5 ?
Thank you for your time.
Regards,
jund (John Underwood)