Re: Stock by Attribute v4.0 for Zen Cart 1.3.5
I have a product made up of attributes. The customer can select which attributes they want in the product. They can select one or as many attributes as they want. I saw the following comment in includes/classes/observers/class.products_with_attributes_stock.php on line 1588 of the June 10, 2021 distribution on github:
Code:
// @TODO: at some point to be able to handle combinations of PWAS table items such that there are combinations of records or variants making up a single product.
so I assume the code can not handle this case at this time. Am I correct? Thanks.
Re: Stock by Attribute v4.0 for Zen Cart 1.3.5
Quote:
Originally Posted by
Dave224
I have a product made up of attributes. The customer can select which attributes they want in the product. They can select one or as many attributes as they want. I saw the following comment in includes/classes/observers/class.products_with_attributes_stock.php on line 1588 of the June 10, 2021 distribution on github:
Code:
// @TODO: at some point to be able to handle combinations of PWAS table items such that there are combinations of records or variants making up a single product.
so I assume the code can not handle this case at this time. Am I correct? Thanks.
Based on your description of what you want to do this week work for you. I make this statement based on the following (of I express an incorrect assumption then please correct me):
You have a product.
That product nearly has an infinite number on quantity (most likely to be the sum of your available attributes)
You have attribute 1 through n where n is the number of attributes available to the customer.
Every attribute has its own quantity and it is that quantity you want to control, limit or otherwise track.
So for example attribute 1 has a quantity of 100.
Attribute 2 has a quantity of 200.
Attribute 3 has a quantity of 300.
When making a purchase of the base product a customer may choose attribute 1 and 3 for example. Let's say they order 100 of this product combination.
After their purchase your stock will be 0, 200, 200 respectively.
If that is the case then you are good to go.
If you wanted to limit the purchase though instead to where you only allow purchases where they choose attributes 2 and 3 together and only allow attribute 1 to be purchased alone and say there was an attribute combination of 3 and 4, along with the possibility of purchasing attribute 4 by itself, then that is not currently possible because of the "clash" of the 3 and 4 combination with the ability to sell 4 by itself.
Now the last other case which is supported is if combinations of attributes are offered but those combinations are ideally discreet, meaning that each combination of attributes has its own stock. The popular example is one of t-shirts where there may be a logo, a size and a color. Such a combination of product (assuming the logo is preprinted) would be discreet because that combination only exists in a given quantity. If though the logo would not be a factor in the total quantity as in it is infinitely available there is a way to make that attribute not count against the stock associated with the size and color... That currently requires a sql command to implement, but it can robustly be used...
For my original product description when populating the attributes you would simply apply the quantity of each attribute by itself so that each attribute has its own quantity. Any attribute that is not given a quantity will be available in the quantity identified to the overall product. Also generally speaking the quantity of a product that can be purchased will be limited to the lesser of the available attribute quantity and the total product quantity. I know a little hard to wrap ones mind around, but.
Re: Stock by Attribute v4.0 for Zen Cart 1.3.5
Quote:
Originally Posted by
mc12345678
Based on your description of what you want to do this week work for you. I make this statement based on the following (of I express an incorrect assumption then please correct me):
You have a product.
That product nearly has an infinite number on quantity (most likely to be the sum of your available attributes)
You have attribute 1 through n where n is the number of attributes available to the customer.
Every attribute has its own quantity and it is that quantity you want to control, limit or otherwise track.
So for example attribute 1 has a quantity of 100.
Attribute 2 has a quantity of 200.
Attribute 3 has a quantity of 300.
When making a purchase of the base product a customer may choose attribute 1 and 3 for example. Let's say they order 100 of this product combination.
After their purchase your stock will be 0, 200, 200 respectively.
If that is the case then you are good to go.
Your assumption is correct. I'll try it. Thanks.
Re: Stock by Attribute v4.0 for Zen Cart 1.3.5
Hi everyone, Would appreciate some help with the following:
I need an sql query to generate a report that outputs the total quantity of each colour/size variant of a specific product model number which is manually input when running the query.
e.g output: Model xyz Green
S 3
M 5
L 10 etc
The complexity of this query is beyond my basic sql skills, and it must be something a lot of people need.
The site is running ZC 1.5.5, SBA V 1.54.
Any help will be much appreciated.
Re: Stock by Attribute v4.0 for Zen Cart 1.3.5
Quote:
Originally Posted by
donw
Hi everyone, Would appreciate some help with the following:
I need an sql query to generate a report that outputs the total quantity of each colour/size variant of a specific product model number which is manually input when running the query.
e.g output: Model xyz Green
S 3
M 5
L 10 etc
The complexity of this query is beyond my basic sql skills, and it must be something a lot of people need.
The site is running ZC 1.5.5, SBA V 1.54.
Any help will be much appreciated.
Easy Populate V4 accomplished this also the admin of this plugin provides that information effectively for a specific product. Could modify the use of the unique products_id for possibly the products_model or related field that is not forced to be unique.
Re: Stock by Attribute v4.0 for Zen Cart 1.3.5
Quote:
Originally Posted by
mc12345678
Easy Populate V4 accomplished this also the admin of this plugin provides that information effectively for a specific product. Could modify the use of the unique products_id for possibly the products_model or related field that is not forced to be unique.
Thanks for your reply. I realised I left something important out of what I am wanting the query to do. It should have read: "I need an sql query to generate a report that outputs the total quantity sold of each colour/size variant of a specific product model number which is manually input when running the query."
As background, I want to be able to run the query using the LibreOffice report generator, which I have used successfully for others reports, so trying to modify or use code from another add on is not what I am looking for.
Re: Stock by Attribute v4.0 for Zen Cart 1.3.5
Quote:
Originally Posted by
donw
Thanks for your reply. I realised I left something important out of what I am wanting the query to do. It should have read: "I need an sql query to generate a report that outputs the total quantity sold of each colour/size variant of a specific product model number which is manually input when running the query."
As background, I want to be able to run the query using the LibreOffice report generator, which I have used successfully for others reports, so trying to modify or use code from another add on is not what I am looking for.
Do you use sba as basically shown above? Specifically where a product has only one attribute that defines quantity and not where a combination of two or more attributes identify a quantity?
Re: Stock by Attribute v4.0 for Zen Cart 1.3.5
So this is wierd.
SBA Version 1.5.4 for Zen Cart Version 1.5.7d
When adding a product with a single attribute set (example "Size") to my shopping cart from the product info page, (shopping as a customer,) I get an error pop up saying "The combination of options you have selected is currently out of stock. Please select another combination." It pops-up this error even though there is stock available (in all "Sizes") It's amost like SBA has suddenly decided that all of my products have a combination of attributes set when, in fact, most of them do not. They have a single attribute, or no attributes set.
The errormessage does NOT pop up when adding products that actually do have a combination of attributes set (example "Size" and "Colour") everything works as expected. The item, with the correct attributes set are added to my cart.
It's behaving as though it's expecting a combination of attrubutes (like color and size) for products that only have a single attribute set (like size.)
This is a fairly recent development that i dont understand. No Error logs being generated, just the javascript pop-up.
Incedently, after clicking "okay" on the error message the product gets added to the cart anyway, (if it's in stock) but the pop-up is very confusing to the user. I cant work out why this is happening? Does anyone understand what im talking about and have any ideas?
Thanks
Re: Stock by Attribute v4.0 for Zen Cart 1.3.5
Quote:
Originally Posted by
frumious
So this is wierd.
SBA Version 1.5.4 for Zen Cart Version 1.5.7d
When adding a product with a single attribute set (example "Size") to my shopping cart from the product info page, (shopping as a customer,) I get an error pop up saying "The combination of options you have selected is currently out of stock. Please select another combination." It pops-up this error even though there is stock available (in all "Sizes") It's amost like SBA has suddenly decided that all of my products have a combination of attributes set when, in fact, most of them do not. They have a single attribute, or no attributes set.
The errormessage does NOT pop up when adding products that actually do have a combination of attributes set (example "Size" and "Colour") everything works as expected. The item, with the correct attributes set are added to my cart.
It's behaving as though it's expecting a combination of attrubutes (like color and size) for products that only have a single attribute set (like size.)
This is a fairly recent development that i dont understand. No Error logs being generated, just the javascript pop-up.
Incedently, after clicking "okay" on the error message the product gets added to the cart anyway, (if it's in stock) but the pop-up is very confusing to the user. I cant work out why this is happening? Does anyone understand what im talking about and have any ideas?
Thanks
What are your settings for admin -> Configuration -> Dynamic Dropdowns?
Also when saying: "When adding a product with a single attribute set (example "Size") to my shopping cart from the product info page, (shopping as a customer,)..."
Please be more specific as relates to the setup of the product on the admin side. How many option names are associated with the product (regardless the type of option name, though that information is also helpful to have including sort order [sequence] for each). Also, the quantity of each attribute and the total quantity of product for the product in question (total quantity is the value that can be set on the page specific to the product where other factors about the product may be set such as the price of the product, the image for the product, etc...).
Then the other thing is to check to see if there are remnant records in the PWAS table as can be seen using the current/recent version of: admin/products_with_attribute_stock.php and associated admin files. At the bottom of the admin screen, if there are "remnant" combinations, they will be presented for action. I suspect though first that the issue relates to the above configuration for use.
Re: Stock by Attribute v4.0 for Zen Cart 1.3.5
OMG you nailed it !!!
It was simply an incorrect setting in Dynamic Drop Downs config.
Thank you sooo much.
It's always worth askin...