
Originally Posted by
oavs
Considering that the add to cart button of the unmodified product information page appears to be displayed using javascript and that the difference between the two page is the commenting out of the box/or a section of code, I would say that the commenting out portion should be reviewed as it applies to your store.
BTW, found a better/improved solution to the single option value issue addressed above making the code removal/commenting out unnecessary.
in includes/classes/observers/class.attributes_grid_products.php
modify the function updateNotifyAttributesModuleOptionBuilt to be the following adding the code in red:
Code:
function updateNotifyAttributesModuleOptionBuilt(&$callingClass, $notifier, $products_options_names_fields,
&$options_name, &$options_menu, &$options_comment,
&$options_comment_position, &$options_html_id,
&$options_attributes_image) {
global $products_options;
if ($products_options->RecordCount() == 1 && $products_options_names_fields['products_options_type'] == PRODUCTS_OPTIONS_TYPE_GRID) {
array_pop($options_name);
array_pop($options_menu);
array_pop($options_comment);
array_pop($options_comment_position);
array_pop($options_html_id);
array_pop($options_attributes_image);
$this->updateNotifyAttributesModuleDefaultSwitch($callingClass, $notifier, $products_options_names_fields, $options_name, $options_menu, $options_comment, $options_comment_position, $options_html_id);
}
// if at the last option name, then no further processing above and want to reset the
// counter so that on the next use on this session it is zero.
if ($this->_products_options_names_current == $this->_products_options_names_count) {
$this->_products_options_names_current = 0;
}
}
Bookmarks