tag:blogger.com,1999:blog-7442072150765022610.post6920802351682500228..comments2023-11-16T23:12:55.172+05:30Comments on Hiren's Technical Blog: Programmatically add configurable products to Magento Shopping CartHiren Davehttp://www.blogger.com/profile/03332234242233370508noreply@blogger.comBlogger7125tag:blogger.com,1999:blog-7442072150765022610.post-68670573356449691172013-09-16T16:18:17.923+05:302013-09-16T16:18:17.923+05:30how to update the super atributes of a cart item ?...how to update the super atributes of a cart item ?<br />like the way we update qty? Anonymoushttps://www.blogger.com/profile/02685637322804032217noreply@blogger.comtag:blogger.com,1999:blog-7442072150765022610.post-6883369752794970942013-04-08T19:17:55.092+05:302013-04-08T19:17:55.092+05:30Hi hiren,
I got some issue with simple configurab...Hi hiren,<br /><br />I got some issue with simple configurable Products extension. Due to SCP extension selected custom options doesn't show up on cart page. I m so frustated. SO if possible give me any solution for that.<br /><br />The SCP extension i m using on magento 1.7.0.2..so please help me<br /><br /><br /><br />Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-7442072150765022610.post-68183871991803712142012-10-18T14:30:34.686+05:302012-10-18T14:30:34.686+05:30my fault, the product i tested didn't have the...my fault, the product i tested didn't have the cost added in the backend, works like a dream...Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-7442072150765022610.post-47433588595102055812012-10-18T14:25:00.410+05:302012-10-18T14:25:00.410+05:30I tried this solution with a product with a yes no...I tried this solution with a product with a yes no option, in product view the price adjusts dynamically and is correctly added to the cart at the correct price, however with this solution when yes is selected a certificate is issued which costs a fixed additional price, how do i get the correct price to the cart? adding products with yes produces the default cost (and not default + certificate cost)Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-7442072150765022610.post-56965995468894807712012-06-19T12:12:33.377+05:302012-06-19T12:12:33.377+05:30what if i want to edit configurable products progr...what if i want to edit configurable products programatically.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-7442072150765022610.post-18611032601111173562011-08-11T12:55:09.815+05:302011-08-11T12:55:09.815+05:30Referencing to above post,
And when I looked at d...Referencing to above post, <br />And when I looked at database there is creation of only one simple product sales_flat_order_item, where as there should be also configurable product.<br /><br />Note: I am running this script not root directory like http://localhost/magento/createOrder.phpAnonymousnoreply@blogger.comtag:blogger.com,1999:blog-7442072150765022610.post-65994791001079766132011-08-11T12:49:21.703+05:302011-08-11T12:49:21.703+05:30Hi Hiran,
I am trying to create one script to cre...Hi Hiran,<br /><br />I am trying to create one script to create an order containing configurable product which has two attributes configurable i.e. color and size.<br /><br />Following is my long code that ideally creates order but in admin order detail,i cannot see product configurable options that were set while creating order. Please look at my code and let me know what i am missing,<br /><br />$product = Mage::getModel('catalog/product')->load($productId);<br /> <br /> //$product->setParentItemId(4);<br /> <br /> <br /> <br /> $attributeSize = $product->getResource()->getAttribute('size');<br /> $attributeColor = $product->getResource()->getAttribute('color');<br /> <br /> <br /> /*$buyInfo = array('qty' => 5 ,<br /> $attributeSize->getId() => 'S',<br /> $attributeColor->getId() => 'Blue', <br /> );<br /> $params = array(<br /> 'product' => $productId,<br /> 'super_attribute' => array(<br /> $attributeSize->getId() => 'Small',<br /> $attributeColor->getId() => 'Blue',<br /> <br /> ),<br /> 'qty' => 2,<br /> ); */<br /> /*********************************************/<br /> $colorAttributeText=$product->getAttributeText('color');<br /> $sizeAttributeText=$product->getAttributeText('size');<br /> <br /> $colorValue = $product->color;<br /> $sizeValue = $product->size;<br /> <br /> $attribute_data=array('info_buyRequest'=>array(<br /> 'product'=>$productId,<br /> 'super_attribute'=>array(<br /> $attributeColor->getId() => $colorValue,<br /> $attributeSize->getId() => $sizeValue,<br /> )<br /> ),<br /> 'attributes_info'=>array(<br /> '0'=>array(<br /> 'label'=>'Color',<br /> 'value'=>$colorAttributeText<br /> ) , <br /> '1'=> array(<br /> 'label'=>'size',<br /> 'value'=>$sizeAttributeText<br /> ),<br /> ),<br /> 'simple_name'=> $product->getName(),<br /> 'simple_sku'=> $product->getSku(),<br /> 'product_calculations' =>1,<br /> 'shipment_type'=>0<br /> ); <br /> <br /> /*********************************************/<br /> <br /> $quote->addProduct($product, new Varien_Object($attribute_data));Anonymousnoreply@blogger.com