Page 250 of 357 FirstFirst ... 150200240248249250251252260300350 ... LastLast
Results 2,491 to 2,500 of 3564
  1. #2491
    Join Date
    Jul 2012
    Posts
    16,739
    Plugin Contributions
    17

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

    Quote Originally Posted by ivopivo View Post
    I had the exact same error as below. I made the changes outlined, and now it is showing a different error, when viewing the order in orders.php (admin panel)

    From error log,



    When viewing the order in orders.php (admin panel) it shows,



    Would you have any idea what might be the cause? Thanks

    Would be very helpful to have additional information.
    1) ZC version.
    2) Source of the SBA files (and possibly when they were downloaded).
    3) The product in question, is it tracked by SBA?
    4) If it is, how is/are the associated variants populated?
    5) How many option names are associated with the product?
    6) What type of option name(s) are they? (ie. read only, radio, etc...)

    In just looking at the code and the above error message(s), it may be that a variable falls out of scope which is why the empty (), but that also depends on some of the above. I do note that a similar function is in the store side of the fileset and the particular area that is causing that problem in the admin where it starts with an if statement to the end of that if statement is in the admin only side. Makes me somewhat wonder if it is even necessary, but it got added in at some point and with purpose, so would rather make it work than make it go away. :)
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  2. #2492
    Join Date
    Jul 2012
    Posts
    16,739
    Plugin Contributions
    17

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

    Still be nice to get the above requested information in case there is something else that needs to be addressed; however, please also see the proposed "fix" posted here.
    If that works, it would be great to know. :) Again, difficult thing here is being able to reproduce the problem which can pretty much only do with sufficient information being provided.
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  3. #2493
    Join Date
    Apr 2016
    Posts
    18
    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
    Would be very helpful to have additional information.
    1) ZC version.
    2) Source of the SBA files (and possibly when they were downloaded).
    3) The product in question, is it tracked by SBA?
    4) If it is, how is/are the associated variants populated?
    5) How many option names are associated with the product?
    6) What type of option name(s) are they? (ie. read only, radio, etc...)

    In just looking at the code and the above error message(s), it may be that a variable falls out of scope which is why the empty (), but that also depends on some of the above. I do note that a similar function is in the store side of the fileset and the particular area that is causing that problem in the admin where it starts with an if statement to the end of that if statement is in the admin only side. Makes me somewhat wonder if it is even necessary, but it got added in at some point and with purpose, so would rather make it work than make it go away. :)
    Hello, thank you for the prompt reply!

    1) ZC Version: v1.5.4

    2) Source of the SBA files: Version: 1.5.3 from pottery house, downloaded here - https://www.zen-cart.com/downloads.php?do=file&id=202

    3) The product in question, is it tracked by SBA? Yes (no custom id, sort order or description set)

    4) If it is, how is/are the associated variants populated? There is an option for colour (radio) with only one option that is selected by default. The other option is for size and there are 6 choices in drop-down format.

    5) How many option names are associated with the product? 2

    6) What type of option name(s) are they? Radio and drop-down

    Its ironic that no errors are generated from the store-side and the flow is seamless, however, it is causing issues when trying to view the order/make updates to it in the admin section.

    The rest of the process works fine. The purchased stock is correctly deducted by SBA, etc.

    Thanks again.

  4. #2494
    Join Date
    Jul 2012
    Posts
    16,739
    Plugin Contributions
    17

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

    Quote Originally Posted by ivopivo View Post
    Hello, thank you for the prompt reply!

    1) ZC Version: v1.5.4

    2) Source of the SBA files: Version: 1.5.3 from pottery house, downloaded here - https://www.zen-cart.com/downloads.php?do=file&id=202

    3) The product in question, is it tracked by SBA? Yes (no custom id, sort order or description set)

    4) If it is, how is/are the associated variants populated? There is an option for colour (radio) with only one option that is selected by default. The other option is for size and there are 6 choices in drop-down format.

    5) How many option names are associated with the product? 2

    6) What type of option name(s) are they? Radio and drop-down

    Its ironic that no errors are generated from the store-side and the flow is seamless, however, it is causing issues when trying to view the order/make updates to it in the admin section.

    The rest of the process works fine. The purchased stock is correctly deducted by SBA, etc.

    Thanks again.
    Thank you for those answers. Item 4 could use some clarification, by variant I am referring to how information is populated in the admin under the catalog drop down and data entry for SBA. Do you have 6 lines of items each with a stock quantity where each row shows like: colour followed by size "1", colour followed by size "2", colour followed by size "3", etc... or do you have one entry with colour and six entries one for each size?

    Also, if using ZC 1.5.4, the version currently available for download from this site is technically for ZC 1.5.1 and hasn't been updated (that I'm aware of) with the changes that have been ongoing on github (https://github.com/mc12345678/Stock_...butes_Combined).

    Lastly, based on the provided information the change that I made to the code and linked above is not expected to correct your issue. The change I made was based on the "notes" that I left at the bottom of that previous post and were to exit out of the customid "loop" if the product was not tracked by SBA, but had attributes. Still might be back to the "out-of-scope" variable... Let me know if you did/did not apply the previous patch so that I can give line numbers appropriately to try something.
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  5. #2495
    Join Date
    Apr 2016
    Posts
    18
    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
    Thank you for those answers. Item 4 could use some clarification, by variant I am referring to how information is populated in the admin under the catalog drop down and data entry for SBA. Do you have 6 lines of items each with a stock quantity where each row shows like: colour followed by size "1", colour followed by size "2", colour followed by size "3", etc... or do you have one entry with colour and six entries one for each size?
    I have attached a screenshot to provide more clarity. (easier than my attempts at explaining)



    Quote Originally Posted by mc12345678 View Post
    Also, if using ZC 1.5.4, the version currently available for download from this site is technically for ZC 1.5.1 and hasn't been updated (that I'm aware of) with the changes that have been ongoing on github (https://github.com/mc12345678/Stock_...butes_Combined).
    Actually, upon second look, I installed it from a zip file titled "Stock_By_Attributes_Combined-master.zip". The stock by attributes file has * Stock by Attributes 1.5.4 15-11-14 mc12345678 in the opening.

    Quote Originally Posted by mc12345678 View Post
    Lastly, based on the provided information the change that I made to the code and linked above is not expected to correct your issue. The change I made was based on the "notes" that I left at the bottom of that previous post and were to exit out of the customid "loop" if the product was not tracked by SBA, but had attributes. Still might be back to the "out-of-scope" variable... Let me know if you did/did not apply the previous patch so that I can give line numbers appropriately to try something.
    I have restored the original file (without the changes from the bottom of the post). Thanks

  6. #2496
    Join Date
    Jul 2012
    Posts
    16,739
    Plugin Contributions
    17

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

    Quote Originally Posted by ivopivo View Post
    I have attached a screenshot to provide more clarity. (easier than my attempts at explaining)





    Actually, upon second look, I installed it from a zip file titled "Stock_By_Attributes_Combined-master.zip". The stock by attributes file has * Stock by Attributes 1.5.4 15-11-14 mc12345678 in the opening.



    I have restored the original file (without the changes from the bottom of the post). Thanks
    Okay, and in a way good... Hmm.. Two options of potential solutions... Based on no customid being defined, I'm thinking the query may be returning nothing when asking for the customid on the product because no customid is defined, the other is the potential out-of-scope issue...

    So first to try to address the potential out-of-scope variable... At line 727 of admin/includes/classes/products_with_attributes_stock.php, please add:
    Code:
    $stock_attributes_comb = null;
    This would be just below:
    Code:
    $products_id = zen_get_prid($products_id);
    Clear your cache/logout of the admin screen then return to the order and see if the error remains.

    Okay I should have posted this a while back when I first wrote it, but I wanted an opportunity to run some of the code basically through some sql tests to see if there was an issue with the sql queries specifically, but have again come back to the fact that $stock_attributes_comb is "empty" within the second query loop... One way around that is to join the values differently so that worst case there would be a series of values like ("","") but ultimately that shouldn't even happen either, because $stock_attributes_comb ought to have values in it if the product 1) has attributes (obviously it does) and 2) is tracked by SBA... So, try the above first and then I may have to modify how the check is done, but that also seems like it will not return any values...
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  7. #2497
    Join Date
    Apr 2016
    Posts
    18
    Plugin Contributions
    0

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

    Cheers for the help.

    Tried the changes, the same error remains in the admin section. Log below:

    [26-Apr-2016 23:03:45 UTC] PHP Warning: implode(): Invalid arguments passed in products_with_attributes_stock.php on line 781
    [26-Apr-2016 23:03:45 UTC] PHP Fatal error: 1064:You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')' at line 4 :: select customid as products_model
    from products_with_attributes_stock
    where products_id = 334
    and stock_attributes in () ==> (as called by)
    products_with_attributes_stock.php on line 804 <== in query_factory.php on line 155
    Contents of my products_with_attributes_stock.php - http://paste.ofcode.org/i2gJ2XegqNfZaMVXgNw2dW

  8. #2498
    Join Date
    Jul 2012
    Posts
    16,739
    Plugin Contributions
    17

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

    Now, I just tried in ZC 1.5.5 to purchase a product that has two option names (each having more than one option value), no customid assigned to the product, I have the admin set to display customid, and when I go to the admin customers->orders page, I am not having a problem with the "customid" and my store's files are the same as what has been uploaded to github as the current version (where version control/documentation hasn't been the best). Almost better off basing the date of the fileset on the date of the download. :) I have a 1.5.4 and 1.5.3 store with it installed at some level, but don't see how that part of the versioning plays a factor. The 1.5.5 fileset was basically made from the 1.5.4 and 1.5.3 set and then trimmed back based on changes made to ZC that made incorporation of this plugin easier/better. So, thing is I haven't yet been able to re-duplicate this issue after the post from this January.

    Is the purchased item in some way at the beginning or end of the listings for that product?

    I'm grasping at straws (assuming that your fileset is up-to-date with the current file set) because I don't yet (again?) know what conditions are fully causing this. May have to ask for some additional testing if the above doesn't work. If this is causing a problem to be able to do what you need, I can provide direction about how to comment out that section that is causing the problem. Considering you are using combined option names, it wouldn't pose a problem for your store when using multiple option name or single option name product.
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  9. #2499
    Join Date
    Apr 2016
    Posts
    18
    Plugin Contributions
    0

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

    Upon further testing, It is happening to every single product that is SBA tracked. If the product isn't SBA tracked, there is no issue at all (displays perfectly fine).

    When viewing customers -> orders in the admin panel, the products will display in the panel to right correctly without any error.

    The error only appeals in the sections like "Display order details", "Display invoice", etc.

    I have checked the files that I used from the master zip, It was installed in the last 2 months - I don't think there were any changes?

  10. #2500
    Join Date
    Jul 2012
    Posts
    16,739
    Plugin Contributions
    17

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

    Quote Originally Posted by ivopivo View Post
    Upon further testing, It is happening to every single product that is SBA tracked. If the product isn't SBA tracked, there is no issue at all (displays perfectly fine).

    When viewing customers -> orders in the admin panel, the products will display in the panel to right correctly without any error.

    The error only appeals in the sections like "Display order details", "Display invoice", etc.

    I have checked the files that I used from the master zip, It was installed in the last 2 months - I don't think there were any changes?
    Would have to look at the commit history to identify changes. What if you applied a customid to eitherone of the purchased product or just any at all? I've made some changes to other aspects like supporting the product attribute grid plugin, but also work on a number of other things and cannot recall specifics
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

 

 

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