Page 10 of 55 FirstFirst ... 8910111220 ... LastLast
Results 91 to 100 of 546
  1. #91
    Join Date
    Jan 2009
    Location
    Vegas Baby!
    Posts
    332
    Plugin Contributions
    0

    Default Re: Product Attribute Grid

    Whenever I try to add more than one attribute with a qty box it all reverts to radio fields. Take a look here.

    I added Color as a radio field the same way as adding the Qty radio, so it has a sort order of -9998. Then I added a separate drop down option name "colors" with option values "black" and "white". It's probably something I'm just missing in the way I'm doing it

  2. #92
    Join Date
    May 2005
    Location
    Bath, Somerset
    Posts
    1,053
    Plugin Contributions
    3

    Default Re: Product Attribute Grid

    There you have 5 different attributes. You should only ever have TWO.

    One attribute, set as a RADIO type should be colour, with RED, GREEN, BLUE etc as the VALUES.

    The other should be SIZE with the VALUES XXL, XL, L, M, S

    Thats all. Remove the other three attributes and it will work as expected.

    You only need a quantity attribute if you only have 1 attribute, and want to force the single attribute into a grid format.

    Absolute
    Back, after a 4 year absence! Did you miss me?
    Absolute Web Solutions Ltd
    Interested in our work? Take a look at one of our sites - The Tech Store

  3. #93
    Join Date
    Jan 2009
    Location
    Vegas Baby!
    Posts
    332
    Plugin Contributions
    0

    Default Re: Product Attribute Grid

    Ooooh Ok I got it now & that worked, thank you!

  4. #94
    Join Date
    May 2005
    Location
    Bath, Somerset
    Posts
    1,053
    Plugin Contributions
    3

    Default Re: Product Attribute Grid

    No problem.
    Back, after a 4 year absence! Did you miss me?
    Absolute Web Solutions Ltd
    Interested in our work? Take a look at one of our sites - The Tech Store

  5. #95
    Join Date
    Nov 2008
    Posts
    16
    Plugin Contributions
    0

    Default Re: Product Attribute Grid

    Absolute, sorry to bother you. Is there a way to have the price in it's own column.

    Like

    [attribute] [price] [qty box]

    ??

    Thank you!

  6. #96
    Join Date
    May 2005
    Location
    Bath, Somerset
    Posts
    1,053
    Plugin Contributions
    3

    Default Re: Product Attribute Grid

    You can. However, this is a little beyond the scope of this module. The existing could certainly be updated to reflect any setup/layout you are looking for.

    Absolute
    Back, after a 4 year absence! Did you miss me?
    Absolute Web Solutions Ltd
    Interested in our work? Take a look at one of our sites - The Tech Store

  7. #97
    Join Date
    Apr 2007
    Location
    California, USA
    Posts
    233
    Plugin Contributions
    0

    Default Re: Product Attribute Grid

    Quote Originally Posted by Absolute View Post
    In terms of replacing the input boxes with a red cross image or similar, you would need to have "Stock by Attribute" module installed, and then use the following code:

    In includes/modules/attributes.php, the FOR statement found around line 136 should be replaced with the following:
    Code:
        for($grh=0; $grh < $grh_size; $grh++) {
          $attributes_ids = array(    $grid_records['H']['id']    =>    $grid_records['H']['options'][$grh]['id'],
                                      $grid_records['V']['id']    =>    $grid_records['V']['options'][$grv]['id']
                                );
          $products_attribs_id = zen_get_uprid((int)$_GET['products_id'], $attributes_ids);
          $stock_check_array = array();
          if (zen_not_null($grid_records['H']['options'][$grh]['name'])) $stock_check_array[] = $grid_records['H']['options'][$grh]['id'];
          if (zen_not_null($grid_records['V']['options'][$grv]['name'])) $stock_check_array[] = $grid_records['V']['options'][$grv]['id'];
          $attrib_grid .= '<td class="attrib-grid-cell" id="attrib-grid-cell-'.$grid_records['H']['options'][$grh]['id'].'-'.$grid_records['V']['options'][$grv]['id'].'">'.
                                                  (zen_get_products_stock($_GET['products_id'], $stock_check_array) > 0 ?
                              zen_draw_input_field('products_id['.$products_attribs_id.']', '', 'size="3"').
                            zen_draw_hidden_field('attribs['.$products_attribs_id.']['.$grid_records['H']['id'].']', $grid_records['H']['options'][$grh]['id']).
                            zen_draw_hidden_field('attribs['.$products_attribs_id.']['.$grid_records['V']['id'].']', $grid_records['V']['options'][$grv]['id'])
                                                   : zen_image(DIR_WS_IMAGES.'item_out_stock.gif)).
                          '</td>';
        }
    Hope this helps.

    Absolute
    Yes I do have the stock by attributes installed and your fix worked. But there was one small error in the code it was missing a '. So for anyone else wanting this to little fix to work:

    In includes/modules/attributes.php (or if you are like me that uses the template override system includes/modules/YOUR_TEMPLATE/attributes.php)
    Find:
    Code:
    for($grh=0; $grh < $grh_size; $grh++) {
          $attributes_ids = array(    $grid_records['H']['id']    =>    $grid_records['H']['options'][$grh]['id'],
                                      $grid_records['V']['id']    =>    $grid_records['V']['options'][$grv]['id']
                                );
          $products_attribs_id = zen_get_uprid((int)$_GET['products_id'], $attributes_ids);
          $attrib_grid .= '<td class="attrib-grid-cell" id="attrib-grid-cell-'.$grid_records['H']['options'][$grh]['id'].'-'.$grid_records['V']['options'][$grv]['id'].'">'.
                              zen_draw_input_field('products_id['.$products_attribs_id.']', '', 'size="3"').'<br />'.
                            zen_draw_hidden_field('attribs['.$products_attribs_id.']['.$grid_records['H']['id'].']', $grid_records['H']['options'][$grh]['id']).
                            zen_draw_hidden_field('attribs['.$products_attribs_id.']['.$grid_records['V']['id'].']', $grid_records['V']['options'][$grv]['id']).
                          '</td>';
        }
    Replace:
    Code:
    for($grh=0; $grh < $grh_size; $grh++) {
          $attributes_ids = array(    $grid_records['H']['id']    =>    $grid_records['H']['options'][$grh]['id'],
                                      $grid_records['V']['id']    =>    $grid_records['V']['options'][$grv]['id']
                                );
          $products_attribs_id = zen_get_uprid((int)$_GET['products_id'], $attributes_ids);
          $stock_check_array = array();
          if (zen_not_null($grid_records['H']['options'][$grh]['name'])) $stock_check_array[] = $grid_records['H']['options'][$grh]['id'];
          if (zen_not_null($grid_records['V']['options'][$grv]['name'])) $stock_check_array[] = $grid_records['V']['options'][$grv]['id'];
          $attrib_grid .= '<td class="attrib-grid-cell" id="attrib-grid-cell-'.$grid_records['H']['options'][$grh]['id'].'-'.$grid_records['V']['options'][$grv]['id'].'">'.
                                                  (zen_get_products_stock($_GET['products_id'], $stock_check_array) > 0 ?
                              zen_draw_input_field('products_id['.$products_attribs_id.']', '', 'size="3"').
                            zen_draw_hidden_field('attribs['.$products_attribs_id.']['.$grid_records['H']['id'].']', $grid_records['H']['options'][$grh]['id']).
                            zen_draw_hidden_field('attribs['.$products_attribs_id.']['.$grid_records['V']['id'].']', $grid_records['V']['options'][$grv]['id']).
                             :zen_image(DIR_WS_IMAGES.'item_out_stock.gif')).
                          '</td>';
        }
    Also remember to upload the image to /images/item_out_stock.gif
    We just used a similar X like on Absoulte's website.

    Thanks again to Absolute for a great module and very simple fix.
    Thanks
    Supersnow

  8. #98
    Join Date
    Apr 2007
    Location
    California, USA
    Posts
    233
    Plugin Contributions
    0

    Default Re: Product Attribute Grid

    The code above works great for two option attributes. But if I use it the grid for single attributes, and still want to have all options with a Quantity box next to them then I have a problem.

    I have followed the readme and set up an attribute called Quantity, which is a Radio type option and then setup one option value, which has no text defined, so it is just a completely blank value, but then even with stock by attribute setup normally I get my X image in all the boxes. But if I put text in the option value the quantity box appears for each single attribute again.

    So what do I need to do with this code so it still works with single attributes?
    Thanks
    Supersnow

  9. #99
    Join Date
    Mar 2009
    Posts
    31
    Plugin Contributions
    0

    Default Re: Product Attribute Grid

    Does anyone think (or know) that this mod could be combined with the "drop down attributes at product listing mod", so that I could create a "quick order on steroids". The grid format would be on the product listing page rather than product info. That way a customer could order for example 5 of one size of shoe and 10 of another size of product a then order 20 of one size and 30 of another of product b on the same page.

    I tried combining the 2 modules on my test site with no success. Probably because of my lack of php knowledge.

  10. #100
    Join Date
    May 2005
    Location
    Bath, Somerset
    Posts
    1,053
    Plugin Contributions
    3

    Default Re: Product Attribute Grid

    The two modules would not function together, as the module we have created relies on a number of product specific hidden variables when the form is submitted.

    The solution to the problem you are looking to solve has been created already however! We have it running on a couple of our sites. If you want a pointer in the right direction, you would need to update your cart action script to add the items to cart with attributes, and then on your product listing page, show all the product attributes with speific field names.

    It can be done, but requires a little PHP knowledge.

    Absolute
    Back, after a 4 year absence! Did you miss me?
    Absolute Web Solutions Ltd
    Interested in our work? Take a look at one of our sites - The Tech Store

 

 
Page 10 of 55 FirstFirst ... 8910111220 ... LastLast

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