Page 47 of 55 FirstFirst ... 374546474849 ... LastLast
Results 461 to 470 of 544
  1. #461
    Join Date
    Jul 2012
    Posts
    16,732
    Plugin Contributions
    17

    Default Re: Product Attribute Grid

    Quote Originally Posted by Dream9Studios View Post
    Yes, it's there and in the correctly named folder. I even tried re-uploading it (just in case it was corrupted during transfer) just now and tried again to load the product page, etc. I'm still getting nothing.
    Well, to get over the first hump and possibly see if the rest of the software works (assuming that the includes/classes/observers file is loaded), I have a slightly odd request because I do not have immediate access to the fileset.

    Could you please post the code that is in the observers function: updateNotifyAttributesModuleStartOption?

    It should contain a check for a constant like if(!defined('PRODUCTS_TYPE_OPTION_GRID'))
    Or similar. Before pasting the code please press the # symbol in the message box toolbar.
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  2. #462
    Join Date
    Sep 2012
    Location
    Illinois
    Posts
    24
    Plugin Contributions
    0

    Default Re: Product Attribute Grid

    I don't see updateNotifyAttributesModuleStartOption? but I do see updateNotifyAttributesModuleStartOptionsLoop
    Is that what you mean? I'll post the code from it below.

    Code:
    function updateNotifyAttributesModuleStartOptionsLoop(&$callingClass, $notifier, $i, &$products_options_fields){
        global $db, $options_menu_images, $products_options_array, $products_options_names,
               $PWA_STOCK_QTY;
    
        $this->_products_options_names_current++;
    
        if ($this->_products_options_names_current == 1) {
          global $currencies;
    
          $show_attribute_stock_left = true;
    
          /****************************************************
          /* Absolute-Solutions.co.uk Edit
          /*
          /* Attributes Grid format
          /* 1 of 2
          /****************************************************/
    // PRODUCTS_OPTIONS_TYPE_GRID is the ID for the GRID option
          if (!defined('PRODUCTS_OPTIONS_TYPE_GRID')) {// || !defined('CONFIG_ATTRIBUTE_OPTION_GRID_INSTALLED') || CONFIG_ATTRIBUTE_OPTION_GRID_INSTALLED != 'true') {
            $products_options_types_name = 'Grid';
    
            /*if (!defined('PRODUCTS_OPTIONS_TYPE_GRID'))*/ {
    
              $sql = "SELECT products_options_types_name, products_options_types_id FROM " . TABLE_PRODUCTS_OPTIONS_TYPES . " WHERE 
                products_options_types_name = :products_options_types_name: AND products_options_types_name != '';";
              $sql = $db->bindVars($sql, ':products_options_types_name:', $products_options_types_name, 'string');
              $result = $db->Execute($sql);
    
              if ($result !== false && $result->RecordCount() > 0) {
                // Is found, reassign $resultGID to found value.
                $resultGID = $result->fields['products_options_types_id'];
              } else {
                $sql = "SELECT pot.products_options_types_id, pot.products_options_types_name
              FROM ".TABLE_PRODUCTS_OPTIONS_TYPES." pot	
              order by pot.products_options_types_id desc limit 1";
                $result = $db->Execute($sql);
    
                $resultGID = $result->fields['products_options_types_id'] + 1;
    
                $sql = "INSERT INTO ".TABLE_PRODUCTS_OPTIONS_TYPES." (`products_options_types_id`, `products_options_types_name`) 
              VALUES (:resultGID:, :products_options_types_name:);";
                $sql = $db->bindVars($sql, ':resultGID:', $resultGID, 'integer');
                $sql = $db->bindVars($sql, ':products_options_types_name:', $products_options_types_name, 'string');
    
                $result = $db->Execute($sql);
              }
    
              if( $result !== false /*&& $result->fields['products_options_types_name'] !=  ''*/ ){
    // PRODUCT_TYPE_ATTRIBUTE_OPTION_GRID was the "old" version.
                $configuration_title = 'Selection list product option type (Grid)';
                $configuration_key = 'PRODUCTS_OPTIONS_TYPE_GRID';
                $configuration_value = $resultGID;
                $configuration_description = 'Numeric value of the grid product option type used for SBA';
                $configuration_group_id = 6;
                $sort_order = 0;
                $last_modified = 'NULL';
                $date_added = 'now()';
                $use_function = 'NULL';
                $set_function = 'NULL';
    
    
                $sql = "INSERT INTO " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value,
          configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function)
            
          VALUES
          (:configuration_title:, :configuration_key:, :configuration_value:, 
            :configuration_description:,
            :configuration_group_id:, :sort_order:, :last_modified:, :date_added:, :use_function:, :set_function:);";
                $sql = $db->bindVars($sql, ':configuration_title:', $configuration_title, 'string');
                $sql = $db->bindVars($sql, ':configuration_key:', $configuration_key, 'string');
                $sql = $db->bindVars($sql, ':configuration_value:', $configuration_value, 'integer');
                $sql = $db->bindVars($sql, ':configuration_description:', $configuration_description, 'string');
                $sql = $db->bindVars($sql, ':configuration_group_id:', $configuration_group_id, 'integer');
                $sql = $db->bindVars($sql, ':sort_order:', $sort_order, 'integer');
                $sql = $db->bindVars($sql, ':last_modified:', $last_modified, (($last_modified == 'now()' || $last_modified == 'NULL') ? 'noquotestring' : 'string'));
                $sql = $db->bindVars($sql, ':date_added:', $date_added, (($date_added == 'now()' || $date_added == 'NULL') ? 'noquotestring' : 'string'));
                $sql = $db->bindVars($sql, ':use_function:', $use_function, (($use_function == 'now()' || $use_function == 'NULL') ? 'noquotestring' : 'string'));
                $sql = $db->bindVars($sql, ':set_function:', $set_function, (($set_function == 'now()' || $set_function == 'NULL') ? 'noquotestring' : 'string'));
    
                $db->Execute($sql);
              }
              define('PRODUCTS_OPTIONS_TYPE_GRID', $resultGID);
            }
          }

  3. #463
    Join Date
    Jul 2012
    Posts
    16,732
    Plugin Contributions
    17

    Default Re: Product Attribute Grid

    Thank you, yes that is the function in question. Now while I write out the sql code to get started, could you goto your option names manager, then view the html source code. Search for an option name type not currently used on screen, such as radio or file, should end up at a section that contains <options value="x" where x is a number. Please identify the largest number for the option values= that are present.
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  4. #464
    Join Date
    Sep 2012
    Location
    Illinois
    Posts
    24
    Plugin Contributions
    0

    Default Re: Product Attribute Grid

    Whoa, it just started working. I'm not quite sure what happened. There must have been a problem with my browser? To answer your question, the highest option value number was "5" for "read-only" but then I reloaded the html source code and "6" for "Grid" popped up. I'm using the latest version of Google Chrome. There must have been a browser cache error somewhere.

    Thank you for your assistance. I appreciate it!

  5. #465
    Join Date
    Jul 2012
    Posts
    16,732
    Plugin Contributions
    17

    Default Re: Product Attribute Grid

    Well glad it worked, but below is the SQL that would have added the option type to the store given the information provided. Sql to be pasted in tools->install sql patches. But unnecessary now that the option appears.


    Code:
    INSERT INTO products_options_types  (`products_options_types_id`, `products_options_types_name`) 
              VALUES (6, 'Grid');
    
     
    INSERT INTO configuration (configuration_title, configuration_key, configuration_value,
          configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function)
            
          VALUES
          ( 'Selection list product option type (Grid)'
    , 'PRODUCTS_OPTIONS_TYPE_GRID', 6, 
            'Numeric value of the grid product option type used for SBA',
            6, 0, NULL, NOW(), NULL, NULL);
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  6. #466
    Join Date
    Jan 2007
    Location
    Los Angeles, California, United States
    Posts
    10,023
    Plugin Contributions
    32

    Default Re: Product Attribute Grid

    Working with Zen Cart v1.5.4.

    I'm sure this is something simple.. I just upgraded SBA (https://github.com/mc12345678/Stock_...butes_Combined) and the latest version of this module.. On the product pages, the only attributes which render or display are the file selection type of attributes. No other attribute types render or display. What should I be looking for to correct this?
    Last edited by DivaVocals; 16 Apr 2016 at 03:21 PM.
    My Site - Zen Cart & WordPress integration specialist
    I don't answer support questions via PM. Post add-on support questions in the support thread. The question & the answer will benefit others with similar issues.

  7. #467
    Join Date
    Jul 2012
    Posts
    16,732
    Plugin Contributions
    17

    Default Re: Product Attribute Grid

    While the install process of ZC 1.5.5 addresses/corrects the dropdown condition (removal of the infamous three values that were previously stored in gID=0 (and potentially erased by incorrectly formatted SQL statements) but have been moved to gID=6).

    The instruction at the following link ought to resolve the issue with the dropdown. Instruction provided above to discover the current value for Grid (seeing as Grid was previously in existence within the store) ought to resolve the display of grid related attributes, although the code ought to have picked up that characteristic upon initial attempt to display a product that had attributes assuming that the existing option name string was that of 'Grid' per the original install of this plugin.

    If the SQL above becomes necessary, then in the case(s) where a value of 6 other than for gID are used in the existing store, then they should be substituted with what is discovered by inspection of the option name page's html source code.
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  8. #468
    Join Date
    Jul 2012
    Posts
    16,732
    Plugin Contributions
    17

    Default Re: Product Attribute Grid

    Though, now that I see the revised message, would also want to look at any merge done to includes/templates/YOUR_TEMPLATE/templates/tpl_modules_attributes.php. Currently there is the use of the capital letter i ($I) where the original code used $i and incorrectly merging that portion of code could cause a problem as the $i variable is used in the images section of that same template file... I know wasn't a good plan. Works as written, but not merge friendly. Working on a rewrite of that to make the "merge" easier to understand where differences exist/matter.
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  9. #469
    Join Date
    Jul 2012
    Posts
    16,732
    Plugin Contributions
    17

    Default Re: Product Attribute Grid

    And thread link I forgot to paste two messages ago: https://www.zen-cart.com/showthread....03#post1306503

    Long day in the sun, sorry.
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  10. #470
    Join Date
    Jan 2007
    Location
    Los Angeles, California, United States
    Posts
    10,023
    Plugin Contributions
    32

    Default Re: Product Attribute Grid

    Quote Originally Posted by mc12345678 View Post
    And thread link I forgot to paste two messages ago: https://www.zen-cart.com/showthread....03#post1306503

    Long day in the sun, sorry.
    Okay.. rolled back for now to move forward.. Gonna take the concierge dog for a walk and go back to this later tonight or tomorrow..
    My Site - Zen Cart & WordPress integration specialist
    I don't answer support questions via PM. Post add-on support questions in the support thread. The question & the answer will benefit others with similar issues.

 

 
Page 47 of 55 FirstFirst ... 374546474849 ... 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