Questions tagged «associate-products»

4
加载简单产品集合(有库存和无库存)
将可配置产品的所有“子”产品(包括缺货)加载到集合中时出现问题。 像这样加载产品: $simpleCollection = $configurable->getUsedProductCollection() ->addAttributeToSelect('*') ->addFilterByRequiredOptions(); foreach ($simpleCollection as $simple) { //$simple->getName(); } 会忽略缺货的子产品,这可能是因为未加入价格表的子产品。 有没有加载所有子ID的另一个选项getChildrenIds然后加载每个简单的产品负载?
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.