Awesome you guys! Thank for the help I really appreciate it!
Printable View
Awesome you guys! Thank for the help I really appreciate it!
I followed the instructions, and everything went as I hoped for except that the stock didn't show on the checkout.
Earlier version, both the shoppingcart and the checkout area told the customer if the product with attribs were out of stock, but this new version only told the customer in the shoppingcart, and not on the last checkoutpage.
Did you understand?
Is this a "bug", or did I do something wrong?
Forgot to mention, that I am now building a Zen Cart 1.39f version, and I have not tried creinfolds version - maybe I should?
Also, I want to install Fast and Easy Checkout, Superorders and Ty Package Tracker. Anyone know in which order they should be installed in?
Does anyone know what the following file does? It appears to be encoded or encrypted. It is in the current download.
/includes/languages/english/.DS_store
That's a Mac file, normally hidden, containing I believe, a directory listing. Throw it away.
Thanks. :D
I knew that file did not fit with all of the PHP code, but I did not know what it is. You can see that I never use a Mac
Hello,
I wanted to check if there was a fix using this mod and adding a radio or checkbox to a product? Is it still not possible?
Incidentally, I've just installed this mod on a fresh 1.3.9f store - and it works! (when I tried a 1.3.9d upgrade I must have "done something" because it wouldn't even show out of stock items on the store during checkout).
@creiner (and all previous contributors) thanks very much for maintaining this absolutely essential mod, I wouldn't be able to set this store up and reasonably maintain it without this kind of volunteered time and effort, and I really appreciate it (along with all the other users I'm sure!)
hello,
in admin, now the SBA page is ordered by product name, i want it by product model, what do i modify the codes ?
I have installed 1.3.9d (my first zencart) and Stock by Attributes 1-4-10.
The Stock by Attributes doesn't show in the admin screen. I have run the SQL patch and copied the files as per the Readme except that the install instructions refer to a file includes/modules/YOUR_TEMPLATE that needs to be renamed but this doesn't exist in the download. Can anyone tell me what I am missing.
This is my second post on this, the first seems to have been removed???
OK. Turns out the download at http://www.zen-cart.com/index.php?ma...roducts_id=310 is missing a bunch of files that I found on another link posted in the forum.
What a total waste of two days.
Hi forum...having problems.
1. Why is it I can download this for free and in other sites is $45 - $100???
2. I think I made a mistake in uploading the SQL file because it spits out a message about duplicate BUT I have everything in the (free) zip file uploaded. This is it...
1062 Duplicate entry 'STOCK_SHOW_LOW_IN_CART' for key 2
in:
[INSERT INTO zencart_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', '6', NULL, now(), NULL, "zen_cfg_select_option(array('true', 'false')," ), ('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')," );]
If you were entering information, press the BACK button in your browser and re-check the information you had entered to be sure you left no blank fields.
With that error, I think I need to "reset" something. I'm confused....
Any help?
1. Where are you seeing it listed for sale?
2. Normally a message like that occurs when you already have it installed.
-lindasdd
There are sites that will offer to install it for $45-100. There is at least one company that has taken some of the free mods and repackaged them for sale - earlier versions of this one amongst them.
Can be a bit of a shock to take on a new site and find your work rebranded in a commercial mod. But that's the nature of open source. But personally, I'd rather put my faith in the version that is open to public scrutiny and is being transparently supported, i.e. the one here.
OK - i would be grateful for any help or comment from any one of the gurus on this mod.
I have installed the 4.10 version of the mod onto 1.39f ZC. It was working and I found I could have either radio buttons or drop downs. Then I tried to alter the files so that it listed the stock alongside each option attribute value. Then I find that on some pages I get the radio button, and on others, the drop down (but without the stock listing). I haven't even dared try the cart yet to see if I have any of the other problems people have referred to.
If I select drop-down, on those prodcts which have only one option value, it shows a radio button and the stock level. Where there is more than one value, it shows a drop down, but without the stock levels.
Please see http://plumfashion.co.uk/store139d/i...products_id=77 and http://plumfashion.co.uk/store139d/i...&products_id=9
Thanks! :dontgetit
Laugh, have solved own problem - used option 1 instead of option 6 for display of option name - type - and this seems to crack it.
I can't get the SQL file for this mod to upload, it keeps giving the following error:
Does anyone know how to fix this? It's for a 1.3.9g store.Quote:
1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '"zen_cfg_select_option(array('true', 'false'),"' at line 1
in:
[INSERT INTO zen_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', '6', NULL, now(), NULL, "zen_cfg_select_option(array('true', 'false'),"]
If you were entering information, press the BACK button in your browser and re-check the information you had entered to be sure you left no blank fields.
Thanks!
Please ignore. I posted to the wrong thread.
Ive just noticed that my SBA is not working after upgrading to 1.39f
So I downloaded the latest SBA from the downloads area today, and uploaded the files, replacing the necessary core files as instructed. I went to the admin area and when I click on the products with attributes stock via CP, I get a a page with a search box, sync link, but otherwise its empty, with no products showing. However there is an error code...
Ive inspected the item 52 and it does have attributes associated with it, but like the other products, does not show up in the SBA Admin. Attributes do show up in the (frontend) dropdown of the product page however, but quantity per attribute cannot be adjusted.Code:1054 Unknown column 'sort' in 'order clause'
in:
[select * from products_with_attributes_stock where products_id="52" order by sort ASC;]
As per the instructions, I did no database patching, but what seems to be causing this error?
Sorry if I have missed a previous answer to the issue at hand..I did try search for this error via this site and google...but nothing?
Thanks..Any help/direction appreciated!
Just noticed there was an sql file with the download, altho not mentioned in the instructions. File was update_1_4_10.sql
So, not having anything to lose, and knowing I had not updated the SBA in over a year..I gave it a shot. But nothing. Still have the same condition now as described in my post above.
I really need to get this corrected, as there already have been orders for sizes which are supposed to be out of stock.
Thanks!
OK..guess I will give this one last bump.
I know the help here is all volunteer, but come on now, surely there is something one of you can suggest????
@fireball
Sounds to me like you jumped to 4.10 or later of the mod without applying the upgrade sql which adds that missing sort column to the products_with_attributes_stock table.
Thanks Kuroi :smile:
Well, that may be..I wanted to check the version level, but the core files were over written with the update. I did run the update sql as mentioned above, and it did add one row/table, but I still have the same error.
Because the instructions say no changes needed to your database with a previous 4.x installation, Ive been avoiding running any other sql patch until I got some input.
Thanks again!
Yes, looks to me like the changelog, but not the instructions have been updated.
There are two parts to the upgrade sql. One adds a row to the config table, which it sounds as though your have done. The other adds a column called "sort" to the products_with_attributes_stock table which your error message is saying hasn't been done.
Thanks Kuroi, I found the problem.
It seems the update_1_4_10.sql was indeed the issue and while I assumed it had ran completely, it had not created the sort table. It did however add the other elements to the database when ran previously, but my remote sql query software, seems to only run single parts of the script, apparently, because I had to highlight the "add sort" part of the query, then run..affected 34 rows. Now it appears that its working now..or at the least, I do not get that error anymore and can see my attributes for items.
THANKS AGAIN for the input!!! :clap:
hi, i have quite strange problem. i`ve been using stock by attribute with only one attribute with no problems. but when i add second attribute, ie. size+color, all entries in first categories get doubled, so i have 2 smalls, 2 mediums, etc to choose from, but second dropdown/radio button is empty and i can`t choose anything and there`s nothing displayed...
help:)
What and who's version are you using???
it says 4.7ajax
There many version, a few that available via forum only such as mine...
The ones in the contribution are old and not updated.
Yes... I will be updating it to work with 1.3.9G this week then I will submit it. Sorry just been crazy last few months.
Had to move our store, then the mall caught fire... Its been hetic.
http://www.washingtonpost.com/wp-dyn...102106938.html
well, im using yours, the one u have in your signature.
btw , sorry to hear about the fire:/
I swear that this mod used to not show the attributes when they were out of stock. Am I going crazy?
If I'm not going crazy, how can that be put back in?
Folks are checking out with out of stock inventory!
You sure its not this flaw: http://www.zen-cart.com/forum/showthread.php?t=40664
creinold, any idea what can i do to fix it? or how to remove it ? i could have another go later on...
creinold, you keep posting everywhere about "this flaw", and pointing to that particular thread. But, that thread discusses about 6 quite different issues.
If there's a particular issue that's really a "bug", then post a bug report about it.
If there's something you just don't like, then why not post a code fix for it?
Or at least specifically explain the issue, instead of randomly passing the buck.
Dr byte. Sorry as I didn't mean to offend you. He'll I didn't even know you read ever one of my post. LOL I feel honored. ;) maybei am using the wrong word when I say flaw. Which I have seen many others use similar words to explain the issue.
The issue I am referring to is that people are able to check out even when not selecting an attribute. IE size color etc., just hit the add to cart button and proceed to checkout. I installed a fresh cart with no mods at all and can do this. Now there clever work arounds using an attrribute and required selector to prevent checking out without making a selection as I point out those post without having to retype something someone already has.
Now in my opinion I think at default you shouldn't be allowed to checkout without an attribute selected. I am sure zen cart has it's reason for it.
I tried to come up with a mod to prevent this but couldn't quite figure out all the attribute code make it work. Using the solution kurio been helping everyone out with works for me and hopefully others.
Now to come up with a diffrent word to use... It's a zen thing... ;)
Aszu. I am hoping to have a 1.3.9G version out this week. Scratch that have a version 1.3.9H out this week. LOL
Not offended. Just puzzled. And concerned that you're pointing people to a thread that has too many different topics in it to actually be giving an answer to their specific question.
That's specifically by design. There are many legitimate cases for having all attributes be entirely optional. In that case it would be wrong to force attribute selection.
Exactly. It's very easy to configure exactly what you need if you require certain attributes to be chosen: simply create an option value such as "Please select" and make it "default" and "display-only". This will force them to choose any of the other non-display-only options in order to complete checkout.
I have just posetd in the ugrade forum regarding an upgrade to 1.39h and the effect i found it had on SBA.
Here's my post from that thread:
Quote:
So i have just upgraded one of my sites.
It seems to have gone smoothly bar a couple of files.
Files for me which were affected were general.php (i had overwritten on 1.39g but not sure which add on had over written it - Winmerge didn't help either as the two files are so different) but everything seems to be working ok.
Main issue is stock by attributes and in particular the following two files:
- /includes/modules/pages/checkout_shipping/header_php.php
- /includes/modules/pages/shopping_cart/header_php.php
I have winmerged the header_php.php file in checkout_shipping succesfully it's the header file in the shopping_cart folder that i am struggling to merge succesfully.
With the merged file i have used no out of stock notification is showing next to an unavailable product in the cart on the customer side.
Any one else using SBA and had the same issue and resolved it?
Try go to Admin - Configuration - Stock and change:
Allow Checkout to False
I am using your version. The latest version of zencart released today (1.39h) requires an update of the two files mentioned, which are files your SBA also modifies to prevent checkout on out of stock items.
There has been changes to these files in 1.39h from 1.39g and before.
I'm working on the update. Just downloaded the new zen version and will merge them together. I should hopeful have it done in a few days. Busy week, I haven't touch the files since version E due to some personal life issues.
Try this for the shopping cart header.php file
Code:<?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') {
$flagStockCheck = zen_check_stock($products[$i]['id'], $products[$i]['quantity'],$attributes);
if ($flagStockCheck == true) {
$flagAnyOutOfStock = true;
}
}
$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,
'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'=>$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');
?>
My 1.3.9H Update:
http://www.zen-cart.com/forum/showth...530#post952530
creinold, i updated sba to 1.3.9h and i still have the same problem as described in post #932
any idea hwo to fix it?
It will be fantastic if this works! I've had so many issues with attribute stock not subtracting after cart upgrades. I don't believe this is the one I have been using. May have to give it a try!
Thanks for the hard work.
I've posted this in another topic, but this one seems to be more busy. I'm coping with the same problem. I renamed the only folder I found, created the table in the database, copied the files but nothing appeared in my admin panel. I guess I'm missing something, but havent found any solution yet. I welcome any help, thanks in advance.
hello, i have upgraded to 1.3.9h and added 1.4.10 attribute mod.
For some reason the code isn't applying my database prefix (which is zen_) when i try to update the attribute quantities.
i get an error message:
that is when i use the save button with the new ajax feature, updating multiple quantities at once.Code:1146 Table 'MYDATABASE.products_with_attributes_stock' doesn't exist
in:
[UPDATE products_with_attributes_stock SET quantity = '0' WHERE products_with_attributes_stock.stock_id =131 LIMIT 1]
If you were entering information, press the BACK button in your browser and re-check the information you had entered to be sure you left no blank fields.
there is no error when i use the regular old slow one item at a time one attribute at a time method (edit quantity button)
what might have i missed for the database prefix error?
revski: look for includes/templates/YOUR_TEMPLATE
not includes/modules/YOUR_TEMPLATE
rename the YOUR_TEMPLATE folder to the name of the template you use, then upload.
So I'm not missing anything, thanks.
I ran the sql file, created the table, renamed the folder, copied into my zen cart installation, but I see no Products with Attributes in the Catalog menu. It's driving me nuts. It's a clean install, havent modified anything yet.
ps: I'm using 1.3.9h with the latest sba from creinold
revski, im looking at my code deeper now. i upgraded and didn't do a clean install. my old versions do indeed have a modules/your_template folder...i see now early in the readme where it mentions that, but for my install, i skipped to the upgrade parts...missed that. there is no folder/file to edit or overwrite in the last downloadable version of this mod. I do have the template folder in my live store site files. it's attributes.php AND that is most likely why my quantity updates work when i use the old way, one at a time update. the ajax doesn't work for me, is this the reason???, the includes/modules/YOUR_TEMPLATE /attributes.php file is not changed....i can't help you any more that this. there seems to be a folder missing in the last updated download.
bah 7 minutes into the future...
version 4.4 was the version i had. i looked at all the other downloads after that release....that file/folder is not included. Was it in fact changed? is it even needed? :)
I am using SBA version 1-4-10 (clean install) on ZC 1.3.8a. Only issue is that when a particular item is out of stock, it still lets the customer add to cart and checkout.
I have already have this setting changed...
admin>configuration>stock>allow checkout> false
Any help would be appreciated. I have read through a lot of this support thread and haven't found a fix.
If I switch to the V4.8 will it fix this?
Sorry, but no, the mod does not obey the out of stock setting. Be sure to turn on the shopping cart display out of stock message so that your customers will be informed that it is out of stock.
I swear this mod used to drop the attributes out of view when out of stock but I can't prove it and no one will agree with me on that.
I can confirm that this mod NEVER did this.. (and I have used/tested versions going all the way back to Kuroi's original version of this mod)
There have been posted "fixes" in both of the SBA support threads which show how to modify SBA so that attributes which are out of stock will not appear on the product pages. However there is a HUGE CAVEAT with using this code. It only works for SINGLE attribute product variants. Product variants which involve multiple attributes do NOT work with this posted "fix".
The reason why this "fix" has NEVER been included in any SBA release is because of the fact that it will NOT work on variants which contain multiple attributes (ie: size + color)
Hope that clears this up a little..:smile:
There was an missing attribute database query in header.php in the modules/pages/shopping_cart/ older files. Replace it with this:
http://www.zen-cart.com/forum/showpo...&postcount=952
;)
ps
sorry for the late reply. Thread notifications only work sometimes here. I am subscribed to all sba threads but some reason I dint get notified till like 5-10 post later. Really weird...
Ok found it and it works.
If anyone has the same issue I had where your customer was still able to add to cart and checkout with out of stock items, this will fix it.
NOTE: This will only work when you are using only 1 attribute from what I have read. I only use color so it works fine for me.
http://www.zen-cart.com/forum/showthread.php?p=697756
Let's be VERY clear.. If you do not want customers to checkout with out of stock items, there is an admin setting which is part of DEFAULT Zen Cart admin which control that..
If what you REALLY want is for out of stock product variants to NOT appear in your dropdown lists, then this fix and other variations of this fix posted throughout this thread will do that..
I want to make sure it's CLEAR what all options are for those folllowng this thread..
DivaVocals is EXACTLY right.
In my situation, I have many other products that do NOT have attributes and when they are out of stock I use the "Product Notification" mod which does not work in conjunction with SBA. this modification that I used simply removes the attribute from the dropbox option.
Is there some sort of add-on or fix that will assign each attribute its own SKU so it would update with Easy Populate?
Just ran into another snag.
Just say I have qty 1 of a certain product. It is still letting me checkout if I have 2+ in my cart.
Is there any fix for this?
Thanks so much for the clariification.
And so to state it boldly:
This module allows checkout no matter the number in stock. Be sure to turn on the shopping cart messaging ( edit it as you want stating that you don't do backorders.)
The fix for this? The lower you allow your stock to go, the more likely it is you might have someone who orders something you can't ship. So don't allow the stock to get so low = or put messages on your product - like ONLY ONE LEFT! Etc...
Well, it certainly used to prevent checking out with non-existent stock. That was explicitly tested for in each of the releases I put out. But as I haven't used it for what must be getting on for a couple of years, I can't say whether the current problems being reported are down to installation (check that you have have the correct version of the order.php class file), configuration (admin > configuration > stock) or a change in the mod's functionality (seems unlikely).
So that I am clear about what I was previously stating, I was referring to the feature which removes attributes from customer view so that it cannot be selected.. That feature has never been apart of this mod. (though there are posted fixes for this which only work with single attributes). When choosing out of stock product variants, SBA does indeed clearly show the item (variant) is out of stock AND if my store admin settings are configured so that I do not allow checkout of out of stock items, then customers are unable to complete the purchase..
:yes: **nods in agreement**
I have this mod installed on a 1.3.9h store and it's working great except for one small issue. In my admin, I've turned on the setting for "Show available stock level in cart when less than order". However, it shows the available stock level as 0 regardless of the quantity actually in stock. So for example, if I have 2 black shirts in stock, and the customer adds 2, they can checkout. If they add 3, the shopping cart displays the message "Stock Available: 0" even though there are actually 2. I'm not sure how to fix this? I know I can just turn that feature off, but it's a really nice feature to have if I can get it working!
Thanks!
I thought I had it working right until today.
Inventory level is not decreasing when a product with attributes is purchased.
Anyone else have this problem and fixed it?
I'm working with Zen Cart version 1.3.8a, have the stock by attributes add-on installed for that version and have a couple of stock-related issues.
1. I need for the stock level for a particular attribute to show in the shopping cart when a customer selects a quantity more than what's in stock. Despite having the correct configurations under Configuration > Stock, I don't get the quantity showing in the shopping cart. Rather there is this message:
Products marked with * are out of stock or there are not enough in stock to fill your order. Please reduce the quantity of products marked with * below. Thank you.
2. Relatedly, when a customer purchases a product with attribute, the stock for that attribute is not updated automatically. Rather the product stock itself is updated but I have to go under Catalog > Product with Attributes Stock to manually update the attribute quantity.
How do I get the attribute quantity to show in cart when customer selects more than what's in stock? Also, how do I get attribute stock level to update automatically? I've seen both of these questions posted over and over in this forum with no clear answers. If anyone can help, it would be greatly appreciated.
Thanks.
Just a quick note that in 4.11 there was a minor bug that you won't notice if you do not use table prefixes and I just loaded up 4.12 and this buglet is still there.
Admin/includes/classes/product_with_attributes_stock.php
line 227 has the table name hard coded
$sql = "UPDATE products_with_attributes_stock SET quantity = '$value' WHERE products_with_attributes_stock.stock_id =$id LIMIT 1";
instead of
$sql = "UPDATE ".TABLE_PRODUCTS_WITH_ATTRIBUTES_STOCK." SET quantity = '$value' WHERE ".TABLE_PRODUCTS_WITH_ATTRIBUTES_STOCK.".stock_id =$id LIMIT 1";
Also,has anyone managed to add SKUs/EANS etc to Stock by Attribute, it would appear slightly tricky due to the denormalised structure, having just a single stock_by_attribute table, with the comma delimited list of attributes, rather than 2 tables, e.g. stock_by_attribute and stock_by_attribute_item, then it would perhaps be simpler to extend the'item' table to have additional columns?
Same hard code problem and fix on line 30 of products_with_attributes_stock_ajax.php
BTW adding SKU and Barcode wasn't as tricky as I thought. I made a fairly rudimentary addition to the table / code to store these values. Obviously getting the data off the database will depend where I want to use these fields. and I haven't looked at that yet :-)
:bigups: Thank you thank you THANK YOU!!!
i'm seeing two more issues with this:
one i have not seen the the image named: ajax-loader2.gif in any of the versions i have downloaded. Which zip package has that? is called for during the search, on the admin/products_with_attributes_stock.php page.
also,
when the products_with_attributes_stock.php page first loads in the admin, the save buttons have no links at all until i first press the search button. odd. is that how it is supossed to work?
thanks
I'm working with Zen Cart version 1.3.9f and have the first add-on of StockByAttributes_WITH-Table-Filter1.6 installed for that version. Then I got this error below and have tried to change the sql file following your forum reco but it is not working, I believe I might have made some mistakes here. I’ve searched high and low and for days but couldn’t figure this out.
Error:
1146 Table 'babynkid_zenc375.zen_products_with_attributes_stock' doesn't exist
in:
[select * from zen_products_with_attributes_stock where products_id = 1 and stock_attributes="1"]
If you were entering information, press the BACK button in your browser and re-check the information you had entered to be sure you left no blank fields.
Changes made on sql file highlighted in red:
CREATE TABLE zen_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 ,
PRIMARY KEY ( `stock_id` )
);
INSERT 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',
'6',
NULL,
now(),
NULL,
"zen_cfg_select_option(array('true', 'false'),"
);
/****************************Additional Databse command BELOW ********************************************************
michael mcinally <[email protected]>
heavily modified version BELOW to allow inserting "ALL" attributes at once
also should probably run this SQL command as well:
******************************************************************************** *****/
ALTER TABLE `zen_products_with_attributes_stock` ADD UNIQUE `products_id_stock_attributes` (`products_id`, `stock_attributes`);
Appreciate very much for your help.:cry:
I'm working with Zen Cart version 1.3.9f and have the first add-on of StockByAttributes_WITH-Table-Filter1.6 installed for that version. Then I got this error below and have tried to change the sql file following your forum reco but it is not working, I believe I might have made some mistakes here. I’ve searched high and low and for days but couldn’t figure this out.
Error:
1146 Table 'babynkid_zenc375.zen_products_with_attributes_stock' doesn't exist
in:
[select * from zen_products_with_attributes_stock where products_id = 1 and stock_attributes="1"]
If you were entering information, press the BACK button in your browser and re-check the information you had entered to be sure you left no blank fields.
Changes made on sql file highlighted in red:
CREATE TABLE zen_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 ,
PRIMARY KEY ( `stock_id` )
);
INSERT 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',
'6',
NULL,
now(),
NULL,
"zen_cfg_select_option(array('true', 'false'),"
);
/****************************Additional Databse command BELOW ********************************************************
michael mcinally <[email protected]>
heavily modified version BELOW to allow inserting "ALL" attributes at once
also should probably run this SQL command as well:
******************************************************************************** *****/
ALTER TABLE `zen_products_with_attributes_stock` ADD UNIQUE `products_id_stock_attributes` (`products_id`, `stock_attributes`);
Appreciate very much on your help:cry:
Hi,
I want to say thank so much for this awesome module. I've installed it on my zen cart v1.3.9h, and met a little problem.
I have a product with different colors with different levels of stock:
- Black (3 pieces)
- White (5 pieces)
- Gold (3 pieces)
Settings under Config --> Stock
Check stock level: True
Substract stock: True
Allow checkout: false
Show available stock level in cart when less than order: true
I tested different situations and found that, when I added 5 pieces of Black into cart, and then 3 pieces of White, there was "out of stock" message for BOTH products, and the stock availability was, of course 0 for both of them. Even that I still had 5 White!
And the weird thing is that, when I changed the quantity of Black (which was the first item added to cart) to 3, and changed White to 6. The error message only showed for White, NOT Black!
Anyone has this same problem? Please me how I could fix this. Thank you so much!!
lisa
mermaidlisaAs a matter of interest what values appear in the database for these products in the table : products_with_attributes_stock in the field : stock_attributes.
As I was experiencing a similar problem, and this would tell if it is the same, the order is very important for the comma separated values.
@ Scrat: Currently, the stock levels for my demo product are 0, 3, 0, 7. And their stock_attributes shown in the database are 8, 7, 9, 10 respectively.
What's the meaning of stock_attributes by the way? Sorry I'm really new to this
mermaidlisa So you only have one 'stock_attribute' per
product: ie
Its not the same issue I had by the sounds of it.Quote:
stock_id,stock_attribute,qty
num,8, 0
num,7,3
num,9,0
num,10,7
Have you 'Sync Quantities' your stocks to product !
'stock_attrubute' is the reference of your attribute product_attributes_id in the `products_attributes` table.
Hi fellow zenners
I have a problem on my store. I have now twice had a customer order out of stock items putting the stock level to -1
I have the setting to not allow out of stock checkouts
I have 1.3.9h zencart - updated from 1.3.9d and Stock by Attributes ver 1-4.12
I should note that I was on 1.3.9d when the first one came last week. I then updated everyhing and it happened again just now.
Something else I have noticed. If you add a product which is out of stock, the cart displays the warning it is out of stock. If you then add another in stock item it will display this as out of stock until you remove the out of stock product.
Anyone else getting this and can anyone help me resolve this?
Kind regards
Natty
Yeah I have 1 stock_attribute per attribute. my table looks like this.
I have synced the quantities as well. So you have more than 1 stock_attribute per attribute? What is the issue that you have?Quote:
stock_id, product_id, stock_attribute, quantity, sort
7, 59, 8 , 0, 0
3 , 59 , 7 , 3 , 0
5 , 59 , 9 , 0 , 0
6 , 59 , 10, 7 , 0
Hi guys,
Firstly, I appreciated for providing such a nice MOD,
My site v1.38a working wonderful.
Now I found a small bug as described here
In Shopping Cart, during shopping on zencart before loged in,
case ok
1. product within a stock
2. product with out of stock
Only No.2 shows error message as expected
case NG-1
1. product with out of stock
2. product within a stock
BOTH shows error. No.2 should not be an error.
case NG-2
1. product within a stock
2. product with out of stock
3. product within a stock
NO.2 & NO.3 shows error. No.3 should not be an error
case NG-3
1. product with out of stock
2. product within a stock
3. product within a stock
All product show error
I think it is clear there is a little bug for kind of "Array" coding?
I have no found this bug on v.1.4.11
after upgraded v.1.4.12 It happens.
Any idea?
Yuki....:oops:
huhuhu,
So you are.
Please let me add one more little thing,
compare to 1.4.11 Attribute control is far improved, THANKS!
But case below,
When products in shopping cart,
1. Product with no Attribute or options with out of stock
After latest MOD patched, product like above stop showing error message of out of stock.
Could you check if that happens ???
Yuki,:oops:
Zen Cart Version 1.3.8
Stock by Attributes Version 1.4.12 (nov 13 2010)
In short, I've installed the module, but I'm having a problem I can't figure out. Example: I have four sizes of socks through the "Add Quantity for Product Variant". I set inventory level on one size to zero, so it backorders. Fair enough. However, the other items in the shopping cart (hats, boots) also suddenly go to backorder status as well.
Any tips would be greatly appreciated. I see this question came up once before in this thread with no answer.
I doubt it matters for the purpose of this question, but if it does, my client doesn't really care at all about tracking real-world inventory levels. They simply want to use this mod to control items they know are out of stock so the customer is immediately informed through the checkout process. And yes, they still want the customer to be able to order the item, but just inform them that it's out of stock.
Thanks in advance!
A client of mine noticed this bug, and I was tasked to fix it.
You only need to add two lines of code to one of the files included in the addon package.
- Open up /includes/modules/pages/shopping_cart/header_php.php
- Around line #137, you should see this line:
- if (zen_not_null($stock_check))
- Add this line right before the line you found in step #2
- $flagStockCheck = NULL;
- Around line #172, you should see this line:
- $productArray[$i] = array(...
- Add an array element and value like this:
- 'stockAvailable'=>$stockAvailable,
That should fix the issue with products below out of stock items showing up as out of stock when they aren't. It should also make the available stock quantities show up like they are supposed to.
I hope this helped you out. :)