0

I have a site that has been up for some time and functioning without issue.

There are a number of products which have 10-20 custom options configured in admin. I logged in recently to discover that I can only see the last 4 custom options configured for any given product. All of the custom options are still appearing correctly on the frontend; it's only the backend where they're missing. I checked the database and all the product option entries still exist and appear to be in order. I've cleared all caches and reindexed everything, but there was no change.

Unfortunately I have no idea when the problem arose, and all of the product entry and configuration was done for the site 7-8 months ago. I've made numerous changes to the site and installed a couple extensions since then.

The only other thing I can think to check at this point is to see where the options are being pulled for the admin view and try to see what's going wrong, but I'm having trouble figuring out where to start. Can anyone point me in the right direction? Site is on version 1.9.2.3.

2

Custom options in admin panel comes from template file options.phtml file located at app\design\adminhtml\default\default\template\catalog\product\edit\options.phtml

In this file there is a call to block function Mage_Adminhtml_Block_Catalog_Product_Edit_Tab_Options::getOptionsBoxHtml()

Now this function basically creates block and calls Mage_Adminhtml_Block_Catalog_Product_Edit_Tab_Options_Option::_prepareLayout() function which is responsible for rendering each field by its type. In the same file there is another function getOptionValues seems to be responsible for getting each available product options and configure it.
Below line gets list of all options.

$optionsArr = array_reverse($this->getProduct()->getOptions(), true);

The template file for this block contains all JS code to create and render option fields which is located at app\design\adminhtml\default\default\template\catalog\product\edit\options\option.phtml

Hope it may help you debug your issue.

  • 1
    Thanks, this was helpful. My issue turned out to be with an uploader that was used on the options by a third party extension to set an image. It tried to check for a Flash version at one point and the variable was undefined, so it errored out. – spencerready Apr 3 '17 at 15:08

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.