
Originally Posted by
oavs
Found it.
Modification is needed to lines 285 and 314 of includes/classes/observers/class.attributes_grid_products.php
I will present each line and its modification as a group (285 orig, 285 mod then 314 same):
Line 285 from:
Code:
if (($grh_size > 1) && zen_not_null($grid_records['H']['options'][$grh]['name'])) {
To:
Code:
if (($grh_size >= 1) && zen_not_null($grid_records['H']['options'][$grh]['name'])) {
Line 314 from:
Code:
if (($grv_size > 1) && zen_not_null($grid_records['V']['options'][$grv]['name'])) {
To:
Code:
if (($grv_size >= 1) && zen_not_null($grid_records['V']['options'][$grv]['name'])) {
On other things, while reviewing the source code, I noticed something that seemed odd but can be corrected through casting of variables that use the ['id'] key to an integer value. If one of those is blank (guess should/could really be 0) then ids such as: attrib-grid-vHeader- could be generated instead of attrib-grid-vHeader-0.
So for example line 315 would change from:
Code:
$this->_attrib_grid .= ' <td class="attrib-grid-vHeader" id="attrib-grid-vHeader-'.$grid_records['V']['options'][$grv]['id'].'">'.$grid_records['V']['options'][$grv]['name'];
to:
Code:
$this->_attrib_grid .= ' <td class="attrib-grid-vHeader" id="attrib-grid-vHeader-'.(int)$grid_records['V']['options'][$grv]['id'].'">'.$grid_records['V']['options'][$grv]['name'];
Not a huge deal unless you are using some sort of "calculation" code to relate to the specific id. The logical thing would be to look for one with the 0 in it, but that's not how it is currently functioning. Will get those two updated as time permits. :) Seems to work on my demo site. Welcome feedback on the two above solutions as in if issues are caused by them.
Bookmarks