开发者

Load Magento configurable product based on attribute options

Is there a magento function that exists which will allow me to load a configurable products child product based on the attributes options used.

For example I have the option values for t-shirt color and size开发者_如何学Python, say 10, 45 (option id's) and I want to quickly get the id of the child simple product


For a configurable product $product, use this function:

$product->getTypeInstance(true)->getProductByAttributes($attributesInfo, $product);

where $attributeInfo is an array of $attributeId => $attributeValue definitions.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜