Backup Files and Databases First. GitHub
Suggestions, Plugins, etc. used at your own risk.
Thanks, Potteryhouse, here are the shots:
Above quantities are NOT synchronized. Syncing changes total # to 4.
If you'd like to see this in action, the test product is at http://test.allstringsnylon.info/cordoba-ukulele-15sm .
Thanks for all your work!
Magz
Ok, I may have missed something but, if the quantity amount for an attribute isn't filled in, is this treated as a zero quantity of stock or an infinite quantity of stock
Webzings Design
Semi retired from Web Design
I think it shows out of stock with quantity of zero.
The way I updated the code it should do the following:
Option A: Product with no associated attributes, this uses the qty assigned to the product in the catalog.
Option B: Product with Attribute(s), If no attribute is created in the SBA Stock page, this will use the qty from the product catalog.
Option C: Product with Attribute(s), and attributes are created in the SBA stock page, this uses the qty from the SBA Stock page.
In all cases,
if the qty is zero, than the flag is set to indicate out of stock.
if the qty is less than the order requested in the cart, than the flag will indicate low stock.
The flag display is based on the settings in the "Configuration -> Stock" (Check Stock Level = true)
There seems to be other configurations to support:
1. Where the base product is to use the quantity in the catalog, and there is an "Optional" attribute to add something like a "Gig Bag".
2. Where the same product is added to the cart, but one has a selected attribute combination as A,B,C, and the second entry for the same product has attribute combinations A,C. etc. These do not properly cross check the other attributes of the same product to test for available qty.
Since I had not considered these configurations, the qty calculations in the cart may not work as expected.
I will look at an update and will post for others to test if I can resolve these.
If there are other configurations I did not account for please provide the configuration scenarios, with some expected results and explanations to help with understanding what you are looking for as a result. Since I am doing this in my spare time, the update may take some time.
Additionally, as a note, the SBA versions in the Plug-ins, to-date support one attribute per row (Stock ID) in the SBA Stock page.
The new test version I posted supports attribute combinations i.e., two or more attributes per row (Stock ID) in the SBA Stock page.
I posting an updated version of this below and would like some feedback, looking for errors, etc.
I believe this version resolves some errors on web hosts that do not permit the PHP eval() command.
New Test version Attachment 13535
Backup Files and Databases First. GitHub
Suggestions, Plugins, etc. used at your own risk.
Backup Files and Databases First. GitHub
Suggestions, Plugins, etc. used at your own risk.
Hi,
This took much longer than I thought, but I think it resolves most of the duplicate product issues you identified.
It is not perfect, but much better I think than it was.
It is a big change so you should try this on a test machine before trying on any production site.
Verify everything works as you want. No guarantees, but I hope it will work for you.
A note, for products that have attributes, you must have "None" or "All" of the products attributes setup in the SBA Stock page, it will not work if you only put one attribute in the stock page but there are others for the product.
Also, the "Attributes Controller" for the "Uke" product should be set like I have in the attached image sample.
Attachment 13600
If you find other things or have suggestion please post them.
Backup Files and Databases First. GitHub
Suggestions, Plugins, etc. used at your own risk.
Thank you, Potteryhouse! Nothing wrong with how long it took, we're all busy and you're doing this with no pay so those of us who don't know the first thing about coding can have functional ecommerce websites... I do appreciate all the time and effort you and many others are putting into Zen-Cart and its plugins, and hope to be able to send out lots of donations sometime soon.
The update seems to be functioning fine (done very limited testing so far), except it now doesn't say what the available quantity is. Unless it's a quick and easy fix, I can live with that until the "perfect" version is released.I'm also noticing a few "cosmetic" issues... Although I set sort order of "base" to 1 and "add" to 2 and in Attributes Controller they do appear in that order, on the product page and in the shopping cart, "add" is first and "base" second. Short of numbering them, how do I force them to display in the desired order? Also on the product page, the vertical space between the 2 attributes is quite large and the text doesn't align vertically with the checkbox. How do I fix that?
Thank you!
Magz
(1) The qty display on the page was not changes, you will need to turn it back on in the "Configuration -> Stock" page in admin.
When you run the installation script it resets all the display flags to false.
(2) You control the Option order by the setting the applicable "Sort Order" in the "Catalog ->Options Name Manager" Product Options page in admin.
(3) I think the layout alignment you mentioned is a template thing you will have to adjust to make it look as you need, the file to work with is:
\includes\templates\YOURTEMPLATE\templates\tpl_product_info_display.php
Backup Files and Databases First. GitHub
Suggestions, Plugins, etc. used at your own risk.
Bookmarks