9 hours ago, fritzelly said:I'm not following you. The only table that references the attribute name is attribute_lang
You don't call that table in your SQL so how can the code know what attribute value's stock to update?
Using Join in query you get value from tables. Attribute stock is updated based on attribute reference set in product combination. Example:
Product have attributes like this.
Size:
S,M,L
Color:
White,Red,Blue
Combinations will be like:
S White, S Red, S Blue
M White, M Red, M Blue
L White, L Red, L Blue
Each of these combinations is separate value in data base, so you assign unique reference.
S White, reference: S-White-tshirt
M Blue, reference: M-Blue-tshirt
Doesnt matter how you set your reference could be like the above or with spaces. Then you can update stock based on this with query, i posted earlier.