Practical example: Product "A" has the sizes "Small", "Medium" and "Large". The "Small" has a stock of "1". The "Medium" has a stock of "1". The "Large" has a stock of "0". If the customer chooses to filter products with "Small" or "Medium" size, I want the product to be shown in the results . If the customer chooses to filter products with "Large" size, I want the product to not be shown in the results.
Is there a system option about that?
I am thinking of a daily cronjob that deletes option values with a zero quantity but I would like this to be my last option.
And when the stock goes back above zero.....I am thinking of a daily cronjob that deletes option values with a zero quantity but I would like this to be my last option.
Crystal Light Centrum Taiwan
Extensions: MailQueue | SUKHR | VBoces
“Data security is paramount at [...], and we are committed to protecting the privacy of anyone who is associated with our [...]. We’ve made a lot of improvements and will continue to make them.”
When you know your life savings are gone.
What extension do you use to manage option stock levels as this is not default behaviour?nbdevelopdreece wrote: ↑Mon Feb 17, 2020 7:04 pmThere are some clothes where a size has stock and another size is out of stock.
UK OpenCart Hosting | OpenCart Audits | OpenCart Support - please email info@antropy.co.uk
Crystal Light Centrum Taiwan
Extensions: MailQueue | SUKHR | VBoces
“Data security is paramount at [...], and we are committed to protecting the privacy of anyone who is associated with our [...]. We’ve made a lot of improvements and will continue to make them.”
When you know your life savings are gone.
Not if there is more than one option e.g. a t-shirt that can be S, M or L and red, green or blue.
UK OpenCart Hosting | OpenCart Audits | OpenCart Support - please email info@antropy.co.uk
There is only one option, so there is no extension used for the stock (different colors are different products).paulfeakins wrote: ↑Tue Feb 18, 2020 7:21 pmNot if there is more than one option e.g. a t-shirt that can be S, M or L and red, green or blue.
Also, most of the time, products do not come back in stock because new ones come in. Every 3-6 months.
In the case where a product comes back in stock, manual edit would suffice. There is plenty of manual work and corrections being done daily anyway.
For the above reasons a cronjob deleting the product options having a 0 stock, is a good last option, in my point of view.
What should I delete?
From what I see, I should delete from table "_product_option_value" where quantity=0.
Then delete from table "_product_option" where "same product_option_id and product_id from above".
Am I wrong somewhere? Should I delete anything else from another table?
Crystal Light Centrum Taiwan
Extensions: MailQueue | SUKHR | VBoces
“Data security is paramount at [...], and we are committed to protecting the privacy of anyone who is associated with our [...]. We’ve made a lot of improvements and will continue to make them.”
When you know your life savings are gone.
Perfect. So it is only 2 tables (_product_option_value and _product_option) and the key that connects them is 'product_option_id'.letxobnav wrote: ↑Thu Feb 20, 2020 5:47 pmyou delete the records from product_option_value and either save the product_option_id's of those records and then delete the records from product_option with those id's or you delete the records from product_option where the product_option_id no longer exists in the product_option_value table.
I will try to post an update if someone needs an accurate answer.
No, I was wrong. I only need to delete from _product_option_value where quantity=0.nbdevelopdreece wrote: ↑Thu Feb 20, 2020 7:42 pmI will try to post an update if someone needs an accurate answer.
For what I want to do, if I delete from table _product_option, all options will be lost, not only the ones with no stock.
Having said that, I also made some other checks like if the product is activated (status=1).
Users browsing this forum: kirkhall, Semrush [Bot] and 18 guests