1

i have this statement, but it runs very low

list( $parentId ) = Mage::getModel('catalog/product_type_configurable')
                        ->getParentIdsByChild( $product->getId() );

anyone know how to get the sql it ran? i only know use getSelect() in collection, but how about in Model?

1

Try this :

$parentId = Mage::getModel('catalog/product_type_configurable')
                    ->getParentIdsByChild( $product->getId() );    
$parentId->printLogQuery(true);
  • not working.... – hkguile Feb 8 '17 at 6:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.