-
Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9
Ooooh I see. I kind of thought it worked like software where the old versions are more 'fixed' and the new ones are just in testing mode still, so I thought by using an old version I'd have less issues.
Thanks - I'll either trawl through the fixes or see if I can update my zen cart and use your version. Thanks!
-
Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9
Quote:
Originally Posted by
callmeal
Ooooh I see. I kind of thought it worked like software where the old versions are more 'fixed' and the new ones are just in testing mode still, so I thought by using an old version I'd have less issues.
Thanks - I'll either trawl through the fixes or see if I can update my zen cart and use your version. Thanks!
Wish it worked that way... LOL there are like 4 buggy versions in the contribution area.
-
Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9
Quote:
Originally Posted by
creinold
My version allows it to show out of stock up in the dropdown menu but it made for zen-cart version 1.5.0. =(
Ok all revved up, I've (I think) managed to upgrade to zencart 1.5 and ready to install your version AAAAANNNNNNDDDDD....
um... where do I find it? :lookaroun
-
Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9
Ignore me - I found it!!! Wish me luck... I'm going to need it!
-
Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9
-
Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9
(sigh)
nup. I've stuffed it. :no:
-
Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9
-
Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9
:jump::jump::jump:
It works!!!
Yesterday I thought I'd stuffed something because I couldn't even get zen cart 1.5 to work, let alone the template and stock by attributes etc - but eventually I contacted hostgator support and apparently they had to change the permissions or something, so they've now fixed it all up :)
AND better still - put in a test product and sizes etc today... and it worked!
THANKYOUSOMUCH for your help and for updating that add on in the first place - you're a legend :clap::clap::clap:
-
Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9
I am trying to figure out how to put a message next to an attribute that is out of stock. I have a message that displays in the cart, but I would like it to show in the list before having to go into the cart.
For example, if Red is out of stock, I would like it to show in the drop down (Red - Out of Stock).
-
Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9
Quote:
Originally Posted by
ChrisD24
I am trying to figure out how to put a message next to an attribute that is out of stock. I have a message that displays in the cart, but I would like it to show in the list before having to go into the cart.
For example, if Red is out of stock, I would like it to show in the drop down (Red - Out of Stock).
Here's why it pays to read through the thread a little bit..:blush:
|
|
\/
Quote:
Originally Posted by
creinold
My version allows it to show out of stock up in the dropdown menu but it made for zen-cart version 1.5.0. =(
-
Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9
Granted I searched for over an hour trying to find a solution. That answer you provided requires a different module and a different zen cart version. I was hoping someone who had the module already had the modified code. I can try to see if I can find the file that guy is referring to as that response only says "My version let you do that" - and maybe I can pull apart the code to figure out what I need to do, but it appears that that is a different module all together than what I am using?
I was hoping there was an easy way to just edit the code to say if the quantity is 0, do this...
-
Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9
Quote:
Originally Posted by
ChrisD24
Granted I searched for over an hour trying to find a solution. That answer you provided requires a different module and a different zen cart version. I was hoping someone who had the module already had the modified code. I can try to see if I can find the file that guy is referring to as that response only says "My version let you do that" - and maybe I can pull apart the code to figure out what I need to do, but it appears that that is a different module all together than what I am using?
I was hoping there was an easy way to just edit the code to say if the quantity is 0, do this...
Well if the post I pointed you to is for a different add-on, I'd venture to say that you are posting your question in the wrong place then..
This is the support thread for all of the Stocks by Attributes add-on(s). There are about four variants of this add-on and they are ALL discussed here.. If you are not using one of the stock by attributes add-ons, then you are posting your question in the wrong place..
-
Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9
Well I'll download the newer version then. This is the right place for the module I use, when the post said "My version" I thought it was a different module from another developer you pointed me to. I'll see if I can figure it out.
-
Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9
Quote:
Originally Posted by
ChrisD24
Well I'll download the newer version then. This is the right place for the module I use, when the post said "My version" I thought it was a different module from another developer you pointed me to. I'll see if I can figure it out.
If you read through the thread, you'd see creinold is the author of one of the SBA variants.. Suggest reading/searching through this thread.. you'll probably find you answer is already posted..
-
Re: Stock by Attribute v4.0 for Zen Cart 1.3.5+
Quote:
Originally Posted by
simwombat
Yes I did use the package as downloaded. I used FTP to drop all files in place and overwrite the existing.
I think you may misunderstand my question. It does subtract for the attribute combination but I do not want to use a combination.
I just want it to subtract by only one of the 6 attributes. I want it to subtract when a size of an item is chosen. I have 6 combinations of each size which I do not want.
I am selling shirts and hoodies and just want to select the size attribute as that is the way they are ordered.
I get 10 small and 10 large and then while the person orders a small they then add if they want it personalized, and where they want it personalized, and what name they want to personalize it with.
Then I perform that work that they asked for. and it is still a small shirt that is sold. I do not order them with names already on them as I have no idea who is going to order. So that combination is impossible for me to put into inventory like SBA does.
I hope that is clearer..
you can see what I mean at
this site just go to a hoodie or t-shirt and you will see the attributes that do not get completed till order is made.
Thank you for your help and I hope I did not misinterpret your reply as to its meaning.
Gary
Hi I have the same issue...how can this text field issue be resolved?
Anybody able to help me?
Thank you.
-
Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9
oops - will post elsewhere
-
Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9
Hey Creinold!
I may have found a bug...
After much fiddling about with trying to get another bit of my cart working (additional images), I think it may be your add-on that's killing it. I'm not skilled enough to know why, but I eventually reinstalled everything on a fresh site to try and figure it out.
Installed zen 1.5 - all fine. Installed my template - still works.
Added some attributes... and then installed your add-on - CLUNK - additional images disappears.
Ideally obviously I should have checked after adding the attributes and before installing your addon, but I kind of thought I was on the home stretch and skipped it.
Does anyone have any idea why this might happen and how to fix? :(
Regards
Callmeal
eta. the new website is j ibadoo.com - there's only one product in there and it USED to show an additional image for it...
-
Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9
Are you using zen cart v1.5 Beta?
-
Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9
My version don't touch any additional image codes. Are you meaning attribute images? Two different things...
-
Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9
Quote:
Originally Posted by
coopco
Are you using zen cart v1.5 Beta?
It's whatever is on the main zen cart page - v1.50 - doesn't SAY beta...
Quote:
Originally Posted by
creinold
My version don't touch any additional image codes. Are you meaning attribute images? Two different things...
No.... just the 'additional images' you get to see when you click into a product...
-
Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9
-
Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9
I posted on SBA 5.0 thread earlier today I found tpl_module_attributes.php is causing the issue with my dynamic drop down mod and will work on a fix tonight.
-
Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9
Quote:
Originally Posted by
creinold
I posted on SBA 5.0 thread earlier today I found tpl_module_attributes.php is causing the issue with my dynamic drop down mod and will work on a fix tonight.
Aha! Cool, thanks :-) I've been uploading and uploading to try and figure out which file it was - I'll stop now!
-
Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9
for a temporary fix re-upload the orginal tpl_module_attributes.php from the zen-cart distrabution.
-
Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9
I take that back... the error is in functions_lookups.php I loaded the original and additional images work again.... Now time to trouble shoot....
-
Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9
Is it really necessary to cross-post duplicates of all your SBA posts in both the 4.0 and 5.0 threads?
It would be a lot easier for users to follow discussions if you kept them in one place, and not scattered all over.
-
Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9
Quote:
Originally Posted by
DrByte
Is it really necessary to cross-post duplicates of all your SBA posts in both the 4.0 and 5.0 threads?
It would be a lot easier for users to follow discussions if you kept them in one place, and not scattered all over.
Hey DrByte.. As you know there are at LEAST four SBA support threads, and I think this is part of the reason creinold has been posting on multiple threads..
Is it possible to close ALL of the SBA support threads and just open ONE thread for this version while it's in beta to discuss issues related to it?? It seems pretty clear that creinold's version will be a v1.5 only compatible version, so perhaps closing all of the threads related to the v1.3.X versions makes sense at this point. The multiple threads (and versions) has always been a huge source of confusion..
However since creinold's version is just a beta version perhaps it makes sense that a thread for issues related to this beta version be started and when this version is finalized and submitted to the downloads section (I planned to write a readme doc for it and submit it to the free downloads) then a new support thread for the final version could be created then..
-
Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9
There's already an SBA 5 thread, hence my post. Why are we talking about non-SBA-4 stuff in the SBA 4 support thread?
-
Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9
Sorry... I am only doing that, because everyone is posting in all the different SBA threads.... Making my head spin also. I'll post only in my SBA 5 thread only. If that works for everyone. =)
-
Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9
That makes good sense. Direct anyone using SBA5 to the SBA5 thread, leaving this one for SBA4 issues.
-
Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9
Ok thought maybe I should post here, since I'm actually asking about v4 issues.
Assuming I'm using the kuroi version that Diva Vocals suggested was most stable,
- what does it do when product is out of stock? I've already experienced that it doesn't show it, and that it shows it in the cart, but
a) is there an option to actually state that it's out of stock prior to the cart? I don't actually need quantities shown - but out of stock vs in stock would be useful! or
b) once it gets to the cart, will it allow the person to backorder the item, and notify me that it's a backorder so that I know the person is aware that there will be a delay in fulfilling the order.
Thanks if anyone can help!
Regards
Sunali
-
Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9
I've got an issue with the product being reported as being out of stock when we go to checkout but the product has stock.
There is a colour attribute (with only one option) and a size attribute with 3 options. Two fo the sizes are being allowed to be purchased and the third is not.
I'm totally confused as how this could happen - can anyone help?
Thanks
Andy
-
stock_by_attributes_1-4-14
Hi all, need a little bit of help here, we have stock_by_attributes_1-4-13 installed and has been working fine with the attributes. But the save button does not work in the attributes, however I found the patched version 14 and FTP all the files over in the correct places and did the SQL update patch and it comes up with this error
"1062 Duplicate entry 'STOCK_SHOW_IMAGE' for key 2
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 ('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."
Now when you push the save button you get this message: (database name removed)
1146 Table 'xxxxxxxx.products_with_attributes_stock' doesn't exist
in:
[UPDATE products_with_attributes_stock SET quantity = '52' WHERE products_with_attributes_stock.stock_id =1206 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.
Any help would be much appreciated
-
Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9
I'm currently setting up a shop using Zen Cart 1.3.9 (not live yet), and want to add the Stock by Attributes 1-4-14 mod. The problem I have encountered it that it need to modify both the order/php files (admin and template), which have already been altered by "Fast and Easy Checkout 1.10.0".
I've compared both files from each mod in WinMerge, but there are so many altered lines that I'm not sure how to proceed.
Do I simply get WinMerge to merge both files into one or will this not work?
Any help getting this mod to work with my other mod would be most appreciated!
-
Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9
You need WinMerge.. that's the purpose of the application..
Quote:
Originally Posted by
pinksparklegirl
I'm currently setting up a shop using Zen Cart 1.3.9 (not live yet), and want to add the Stock by Attributes 1-4-14 mod. The problem I have encountered it that it need to modify both the order/php files (admin and template), which have already been altered by "Fast and Easy Checkout 1.10.0".
I've compared both files from each mod in WinMerge, but there are so many altered lines that I'm not sure how to proceed.
Do I simply get WinMerge to merge both files into one or will this not work?
Any help getting this mod to work with my other mod would be most appreciated!
-
Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9
You might want to check... I think the order.php already has Numinix coding in it for his FAEC addon
-
Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9
I just installed Stock by attributes and am coming across 2 problems..
1. I do not have the Catalog->"Products with Attributes Stock" option
2. When loading my cart, it is a blank page... upon looking at the debug file, I get this error:
[26-Mar-2012 08:57:07] PHP Fatal error: require() [<a href='function.require'>function.require</a>]: Failed opening required 'index_filters/default_filter.php' (include_path='.:/usr/lib64/php:/usr/lib/php:/usr/share/pear') in /home5/myfuzzib/public_html/Cart/includes/modules/pages/index/header_php.php on line 49
I'm stuck and need some help.
thanks in advance!
-
Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9
ALL install errors trace directly back to something going wrong with your install.. eg:
- files were not uploaded correctly
- corrupted during the FTP transfer
- steps were missed
Not seeing the menu item says that you did not run the SQL to add the menu items..
Quote:
Originally Posted by
Skippersyacht
I just installed Stock by attributes and am coming across 2 problems..
1. I do not have the Catalog->"Products with Attributes Stock" option
2. When loading my cart, it is a blank page... upon looking at the debug file, I get this error:
[26-Mar-2012 08:57:07] PHP Fatal error: require() [<a href='function.require'>function.require</a>]: Failed opening required 'index_filters/default_filter.php' (include_path='.:/usr/lib64/php:/usr/lib/php:/usr/share/pear') in /home5/myfuzzib/public_html/Cart/includes/modules/pages/index/header_php.php on line 49
I'm stuck and need some help.
thanks in advance!
-
Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9
Quote:
Originally Posted by
DivaVocals
ALL install errors trace directly back to something going wrong with your install.. eg:
- files were not uploaded correctly
- corrupted during the FTP transfer
- steps were missed
Not seeing the menu item says that you did not run the SQL to add the menu items..
I ran the SQL and verified the table "products_with_attributes_stock" was created, along with the STOCK_SHOW_LOW_IN_CART and STOCK_SHOW_IMAGE rows in the configuration table.
I think I found one of my problems... My "includes/classes/order.php" is newer than the one included with this mod. However when I WinMerge it, I can't tell what was changed by the mod, or what was changed since the mod was released.
-
Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9
Quote:
Originally Posted by
Skippersyacht
I ran the SQL and verified the table "products_with_attributes_stock" was created, along with the STOCK_SHOW_LOW_IN_CART and STOCK_SHOW_IMAGE rows in the configuration table.
I think I found one of my problems... My "includes/classes/order.php" is newer than the one included with this mod. However when I WinMerge it, I can't tell what was changed by the mod, or what was changed since the mod was released.
and what about the SQL that adds the MENU item.. If you are not seeing a menu item it means your SQL did not run correctly..
-
Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9
The query that came with the installation only did those 3 things...
listed is the entire .sql file...
Code:
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` )
);
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'),"
),
('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'),"
);
Regardless, I ended up backing up my previous cart and I plan on tackling this at a later time. It's too time consuming and isn't a priority at this time.
Thank you for your help.
-
Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9
If you installed any of the 4.0 versions of SBA from free downloads with Zen Cart v1.5 then THAT is your issue.. It's been posted/document MANY times in this thread that NONE of the versions available in the free downloads work with Zen Cart v1.5..
Quote:
Originally Posted by
Skippersyacht
The query that came with the installation only did those 3 things...
listed is the entire .sql file...
Code:
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` )
);
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'),"
),
('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'),"
);
Regardless, I ended up backing up my previous cart and I plan on tackling this at a later time. It's too time consuming and isn't a priority at this time.
Thank you for your help.
-
Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9
:oops: that makes perfect sense now... Thank you for your help.
-
Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9
Quote:
Originally Posted by
Skippersyacht
:oops: that makes perfect sense now... Thank you for your help.
This is why I always say it PAYS to read the support thread BEFORE installing add-ons..
Look for the SBA 5.0 thread.. Creinold has a beta version that is working..
-
Re: Stock by Attribute v4.0 for Zen Cart 1.3.5+
Quote:
Originally Posted by
athena
In post #1293 I shared the following fix for zencart version 1.3.9h using the SBA version .13 - it is a no fuss no muss solution to get your store up and running. I have not worked with .14 but if you go back to 1.3.9 I highly recommend this fix. It has solved the problem for many here:
Hi Athena,
Can you elaborate if your solution actually restocks each attribute to the original quantities when an order is deleted and the option to restock is checked??? I've tested it on my store, and it does not restock. I'm using the same exact version of SBA that you're using, along with your suggested fix for the header_php.php.
The modified core file of order.php that SBA uses, is also modified by my following modules:
Fast and Easy Checkout
Super Orders
Although I've merged everything and all modules are fully functioning...my only dilemma now is when customers submit large orders as RFQ's (request for quotes), I need to be able to cancel the order and have all the items auto-restock, or else it becomes a huge hassle to manually adjust them. Thanks!
-
Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9
Stock by Attributes for Zen Cart V 1.5?
I recently upgraded to the most recent version of Zen Cart. Stock by Attributes doesn't seem to be compatible. Is there a newer version, or perhaps this feature is built into the new version? Any input is greatly appreciated, thank you.
Rich
-
Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9
Can you please post a link to where I can download the latest Stock by Attribute Addon?
thanks,
Rich
-
Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9
When I delete an order and check "re-stock product quantity" it does not work, any idea how to solve this problem?
-
Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9
ad post 1550:
the order gets deleted, but the quantity will not get re-stocked.
-
Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9
Just wondered if this has been upgraded to work with zen cart v1.5 yet?
-
Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9
I am getting this error after upgrading Stock by Attributes to 1.4.14:
Quote:
1054 Unknown column 'sort' in 'order clause'
in:
[select * from zen_products_with_attributes_stock where products_id="337" order by sort ASC;]
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.
I'm using ZC 1.3.9d. Was using Stock by Attributes 4.7 (which I found out is only listed as 1.3.8 compatible). I encountered an error where all variants listed somehow deleted themselves (they only showed up as ":" instead of the normal "Color:Red" etc). This became a problem seeing as how I would have to manually re-add hundreds of variants and stock levels for each.
So I downloaded and installed update 1.4.14, which is 1.3.9 compatible and has several fixes as well. I extracted files into my directory, overwriting them (I do have backups). Then I go to admin and see this error. I removed all option values from all products and the error was gone, but no products had attributes. I added one option value to one product and the error came back. The products_id is simply the first item when you're looking at the categories (I deleted the attributes for 337 and the next item in the list was shown). Also set all quantities for those items to 0 using easy populate and still no luck.
Has anyone had this problem before or could someone help me! The rest of the website seems fine, it's just this mod isn't working anymore.
-
Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9
Zen Cart ver 1.39H
Stock By Attributes ver 1.4.14
Okay, I've read through the last 530 posts and have seen this issue mentioned a couple times, but no solutions were forthcoming. First, the install went fine with no errors, product with attributes stock is in admin under catalog just as it should be, and any products that have attributes are loaded in there ready for manipulation. Now, here's the scenario:
First, all of the products in the store have the following attributes:
Gender (unisex)
Age (adult)
Color (various)
These attributes exist only to satisfy the Google feed requirements and are set to ready only and hidden. With me so far?
In addition, some products require a size attribute that is visible and selectable by the customer, IE:
Size:
(4G)
(6G)
(8G)
Etc.
Now, I can manipulate the quantity amount for the items that use only the first three, (hidden), attributes using stock by attributes just fine. Changes the number on the product listing page as it should, when one is added to the cart, it works fine and deducts it as it should. In other words, no issues with the items that only have these three attributes.
However, if I try to manipulate quantities using stock by attributes for any item that has the additional attribute of size, it causes the cart to think the quantity is zero no matter what the quantity is set as in stock by attributes. The same thing happens whether I add a quantity to one size, a couple sizes, or all sizes. If I go back in and delete the variant/s and reset the quantity on the product setup page it works fine again.
If I remove the three hidden attributes from a product with the size attribute, it then works fine. I can add sizes, change quantity of sizes, delete variant/s, etc. It then functions as it should when adding the product to the cart.
I tried athena's fix, (even though it actually addressed a different issue), of replacing header_php.php with the earlier version, but no joy.
Anybody have any ideas to fix this? Or should I just scrap it and go back to an earlier version. If the latter, what earlier version is known to work as intended in Zen 1.39h?
-
Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9
Okay, after dinking with this for a while, I came up with a workaround. There appears to be a bug that causes the issue to manifest itself when configuing all the attributes, (both the hidden and customer usable), simultaneously - which is the only way the mod functions until after the attributes are initially configured. The solution is to add only the user configurable attribute/s to the product in attributes controller then get the quantities set in stock by attributes. After that, add the hidden attributes from attributes controller and it works fine. Just don't go in to "add quantity for product variant", but instead only use the edit quantity link next to each of the individual option values.
-
Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9
This caught my eye..
Quote:
Originally Posted by
RescoCCC
First, all of the products in the store have the following attributes:
Gender (unisex)
Age (adult)
Color (various)
These attributes exist only to satisfy the Google feed requirements and are set to ready only and hidden. With me so far?
I know how to make attributes read-only.. What I'm curious about is, how do you set attributes to be hidden??
-
Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9
-
Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9
Further followup. Sometimes my brain is a little slow on the uptake! The only reason I had the attributes as read only is because they were only there for Google compliance and I didn't want customers trying to select them. It suddenly occured to me that since I have them hidden, that problem is moot. Took them off read only, and the issue is solved. Now the item can be configured correctly with all attributes at once in stock by attributes.
-
Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9
Quote:
Originally Posted by
RescoCCC
Got it.. thanks..
-
Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9
To add to my previous post, when I click on the Sort button at top, I get the following error:
1054 Unknown column 'sort' in 'field list'
in:
[UPDATE zen_products_with_attributes_stock set sort = '' WHERE stock_id = '2' 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.
Does that help anyone figure out what could be wrong??
I copied back over the original files and am now still getting this error... I only copied over files, did not update SQL or anything like that. I'm not sure what to do now... Any help or ideas would be appreciated!
-
Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9
Quote:
Originally Posted by
simply_sterling
To add to my previous post, when I click on the Sort button at top, I get the following error:
1054 Unknown column 'sort' in 'field list'
in:
[UPDATE zen_products_with_attributes_stock set sort = '' WHERE stock_id = '2' 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.
Does that help anyone figure out what could be wrong??
I copied back over the original files and am now still getting this error... I only copied over files, did not update SQL or anything like that. I'm not sure what to do now... Any help or ideas would be appreciated!
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..
-
Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9
Is this working for v1.5.0 if so how do you set it up and do I still need the add on or is it all ready set up?
This is what im trying to do http://www.zen-cart.com/showthread.p...es-on-one-page
-
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)
-
Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9
I did all the changes, but then I just get a white store. The admin-area works fine, the Stock by Attributes is there in my 1.5, but my store is just plain white.
Anyone knows why that is?
-
Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9
Did you merge the code or copy it? In order for this to work, you must merge the code and merge only those sections labeled for stock by attributes. The problem here is that the code sections were not labeled in some of the files, and it gets a little tricky - but still doable.
-
Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9
Toneklone,
Did you resolve this issue? If so how? I am having the same problem and I did merge the files. I'm pretty sure the issue is with the file: admin/includes/functions/general.php
But you have to restore all the original ZC files that were modified or overwritten before the white screen returns to normal. I checked my site each time I uploaded a merged file and the one stated above was what sent my site to a white screen. Just restoring that file didn't fix it though.
If anyone else could help it would be much appreciated. Thank you.
-
Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9
ATTENTION: Restock Feature has been FIXED!!!!
Sorry for the caps, but I am just too excited :D
I really had to get the functionality of this feature to start working, well because, a typical order for my store might contain numerous products, and having to manually edit the stock for each product when I deleted a large order was not practical.
So without further Adieu! -
In \admin\includes\functions\general.php look for the following code:
Code:
function zen_remove_order($order_id, $restock = false) {
global $db, $order;
if ($restock == 'on') {
$order = $db->Execute("select products_id, products_quantity
from " . TABLE_ORDERS_PRODUCTS . "
where orders_id = '" . (int)$order_id . "'");
while (!$order->EOF) {
//restored db
$restored_attributes = $db->Execute("select pa.products_attributes_id
from ".TABLE_ORDERS_PRODUCTS_ATTRIBUTES." opa, ".TABLE_PRODUCTS_ATTRIBUTES." pa
where opa.orders_id='".(int)$order_id."'
and opa.products_options_id = pa.options_id
and pa.options_values_id = opa.products_options_values_id
and pa.products_id='".(int)$order->fields['products_id']."'
ORDER BY pa.products_attributes_id ASC
");
while(!$restored_attributes->EOF) {
$attr_array[] = $restored_attributes->fields['products_attributes_id'];
$restored_attributes->MoveNext();
}
//echo implode(',', $attr_array);die;
$db->Execute("update ".TABLE_PRODUCTS_WITH_ATTRIBUTES_STOCK."
set quantity = quantity + " . $order->fields['products_quantity'] . "
where products_id = '" . (int)$order->fields['products_id'] . "'
and stock_attributes = '".implode(',', $attr_array)."'
");
$db->Execute("update " . TABLE_PRODUCTS . "
set products_quantity = products_quantity + " . $order->fields['products_quantity'] . ", products_ordered = products_ordered - " . $order->fields['products_quantity'] . " where products_id = '" . (int)$order->fields['products_id'] . "'");
$order->MoveNext();
}
}
And replace with...
Code:
function zen_remove_order($order_id, $restock = false) {
global $db, $order;
if ($restock == 'on') {
$order = $db->Execute("select orders_products_id, products_id, products_quantity
from " . TABLE_ORDERS_PRODUCTS . "
where orders_id = '" . (int)$order_id . "'");
while (!$order->EOF) {
//restored db
$restored_attributes = $db->Execute("select pa.products_attributes_id
from ".TABLE_ORDERS_PRODUCTS_ATTRIBUTES." opa, ".TABLE_PRODUCTS_ATTRIBUTES." pa
where opa.orders_id='".(int)$order_id."'
and opa.products_options_id = pa.options_id
and opa.products_options_values_id = pa.options_values_id
and opa.orders_products_id='".(int)$order->fields['orders_products_id']."'
and pa.products_id='".(int)$order->fields['products_id']."'
ORDER BY pa.products_attributes_id ASC
");
while(!$restored_attributes->EOF) {
$attr_array[] = $restored_attributes->fields['products_attributes_id'];
$restored_attributes->MoveNext();
}
$db->Execute("update ".TABLE_PRODUCTS_WITH_ATTRIBUTES_STOCK."
set quantity = quantity + " . $order->fields['products_quantity'] . "
where products_id = '" . (int)$order->fields['products_id'] . "'
and stock_attributes = '".implode(',', $attr_array)."'
");
$db->Execute("update " . TABLE_PRODUCTS . "
set products_quantity = products_quantity + " . $order->fields['products_quantity'] . ", products_ordered = products_ordered - " . $order->fields['products_quantity'] . " where products_id = '" . (int)$order->fields['products_id'] . "'");
unset($attr_array);
$order->MoveNext();
}
}
But just a little background and forewarning, I am by no means a programmer, just a noobie, but proficient computer nerd who has had a little background in programming back in college. I sat down for the past 12 hours trying to dissect the logic of tying the line items of the ORDERS_PRODUCTS table (which records each of your unique products sold and in what quantities) to the PRODUCTS_WITH_ATTRIBUTES_STOCK table (which contains your master list of stock for each unique attribute of your product inventory) in the zen-cart database, and realized that the arguments utilized were not specific enough to appropriately identify tie the two tables together accurately.
Furthermore, $attr_array needs to be unset after each iteration, or else data just gets appended to the end of it, causing the whole function to simply not work.
PLEASE NOTE:
This needs more testing and input from the rest of you guys who use this module, because my store's attributes are set up where the only unique attribute I use is color.
So if your store's products are similar to mine, I'm sure that the fix above will work, but if you have multiple attribute combinations (such as size and color), then please test cautiously, and provide your feedback. From looking at the code, I believe it should work in all scenarios...but I can't be for certain.
Also, PLEASE test with caution!!! I would suggest creating a few dummy orders and taking note of your quantities before and after placing your dummy order then monitoring the stock levels after you delete the dummy order and choose to restock the items! It should go without saying, but...obviously don't test this on real live orders :)
Hopefully this helps out a lot of you out there, and this code (or at least the logic to make the restock feature work) make it to the 1.5 version of SBA!
-
Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9
Sorry, also important to note for my above solution, this is for ZC 1.3.9h only! I don't have any experience with 1.5 and don't know if the code has changed much, if any, in 1.5...so I can only guarantee this to be working with the latest verion of SBA for ZC 1.3.9h.
-
Re: Stock by Attribute v4.0 for Zen Cart 1.3.5
My site is getting this error
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 ') AND pa2.products_attributes_id IN (19821) ' at line 3
in:
[SELECT count(DISTINCT pa1.options_id) AS matches FROM products_attributes pa1, products_attributes pa2 WHERE pa1.products_attributes_id IN () AND pa2.products_attributes_id IN (19821) AND pa1.options_id = pa2.options_id]
http://www.nothingbutcostumes.com/bi...me-p-9007.html
Any suggestion on how I can fix this???
Thanks in advance
-
Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9
I searched my store for pa1 and narrowed the problem. Is there something I can comment out to remove this problem??
/home/nothingb/public_html/includes/functions/functions_lookups.php
Quote:
Line #272 : SELECT pov1.products_options_id FROM (products_attributes pa1
Line #274 : ON pa1.options_values_id = pov1.products_options_values_id)
Line #278 : WHERE pa1.products_attributes_id IN ( $atr ) AND pa2.products_attributes_id IN ( $atr2 )
Line #288 : $res2 = $db->Execute("SELECT count(DISTINCT pa1.options_id) AS matches
Line #289 : FROM products_attributes pa1, products_attributes pa2
Line #290 : WHERE pa1.products_attributes_id IN ($atr)
Line #292 : AND pa1.options_id = pa2.options_id");
Line #321 : $res2 = $db->Execute("SELECT DISTINCT pa1.products_attributes_id AS needed
Line #322 : FROM products_attributes pa1, products_attributes pa2
Line #323 : WHERE pa1.products_attributes_id IN ($atr)
Line #325 : AND pa1.options_id = pa2.options_id
Line #326 : ORDER BY pa1.products_attributes_id");
/home/nothingb/public_html/snickers/includes/functions/extra_functions/functions_qty_attribute.php
Quote:
Line #34 : (products_attributes pa1 INNER JOIN products_options_values_to_products_options pov1
Line #35 : ON pa1.options_values_id = pov1.products_options_values_id)
Line #42 : WHERE pa1.products_attributes_id IN ( $atr )
Line #53 : $res2 = $db->Execute("SELECT count(DISTINCT pa1.options_id) AS matches
Line #54 : FROM products_attributes pa1, products_attributes pa2
Line #55 : WHERE pa1.products_attributes_id IN ($atr)
Line #57 : AND pa1.options_id = pa2.options_id;");
-
Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9
Dr Byte once said
Quote:
"WHERE pa1.products_attributes_id IN ()"
You're telling it to lookup a products_attributes_id in the list of values specified inside the parentheses, but your list is empty, thus you're creating a MySQL syntax error. Hence the error message.
So I see the 2 places... What can I do now?
Code:
WHERE pa1.products_attributes_id IN ($atr)
Is the problem..
-
Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9
Quote:
Originally Posted by
milobloom
So I see the 2 places... What can I do now?
Code:
WHERE pa1.products_attributes_id IN ($atr)
Simple: fix the code that creates the contents of $atr
-
Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9
Quote:
$atr = implode(',',$attributes);
in
/home/nothingb/public_html/includes/functions/functions_lookups.php
Can I change this to something?
-
Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9
Custom code.
So, you trace that back to figure out why the $attributes array was empty.
Chances are some query or criteria or selection in however you set up your attributes ... failed.
Keep following the trail until you find the solution.
-
Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9
Quote:
$attributes = $db->Execute($attributes_query);
/home/nothingb/public_html/includes/functions/functions_lookups.php
Quote:
Line #420 : $attributes_query = "select pa.products_attributes_id
Line #425 : $attributes_query = "select pa.products_attributes_id
Line #430 : $attributes = $db->Execute($attributes_query);
Line #444 : $attributes_query = "select sum(options_values_price) as total
Line #448 : $attributes = $db->Execute($attributes_query);
Anything here??
-
Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9
All searches for $db
come up
Quote:
$db = new queryFactory();
-
Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9
Is the problem in here?
Quote:
Line #444 : $attributes_query = "select sum(options_values_price) as total
-
Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9
A snippit from this section that has $attributes_query
Quote:
/*
* Check if product has attributes
*/
function zen_has_product_attributes($products_id, $not_readonly = 'true') {
global $db;
if (PRODUCTS_OPTIONS_TYPE_READONLY_IGNORED == '1' and $not_readonly == 'true') {
// don't include READONLY attributes to determin if attributes must be selected to add to cart
$attributes_query = "select pa.products_attributes_id
from " . TABLE_PRODUCTS_ATTRIBUTES . " pa left join " . TABLE_PRODUCTS_OPTIONS . " po on pa.options_id = po.products_options_id
where pa.products_id = '" . (int)$products_id . "' and po.products_options_type != '" . PRODUCTS_OPTIONS_TYPE_READONLY . "' limit 1";
} else {
// regardless of READONLY attributes no add to cart buttons
$attributes_query = "select pa.products_attributes_id
from " . TABLE_PRODUCTS_ATTRIBUTES . " pa
where pa.products_id = '" . (int)$products_id . "' limit 1";
}
$attributes = $db->Execute($attributes_query);
if ($attributes->recordCount() > 0 && $attributes->fields['products_attributes_id'] > 0) {
return true;
} else {
return false;
}
}
/*
* Check if product has attributes values
*/
function zen_has_product_attributes_values($products_id) {
global $db;
$attributes_query = "select sum(options_values_price) as total
from " . TABLE_PRODUCTS_ATTRIBUTES . "
where products_id = '" . (int)$products_id . "'";
$attributes = $db->Execute($attributes_query);
if ($attributes->fields['total'] != 0) {
return true;
} else {
return false;
}
}
-
Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9
Sadly... I am trying... But not sure what I am doing...
-
Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9
Quote:
Originally Posted by
milobloom
Sadly... I am trying... But not sure what I am doing...
Can you provide more details?
What specific variation of SBA did you install? I'm assuming you're on ZC 1.3.9h or older version?
Did you modify any code in the files from the SBA addon module? Or did you install perhaps other addon modules that may have overwritten files related to the SBA addon instead of properly merging the code?
You linked a specific product in your post, is this product the cause of the error? Can you be more specific about how the error is triggered?
What exactly are you doing in the ZC admin that causes that error to be displayed, and does this error only happen with a few specific products, or does it happen to all of your products?
Based on the assumption that you did not modify any of the SBA code, and you did not install other addons that may have overwritten SBA code...
Then the problem as Dr. Byte pointed out is that your $attributes array is coming up as empty, and the reason is not because of an error in the code, but an error in how you may have programmed your product's attributes.
Looking at the specific product that you linked, I noticed that it was not assigned any specific attributes. It appears as if most of your toddler items are assigned either the 0-6m attribute or the 6-12m attribute, except this one. Does the problem persist if you assign it a specific attribute? Or is the error what's actually preventing you from adding specific attributes to this product?
Need all these questions answered to help you further.
-
Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9
Can anyone steer me in the right direction please?
In Admin > Catalog > Products with attributes stock, is it possible to sort the attributes for each product in any way other than the default 'primary attribute'? I'm using v1.3.9h with SBA v 1.4.14. I'd like to sort by colour then by size, unfortunately, some products were added with size as the primary attribute and others with colour as the primary attribute. Thanks
-
Re: Stock by Attribute v4.0 for Zen Cart 1.3.5
Is there a way to change the order in which the attributes appear in the admin interface in this? I'm using ZC 1.3.9h.
Thanks,
John
-
Re: Stock by Attribute v4.0 for Zen Cart 1.3.5
John,
The attributes are ordered by primary attribute. The primary attribute is the attribute you inserted first for each product. Within the primary attribute, the order is determined by the sort order of the primary attribute. For example, if you added colour before size, and within colour you have blue- sort order 10, red - sort order 20, then the SBA order will be 1st blue size x, blue size y followed by red size x, red size y. You can change the sort order within an attribute via admin>catalog>option value manager. I don't know how you change the primary attribute.
-
Re: Stock by Attribute v4.0 for Zen Cart 1.3.5
Hmm, that doesn't seem to work. I went into catalog > option value manager and changed the default order for several of the attributes.
While that change did affect their order in that screen (option value manager) it had no effect on their order in the "Stock By Attributes" screen. Did I miss something?
John
-
Re: Stock by Attribute v4.0 for Zen Cart 1.3.5
Quote:
Originally Posted by
jgold723
Hmm, that doesn't seem to work. I went into catalog > option value manager and changed the default order for several of the attributes.
While that change did affect their order in that screen (option value manager) it had no effect on their order in the "Stock By Attributes" screen. Did I miss something?
John
When you add attributes to a product they assume the default sort order of the attributes (it's flexible so you can change the sort order of your attribute name and values at the time you add the attributes if you want a different order for whatever reason).. If you change the sort order of the attribute names and values in the attributes manager, the default sort order will be modified for any future products you add your attributes to. Products that you've already added your attributes (with the old sort order values) to will remain the same as the original default sort order.. this means you must edit your products that you have added attributes to with the new sort order values..
-
Re: Stock by Attribute v4.0 for Zen Cart 1.3.5
I think I understand, but to clarify -- when you say "edit the products" do you mean I need to delete attributes and re-add them so that the new sort order will take effect?
Also -- I just want to change the order in the "Stock by Attributes" admin screen -- I don't want to change how the attributes are arranged in the front end.
John
-
Re: Stock by Attribute v4.0 for Zen Cart 1.3.5
Quote:
Originally Posted by
jgold723
I think I understand, but to clarify -- when you say "edit the products" do you mean I need to delete attributes and re-add them so that the new sort order will take effect?
Edit your products in the attributes manager.. simply change the sort order of the names and values as you wish.. no need to delete and start over..
-
Re: Stock by Attribute v4.0 for Zen Cart 1.3.5
Thank you.
However, my concern is that changing the sort order in the Attributes Controller section changes how the attributes are ordered on the product page -- something I don't want. I just want to change them in the Admin screen of "Stock by Attributes"
I tried this and is seems to work: I went into Stock by Attributes and deleted every attribute.
Then I readded them in the reverse order in which I want them to appear.
That seemed to do the trick -- at least with a product that had three attributes.
Does this seem correct?
John
-
Re: Stock by Attribute v4.0 for Zen Cart 1.3.5
I'll answer my own question -- it didn't work.
-
Re: Stock by Attribute v4.0 for Zen Cart 1.3.5
Finally -- success!
Quote:
Originally Posted by
jgold723
Hmm, that doesn't seem to work. I went into catalog > option value manager and changed the default order for several of the attributes.
While that change did affect their order in that screen (option value manager) it had no effect on their order in the "Stock By Attributes" screen. Did I miss something?
John
This did work -- but you have to click the very small "sort" link at the top of the Stock by Attributes admin screen before you see the new sort order. Thanks to everyone for your help.
-
Re: Stock by Attribute v4.0 for Zen Cart 1.3.5
Hi,
I hope someone can help me. I am working on www.dragonslivestore.com, using Zen Cart 1.3.9 h and StockByAttributes_1.4.13_with_my_stock_id_MOD_1.0.2. The module installed correctly, and I have given each attribute it's own model number. However when a customer places an order, in admin - orders - it shows the product and attribute, but the model column is empty. What can I do so the model number shows up on my orders?
-
Re: Stock by Attribute v4.0 for Zen Cart 1.3.5
barendfaber:
If I understand correctly what you have to do is actually include the model number as part of your attribute value.
so if you go to catalogue > attribute controller
and create a the option name "size"
then create the value "small #12345" for the particular item that this part number will apply to.
If the part number is different for the option "small" for other products you create different option value for "size" that includes the part number as it applies to each product. That way the part number shows up on the invoice. We do this to avoid mis-picking the order.
-
Re: Stock by Attribute v4.0 for Zen Cart 1.3.5
Hi,
Thanks for the reply, but I do not think this will work. This will be a huge amount of work and will still not add a model number in orders, only adds the model number next to the attribute description. It also means that next to each product on the site, the attribute drop down will change from “Small” to “Small - 63-AN-011-1”, or “Medium” to “Medium - 63-AN-011-2”. Good to know for future.
I think I will have to ask the customer to allow us to add a model number for the main product, and they will just have to check sizes on the orders.