Page 261 of 360 FirstFirst ... 161211251259260261262263271311 ... LastLast
Results 2,601 to 2,610 of 3591
  1. #2601
    Join Date
    Jul 2012
    Posts
    16,798
    Plugin Contributions
    17

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

    Quote Originally Posted by stellarweb View Post
    I am having an issue that is making me pull my hair out! lol

    History... upgrading a 1.5.0 cart to 1.5.4
    Installed latest "combo" version of SBA from github and get an error in logs as follows when going to a product page - which is blank:

    [20-Aug-2016 13:21:11 America/New_York] PHP Parse error: syntax error, unexpected '[' in /home/elkkidsc/public_html/store2/includes/classes/observers/class.products_with_attributes_stock.php on line 671

    When I look at it in Dreamweaver it shows two lines as "red" indicating an error:
    Attachment 16599
    Typo:
    is_array
    Is a function, not an array. Therefore the first [ and last] should be replaced with their () equivalent.

    Line should read:
    Code:
     if (is_array($products[$i]['attributes'])) {
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  2. #2602
    Join Date
    May 2006
    Location
    Montana
    Posts
    291
    Plugin Contributions
    20

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

    Thanks - changing the coding in that file took the error away.... but for some reason the drop down attributes are not showing up on the product page. It just says "Please Choose" but doesn't show the attributes / name / value under it.

    Dev site is here:

    http://www.elkkids DOT com/store2/index.php?main_page=product_info&cPath=28_47&products_id=471

    compare to LIVE 1.5.0 site:
    http://www.elkkids DOT com/store/index.php?main_page=product_info&cPath=28_47&products_id=471

    Any ideas?

    BTW - I can get the 1.5.4 code from github to show the attributes .... but the problem is that it shows ALL of the attributes stock - even if there is zero stock for the option value. I was HOPING this newer "combo" code would rectify that. If not... then I can switch back to the 1.5.4 since I know it works and the combo one apparently isn't working.

    Quote Originally Posted by mc12345678 View Post
    Typo:
    is_array
    Is a function, not an array. Therefore the first [ and last] should be replaced with their () equivalent.

    Line should read:
    Code:
     if (is_array($products[$i]['attributes'])) {

  3. #2603
    Join Date
    Jul 2012
    Posts
    16,798
    Plugin Contributions
    17

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

    Quote Originally Posted by stellarweb View Post
    Thanks - changing the coding in that file took the error away.... but for some reason the drop down attributes are not showing up on the product page. It just says "Please Choose" but doesn't show the attributes / name / value under it.

    Dev site is here:

    http://www.elkkids DOT com/store2/index.php?main_page=product_info&cPath=28_47&products_id=471

    compare to LIVE 1.5.0 site:
    http://www.elkkids DOT com/store/index.php?main_page=product_info&cPath=28_47&products_id=471

    Any ideas?

    BTW - I can get the 1.5.4 code from github to show the attributes .... but the problem is that it shows ALL of the attributes stock - even if there is zero stock for the option value. I was HOPING this newer "combo" code would rectify that. If not... then I can switch back to the 1.5.4 since I know it works and the combo one apparently isn't working.
    Do other attribute types show?

    If so, then it would appear that the site is missing a few keys that would have been removed from sql code of other plugins. The install evolution should address/correct that issue. Other attribute types that would likely be affected would be text and file upload. Try a radio button and see if the attribute types come back. Should be able to provide the sql statement needed if the issue persists.

    Also, are these product in that category also already populated in SBA?
    Last edited by mc12345678; 20 Aug 2016 at 08:30 PM.
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  4. #2604
    Join Date
    Jul 2012
    Posts
    16,798
    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
    Typo:
    is_array
    Is a function, not an array. Therefore the first [ and last] should be replaced with their () equivalent.

    Line should read:
    Code:
     if (is_array($products[$i]['attributes'])) {
    I was trying to remember the brain twister that ends with something like, the light is green, what do you do at a stop light.

    Apparently at the time of writing that line, ithe code snippet ends with arry, and so I did what is done with arrays, used the square brackets...

    As seen above though and as I had locally corrected the code should use the parentheses to work as suggested/provided. I thought I had uploaded that fix, but apprently not.
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  5. #2605
    Join Date
    May 2006
    Location
    Montana
    Posts
    291
    Plugin Contributions
    20

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

    You are too funny!! lol

    Quote Originally Posted by mc12345678 View Post
    I was trying to remember the brain twister that ends with something like, the light is green, what do you do at a stop light.

    Apparently at the time of writing that line, ithe code snippet ends with arry, and so I did what is done with arrays, used the square brackets...

    As seen above though and as I had locally corrected the code should use the parentheses to work as suggested/provided. I thought I had uploaded that fix, but apprently not.

  6. #2606
    Join Date
    May 2006
    Location
    Montana
    Posts
    291
    Plugin Contributions
    20

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

    Changing it to checkbox makes the attributes show up.... but unfortunately ALL the option values show up..... not just the ones that are in stock for that item

    See this one:
    http://www.elkkids DOT com/store2/index.php?main_page=product_info&cPath=28_2&products_id=120

    Only one color is in stock.

    Name:  sba-stock.jpg
Views: 91
Size:  50.8 KB


    Quote Originally Posted by mc12345678 View Post
    Do other attribute types show?

    If so, then it would appear that the site is missing a few keys that would have been removed from sql code of other plugins. The install evolution should address/correct that issue. Other attribute types that would likely be affected would be text and file upload. Try a radio button and see if the attribute types come back. Should be able to provide the sql statement needed if the issue persists.

    Also, are these product in that category also already populated in SBA?

  7. #2607
    Join Date
    Jul 2012
    Posts
    16,798
    Plugin Contributions
    17

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

    Since other attribute types show on screen, but the classic dropdown doesn't, this seems to confirm my suspicions of a few keys being removed from the database which well... doesn't happen as much now-a-days and is reversed by installation of ZC 1.5.5 and/or running the install of this plugin.

    Doing so will/should execute the query(ies) below to restore the missing attribute types (any existing variants will remain untouched, but for now the SBA configuration settings will get reset to "factory default", then after the install, you will want to change the option name type to the added SBA basic/simple dropdown to get the desired results:
    Code:
    UPDATE configuration set configuration_group_id = 6 where configuration_key in 
    	('PRODUCTS_OPTIONS_TYPE_SELECT', 'UPLOAD_PREFIX', 'TEXT_PREFIX');
    	INSERT IGNORE INTO configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES ('Product option type Select', 'PRODUCTS_OPTIONS_TYPE_SELECT', '0', 'The number representing the Select type of product option.', 6, NULL, now(), now(), NULL, NULL);
    
    	INSERT IGNORE INTO configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES ('Upload prefix', 'UPLOAD_PREFIX', 'upload_', 'Prefix used to differentiate between upload options and other options', 6, NULL, now(), now(), NULL, NULL);
    	INSERT IGNORE INTO configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES ('Text prefix', 'TEXT_PREFIX', 'txt_', 'Prefix used to differentiate between text option values and other option values', 6, NULL, now(), now(), NULL, NULL);
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  8. #2608
    Join Date
    May 2006
    Location
    Montana
    Posts
    291
    Plugin Contributions
    20

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

    That did the trick Chad! Thanks so much!!

    Quote Originally Posted by mc12345678 View Post
    Since other attribute types show on screen, but the classic dropdown doesn't, this seems to confirm my suspicions of a few keys being removed from the database which well... doesn't happen as much now-a-days and is reversed by installation of ZC 1.5.5 and/or running the install of this plugin.

    Doing so will/should execute the query(ies) below to restore the missing attribute types (any existing variants will remain untouched, but for now the SBA configuration settings will get reset to "factory default", then after the install, you will want to change the option name type to the added SBA basic/simple dropdown to get the desired results:
    Code:
    UPDATE configuration set configuration_group_id = 6 where configuration_key in 
    	('PRODUCTS_OPTIONS_TYPE_SELECT', 'UPLOAD_PREFIX', 'TEXT_PREFIX');
    	INSERT IGNORE INTO configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES ('Product option type Select', 'PRODUCTS_OPTIONS_TYPE_SELECT', '0', 'The number representing the Select type of product option.', 6, NULL, now(), now(), NULL, NULL);
    
    	INSERT IGNORE INTO configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES ('Upload prefix', 'UPLOAD_PREFIX', 'upload_', 'Prefix used to differentiate between upload options and other options', 6, NULL, now(), now(), NULL, NULL);
    	INSERT IGNORE INTO configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES ('Text prefix', 'TEXT_PREFIX', 'txt_', 'Prefix used to differentiate between text option values and other option values', 6, NULL, now(), now(), NULL, NULL);

  9. #2609
    Join Date
    May 2006
    Location
    Montana
    Posts
    291
    Plugin Contributions
    20

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

    I feel like a beggar... lol but is there any way to get the "out of stock" attributes not to show up in the dropdown - like the older version of SBA used with 1.5.0?

    Quote Originally Posted by stellarweb View Post
    That did the trick Chad! Thanks so much!!

  10. #2610
    Join Date
    Nov 2007
    Location
    Sunny Coast, Australia
    Posts
    3,378
    Plugin Contributions
    9

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

    I am in the process of upgrading a site from ZC 1.3.9d to 1.5.5a. Because upgrades have not been done progressively (amongst other no,no,no's), I am now faced with making SBA workable on the updated site.

    Downloaded the latest version of SBA combined from Github.

    Question: How does the new installer supposed to be handled? I just see the file admin/stock_by_attr_install.php to effect this.

    Am I supposed to run the file stock_by_attr_install.php manually or what is the intention (can't find any updated documentation for this version on Github)?

    TIA / Frank

 

 

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