Page 240 of 356 FirstFirst ... 140190230238239240241242250290340 ... LastLast
Results 2,391 to 2,400 of 3558
  1. #2391
    Join Date
    Jul 2015
    Posts
    43
    Plugin Contributions
    0

    Default Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9

    Quote Originally Posted by mc12345678 View Post
    Under Configuration->Dynamic Dropdowns->Use ZC default HTML Attribute Tags

    set it to false if it is not... Intent of that option is to eventually present the dynamic dropdown information with the tags that are provided by ZC so that formatting can be consistently applied. At the moment it's a series of generic tags...
    Doesn't exist under Dynamic Dropdowns...

  2. #2392
    Join Date
    Jul 2012
    Posts
    16,734
    Plugin Contributions
    17

    Default Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9

    Also found something in the original Dynamic Dropdowns file that may have sorted as was necessary when first developed but has changed since then.

    When I was looking two attributes displayed, each had the same sort order, but alphabetically they would/may display in a modified sequence like what you showed above, when using Dynamic Dropdowns I too was seeing that the sequence did not follow the rules set by configuration->product info->Products Info - Products Option Name Sort Order..

    I have locally updated the includes/classes/pad_base.php file to be uploaded with some other modifications/simplifications. Trying to clean up code as there are functions/features used in more than one location so would be best to consolidate the code rather than change multiple locations at least until it gets too complicated to keep as a single source.

    The change was this for your interest:
    includes/classes/pad_base.php
    line 315 change from:
    Code:
          $products_options_name_query = "select distinct  popt.products_options_id, popt.products_options_name,  popt.products_options_track_stock, popt.products_options_images_style,  popt.products_options_type from " . TABLE_PRODUCTS_OPTIONS . " popt, " .  TABLE_PRODUCTS_ATTRIBUTES . " patrib where patrib.products_id =  :products_id: and popt.products_options_id = patrib.options_id and  popt.language_id = :languages_id: :stocked_where: order by  popt.products_options_sort_order";
    to:

    Code:
      //LPAD - Return the string argument, left-padded with the specified string 
      //example: LPAD(po.products_options_sort_order,11,"0") the field is 11 digits, and is left padded with 0
      if (PRODUCTS_OPTIONS_SORT_ORDER == '0') {
                    $options_order_by= ' order by LPAD(popt.products_options_sort_order,11,"0")';
      } else {
                    $options_order_by= ' order by popt.products_options_name';
      }
          $products_options_name_query = "select distinct popt.products_options_id, popt.products_options_name, popt.products_options_track_stock, popt.products_options_images_style, popt.products_options_type from " . TABLE_PRODUCTS_OPTIONS . " popt, " . TABLE_PRODUCTS_ATTRIBUTES . " patrib where patrib.products_id = :products_id: and popt.products_options_id = patrib.options_id and popt.language_id = :languages_id: :stocked_where:" . $options_order_by;
    I do plan on updating the public download version of Dynamic Dropdowns plugin as there *are* some things about it that are broke or no longer accurate, but obviously still working out some of its operations.
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  3. #2393
    Join Date
    Jul 2012
    Posts
    16,734
    Plugin Contributions
    17

    Default Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9

    And in the same vein, looked at how the option values are/were sorted... Seems a similar "issue" was there...

    So, to address that at "old" line 324 add the code that is below. Providing the code above and below the modification to show context:

    Code:
          $products_options_name_query = $db->bindVars($products_options_name_query, ':products_id:', $this->products_id, 'integer');
          $products_options_name_query = $db->bindVars($products_options_name_query, ':languages_id:', $_SESSION['languages_id'], 'integer');
          $products_options_name_query = $db->bindVars($products_options_name_query, ':stocked_where:', $stocked_where, 'passthru');
    
          $products_options_name = $db->Execute($products_options_name_query);
    
          $attributes=array();
            
          while (!$products_options_name->EOF) {
            $products_options_array = array();
            $products_options_query = "select pov.products_options_values_id, pov.products_options_values_name, pa.options_values_price, pa.price_prefix from " . TABLE_PRODUCTS_ATTRIBUTES . " pa, " . TABLE_PRODUCTS_OPTIONS_VALUES . " pov where pa.products_id = :products_id: and pa.options_id = :products_options_id: and pa.options_values_id = pov.products_options_values_id and pov.language_id = :languages_id: order by pa.products_options_sort_order";
    
            $products_options_query = $db->bindVars($products_options_query, ':products_id:', $this->products_id, 'integer');
            $products_options_query = $db->bindVars($products_options_query, ':languages_id:', $_SESSION['languages_id'], 'integer');
            $products_options_query = $db->bindVars($products_options_query, ':products_options_id:', $products_options_name->fields['products_options_id'], 'integer');
    
            $products_options = $db->Execute($products_options_query);


    Code:
          $products_options_name_query = $db->bindVars($products_options_name_query, ':products_id:', $this->products_id, 'integer');
          $products_options_name_query = $db->bindVars($products_options_name_query, ':languages_id:', $_SESSION['languages_id'], 'integer');
          $products_options_name_query = $db->bindVars($products_options_name_query, ':stocked_where:', $stocked_where, 'passthru');
    
          $products_options_name = $db->Execute($products_options_name_query);
    
          $attributes=array();
          if (PRODUCTS_OPTIONS_SORT_BY_PRICE == '1') {
            $order_by = ' order by LPAD(pa.products_options_sort_order,11,"0"), pov.products_options_values_name';
          } else {
            $order_by = ' order by LPAD(pa.products_options_sort_order,11,"0"), pa.options_values_price';
          }
            
          while (!$products_options_name->EOF) {
            $products_options_array = array();
            $products_options_query = "select pov.products_options_values_id, pov.products_options_values_name, pa.options_values_price, pa.price_prefix from " . TABLE_PRODUCTS_ATTRIBUTES . " pa, " . TABLE_PRODUCTS_OPTIONS_VALUES . " pov where pa.products_id = :products_id: and pa.options_id = :products_options_id: and pa.options_values_id = pov.products_options_values_id and pov.language_id = :languages_id: :order_by:";
    
            $products_options_query = $db->bindVars($products_options_query, ':products_id:', $this->products_id, 'integer');
             $products_options_query = $db->bindVars($products_options_query,  ':languages_id:', $_SESSION['languages_id'], 'integer');
             $products_options_query = $db->bindVars($products_options_query,  ':products_options_id:',  $products_options_name->fields['products_options_id'], 'integer');
             $products_options_query = $db->bindVars($products_options_query,  ':order_by:',  $order_by, 'passthru');
    
            $products_options = $db->Execute($products_options_query);
    Last edited by mc12345678; 2 Jan 2016 at 12:30 AM.
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  4. #2394
    Join Date
    Jul 2012
    Posts
    16,734
    Plugin Contributions
    17

    Default Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9

    Quote Originally Posted by michael_rebreathe View Post
    I'll replace it ASAP. I'm knees-deep in another bit of joy.



    Looking at products_with_attributes_stock.php, the "unique combo" field is blank, and looks random, but I'm sure it's not...For the product I mentioned, the unique combo was only populated for one attribute combo.

    If I look at the table itself (products_with_attributes_stock) in the database, this field (product_attribute_combo) is NULL for some products and attributes, properly populated on others.


    YAY!
    Ohh, that.. Umm as far as I've seen that particular "list" doesn't support anything... In otherwords unless you are personally using it for something, I wouldn't worry about what is being populated there, but I have seen some cases when generating a combination that the unique combo field hasn't gotten updated. One case I have seen this in was where old data was imported to the table but that field wasn't populated... Further, all of the information that is "captured" in that field is a combination of other fields that already exist. If the data must be regrouped then can probably provide a sql statement to recreate all of the missing data for that field..
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  5. #2395
    Join Date
    Jul 2012
    Posts
    16,734
    Plugin Contributions
    17

    Default Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9

    Quote Originally Posted by mc12345678 View Post
    Under Configuration->Dynamic Dropdowns->Use ZC default HTML Attribute Tags

    set it to false if it is not... Intent of that option is to eventually present the dynamic dropdown information with the tags that are provided by ZC so that formatting can be consistently applied. At the moment it's a series of generic tags...
    Quote Originally Posted by michael_rebreathe View Post
    Doesn't exist under Dynamic Dropdowns...
    Under Configuration for SBA, run the rebuild/upgrade to repopulate the menu options with what is provided in the plugin. That is one of the options that was added in the process... The existing SBA stock table should remain untouched, but as with all things, please backup before doing so, just in case. :)
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  6. #2396
    Join Date
    Jul 2015
    Posts
    43
    Plugin Contributions
    0

    Default Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9

    Quote Originally Posted by mc12345678 View Post
    Ohh, that.. Umm as far as I've seen that particular "list" doesn't support anything... In otherwords unless you are personally using it for something, I wouldn't worry about what is being populated there, but I have seen some cases when generating a combination that the unique combo field hasn't gotten updated. One case I have seen this in was where old data was imported to the table but that field wasn't populated... Further, all of the information that is "captured" in that field is a combination of other fields that already exist. If the data must be regrouped then can probably provide a sql statement to recreate all of the missing data for that field..
    Nice to know it isn't a genuine break...I didn't see anything that broke, but there's a lot of functionality I don't play in on a daily basis. Just 'cuz I didn't see something break because of it still left me concerned.

    Yeah, it's a tiny SQL statement to rebuild the column, which I did before I posted the "issue," but wanted to send up the flag just in case it was a monkeywrench. update products_with_attributes_stock set product_attribute_combo = CONCAT(products_id, '-', replace(stock_attributes, ',', '-')) ;

  7. #2397
    Join Date
    Jul 2015
    Posts
    43
    Plugin Contributions
    0

    Default Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9

    Quote Originally Posted by mc12345678 View Post
    Under Configuration for SBA, run the rebuild/upgrade to repopulate the menu options with what is provided in the plugin. That is one of the options that was added in the process... The existing SBA stock table should remain untouched, but as with all things, please backup before doing so, just in case. :)
    Now, I'm getting really worried...I'm not finding rebuild/upgrade anywhere on stock_by_attr_install.php or products_with_attributes_stock.php. The version of both on the site were updated 12/31/2015 when I updated it the last time.

    Installation
    Full/Upgrade DB Install

    Removal
    Remove All from DB

    Optional SQL Scripts
    Default SQL
    Add all Product Attributes
    Add display-only product attributes
    Add product attributes that are NOT display-only
    Remove product attributes that are ONLY read-only
    Update Unique Combo field Here's a way to repopulate the field I mentioned earlier
    Remove ALL entries from the PAS Table

    Tests
    File Check

    Export / Import
    Export Table Data
    Import Table Data

  8. #2398
    Join Date
    Jul 2015
    Posts
    43
    Plugin Contributions
    0

    Default Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9

    Quote Originally Posted by mc12345678 View Post
    Well there is also something else going on there, which I have seen if the tpl_modules_attributes.php file is not merged/replaced correctly. It looks like color options are being applied/listed against capacity and capacity items against color...

    I don't understand the statement that products_with_attributes_stock.product_attribute_combo going to null... Doesn't need to be in depth, but helps to follow. :)

    I'm still working on things on my end to ensure all that has been done previously remains functional.
    tpl_modules_attributes.php was updated with the last download from GitHub (2015-12-31)

  9. #2399
    Join Date
    Jul 2012
    Posts
    16,734
    Plugin Contributions
    17

    Default Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9

    Quote Originally Posted by michael_rebreathe View Post
    Now, I'm getting really worried...I'm not finding rebuild/upgrade anywhere on stock_by_attr_install.php or products_with_attributes_stock.php. The version of both on the site were updated 12/31/2015 when I updated it the last time.

    Installation
    Full/Upgrade DB Install

    Removal
    Remove All from DB

    Optional SQL Scripts
    Default SQL
    Add all Product Attributes
    Add display-only product attributes
    Add product attributes that are NOT display-only
    Remove product attributes that are ONLY read-only
    Update Unique Combo field Here's a way to repopulate the field I mentioned earlier
    Remove ALL entries from the PAS Table

    Tests
    File Check

    Export / Import
    Export Table Data
    Import Table Data
    Sorry, I know I should have used exact terminology, but I intended:
    Installation
    Full/Upgrade DB Install

    That has/was written to preserve the existing data table, add any fields that were necessary and redo the configuration options back to "default"...

    Sorry for the delayed response, I saw the first hooray and didn't follow up to see if there was more. :). Going to be uploading some more changes (though none to the configuration options) very soon. Trying to verify that I have captured in the fileset what worked on the test site.
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  10. #2400
    Join Date
    Dec 2015
    Location
    Ohio
    Posts
    16
    Plugin Contributions
    0

    Default Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9

    Hello, I am running into a small issue with trying to install this on my 1.5.4 Zen cart...I have already backed up my website and made an exact copy of my existing database. I uploaded the files and chose replace existing. I went to the install.php address and logged in to my Zen cart admin area. I selected check files and verified no errors. I selected the Full/Upgrade option and ran the script. Nothing happened...my screen didn't change in display and it never said the database was successfully changed as the directions state would happen. Please advise as I still don't see the SBA option under Catalodg.

    I am new to this and REALLY need this add-on to track my inventory.

    Alana

    Adding: The screen shows SBA Version 1.5.3 for Zen Cart Version 1.5.1. I chose the most recent download which showed that it works with 1.5.4.
    Last edited by jnabird333; 3 Jan 2016 at 06:03 PM. Reason: added additional info

 

 

Similar Threads

  1. Problems with addon: Dynamic Drop Downs for Stock By Attribute
    By Dunk in forum All Other Contributions/Addons
    Replies: 56
    Last Post: 30 Apr 2014, 07:55 PM
  2. MySQL Problem with Product with Attribute Stock addon
    By rtwingfield in forum All Other Contributions/Addons
    Replies: 1
    Last Post: 20 Sep 2011, 03:35 PM
  3. Hide Zero Quantity Attributes with attribute-stock addon
    By leevil123 in forum All Other Contributions/Addons
    Replies: 1
    Last Post: 11 Feb 2010, 05:06 PM
  4. Replies: 4
    Last Post: 22 Jan 2010, 10:43 PM
  5. Price Products in the grid by 'Stock by Attribute' addon?
    By Salixia in forum Setting Up Categories, Products, Attributes
    Replies: 0
    Last Post: 27 Oct 2009, 06:03 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