Page 291 of 360 FirstFirst ... 191241281289290291292293301341 ... LastLast
Results 2,901 to 2,910 of 3591
  1. #2901
    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
    @madshaun1984, et al...

    Ok, figured out what's going on.

    There were two things, one was the additional encoding that caused £ to become $amp;pound; in the txtXXX section (should be addressed by the above change(s) though processing of the code may make that change unnecessary), the other is/was that when selecting a "parent" option, the child select options are added by pushing the content to the option list. This push (creating a new option) though populated the text of the option not the html of the option. I.e put £ directly in the output text instead of the more "inner" html. So, while this was tested for the change identified at line 1053 below it has not been tested in absence of the previously posed changes or other similar changes that I made on my test server. I do think the below changes would address the wrongful display of £ instead of £.

    I'm providing line numbers here working from the "bottom" to the "top" so that as each change is made the identified line numbers will still line up with the content on github at the moment (haven't pushed an update, just realized what needed to be done and proved that at least adding the change to line 1053 worked, though had also made some other changes as well that need to be validated as unnecessary.)

    Between lines 1091 and 1092 having this content:
    Code:
              $out.='), opt.substring(1));' . "\n";
              if ((STOCK_ALLOW_CHECKOUT == 'false' && ($curattr == count($attributes) - 2)) || PRODINFO_ATTRIBUTE_NO_ADD_OUT_OF_STOCK == 'True') {
    Modify it to look like the below:
    Code:
              $out.='), opt.substring(1));' . "\n";
              $out.='                        frm["id[' . $attributes[$nextattr]['oid'] . ']"].options[frm["id[' . $attributes[$nextattr]['oid'] . ']"].length - 1].innerHTML = frm["id[' . $attributes[$nextattr]['oid'] . ']"].options[frm["id[' . $attributes[$nextattr]['oid'] . ']"].length - 1].text;' . "\n";
              if ((STOCK_ALLOW_CHECKOUT == 'false' && ($curattr == count($attributes) - 2)) || PRODINFO_ATTRIBUTE_NO_ADD_OUT_OF_STOCK == 'True') {
    and then again between lines 1066 and 1067 having this content:
    Code:
              $out.='), opt.substring(1));' . "\n";
              if ((STOCK_ALLOW_CHECKOUT == 'false' && ($curattr == count($attributes) - 2)) || PRODINFO_ATTRIBUTE_NO_ADD_OUT_OF_STOCK == 'True') {
    Modify it to look like:
    Code:
              $out.='), opt.substring(1));' . "\n";
              $out.='                            frm["id[' . $attributes[$nextattr]['oid'] . ']"].options[frm["id[' . $attributes[$nextattr]['oid'] . ']"].length - 1].innerHTML = frm["id[' . $attributes[$nextattr]['oid'] . ']"].options[frm["id[' . $attributes[$nextattr]['oid'] . ']"].length - 1].text;' . "\n";
              if ((STOCK_ALLOW_CHECKOUT == 'false' && ($curattr == count($attributes) - 2)) || PRODINFO_ATTRIBUTE_NO_ADD_OUT_OF_STOCK == 'True') {
    Between Lines 1052 and 1053 having this content:
    Code:
            $out.=', opt.substring(1));' . "\n";
            $out.='                        }';
    have it look like the following:
    Code:
            $out.=', opt.substring(1));' . "\n";
            $out.='                            frm["id[' . $attributes[$nextattr]['oid'] . ']"].options[frm["id[' . $attributes[$nextattr]['oid'] . ']"].length - 1].innerHTML = frm["id[' . $attributes[$nextattr]['oid'] . ']"].options[frm["id[' . $attributes[$nextattr]['oid'] . ']"].length - 1].text;' . "\n";
            $out.='                        }';
    Apparently my initial testing with the above change(s) was with a product condition that was incorrect. The testing involved a product that had prices in the first attribute (drawn by a different process) and not with a product that had attributes with prices in the second or subsequent attributes (option names). After testing with such a product the following was identified that corrected the reported issue (basically the array key addressing the "length" of the array should have had a '- 1' (in blue) in it in all cases.) Therefore, the following is recommended (and identified as functional):
    Between lines 1091 and 1092 having this content:
    Code:
              $out.='), opt.substring(1));' . "\n";
              if ((STOCK_ALLOW_CHECKOUT == 'false' && ($curattr ==  count($attributes) - 2)) || PRODINFO_ATTRIBUTE_NO_ADD_OUT_OF_STOCK ==  'True') {
    Modify it to look like the below:
    Code:
              $out.='), opt.substring(1));' . "\n";
              $out.='                        frm["id['  . $attributes[$nextattr]['oid'] . ']"].options[frm["id[' .  $attributes[$nextattr]['oid'] . ']"].length - 1].innerHTML = frm["id[' .  $attributes[$nextattr]['oid'] . ']"].options[frm["id[' .  $attributes[$nextattr]['oid'] . ']"].length - 1].text;' . "\n";
              if ((STOCK_ALLOW_CHECKOUT == 'false' && ($curattr ==  count($attributes) - 2)) || PRODINFO_ATTRIBUTE_NO_ADD_OUT_OF_STOCK ==  'True') {
    and then again between lines 1066 and 1067 having this content:
    Code:
              $out.='), opt.substring(1));' . "\n";
              if ((STOCK_ALLOW_CHECKOUT == 'false' && ($curattr ==  count($attributes) - 2)) || PRODINFO_ATTRIBUTE_NO_ADD_OUT_OF_STOCK ==  'True') {
    Modify it to look like:
    Code:
              $out.='), opt.substring(1));' . "\n";
              $out.='                             frm["id[' . $attributes[$nextattr]['oid'] . ']"].options[frm["id[' .  $attributes[$nextattr]['oid'] . ']"].length - 1].innerHTML = frm["id[' .  $attributes[$nextattr]['oid'] . ']"].options[frm["id[' .  $attributes[$nextattr]['oid'] . ']"].length - 1].text;' . "\n";
              if ((STOCK_ALLOW_CHECKOUT == 'false' && ($curattr ==  count($attributes) - 2)) || PRODINFO_ATTRIBUTE_NO_ADD_OUT_OF_STOCK ==  'True') {
    Between Lines 1052 and 1053 having this content:
    Code:
            $out.=', opt.substring(1));' . "\n";
            $out.='                        }';
    have it look like the following:
    Code:
            $out.=', opt.substring(1));' . "\n";
            $out.='                             frm["id[' . $attributes[$nextattr]['oid'] . ']"].options[frm["id[' .  $attributes[$nextattr]['oid'] . ']"].length - 1].innerHTML = frm["id[' .  $attributes[$nextattr]['oid'] . ']"].options[frm["id[' .  $attributes[$nextattr]['oid'] . ']"].length - 1].text;' . "\n";
            $out.='                        }';
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  2. #2902
    Join Date
    Feb 2018
    Posts
    19
    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
    Apparently my initial testing with the above change(s) was with a product condition that was incorrect. The testing involved a product that had prices in the first attribute (drawn by a different process) and not with a product that had attributes with prices in the second or subsequent attributes (option names). After testing with such a product the following was identified that corrected the reported issue (basically the array key addressing the "length" of the array should have had a '- 1' (in blue) in it in all cases.) Therefore, the following is recommended (and identified as functional):
    Between lines 1091 and 1092 having this content:
    Code:
              $out.='), opt.substring(1));' . "\n";
              if ((STOCK_ALLOW_CHECKOUT == 'false' && ($curattr ==  count($attributes) - 2)) || PRODINFO_ATTRIBUTE_NO_ADD_OUT_OF_STOCK ==  'True') {
    Modify it to look like the below:
    Code:
              $out.='), opt.substring(1));' . "\n";
              $out.='                        frm["id['  . $attributes[$nextattr]['oid'] . ']"].options[frm["id[' .  $attributes[$nextattr]['oid'] . ']"].length - 1].innerHTML = frm["id[' .  $attributes[$nextattr]['oid'] . ']"].options[frm["id[' .  $attributes[$nextattr]['oid'] . ']"].length - 1].text;' . "\n";
              if ((STOCK_ALLOW_CHECKOUT == 'false' && ($curattr ==  count($attributes) - 2)) || PRODINFO_ATTRIBUTE_NO_ADD_OUT_OF_STOCK ==  'True') {
    and then again between lines 1066 and 1067 having this content:
    Code:
              $out.='), opt.substring(1));' . "\n";
              if ((STOCK_ALLOW_CHECKOUT == 'false' && ($curattr ==  count($attributes) - 2)) || PRODINFO_ATTRIBUTE_NO_ADD_OUT_OF_STOCK ==  'True') {
    Modify it to look like:
    Code:
              $out.='), opt.substring(1));' . "\n";
              $out.='                             frm["id[' . $attributes[$nextattr]['oid'] . ']"].options[frm["id[' .  $attributes[$nextattr]['oid'] . ']"].length - 1].innerHTML = frm["id[' .  $attributes[$nextattr]['oid'] . ']"].options[frm["id[' .  $attributes[$nextattr]['oid'] . ']"].length - 1].text;' . "\n";
              if ((STOCK_ALLOW_CHECKOUT == 'false' && ($curattr ==  count($attributes) - 2)) || PRODINFO_ATTRIBUTE_NO_ADD_OUT_OF_STOCK ==  'True') {
    Between Lines 1052 and 1053 having this content:
    Code:
            $out.=', opt.substring(1));' . "\n";
            $out.='                        }';
    have it look like the following:
    Code:
            $out.=', opt.substring(1));' . "\n";
            $out.='                             frm["id[' . $attributes[$nextattr]['oid'] . ']"].options[frm["id[' .  $attributes[$nextattr]['oid'] . ']"].length - 1].innerHTML = frm["id[' .  $attributes[$nextattr]['oid'] . ']"].options[frm["id[' .  $attributes[$nextattr]['oid'] . ']"].length - 1].text;' . "\n";
            $out.='                        }';
    The lines didn't quite match up in the file on my server with those you specified, but once the lines had been found and edited, the drop down started working as expected immediately.

    I haven't seen any debug logs generated since, so hopefully that will be that!

    Thanks for the support on this! Much appreciated :)

  3. #2903
    Join Date
    Feb 2006
    Location
    NM
    Posts
    750
    Plugin Contributions
    1

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

    Test site for 1.5.5f on Linux
    I have latest SBA Combined from Github and Edit Orders installed. Stock seems to work fine unless I use Edit Orders to change a quantity of any item. The attributes disappear from the entire order in any further view of the order. The attributes disappear also from the invoice and the packing slip. I have a screen shot I will try and attach. Name:  editorderexample.jpg
Views: 217
Size:  121.3 KB

  4. #2904
    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

    What version of Edit Orders is being used?
    Was product that was edited one tracked by SBA?
    What of the other product were tracked by SBA?

    When the feature was added such changes in quantity were tested for both SBA product as well as not and combinations including product being first in the list, middle and last, increase and decrease of product quantity.
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  5. #2905
    Join Date
    Feb 2006
    Location
    NM
    Posts
    750
    Plugin Contributions
    1

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

    Quote Originally Posted by mc12345678 View Post
    What version of Edit Orders is being used?
    Was product that was edited one tracked by SBA?
    What of the other product were tracked by SBA?

    When the feature was added such changes in quantity were tested for both SBA product as well as not and combinations including product being first in the list, middle and last, increase and decrease of product quantity.
    The vesion: Edit Orders v4.x for Zen Cart 1.5.x
    I just went into edit an order with Edit Orders with several products, some with attributes and some without, and changed the color only of one product in the middle of the list. Pushed the update button and all attributes for all products in the order disappeared.

    However: when I then, edit the same order with Edit Orders, to add an item with attributes it works and the item with attribute for that item shows up in the order and the math is corrected in the order total. If you can help me get this site up... been working on it too long now... I would employ you to do so. PM me.

  6. #2906
    Join Date
    Feb 2006
    Location
    NM
    Posts
    750
    Plugin Contributions
    1

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

    SBA is tracking the stock. It will not let me add things that are out of stock through EditOrders. It does let me know that items were not updated because their attributes do not exist... since those attributes were eliminated in the previous test update; but it keeps the item in the order even though there is no attribute specified as required in the normal ordering process.

  7. #2907
    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 athena View Post
    SBA is tracking the stock. It will not let me add things that are out of stock through EditOrders. It does let me know that items were not updated because their attributes do not exist... since those attributes were eliminated in the previous test update; but it keeps the item in the order even though there is no attribute specified as required in the normal ordering process.
    Want to confirm. The product identified above that is shown as three different line items, that is a product tracked by SBA?
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  8. #2908
    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

    @athena, looks to me like there has been a change to edit orders that has caused this issue... Disabling the SBA portion of the code, a product/screen that is updated by selecting the update button has the attributes stripped from it... Still trying to work through that issue regardless.
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  9. #2909
    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
    @athena, looks to me like there has been a change to edit orders that has caused this issue... Disabling the SBA portion of the code, a product/screen that is updated by selecting the update button has the attributes stripped from it... Still trying to work through that issue regardless.
    Forgot to mention how to "disable the SBA portion". Renaming the file admin/includes/auto_loaders/config.eo_sba.php to have an extension other than .php ie: config.eo_sba.php.txt will prevent it from loading, without it loading, then the code related to SBA does not run when using edit orders. At least on the configuration I was running I had the same issue as described above where attributes of an existing product were stripped when selecting the update button from the edit orders screen. I didn't try modifying one of the attributes even or the quantity, just simply pressing the update button was enough to cause the issue.
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  10. #2910
    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

    The above issue has been confirmed as being a result of a minor bug in Edit Orders version 4.3.1 and is to be corrected in the next release. The fix is posted here in the edit orders thread.
    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