2
votes

I have simple products with custom options in my store. They work perfectly from the front end, but if I try to add an order from the admin section, The custom options do not show up.

I only have this problem if the type of custom option is a dropdown, multi select, radio buttons, or check boxes. If it is a text field, date or anything else, it works fine.

I am assumming i need to make some changes to something in the /www/app/design/adminhtml/default/default/template/sales/order/create area, but no clue what i should try.

enter image description here

Looking a bit further, I found this /www/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Items/grid.php

/**
 * Get Custom Options of item
 *
 * @param Mage_Sales_Model_Quote_Item $item
 * @return array
 */
public function getCustomOptions(Mage_Sales_Model_Quote_Item $item)
{
    $optionStr = '';
    $this->_moveToCustomerStorage = true;
    if ($optionIds = $item->getOptionByCode('option_ids')) {
        foreach (explode(',', $optionIds->getValue()) as $optionId) {
            if ($option = $item->getProduct()->getOptionById($optionId)) {
                $optionValue = $item->getOptionByCode('option_' . $option->getId())->getValue();

                $optionStr .= $option->getTitle() . ':';

                $quoteItemOption = $item->getOptionByCode('option_' . $option->getId());
                $group = $option->groupFactory($option->getType())
                    ->setOption($option)
                    ->setQuoteItemOption($quoteItemOption);

                $optionStr .= $group->getEditableOptionValue($quoteItemOption->getValue());
                $optionStr .= "\n";
            }
        }
    }
    return $optionStr;
}
1

1 Answers

1
votes

The best way to find the correct template path is to turn on admin template hints.

By default magento does not provide a way to accomplish from the admin, but you can easily accomplish this using one of these methods Enable template path hint in admin pages - Magento