Products out of stock for Selection product

How to configure and adapt Aimeos based shops as developer
Forum rules
Always add your Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
SaurabhSharma
Posts: 12
Joined: 23 Feb 2020, 10:32

Products out of stock for Selection product

Post by SaurabhSharma » 27 Feb 2020, 15:33

I am creating products via manager (post10930.html)

I am getting options to select products in catalog details, however when I continue adding to basket it gives me error saying
"Products out of stock", "Sorry, at least one product is out of stock. Please remove it from your basket to continue"

I have stock value for the product set.
Earlier I thought it was being caused because individual variant's in mshop_product did not have any stock value set. However when I added a stock in any of those variant, it got omitted from the dropdown to chose.
For example earlier there were size selections for 36, 38, 40. If I added a stock level to th item 36 variant, it was no longer in list to select.

Please help.

Using aimeos/aimeos-laravel ~2019.10 on XAMPP windows 10, PHP 7.3.12

User avatar
aimeos
Administrator
Posts: 7836
Joined: 01 Jan 1970, 00:00

Re: Products out of stock for Selection product

Post by aimeos » 28 Feb 2020, 15:09

Each variant article needs a stock level because you have different numbers of items for size 36, 38 and 40 in your warehouse. For virtual products, stock levels of NULL are accepted too which means an unlimited number of items can be sold.

The reason why the variant disappeared from the drop-down isn't related to adding a stock level to it. Make sure, the variant article still has the variant attribute ("36" in your case).
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

SaurabhSharma
Posts: 12
Joined: 23 Feb 2020, 10:32

Re: Products out of stock for Selection product

Post by SaurabhSharma » 29 Feb 2020, 18:21

Can you please elaborate more? Like what methods to look in or simply what table to look into?

The entries are there in mshop_index_attribute table. Even then the selection is hidden in frontend?

P.S. I manually added an entry in mshop_stock for one of the variant it worked. What I am asking is what table does manages variant attributes?

User avatar
aimeos
Administrator
Posts: 7836
Joined: 01 Jan 1970, 00:00

Re: Products out of stock for Selection product

Post by aimeos » 01 Mar 2020, 10:08

Product variant attributes are referenced by the mshop_product_list table:
mshop_product -> mshop_product_list (parentid=prodid, domain='attribute', type='variant', refid=attrid) -> mshop_attribute

The mshop_index_* tables are only updated if you run the index/rebuild job or pass the product items to the rebuild() method of the index manager. Better use the mshop_product/mshop_product_list/mshop_attribute tables to check if your variant attributes are stored correctly.
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

Post Reply