I am trying to add the base product of a related item (without configuration or additional products added to the kit). None of the custom items are required, and the price of the related item is set to a fixed price.
I tried to try the solution given here: http://www.magentocommerce.com/boards/viewthread/17289/
if (empty($optionIds)) {
$selectionCollection = $product->getTypeInstance(true)->getSelectionsCollection($product->getTypeInstance(true)->getOptionsIds($product), $product);
$bypass_sel_arry = $selectionCollection->getData();
$options = array($bypass_sel_arry[0]['option_id']=>$bypass_sel_arry[0]['selection_id']);
}
But I noticed that when an item is added to the cart, it automatically selects the first option in custom items.
Any help would be appreciated.
source
share