0

using observer after add to cart i am getting this

 Array (
     [uenc] => aHR0cDovL2NpdHl0ZWNoLmxpbnV4c2VydmVyLmNvbS9saWNodGJveC9kcm9wLWFwLXBsLTQ1Y20tNjBjbS5odG1s
     [product] => 33890
     [form_key] => kcKeJzvsx2gsdJsE
     [related_product] => 
     [super_attribute] => Array
         (
             [278] => 2707
         )

     [qty] => 1 )

from this how can i get simple product id which are post to add to cart

  • which event do you use? – HelgeB Mar 4 at 14:43
0

Add following code snippet where you want:

$product = Mage::getModel('catalog/product')
        ->setStoreId(Mage::app()->getStore()->getId())
        ->load($params['product']);
if (isset($params['super_attribute'])) {
    $childProduct = Mage::getModel('catalog/product_type_configurable')->getProductByAttributes($params['super_attribute'], $product);
}

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.