Results 1 to 10 of 546

Threaded View

  1. #11
    Join Date
    Jul 2012
    Posts
    16,798
    Plugin Contributions
    17

    Default Re: Product Attribute Grid

    Quote Originally Posted by oavs View Post
    Hi, Thanks for your help it is much appreciated.

    I have commented the as you advised. It worked but now it will not display product option value (under the heading of '
    Product / Item Code') . You can see it here http://www.qbrands.com.au/qb/index.p...products_id=71

    It supposed to display like this http://www.qbrands.com.au/qb/index.p...products_id=48

    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.
    Last edited by mc12345678; 1 Nov 2016 at 05:59 PM. Reason: Updated text example to match code example in last issue.
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

 

 

Similar Threads

  1. Product Attribute Grid Help - Willing to Pay
    By MM_Dude in forum General Questions
    Replies: 0
    Last Post: 26 Nov 2014, 08:19 PM
  2. Quick Order & Product Attribute Grid...Possible?
    By laurenjj in forum All Other Contributions/Addons
    Replies: 0
    Last Post: 2 Jul 2010, 02:02 AM
  3. Product Attribute Grid!!!
    By runoka in forum Setting Up Categories, Products, Attributes
    Replies: 3
    Last Post: 5 Apr 2010, 05:50 PM
  4. Product Attribute Grid Instructions Possible Paragraph Missing
    By printchic in forum Setting Up Categories, Products, Attributes
    Replies: 0
    Last Post: 8 Aug 2009, 05:54 AM
  5. Help Uninstalling Product Attribute Grid
    By Dr Tweak in forum All Other Contributions/Addons
    Replies: 7
    Last Post: 20 May 2008, 05:01 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR