-
Stock by Attribute v4.0 addon for v1.3.5-1.3.9
This is the support thread for the updated Stock by Attributes add-on for Zen Cart 1.3.5. If you are using an version of Zen Cart prior to 1.3.5 then you will need to upgrade before you can use this add-on.
The add-on can be downloaded from here.
There is also a Wiki with more information about the add-on. You can find the Wiki here.
To put this add-on in context, it is a stop gap. This feature is scheduled to be added to the next major release of Zen Cart, and probably in a rather more integrated way than is appropriate for an add-on such as this. Furthermore the add-on from which this was adapted has a major flaw in its table structure, which I am sure the Zen Cart team will not replicate.
So I have no desire to add extra functionality that will probably have a very short shelf life, may not be included in the Zen Cart solution anyway and might make future conversion to the differently structured and more integrated Zen Cart version more complex. So please don't post requests for new functionality in this support thread.
However, if you are having problems installing or using the add-on or think that there are errors / bugs in it, then your posts will be welcome.
-
Re: Stock by Attribute v4.0 for Zen Cart 1.3.5
I guess I should never have referred to v4.0, as just a few hours later, v4.1 has been released. This is a minor bug fix release that incorporates two Zen Cart 1.3.5 bug fixes, removes a diagnostic line and makes a syntactic correction to the SQL file.
-
Re: Stock by Attribute v4.0 for Zen Cart 1.3.5
-removed as I have fixed issue and was being daft -
Thanks
MG
-
Re: Stock by Attribute v4.0 for Zen Cart 1.3.5
I have been testing this further and I have issue with the maths.
If I have sizes small, medium, large and stock of 1 of each and some one buys 2 of medium the stock by attributes will tell me that I have 1 in stock in total. But I have 2 in stock (one large and one small)
So mathmatically 1+1+(-1)=1 but reality 1+1+(-1)=2
can this be fixed - do people want it to be fixed? ie top line tells you total in stock. Variant lines tell you the exact stock for each one.
Logic if I have this right would mean that if I have any positive stock add them up and tell me (ignoring any negatives). If I have all 0 or negative stock added them up and report all as a negative or as 0.
Also a bit of a wish list - is it possible to work out all variants and add them to the database so only the qty has to be added. I know some have asked for a quicker way of entering the data.
Thanks
MG
-
Re: Stock by Attribute v4.0 for Zen Cart 1.3.5
I just installed this mod and have the following problem.
When "Add Quantity for Product Variant" I can select the varant from the drop down menus of attributes OK, but then when the variant is listed as
Stock ID Variant Quantity in Stock etc
all the variant are just listed as ":".
Presumably this column is supposed to show the value of the attribute.
Now I have no way of telling which variant is which,
Any ideas?
-
Re: Stock by Attribute v4.0 for Zen Cart 1.3.5
I installed this mod a couple of days ago to my test site and it was working just fine, but after some wrestling with some other issues on the site it is now not working. When I try to apply the sql patch in admin, I get the following error:
1062 Duplicate entry 'STOCK_SHOW_LOW_IN_CART' for key 2
in:
[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 stock when low', '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')," );]
I'm thinking this is probably why it's not working, but I'm just not savvy enough to know what I need to do to get it working again. Can someone help guide me?
TIA!
-
Re: Stock by Attribute v4.0 for Zen Cart 1.3.5
Quote:
Originally Posted by
MikeyG
If I have sizes small, medium, large and stock of 1 of each and some one buys 2 of medium the stock by attributes will tell me that I have 1 in stock in total. But I have 2 in stock (one large and one small)
That's a good point. This logic works in for Zen Cart's normal stock control where negative values indictate back orders but not for variants when the variant stock gets offset. Sadly this probably won't be fixed in Stock by Attributes, but will hopefully be taken into consideration when the function is absorded into Zen Cart's core code.
Quote:
Originally Posted by
trollboy
I just installed this mod and have the following problem.
When "Add Quantity for Product Variant" I can select the varant from the drop down menus of attributes OK, but then when the variant is listed as
Stock ID Variant Quantity in Stock etc
all the variant are just listed as ":".
This problem is not unique to this this version. It has just surfaced in the mod from which which this one was derived. I have located the problem and am working on a fix. Watch this space.
Quote:
Originally Posted by
buzzville
I installed this mod a couple of days ago to my test site and it was working just fine, but after some wrestling with some other issues on the site it is now not working. When I try to apply the sql patch in admin, I get the following error:
1062 Duplicate entry 'STOCK_SHOW_LOW_IN_CART' for key 2
in:
[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 stock when low', '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')," );]
This error is most likely because you are trying to run the patch a second time and MySQL is kicking up a fuss because you're trying to ram data that must be unique into the database for a second time. So it's unlikely to explain why the mod's not working for you. To hazard a guess at that would require something more specific than "after some wrestling with some other issues on the site it is now not working" :wink2:
-
Re: Stock by Attribute v4.0 for Zen Cart 1.3.5
Quote:
Originally Posted by
kuroi
This error is most likely because you are trying to run the patch a second time and MySQL is kicking up a fuss because you're trying to ram data that must be unique into the database for a second time. So it's unlikely to explain why the mod's not working for you. To hazard a guess at that would require something more specific than "after some wrestling with some other issues on the site it is now not working" :wink2:
Ok, fair enough! The mod was working nicely before I imported my database into my test site (with test products). I had some issues importing my database into the install of 1.3.5 on my test site. Once it was finally imported to the test site I also had to rename all of the database tables to remove the "zen" prefix that was still present in my "live" database. Renaming all the tables got everything working again on the test site, but the mod doesn't appear to be working fully. I get the insufficient stock warning, but it doesn't show the remaining stock quantity so that customers know how to adjust the contents of their cart.
Is it something in the tpl_shopping_cart_default.php file? This is what I found in what I thought was the relevant section of the file:
Code:
<?php if ((STOCK_SHOW_LOW_IN_CART == 'true') && $product['flagStockCheck']) {
echo '<span class="alert bold">';
echo PWA_STOCK_AVAILABLE;
echo ((isset($product['stockAvailable'])) ? $product['stockAvailable']: 0);
echo '</span>';
}?>
Does this help at all? Thanks so much for the help!
-
Re: Stock by Attribute v4.0 for Zen Cart 1.3.5
Quote:
Originally Posted by
buzzville
I get the insufficient stock warning, but it doesn't show the remaining stock quantity so that customers know how to adjust the contents of their cart.
Is it something in the tpl_shopping_cart_default.php file?
You've found the right bit of code, but hopefully your solution will be much more straightforward. I suspect that your problem may be no more than that whilst wrestling your site back under control your Admin > Stock > "Show stock when low" flag has been reset to false (fingers crossed)
-
Re: Stock by Attribute v4.0 for Zen Cart 1.3.5
Yes! Thank you! I hadn't thought to re-check there, but that seems to be exactly what happened. Now the remaining stock is showing! Thanks so much for this *much needed* addition! :D
-
Re: Stock by Attribute v4.0 for Zen Cart 1.3.5
Quote:
Originally Posted by
trollboy
I just installed this mod and have the following problem.
When "Add Quantity for Product Variant" I can select the varant from the drop down menus of attributes OK, but then when the variant is listed as
Stock ID Variant Quantity in Stock etc
all the variant are just listed as ":".
Presumably this column is supposed to show the value of the attribute.
Now I have no way of telling which variant is which,
Any ideas?
There is a fix for this in a maintenance release 4.2 of this mod awaiting approval from the Zen Cart team. I'm afraid that you will need to delete out the corrupted variants and re-enter them as the details that don't appear on your screen won't be in your database either. To upgrade simply replace all the files in the old mod with those in this version. It's a one-to-one match.
-
Re: Stock by Attribute v4.0 for Zen Cart 1.3.5
Hello,
I installed the Stock by Attribute module, but I have a question about how it works. I have a situation where I have products with a couple attributes that affect the stock, and a couple of attributes that do not affect stock. For example, color and size affect stock, but monogram style and monogram text do not.
I would like to be able to control the stock for the different combinations of color and size, ignoring the monogramming options.
Is this possible with this module?
When I click the "add a product variant" link, it makes me choose a value for each attribute. Is there a way to just choose the attributes that you want to affect stock?
Thanks!
-
Re: Stock by Attribute v4.0 for Zen Cart 1.3.5
Quote:
Originally Posted by
blake06
I have a situation where I have products with a couple attributes that affect the stock, and a couple of attributes that do not affect stock. For example, color and size affect stock, but monogram style and monogram text do not.
I would like to be able to control the stock for the different combinations of color and size, ignoring the monogramming options.
Is this possible with this module?
When I click the "add a product variant" link, it makes me choose a value for each attribute. Is there a way to just choose the attributes that you want to affect stock?
Hi Blake
Firstly you should find that the monogram text presents no problem. As it a text field you should find that the drop down menu presents only one option and so can be safely ignored. Unsightly yes, extra work, not really.
The monogram style question however, is much more significant. I now call this the gift wrapping question. It crops up in an amazing varied number of ways and situations: gift wrapping, bow color, container type, ring setting, frame type, etc. - all basically where one or more attributes are somehow independent of the main product. There is an archive thread (discussion starts from post 199) that offers a workable solution. However, there are no plans to include this in the current mod, though it will hopefully be considered for inclusion into the next major release of Zen Cart along with attribute stocks generally.
-
Re: Stock by Attribute v4.0 for Zen Cart 1.3.5
I am just learning to use/mod zen cart, so this may be an obvious or previously discussed option, but I have not seen it in my readings.
The idea may not work for all "Gift Wrap" problems, but is it possible to create a product which does not show up in the catalog, but is offerred to the customer before check out, maybe even offered only for certain products?
I'm still figuring out how to configure the store at a basic level, but wouldn't an option like the one I describe allow you to only have stock relevant attributes, and offer gift wrapping as a separate product at $0.00.
If the offer could be tied to only certain items, it would even work for something like monograms being offered for shirts, but not other products.
Just a thought...
Steven
************************
After posting, I looked at the downloads and I wonder if Cross Sell under the marketing add ons could server this purpose...
-
Re: Stock by Attribute v4.0 for Zen Cart 1.3.5
kuroi,
Thanks for the link. I'll probably end up taking a similar approach to what was suggested on that thread.
-
Re: Stock by Attribute v4.0 for Zen Cart 1.3.5
Quote:
Originally Posted by
neo314
The idea may not work for all "Gift Wrap" problems, but is it possible to create a product which does not show up in the catalog, but is offerred to the customer before check out, maybe even offered only for certain products?
I'm still figuring out how to configure the store at a basic level, but wouldn't an option like the one I describe allow you to only have stock relevant attributes, and offer gift wrapping as a separate product at $0.00.
If the offer could be tied to only certain items, it would even work for something like monograms being offered for shirts, but not other products.
... I wonder if Cross Sell under the marketing add ons could server this purpose
Steven, that's an excellent suggestion, since it more accurately reflects what is happening in many of these situations. That's to say, the extra is, at time of sale, a separate product or service with its own or unlimited stock (even if like monogramming it becomes an intrinsic part of the product prior to delivery).
It wouldn't work in all cases, e.g. ring settings couldn't easily be presented separately from the gems being sold, but it would work in most.
I'm not personally familar with Cross Sell so I don't know how easily it could be adapted, but I'm sure that there are other subscribers to this thread who are and who will hopefully jump in to extend this idea.
Welcome to Zen Cart.
-
Re: Stock by Attribute v4.0 for Zen Cart 1.3.5
I have some products for which I was to keep track of stock by attributes,
and some for which I want to keep track of total stock regardless of attributes.
Is it possible to decide which products should appear in the stock by attributes list?
I have installed the mod and all my products with attributes appear there.
If don't put in numbers for product variants then it treats my total stock as zero.
Do I have to either keep track of the stock of all products via attrabutes or none, or can I mix and match?
-
Re: Stock by Attribute v4.0 for Zen Cart 1.3.5
I have just noticed that this module is not substracting my stock level when I have received an order. My settings in admin are:
Check stock level true
Subtract stock true
Allow Checkout false
I am not sure when this has stopped working, as before the 1.3.5 release of ZenCart it worked fine. And have upgraded to 'stock_by_attributes_4.2' when I noticed that no attributes were displayed with the older version after upgrade.
I also have noticed that I have 2 entries of 'products by attributes stock' in my manager under the catalog entry.
What can I do to fix it?
Kind regards,
Goshawk
-
Re: Stock by Attribute v4.0 for Zen Cart 1.3.5
I have installed this twice and after inserting many attributes stock, both were not working anymore. Suddenly the page can`t show and I am not able to insert no more attributes stock. Do you have any idea about that.
Gerda
-
Re: Stock by Attribute v4.0 for Zen Cart 1.3.5
I am looking for solutions for a friend of mine who wants to list property on a website for people to rent. I wondered if this stock by attribute would allow you to list a property and use availability attributes to allow people to select a set of dates.
My question made simple is does this mod allow you to setup availability of attributes?
Regards
Mark.
-
Re: Stock by Attribute v4.0 for Zen Cart 1.3.5
Quote:
Originally Posted by
trollboy
I have some products for which I was to keep track of stock by attributes,
and some for which I want to keep track of total stock regardless of attributes.
Is it possible to decide which products should appear in the stock by attributes list?
I have installed the mod and all my products with attributes appear there.
If don't put in numbers for product variants then it treats my total stock as zero.
Do I have to either keep track of the stock of all products via attrabutes or none, or can I mix and match?
The mod displays all products, but only stock by attributes for those products for which you explicitly choose to set attribute stock.
Once you decide to set attribute stock, you must do so for all variants available for that product and any variants not set will be assumed to have no stock. However, you can remove all the variants and revert to managing stock at the product level if you wish.
-
Re: Stock by Attribute v4.0 for Zen Cart 1.3.5
Quote:
Originally Posted by
Goshawk
I have just noticed that this module is not substracting my stock level when I have received an order. My settings in admin are:
Check stock level true
Subtract stock true
Allow Checkout false
I am not sure when this has stopped working, as before the 1.3.5 release of ZenCart it worked fine. And have upgraded to 'stock_by_attributes_4.2' when I noticed that no attributes were displayed with the older version after upgrade.
I also have noticed that I have 2 entries of 'products by attributes stock' in my manager under the catalog entry.
What can I do to fix it?
I'm open to correction, but the only way that I can see to get the symptoms that you describe would be to upgrade to Zen Cart 1.3.5, then re-install whatever older version of Stock by Attributes you were using. Then install version 4.2 without first removing the files for the older version.
TRemoving these older files is more critical for this releases 4.x of this mod than would normally be the case since when I upgraded it for 1.3.5 I also removed a number of dubious practises that went way back, and made better use of the over-rides system than was probably available to older versions. As a result, you can't install 4.2 by simply over-writing your existing setup. You must remove those old files not now used by this mod. I suspect that something in one of them is what's causing you these problems.
-
Re: Stock by Attribute v4.0 for Zen Cart 1.3.5
Quote:
Originally Posted by
gerda
I have installed this twice and after inserting many attributes stock, both were not working anymore. Suddenly the page can`t show and I am not able to insert no more attributes stock. Do you have any idea about that.
Gerda
You haven't given me much to go on here Gerda. When you say that you have installed this mod twice and both are not working anymore, do you mean that you are trying to run two versions of the mod at the same time. If so, I would not expect it work. You would need top remove all traces of the older version and ideally re-install the new on to ensure that you had a clean fileset from the beginning.
-
Re: Stock by Attribute v4.0 for Zen Cart 1.3.5
Quote:
Originally Posted by
mrmarcus66
I am looking for solutions for a friend of mine who wants to list property on a website for people to rent. I wondered if this stock by attribute would allow you to list a property and use availability attributes to allow people to select a set of dates.
My question made simple is does this mod allow you to setup availability of attributes?
Mark
You could do this by setting up each availability range as an attribute and then assigning each an attribute stock of '1'.
That would work, but it really feels like a taking a sledgehammer to a nut. I feel that there must be a better solution and just wish that I could think of it!
-
Re: Stock by Attribute v4.0 for Zen Cart 1.3.5
Hey I am a danish girl and not wery good in english, but I removed the mod and installed it again and it worked for some time and then suddenly it doesn`t work anymore. If I drain the table in the database, the mod works for a while, but when I have added a cuple of stocks again it stops work.
-
Re: Stock by Attribute v4.0 for Zen Cart 1.3.5
Quote:
Originally Posted by
gerda
Hey I am a danish girl and not wery good in english, but I removed the mod and installed it again and it worked for some time and then suddenly it doesn`t work anymore. If I drain the table in the database, the mod works for a while, but when I have added a cuple of stocks again it stops work.
Hey Gerda, your English is much better than my Danish and you are perfectly understandable.
Could you give me some more details though. Which version or versions of the mod have you installed? Which version of Zen Cart are you using? What process did you use for removing the mod?
-
Re: Stock by Attribute v4.0 for Zen Cart 1.3.5
Kuroi,
I am in the process of upgrading my cart to version 1.3.6, and have only installed your update 4.2, so far everything seems to be working ok.
Will keep you posted if I see anything unusual.
Are there any database files that I should delete that are left over from daniels older version?
Thanks, Goshawk
-
Re: Stock by Attribute v4.0 for Zen Cart 1.3.5
Hey, I`m using Zencart 1.3.5. and the mod is 4.2. I just deleted the old installations files and installed again.
-
Re: Stock by Attribute v4.0 for Zen Cart 1.3.5
Quote:
Originally Posted by
kuroi
The mod displays all products, but only stock by attributes for those products for which you explicitly choose to set attribute stock.
Once you decide to set attribute stock, you must do so for all variants available for that product and any variants not set will be assumed to have no stock. However, you can remove all the variants and revert to managing stock at the product level if you wish.
That is what I thought should happen, but t doesn't seem to be working properly. When I look at the Stock by Attributes admin page, the stock appears at the product level for any products for which I haven't set indivdual stocks by attribute. However, when I try and buy one of these products, the shopping cart tells me that there s not enough stock. If I "synchronise stock" on the Stock by Attributes admin page the stock value gets reset to zero, It seems as though the stock at the product level is not being recognised.
Any ideas as to what might be wrong?
-
Re: Stock by Attribute v4.0 for Zen Cart 1.3.5
I have installed this mod, but I am not sure if this is normal. I have a size set up for selling shirts. I only have them in size M,L,XL, but my attribute is for all sizes, so it includes S and XXL, XXXL. But I have zero of these in stock, but they are still showing up on the items page. Is this normal? Is there a way to make it so that the items not in stock don't show up as options?
Thanks,
Bob
-
Re: Stock by Attribute v4.0 for Zen Cart 1.3.5
If you go into catalog/products with attributes stock, you are able to delete the attributes that you do not need for each item Somehow you must have imported all atributes available to all your products. I don't know if their is a quick way around it.
Goshawk
-
Re: Stock by Attribute v4.0 for Zen Cart 1.3.5
Does this version also work for 1.3.6? Anyone using it now?
-
Re: Stock by Attribute v4.0 for Zen Cart 1.3.5
I have a version for 1.3.6 but haven't had time to test it yet. Apologies to others who have asked questions, I will be back to answer them when pressure of work permits, in the meamtime, hopefully other members of the community can help.
-
How do I disable this mod?
I installed the mod and it seems to work as promised. Nice job. However, my client apparently does not want to deal with adjusting stock levels for every variation of product. Is there a way to disable this and go back to the old way?
Is there a switch or do I need to copy over some "new" files with original ones?
Thanks,
Chris
-
Removal of Stock by Attribute v4.0 causing FATAL ERRORS!
Anyone???
I replaced all the overwritten files with the original, but am now getting the following error after checkout from the shopping cart:
Fatal error: Cannot redeclare class httpclient in /home/chubby/public_html/shop/includes/classes/http_client.php on line 22
I gotta launch this thing in the next coupla days. Any help is appreciated.
Chris
-
Re: Stock by Attribute v4.0 for Zen Cart 1.3.5
My fix for this (rather, a workaround) was that I had to KEEP the changed version of header_php.php in the modules/pages/checkout_shipping. The original version of the file was causing the error for some reason.
Anyway, it works and attribute stock is not required. I basically deleted and replaced all the changed files with originals (excepting above) and deleted the new database entries/tables.
PL
-
Re: Stock by Attribute v4.0 for Zen Cart 1.3.5
Quote:
Originally Posted by
kuroi
I have a version for 1.3.6 but haven't had time to test it yet. Apologies to others who have asked questions, I will be back to answer them when pressure of work permits, in the meamtime, hopefully other members of the community can help.
I hope that you release your version for 1.3.6 soon. When I installed stock by attribute on 1.3.6, I encountered a minor bug. When you try to change Configuration>'show stock when low', there is a error message:
Quote:
Parse error: parse error, unexpected T_STRING, expecting ')' in /home/user/public_html/admin/configuration.php(192) : eval()'d code on line 1
So I just left this field unchanged. Anyway, I think this is just a minor bug and the problem probably came from admin/products_with_attributes_stock.php
-
Re: Stock by Attribute v4.0 for Zen Cart 1.3.5
Quote:
Originally Posted by
frank_lyy
I hope that you release your version for 1.3.6 soon. When I installed stock by attribute on 1.3.6, I encountered a minor bug. When you try to change Configuration>'show stock when low', there is a error message:
So I just left this field unchanged. Anyway, I think this is just a minor bug and the problem probably came from admin/products_with_attributes_stock.php
Problem solved!! Sorry, my mistake. The problem was cause by myself. I changed stock_attribute sql syntax when installing the first time in light of my past experience with contribs installations such as super order 2.0.
Now, I simply reinstalled the stock_attribute.sql as it is. Problem solved.
It seems like this contrib is working with 1.3.6 so far.
-
Re: Stock by Attribute v4.3 for Zen Cart 1.3.6
Quote:
Originally Posted by
frank_lyy
Problem solved!! Sorry, my mistake. The problem was cause by myself. I changed stock_attribute sql syntax when installing the first time in light of my past experience with contribs installations such as super order 2.0.
Now, I simply reinstalled the stock_attribute.sql as it is. Problem solved.
It seems like this contrib is working with 1.3.6 so far.
Hi Frank. Glad you solved the problem, and thanks for posting the answer. It's always helpful when people do that as Zen Cart now has such a large base that sooner or later somebody else will probably do something similar.
The Zen Cart 1.3.6 version (mod version 4.3) is now available in the download section. Due to my other commitments it's less extensively tested than previous releases. The changes shouldn't have introduced any new problems, but if you find any please post them.
I strongly recommend upgrading to this version as it incorporates some of the security changes added to Zen Cart 1.3.6.
If you are using languages other than English or French, you will need to make some minor adjustments to the language files, otherwise upgrading is simply a matter of overwriting your existing mod files.
-
Re: Stock by Attribute v4.0 for Zen Cart 1.3.5
Quote:
Originally Posted by
Goshawk
Kuroi,
I am in the process of upgrading my cart to version 1.3.6, and have only installed your update 4.2, so far everything seems to be working ok.
Will keep you posted if I see anything unusual.
Are there any database files that I should delete that are left over from daniels older version?
Thanks, Goshawk
No there are database files to delete. When I upgraded this for 1.3.5 I used the same table structure as Daniel's version (I don't like it, but it ensured compatibility until the official Zen Cart version comes along).
As you are running Zen Cart 1.3.6, I recommend upgrading to mod version 4.3 for the reasons explained to Frank in my previous post.
-
Re: Stock by Attribute v4.0 for Zen Cart 1.3.5
Quote:
Originally Posted by
trollboy
That is what I thought should happen, but t doesn't seem to be working properly. When I look at the Stock by Attributes admin page, the stock appears at the product level for any products for which I haven't set indivdual stocks by attribute. However, when I try and buy one of these products, the shopping cart tells me that there s not enough stock. If I "synchronise stock" on the Stock by Attributes admin page the stock value gets reset to zero, It seems as though the stock at the product level is not being recognised.
Any ideas as to what might be wrong?
Sorry my earlier response wasn't very well-crafted. I'll try to make it a little more clear, though I fear you won't much like the answer.
The way the mod works is that once you enable stock by attribute it takes over the management of stock levels for all products with attributes. So if you have a product with attributes for which you do not create any variants and give them stock, then when a customer tries to buy them, the mod will return zero stock levels. This is not immediately obvious as the product stock level is not updated when the mod is first installed, but when you sync the stock, the product stock will go to zero. Products that have no attributes will continue to use the product stock level.
You can return to using only product level stock figures by uninstalling the mod (basically by over-writing the six core Zen Cart files changed by this mode and listed in the release notes with the equivalents from a default Zen Cart installation. You would then need to reset the stock for those products to which you had allocated product variants or synced the stock values.
Can you tell me a little more background to what you are trying to do so that I can take it into account for future Attribute Stock requirements?
-
Re: Stock by Attribute v4.0 for Zen Cart 1.3.5
Quote:
Originally Posted by
bobage24
I have installed this mod, but I am not sure if this is normal. I have a size set up for selling shirts. I only have them in size M,L,XL, but my attribute is for all sizes, so it includes S and XXL, XXXL. But I have zero of these in stock, but they are still showing up on the items page. Is this normal? Is there a way to make it so that the items not in stock don't show up as options?
Thanks,
Bob
Hi Bob
Yes this is normal. The options showing in the product info page are built by core Zen Cart code that doesn't know anything about the stock values maintained by this add-on.
If you have just one attribute (size) there are other threads that refer to the "Grayson" solution for displaying attribute stock levels on the product_info page. This solution could be tweaked to instead suppress display of the option.
-
Re: Stock by Attribute v4.0 for Zen Cart 1.3.5
Quote:
Originally Posted by
kuroi
Can you tell me a little more background to what you are trying to do so that I can take it into account for future Attribute Stock requirements?
I have a mix of products, some of which require stock by attributes (e.g. tea-light holders which come in small, medium and large). But I also sell cushion covers, which I want to be able to sell with or without the cusion. This is more of a stock by raw materials problem, but since I have lots of cushions I was just going to keep track of stock using the total number of cushion covers sold, with or without cushions inside.
So the product is priced by attribute (with cushion or without), but I want to opt out of keeping track of the stock by attributes.
Is there any reason that all products with attributes have to be included in stock by attributes? Would it be difficult to add an option to allow products to opt out of tracking stock by attributes?
-
Re: Stock by Attribute v4.0 for Zen Cart 1.3.5
You have an example of what I think of as the "gift wrapping" problem. A situation where one of the attributes of a product refers to something that accompanies the product and has stock that is completely independent of that of the product itself. Ironcially, your attribute goes on the inside, rather than the outside.
It probably wouldn't be too difficult to extend the mod to cope with this, but there are no plans to do so. The reason for this is that the functionality is due to be incorporated into the next major release of Zen Cart and to push it to the next level will require a complete rewrite (in fact a completely different approach), so any changes made now would have a short life and make migration to the next release more difficult. However, coping with exactly the situation that you describe looms large in my recommendations to the Zen Cart team.
-
Re: Stock by Attribute v4.0 for Zen Cart 1.3.5
Thanks Kuroi, will get a copy today
Kind regards,
Goshawk
-
1 Attachment(s)
Re: Stock by Attribute v4.3 for Zen Cart 1.3.6
Quote:
Originally Posted by
kuroi
Hi Frank. Glad you solved the problem, and thanks for posting the answer. It's always helpful when people do that as Zen Cart now has such a large base that sooner or later somebody else will probably do something similar.
The Zen Cart 1.3.6 version (mod version 4.3) is now available in the download section. Due to my other commitments it's less extensively tested than previous releases. The changes shouldn't have introduced any new problems, but if you find any please post them.
I strongly recommend upgrading to this version as it incorporates some of the security changes added to Zen Cart 1.3.6.
If you are using languages other than English or French, you will need to make some minor adjustments to the language files, otherwise upgrading is simply a matter of overwriting your existing mod files.
First, a little bug that I found in your new release by using beyond compare with older ones.
In functions_lookups.php on line 163:
Quote:
function zen_get_products_stock($products_id) {
should've been:
Quote:
/* function zen_get_products_stock($products_id) {
Next, I applied a fix by Grayson posted in archived threads to show qty of attributes on product info page. For those who still having trouble with this fix, I am including the attributes.php file here. You may drop it in includes/modules/your_template/ folder.
I am also including another alternative version of this fix (I take no credit whatsoever on this), which shows attribute stock after price_fix and weight etc. display, which makes more sense to myself, becasue this way customer won't confuse stock level with quantity discounts/surcharges. This alternative file is called attributes_Alternative.php. You need to rename it to attributes.php to overwrite the existing one when using.
Don't forget to add a define to the product_info.php in includes/languages/english/your_template folder, such as:
[quote][define('TEXT_ATTRIBUTES_PIECES','pieces');/QUOTE]. I use 'in stock' instead of 'pieces', for it makes more sense.
Now, I need help for myself!! I tried hard to set a "display only" option value such as " select from below" to NOT show stock level, which is a conditional undone of the above fix in attributes.php. I tried codes as follows, but no luck:
Quote:
/*
* check if attribute is display only
*/
global $db;
$check_attributes = $db->Execute("select *
from " . TABLE_PRODUCTS_ATTRIBUTES . "
where products_id = '" . (int)$products_id . "'
and options_id = '" . (int)$option . "'
and options_values_id = '" . (int)$value . "'");
if ($check_attributes->fields['attributes_display_only'] == '1') {
$products_options_value_id = $products_options->fields['products_options_values_id'];
$products_options_details = $products_options->fields['products_options_values_name'];
$products_options_details_noname = $products_options_display_price . ($products_options->fields['products_attributes_weight'] != 0 ? '<br />' . $products_options_display_weight : '');
}
This block of codes were applied after the "// prepare product options details" section and before "//radio buttons" section.
Any help on this would be greatly appreciated!
-
Stock by Attribute v4.3.1 for Zen Cart 1.3.6
Hi Frank
I'm not sure whether the bug that you pointed out would have any functional implications, but it's clearly wrong so I've updated the release pack to 4.3.1. Many thanks for pointing it out.
In respect of the Grayson solution. It clearly works for some people, but comes with the big caveat that it is only suitable for situations where your products have just one attribute (the reason why it has not been incorporated into this or earlier versions of the mod).
-
Re: Stock by Attribute v4.3.1 for Zen Cart 1.3.6
Quote:
Originally Posted by
kuroi
Hi Frank
I'm not sure whether the bug that you pointed out would have any functional implications, but it's clearly wrong so I've updated the release pack to 4.3.1. Many thanks for pointing it out.
In respect of the Grayson solution. It clearly works for some people, but comes with the big caveat that it is only suitable for situations where your products have just one attribute (the reason why it has not been incorporated into this or earlier versions of the mod).
You are absloutely right. The Grayson solution is for products which have only one attribute! I have two attributes on one of my products. In order to use Grayson's fix, I combined the two attributes into one, and named it (very clumsy looking) something like "Color + Size Combination". I sincerely hope someone could come up with a better solution on multi-attribute stock control as well as product info display on these attributes in the near future!!!!
By the way, I solved my own dilemma. I tried to set a "displayonly" attribute as default selection to force attribute selection when add product to cart. Now, I figured out how to set this particular attribute back to NOT showing stock level (for many reasons, but mostly for a better looking). Here is my solution:
Find attributes.php in includes/modules/your_template floder from Kuroi's contrib( many many thanks to Kuroi! Great mod!). Change this code:
Quote:
$products_options_array[] = array('id' => $products_options->fields['products_options_values_id'],
'text' => $products_options->fields['products_options_values_name']);
to the following:
Quote:
//check if attribute is display only
if ($products_options->fields['attributes_display_only'] == '1') {
$products_options_array[] = array('id' => $products_options->fields['products_options_values_id'],
'text' => $products_options->fields['products_options_values_name']);
} else {
$products_options_array[] = array('id' => $products_options->fields['products_options_values_id'],
'text' => $products_options->fields['products_options_values_name'] .' [' . $products_options->fields['quantity'] . ' '. TEXT_ATTRIBUTES_PIECES . ']');
}
Next, right above this line:
add the following:
Quote:
//check if attribute is display only
if ($products_options->fields['attributes_display_only'] == '1') {
$products_options_value_id = $products_options->fields['products_options_values_id'];
$products_options_details = $products_options->fields['products_options_values_name'];
$products_options_details_noname = $products_options_display_price . ($products_options->fields['products_attributes_weight'] != 0 ? '<br />' . $products_options_display_weight : '');
}
//check complete
I wish these changes can be of some help to somebody out there who needs it. I am not a programmer and I've got a lot of help from various smart people in this forum before. For that, I am very grateful.
"Stock by attributes" should be inculded in future zen-cart releases and hopefully has much more intelligent fuctions by then.
-
Stock by Attribute v4.0 for Zen Cart 1.3.5
Hi Frank,
Thanx for your posted fixes... and actually, instead of showing the stock values beside the respective attributes option, I just want to show the 'Out of Stock' remark to only for those attributes that has reach to 0 in quantity BUT no remarks to the one that still have stock. So that next time the online shoppers no need to 'choose' and 'add to cart' the attributes and then find that no stock available to order!!! Do you have any idea how to code that?! :smile: or anyone out there?!
-
Stock by Attribute v4.0 for Zen Cart 1.3.5
Kuroi,
Is it possible to implement a SEARCH facility to Stocks by Attributes mod?! :lamo: As what I can see now is that when you have a LOT of stocks with attributes to manage, it become paintful just to search for particular products thru the listing :wacko:
-
Re: Stock by Attribute v4.0 for Zen Cart 1.3.5
Quote:
Originally Posted by
tajul_ashyqin
Hi Frank,
Thanx for your posted fixes... and actually, instead of showing the stock values beside the respective attributes option, I just want to show the 'Out of Stock' remark to only for those attributes that has reach to 0 in quantity BUT no remarks to the one that still have stock. So that next time the online shoppers no need to 'choose' and 'add to cart' the attributes and then find that no stock available to order!!! Do you have any idea how to code that?! :smile: or anyone out there?!
In my situation, I have very limited stock level on each attribue. So, I wanted customers to see the quantities on each attribute, so that they would not add more than what's available. I also turned "show stock when low" in admin under Configuration/Stock, so that if my customers did add more than available quantities, they would get an warning message and show available stock in shopping cart.
In your situation, I assume that you have plenty merchandise in stock and you have a very tight stock level control in place. I would suggest another fix posted by Grayson before:
1. Switch back to original attributes.php by kuroi
2. If you want to force attribute selection, add a "display only" attribute as "default" selection
3. In attribute.php find
Quote:
[FONT=Times New Roman]$products_options_details = $products_options->fields['products_options_values_name'];[/FONT]
replace it with:
Quote:
if ($products_options->fields['quantity'] > 0) { $products_options_details = $products_options->fields['products_options_values_name']; } else { $products_options_details = $products_options->fields['products_options_values_name'] . ' [' . TEXT_ATTRIBUTES_NOT_IN_STOCK . ']'; }
next replace
Quote:
[FONT=Times New Roman]$products_options_details_noname = $products_options_display_price . ($products_options->fields['products_attributes_weight'] != 0 ? '<br />' . $products_options_display_weight : '');[/FONT]
with
Quote:
if ($products_options->fields['quantity'] > 0) { $products_options_details_noname = $products_options_display_price . ($products_options->fields['products_attributes_weight'] != 0 ? '<br />' . $products_options_display_weight : ''); } else { $products_options_details_noname = ' [' . TEXT_ATTRIBUTES_NOT_IN_STOCK . ']' . $products_options_display_price . ($products_options->fields['products_attributes_weight'] != 0 ? '<br />' . $products_options_display_weight : ''); }
A few lines below this, find
[FONT=Times New Roman]
Quote:
[FONT=Times New Roman]$products_options_details_noname = $products_options_display_price . ($products_options->fields['products_attributes_weight'] != 0 ? '' . $products_options_display_weight : '');[/FONT]
[/FONT]
Replace with:
Quote:
if ($products_options->fields['quantity'] > 0) { $products_options_details_noname = $products_options_display_price . ($products_options->fields['products_attributes_weight'] != 0 ? '' . $products_options_display_weight : ''); } else { $products_options_details_noname = ' [' . TEXT_ATTRIBUTES_NOT_IN_STOCK . '] ' . $products_options_display_price . ($products_options->fields['products_attributes_weight'] != 0 ? '' . $products_options_display_weight : '');}
Do NOT forget to add a define of [FONT=Verdana]TEXT_ATTRIBUTES_NOT_IN_STOCK[/FONT] in product_info.php in includes/languages/english/your_template folder!!
-
Re: Stock by Attribute v4.0 for Zen Cart 1.3.5
By the way, the fix suggested above works for single attribute product only and for radio, checkbox options.
For default dropdown display, you need to modify:
Quote:
$products_options_array[] = array()
statements in attributes.php and add a if{}else{} conditon, which is a little harder to achieve and I have not enough time to play with it.
-
Re: Stock by Attribute v4.0 for Zen Cart 1.3.5
Quote:
Originally Posted by
frank_lyy
...In your situation, I assume that you have plenty merchandise in stock and you have a very tight stock level control in place. I would suggest another fix posted by Grayson before...
Yup, you are correct as it reflects the real situation in my shops! I tried to insert the fixes posted but it didn't work as it shows the remarks to all the attributes defined even the stock has 0 quantity in it. I tried to change the logic though but when I define $products_options->fields['quantity'] = 0, no remarks shown instead!:no: BTW, thanx for your help, much appreciated!
-
Re: Stock by Attribute v4.0 for Zen Cart 1.3.5
Quote:
Originally Posted by
tajul_ashyqin
Yup, you are correct as it reflects the real situation in my shops! I tried to insert the fixes posted but it didn't work as it shows the remarks to all the attributes defined even the stock has 0 quantity in it. I tried to change the logic though but when I define $products_options->fields['quantity'] = 0, no remarks shown instead!:no: BTW, thanx for your help, much appreciated!
Sorry, my bad. I forgot to include the DB query change by Grayson. You need to change part of the DB query in attributes.php by kuori to ferry "quantity" from your DB first, then apply the fix I posted yesterday.
Here is the query change:
find this block of code:
Quote:
$sql = "select pov.products_options_values_id,
pov.products_options_values_name,
pa.*
from " . TABLE_PRODUCTS_ATTRIBUTES . " pa, " . TABLE_PRODUCTS_OPTIONS_VALUES . " pov
where pa.products_id = '" . (int)$_GET['products_id'] . "'
and pa.options_id = '" . (int)$products_options_names->fields['products_options_id'] . "'
and pa.options_values_id = pov.products_options_values_id
and pov.language_id = '" . (int)$_SESSION['languages_id'] . "' " .
$order_by;
change it to:
Quote:
if ($products_options_names->fields['products_options_type'] != PRODUCTS_OPTIONS_TYPE_TEXT && $products_options_names->fields['products_options_type'] != PRODUCTS_OPTIONS_TYPE_FILE && $products_options_names->fields['products_options_type'] != PRODUCTS_OPTIONS_TYPE_READONLY) {
$sql = "select pov.products_options_values_id,
pov.products_options_values_name,
pwas.quantity,
pa.*
from " . TABLE_PRODUCTS_ATTRIBUTES . " pa, " . TABLE_PRODUCTS_OPTIONS_VALUES . " pov, " . TABLE_PRODUCTS_WITH_ATTRIBUTES_STOCK . " pwas
where pa.products_id = '" . (int)$_GET['products_id'] . "'
and pa.options_id = '" . (int)$products_options_names->fields['products_options_id'] . "'
and pa.options_values_id = pov.products_options_values_id
and pwas.stock_attributes = pa.products_attributes_id
and pov.language_id = '" . (int)$_SESSION['languages_id'] . "' " .
$order_by;
} else {
$sql = "select pov.products_options_values_id,
pov.products_options_values_name,
pa.*
from " . TABLE_PRODUCTS_ATTRIBUTES . " pa, " . TABLE_PRODUCTS_OPTIONS_VALUES . " pov
where pa.products_id = '" . (int)$_GET['products_id'] . "'
and pa.options_id = '" . (int)$products_options_names->fields['products_options_id'] . "'
and pa.options_values_id = pov.products_options_values_id
and pov.language_id = '" . (int)$_SESSION['languages_id'] . "' " .
$order_by;
}
This way, you got your quantities for each attribute then you can apply if {}else{}condition I suggested yesterday.
Keep in mind, these fix will only work for products have one attribute, and product attribute display style is radio buttons or check boxes.
In case of default dropdown display, you need to modify the $products_options_array[], such as:
Quote:
[FONT=Times New Roman]if ($products_options->fields['quantity']) > 0) {[FONT=Verdana]$products_options_array[] = array('id' => $products_options->fields['products_options_values_id'],[/FONT]
[FONT=Times New Roman]'text' => $products_options->fields['products_options_values_name'] .' [' . $products_options->fields['quantity'] . ' '. TEXT_ATTRIBUTES_NOT_In_Stock . ']');[/FONT]
[FONT=Times New Roman]}[/FONT][/FONT]
-
Re: Stock by Attribute v4.0 for Zen Cart 1.3.5
Quote:
Originally Posted by
frank_lyy
...Sorry, my bad. I forgot to include the DB query change by Grayson. You need to change part of the DB query in attributes.php by kuori to ferry "quantity" from your DB first, then apply the fix I posted yesterday...
Why I didn't think of that! :laugh: thank you very much Frank! that should fix it... :yes:
-
Re: Stock by Attribute v4.0 for Zen Cart 1.3.5
Hi, I'm not sure if the error I'm experiencing has to do with Stock by Attribute or not. My client had this add-on installed for Zen Cart 1.2. We then installed 1.3.6 for her in a test directory. I do not see the error on her old cart, only on the new one.
I noticed the following error happening in the Attributes Controller on her new site. When I try to copy the attributes from one product to another item or to a category, this message comes up:
1136 Column count doesn't match value count at row 1
in:
[insert into products_attributes values (0, '237', '70', '480', '1.5000', '+', '0', '1', '0', '+', '0', '0', '1', '', '1', '0.0000', '0.0000', '0.0000', '0.0000', '0.0000', '', '', '0.0000', '0', '0.0000', '0', '0')]
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 thought that maybe installing the add-on would help, so I did, but it hasn't made any difference. There's no products_attributes_values table in my database...should there be?
Does this seem like an error that is somehow related to Stock by Attribute?
Thanks!
Shoshanna
-
Re: Stock by Attribute v4.0 for Zen Cart 1.3.5
Ok this is a simple question not really related to the functionality of the script so much as the location of the output on the products page --
if you look at the product page at - http://marylandcycling.com/shopping/...&products_id=1
The attributes selection box seems to be much lower and out of place as compared to the add item to cart screen. I am afraid users will not see the size selection... and I can't for the life of me find out where this attributes box is scripted into each zen cart product page.
Can someone direct me to where or how I can modify the location of the output of the attributes slection "please choose" on the product page?
Ideally I would like to get it above the "add to cart" box.
-
Re: Stock by Attribute v4.0 for Zen Cart 1.3.5
Quote:
Originally Posted by
lemuria
Does this seem like an error that is somehow related to Stock by Attribute?
Hi Shoshanna
It's right that you have no products_attributes_values table. What this sql is doing is inserting values into the products_attributes table.
I'm afraid that I can see no link between this problem and Stock by Attribute. I think that your assessment is most likely correct and that the problem occurs in a database inset in the attributes controller. Stock by Attributes steers well clear of there.
I have a hypothesis however, about your problem. What version of MySQL are you running?
-
Re: Stock by Attribute v4.0 for Zen Cart 1.3.5
Quote:
Originally Posted by
nickmd
Ok this is a simple question not really related to the functionality of the script so much as the location of the output on the products page
Actually this is even further off topic than that since this add-on does not actually output anything to the products page :D (though a lot of people wish it would :yes:).
Although I wouldn't want to see this thread wander off into a discussion about reworking the products page (a rather common request) here's a quick pointer in the right direction ... some of the formating is achieving through CSS, but to make the change you want to do would require some editing of the includes/templates/YOUR_TEMPLATE/templates/tpl_product_info.php file which determines the order in which content is served to the products page.
-
Re: Stock by Attribute v4.0 for Zen Cart 1.3.5
Quote:
Originally Posted by
kuroi
Actually this is even further off topic than that since this add-on does not actually output anything to the products page :D (though a lot of people wish it would :yes:).
Great thank you! After looking in the correct forum I found an answer -- (http://www.zen-cart.com/forum/showthread.php?t=51697) for some reason I thought this module created the attributes, but now I understand. Thanks!
-
Re: Stock by Attribute v4.0 for Zen Cart 1.3.5
Quote:
I have a hypothesis however, about your problem. What version of MySQL are you running?
It's 5.0.18, on Dreamhost.
It would be great to hear any ideas, I'm stuck on this one! If this problem is unrelated to the add-on and there's a better forum for it, please let me know.
-
Re: Stock by Attribute v4.0 for Zen Cart 1.3.5
Quote:
Originally Posted by
lemuria
It's 5.0.18, on Dreamhost.
It would be great to hear any ideas, I'm stuck on this one! If this problem is unrelated to the add-on and there's a better forum for it, please let me know.
I suspected that you would say something like this. I believe that the specific insert that is failing starts in line 242 of the admin/attributes_controller.php script. The comment immediately above this line says "TODO: MySQL5", suggesting that this insert may need tweaking for MySQL5 compatibility. That said, I've not seen this problem in my MySQL5 environments (and I have dozens).
Are you seeing this on a clean database? Or on a copy of your client's database? If the latter, has your client's database been upgraded from 1.2? If so, could you post a copy of the product_attributes table schema?
-
Re: Stock by Attribute v4.0 for Zen Cart 1.3.5
Hi,
I downloaded the 4.3 version that is currently in the downloads section. I ran the sql patch and uploaded the files. I went to admin and logged in. I could not find the catalog->products with attributes link. I went back to make sure that all files had downloaded. Well, I noticed that admin/includes/boxes/extra_boxes/products_with_attributes_catalog_dhtml.php had not been uploaded to my server. So, I went to my local folder and noticed that the file was actually named products_with_attributes_catalog_dhtml.ph and not products_with_attributes_catalog_dhtml.php . I'm assuming that this has something to do with the length of the file name, but I'm not sure how to fix it. Does anyone know how I can correct this?
Thanks,
Melissa
http://store.equineshop.biz
-
Re: Stock by Attribute v4.0 for Zen Cart 1.3.5
After further analysis, there are other filnames that have bee shortened as well. In my local environment, I'm using Windows XP.
If anyone could help me figure this out, I'd really appreciate it.
Melissa
http://store.equineshop.biz
-
Re: Stock by Attribute v4.0 for Zen Cart 1.3.5
Quote:
Originally Posted by
saddlebred
After further analysis, there are other filnames that have bee shortened as well. In my local environment, I'm using Windows XP.
If anyone could help me figure this out, I'd really appreciate it.
Melissa
http://store.equineshop.biz
Windows XP has a full path name limit of 255 characters. Are your Zen Cart files buried deep in a directory structure? If so, I'd recommend moving them closer to your hard disk's root directory.
-
Re: Stock by Attribute v4.0 for Zen Cart 1.3.5
Thanks that helps a lot. Now things seem to be working right.
Thanks,
Melissa
http://store.equineshop.biz
-
Re: Stock by Attribute v4.0 for Zen Cart 1.3.5
Ooops! I spoke too soon I am getting the following error when I access http://store.equineshop.biz .
Parse error: syntax error, unexpected '*' in /home/xxxxxxxxxxxxx/public_html/store/includes/functions/functions_lookups.php
on line 174
Any ideas?
Thanks,
Melissa
http://store.equineshop.biz
-
Re: Stock by Attribute v4.0 for Zen Cart 1.3.5
Here is the offending line of code. It actually appears to be on line 175.
function zen_get_products_stock($products_id, $attributes = '') {
I'm not very familiar with php, so am not sure how to fix it.
Thanks,
Melissa
http://store.equineshop.biz
-
Re: Stock by Attribute v4.0 for Zen Cart 1.3.5
Quote:
Originally Posted by
saddlebred
Here is the offending line of code. It actually appears to be on line 175.
function zen_get_products_stock($products_id, $attributes = '') {
I'm not very familiar with php, so am not sure how to fix it.
Thanks,
Melissa
http://store.equineshop.biz
You appear to have been unlucky and downloaded version 4.3 for during the rather brief period when it was the latest version. That honour is now held by version 4.3.1 which contains the fix to the specific problem that you have raised. However you don't need to download the new version , just deleting the contents of line 162 in the file you reference above will fix the problem.
-
Re: Stock by Attribute v4.0 for Zen Cart 1.3.5
Okay, I've got that fixed. Things seem to be working as expected, accept that the remaining stock doesn't work on products with attributes. I have it set to show the remaining stock in the shopping cart if the customer added more than what is availble. For products without attributes, the amount shows up, but for products without attributes, the number doesn't.
Melissa
http://store.equineshop.biz
-
Re: Stock by Attribute v4.0 for Zen Cart 1.3.5
Quote:
Originally Posted by
saddlebred
Okay, I've got that fixed. Things seem to be working as expected, accept that the remaining stock doesn't work on products with attributes. I have it set to show the remaining stock in the shopping cart if the customer added more than what is availble. For products without attributes, the amount shows up, but for products without attributes, the number doesn't.
Melissa
http://store.equineshop.biz
Sorry, but I'm confused by this post. Visiting your site didn't help as I could see the low stock messages in your shopping cart for products with and without attributes, but could see no stock remaining figures elsewhere, whether the products had attributes or not. Do you have some specific examples?
-
Re: Stock by Attribute v4.0 for Zen Cart 1.3.5
Okay, I have it set to show the number remaining when the customer adds more than what is available. For my products with attributes, if a customers adds a product to the cart, and the number they add is less than the total stock available, it doesn't show any message, even if there isn't enough stock of the specific variant they chose. For instance, go to http://store.equineshop.biz/index.ph...products_id=75 and add any color, but red or yellow. Currently we only have 1 red and 1 yellow available. If I add 1 black hat can, it does not show that my stock is low, even though I don't have any black available in black.
Thanks,
Melissa
http://store.equineshop.biz
-
Re: Stock by Attribute v4.0 for Zen Cart 1.3.5
Quote:
Originally Posted by
saddlebred
Okay, I have it set to show the number remaining when the customer adds more than what is available. For my products with attributes, if a customers adds a product to the cart, and the number they add is less than the total stock available, it doesn't show any message, even if there isn't enough stock of the specific variant they chose. For instance, go to
http://store.equineshop.biz/index.ph...products_id=75 and add any color, but red or yellow. Currently we only have 1 red and 1 yellow available. If I add 1 black hat can, it does not show that my stock is low, even though I don't have any black available in black.
Thanks,
Melissa
http://store.equineshop.biz
you have set it correctly as if I add 1 black hat can, it does not show low stock but if I enter more than 1 quantity, eg. 2, well the message appear "Products marked with currently back ordered*** are out of stock.
Items not in stock will be placed on backorder." together with the currently available stock! :wacko:
-
Re: Stock by Attribute v4.0 for Zen Cart 1.3.5
Quote:
Originally Posted by
tajul_ashyqin
you have set it correctly as if I add 1 black hat can, it does not show low stock but if I enter more than 1 quantity, eg. 2, well the message appear "Products marked with currently back ordered*** are out of stock.
Items not in stock will be placed on backorder." together with the currently available stock! :wacko:
Yes, but there are 0 black hat cans, so if I add 1 it should show that it is currently back ordered and that there is 0 available stock.
-
Stock by Attribute v4.0 for Zen Cart 1.3.5
Have you defined all the respectives attributes of those stocks?! it should be ok... If the problem still persist, try re-installing it one more time including the SQL patch (remove the old table first!)...
-
1 Attachment(s)
Re: Stock by Attribute v4.0 for Zen Cart 1.3.5
Quote:
Are you seeing this on a clean database? Or on a copy of your client's database? If the latter, has your client's database been upgraded from 1.2? If so, could you post a copy of the product_attributes table schema?
It's a copy of the client's database, not a clean one, and it has been upgraded to 1.3.6. Here's the table schema, did I export the right part/does it tell you anything?
-
Re: Stock by Attribute v4.0 for Zen Cart 1.3.5
Quote:
Originally Posted by
lemuria
It's a copy of the client's database, not a clean one, and it has been upgraded to 1.3.6. Here's the table schema, did I export the right part/does it tell you anything?
Yes you exported the right. Yes it tells us something, indeed it gives us most of the answer.
The sixth entry down in this table schema is
Quote:
`options_values_price_w` varchar(150) collate latin1_general_ci default '0',
That's not a part of base Zen Cart and is most likely left over from an add-on installed on your client's 1.2 Zen Cart. It might be something to do with dual pricing or wholesale pricing. Whatever it is, it's changing the shape of the table so that the product_attributes update no longer "fits". Either you need to locate the add-on that inserted this and find out how it changes product_attributes.php to update the table appropriately, or if the add-on is no longer going to be used, delete this column from the product_attributes table.
-
Re: Stock by Attribute v4.0 for Zen Cart 1.3.5
Quote:
Originally Posted by
saddlebred
Yes, but there are 0 black hat cans, so if I add 1 it should show that it is currently back ordered and that there is 0 available stock.
Which version of Zen Cart are you using?
When you fixed the earlier problem, did you do so by editing the file, or downloading a new version of the add-on?
-
Re: Stock by Attribute v4.0 for Zen Cart 1.3.5
Thanks, kuroi! It turned out to be this problem, and the solution posted there worked:
http://www.zen-cart.com/forum/showth...ing+attributes
-
Re: Stock by Attribute v4.0 for Zen Cart 1.3.5
Well, I first tried editing the file. Apparently I did that wrong. I downloaded the new version and uploaded the files. Things still weren't working. I went and deleted the table, overwrote the core zencart files to get things back to the way they were before the install. I then tried to install the sql patch and it gave me an error message saying there were duplicate entries. So, what do I do now. I'm afraid I've really screwed things up.
Melissa
http://store.equineshop.biz
-
Re: Stock by Attribute v4.0 for Zen Cart 1.3.5
Hey all!
I previously posted about stock avail in the product info page.
Ex.
XS [Not in stock]
S [In stock]
M [In stock]
and so on..
Was this implemented in later versions of the contrib?
If so; is there a switch for it because I can't get it to work after upgrading a ZC from 1.2.7 - 1.3.5, the old shop had a previous version of danielcor's contrib..
-
Re: Stock by Attribute v4.0 for Zen Cart 1.3.5
When installing Stock by Attribute to an existing Zen Cart that already has a lot of attributes, what happens to those pre-existing attributes? Do they just require stock quantities to be added to them after the add-on install?
~anne
-
Re: Stock by Attribute v4.0 for Zen Cart 1.3.5
Quote:
Originally Posted by
saddlebred
Well, I first tried editing the file. Apparently I did that wrong. I downloaded the new version and uploaded the files. Things still weren't working. I went and deleted the table, overwrote the core zencart files to get things back to the way they were before the install. I then tried to install the sql patch and it gave me an error message saying there were duplicate entries. So, what do I do now. I'm afraid I've really screwed things up.
Melissa
http://store.equineshop.biz
It's not as bad as it seems. In fact it's probably all OK. You can ignore the duplicate error message. Although you deleted the table, the original installation will have also placed a flag in the admin config flag (the lowstock flag). This is almost certainly what the error message refers to as it will still be there from the original installation (but does no harm, so no need to get it out, even if you uninstall.
By running the SQL again you will probably (despite the error message which come later) have recreated the table. Just go ahead with re-installing the files and hopefully all will be OK this time.
Good luck.
-
Re: Stock by Attribute v4.0 for Zen Cart 1.3.5
Quote:
Originally Posted by
Svanis
Hey all!
I previously posted about stock avail in the product info page.
Ex.
XS [Not in stock]
S [In stock]
M [In stock]
and so on..
Was this implemented in later versions of the contrib?
If so; is there a switch for it because I can't get it to work after upgrading a ZC from 1.2.7 - 1.3.5, the old shop had a previous version of danielcor's contrib..
Sorry Svanis. This question has been done to death and there's lots of previous posts on it, so only the quick answer this time. Stock on the product info page isn't included in the mod becuase there isn't a soluton for it that works witt mutliple attributes. There is a solution posted in an archive thread references to which can be found by searching on "Grayson".
-
Re: Stock by Attribute v4.0 for Zen Cart 1.3.5
Quote:
Originally Posted by
seattleannie
When installing Stock by Attribute to an existing Zen Cart that already has a lot of attributes, what happens to those pre-existing attributes? Do they just require stock quantities to be added to them after the add-on install?
~anne
Exactly right.
-
Re: Stock by Attribute v4.0 for Zen Cart 1.3.5
my apologies if this question has been asked...
i just installed stock by attribute. i am using 1.3.6 and installed sba 4.3.1.
i see the sba option under the catalogue pull-down. but unfortunately i get this error message:
"Sorry, your security clearance does not allow you to access this resource.
Please contact your site administrator if you believe this to be incorrect.
Sorry for any inconvenience."
please advise.
thank you!!!
-
Re: Stock by Attribute v4.0 for Zen Cart 1.3.5
never mind on my last post about security clearance.
i figured it out! i am so proud of myself. maybe i am getting the hang of it yet.
thank you!
-
Re: Stock by Attribute v4.0 for Zen Cart 1.3.5
Is there any way to automatically populate the entire product selection to 1 of each attribute combination? or any number for that matter? or do I have to go through all of the products one at a time?
-
Re: Stock by Attribute v4.0 for Zen Cart 1.3.5
Quote:
Originally Posted by
paisleydi
never mind on my last post about security clearance.
i figured it out! i am so proud of myself. maybe i am getting the hang of it yet.
thank you!
Hi paisleydi
Well done for sorting this out. For the benefit of anybody else who may run into this problem ... I'm guessing that you are also running Admin Profiles and hadn't given yourself permission to access Stock by Attribute.
-
Re: Stock by Attribute v4.0 for Zen Cart 1.3.5
Quote:
Originally Posted by
styleboy
Is there any way to automatically populate the entire product selection to 1 of each attribute combination? or any number for that matter? or do I have to go through all of the products one at a time?
I'm afraid not. However, what you would like to do is just one step beyond a request that has been made before to automatically set up each combination. You're just asking to have a user-defined default for those combinations. I'm sure that this will be considered when this mod is replaced by an official Zen Cart facility.
-
Re: Stock by Attribute v4.0 for Zen Cart 1.3.5
Sounds great. Another thing I would suggest if not already said is to allow the admin to set values for every combination and then click submit. Allowing all of the stock values for a certain product to be updated at one time.
Great module though either way. Do you have any idea when the next zen-cart update would be? I just recently discovered the cart and I think its fabulous..I just don't know how often the updates are.
-
Re: Stock by Attribute v4.0 for Zen Cart 1.3.5
These are helpful suggestions. Both have been noted.
The functionality in this mod is planned to be taken into core Zen Cart in the next major release. However, this will hopefully be a re-write as the mod is creaking under the weight of some dodgy historical design choices (it has a long history dating back to osCommerce since when it has passed through the hands of several developers) and lacks the flexibility to cope with many of the features that store owners would like.
Zen Cart releases don't come out on a schedule. I suspect that this is because the Zen Cart developers have to work around their other commitments (e.g. their day jobs) and prefer to get each release right, rather than cut corners to meet a deadline. However, as a generalisation, there's a major release about once a year and several minor releases. It's an active project whose roadmap can be seen here.
-
Re: Stock by Attribute v4.0 for Zen Cart 1.3.5
it is like you are psychic or something!!! :yes:
i did indeed install the admin profile module. it never even occurred to me that i would not have access privileges to all functions.
thank you for your support and for helping with such a great piece of software.
di
-
Re: Stock by Attribute v4.0 for Zen Cart 1.3.5
I'm extremely new to this Zen cart stuff and have no PHP experience. I'm using the Stock by Attribute module with ZenCart v1.3.6
I am allowed to check out having ordered apparel in variations for which there is no stock.
What configuration settings should be looking at to make sure order unavailable stock?
Thanks for any (urgent!) Help!!
-
Re: Stock by Attribute v4.0 for Zen Cart 1.3.5
Quote:
Originally Posted by
cmglade
I am allowed to check out having ordered apparel in variations for which there is no stock.
What configuration settings should be looking at to make sure order unavailable stock?
In the Admin > Configuration > Stock there are settings for you to decide whether you want to check stock before checkout and whether you wish to allow checkout if you are not holding the stock.
These settings apply whether or not stock by attributes is being used.
-
Re: Stock by Attribute v4.0 for Zen Cart 1.3.5
Quote:
Originally Posted by
kuroi
In the Admin > Configuration > Stock there are settings for you to decide whether you want to check stock before checkout and whether you wish to allow checkout if you are not holding the stock.
These settings apply whether or not stock by attributes is being used.
Thanks for the quick response.
My Stock settings are currently:
Check stock level: true
Subtract Stock: true
Allow Checkout: false
Are there other Configuration>Stock settings I need to address?
Thanks so much
-
Re: Stock by Attribute v4.0 for Zen Cart 1.3.5
Which version of the mod are you using?
Do you have the "Show stock when low" flag set to true?
Is there a site and product where this can be seen happening?
-
Re: Stock by Attribute v4.0 for Zen Cart 1.3.5
Using v4_2
Yes the show stock when low is set to true, have also tried it set to false.
Maybe look at:
http://www.tattersallsclothing.com/s...products_id=19
There is nothing available in large, it lets me order large, subtracts it from the total product quantity of all variants.
Any ideas?
-
Re: Stock by Attribute v4.0 for Zen Cart 1.3.5
Quote:
Originally Posted by
cmglade
Using v4_2
Yes the show stock when low is set to true, have also tried it set to false.
Maybe look at:
http://www.tattersallsclothing.com/s...products_id=19
There is nothing available in large, it lets me order large, subtracts it from the total product quantity of all variants.
Any ideas?
First recommendation is to upgrade to 4.3.1. The 4.2 version was targeted at Zen Cart 1.3.5 rather than the 1.3.6 that you said earlier you are using. Although I can't promise that this will solve the problem, this nature and design of this mod makes it partiicularly sensitive to mismatches between Zen Cart and mod versions.
-
Re: Stock by Attribute v4.0 for Zen Cart 1.3.5
I tried uploading the patch file and got:
1062 Duplicate entry 'STOCK_SHOW_LOW_IN_CART' for key 2
in:
[INSERT INTO tattersallsconfiguration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES ('Show stock when low', '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.
This, sadly, means nothing to me.
Can you provide any guidance? Please?