更新时间:2023-11-30 15:17:40
您可以使用:
$product->getTypeInstance();
哪个将返回您产品的类型对象
Which will return the type object of your product
然后您可以执行以下操作:
Then you can perform your:
->getParentIdsByChild()
最终放弃:
$product->getTypeInstance()->getParentIdsByChild($child->getId());