Page 244 of 360 FirstFirst ... 144194234242243244245246254294344 ... LastLast
Results 2,431 to 2,440 of 3591
  1. #2431
    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 jnabird333 View Post
    I have isolated it to it taking into account the sale I have on the t-shirts. If I remove the sale, they display correctly. If I turn it back on, the additional amounts are there. Why is it figuring in the sale on the additional cost especially since it is a set amount off and not a set percentage?

    Quite honestly, when I try to read the php files, I get very confused trying to figure out where to make a change as I do not have line numbers on my page when I am editing.
    Btw, fwiw, the line numbers in such a situation can be found on github wthin the specific file. That's how I found them while I was using my cell phone to provide the response on the previous page.

    But, also suggest obtaining a text only editor to help you with such changes... There's a list of recommended applications in the FAQs, and I thought that the likes of notepad++ was still one of those. Last I knew it had line numbers and some basic context display (color changes based on what the code has in it). I could be wrong on that last part though. I have other IDE type tools that help me out in a jam if the code isn't nicely formatted for readability.
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  2. #2432
    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
    At "last" check, yes as I recall controls the overall usage not just in one place or another. But, with that in mind, one could either hard code replace the constant with a "false" or "true" for all cases, or as desired including adding one's own "on/off" switch...

    Here's my thoughts for the "settings". One for the Attributes.php file such that is possible to have in no particular order (off entirely, on always, on with the overall setting just discussed), then also to provide a "no-customer side" type option... Like said, doesn't help the customer to know some of that customid data, so may make sense for some to not have it displayed on the customer side except for packing slips that may be received, etc... Kind of a "side" issue versus say the email? Haven't really thought about how/when one would want to disable it, so open to suggestions, although again not trying to make this thing overly complicated or to have too many options that need to be "explained". :)
    Hmmm...I saw where the setting is used for populating the dropdowns, but just used the Key name to find it in Configuration => Stock => SBA Display Custom ID. Haven't traced it all the way through packing lists and invoices. I guess I'll do that.

    The customid and item number stood out as a blaringly obvious solution for our SKUs. I'm kind of surprised that you haven't had others trying the same thing. I agree that lots of settings with necessarily detailed explanations are hard to balance with all of the other needs for a module like this...The added fun is someone like me trying to balance rapid upgrades with minimum post-upgrade re-dos of hard coding changes like you're suggesting.

    ..If only there were a "perfect" way to build a module like this...

    I'll gladly tweak the order form to remove the customid from the dropdowns in our implementation. It just clutters the dropdown too much. The customid showing up on the shopping cart or invoice is not a problem either way (doesn't hurt, doesn't help), but is essential for us on packing slips. This way, we only need to propagate our update on a single file (from what it looks like).

  3. #2433
    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 michael_rebreathe View Post
    Hmmm...I saw where the setting is used for populating the dropdowns, but just used the Key name to find it in Configuration => Stock => SBA Display Custom ID. Haven't traced it all the way through packing lists and invoices. I guess I'll do that.

    The customid and item number stood out as a blaringly obvious solution for our SKUs. I'm kind of surprised that you haven't had others trying the same thing. I agree that lots of settings with necessarily detailed explanations are hard to balance with all of the other needs for a module like this...The added fun is someone like me trying to balance rapid upgrades with minimum post-upgrade re-dos of hard coding changes like you're suggesting.

    ..If only there were a "perfect" way to build a module like this...

    I'll gladly tweak the order form to remove the customid from the dropdowns in our implementation. It just clutters the dropdown too much. The customid showing up on the shopping cart or invoice is not a problem either way (doesn't hurt, doesn't help), but is essential for us on packing slips. This way, we only need to propagate our update on a single file (from what it looks like).
    Well, actually the initial intent as I've seen by potteryhouse and jeking was exactly to provide such a "model" number for each attribute variant. Some use it for things like Quickbooks or other financial software where it is needed to link uniquely to each "object". As to display/hide, well either they have accepted it to be present, modified it themselves, or hidden it to only be used by that other software.

    I was thinking though, that in the end it still could be helpful for the store owner and customer if the data remains present so that if there is any question about what is what, the customer has access to that information to make sure that both parties are speaking a "unique" language that ties items to each other. Means nothing to the "world" but can be very helpful in the "quick" call...

    I'm working on the quick mod for at least to remove from the attributes dropdown by admin option. For information, because of some other comments in other threads, I'm looking at applying the option into the configuration->attributes menu instead of being only associated with Stock or Dynamic Dropdowns.

    On another note, and this applies to anyone looking to use Dynamic Dropdowns (or almost any javascript), the page needs to validate properly before applying additional javascript. I say this from review of sites where there have been problems with the dynamic dropdowns display (multiple attributes).
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

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

    SQL Statement to install the new "feature" of controlling the display of CustomID on the attributes dropdown without using the Install/update option in the SBA install list. This will add the option to the end of the Attribute Settings Menu:

    Code:
    SELECT @sort_order := (c.sort_order + 1) FROM configuration c
                WHERE c.configuration_group_id = 13
                order by c.sort_order desc limit 1;
    
    INSERT INTO `configuration` (configuration_title, configuration_key, configuration_value, 
               configuration_description, configuration_group_id, sort_order, 
               date_added, use_function, set_function) 
               VALUES 
     ('SBA Display CustomID in Attribute Dropdowns', 'ATTRIBUTES_SBA_DISPLAY_CUSTOMID', '2', 
                'Display the CustomID in the Attribute Dropdown list(s) for the customer to see while selecting an option.<br /><br /> 0 - Hide the Custom ID<br /> 1 - Display the Custom ID depending on the setting for display throughout<br ?> 2 - Always display the Custom ID (default)<br />',
                13,@sort_order ,now(),null,'zen_cfg_select_drop_down(array(array(\'id\'=>\'0\', \'text\'=>\'Off\'), array(\'id\'=>\'1\', \'text''=>\'On Pending SBA Stock\'), array(\'id\'=>\'2\', \'text''=>\'Always On\'), ),');
    Deletion SQL if needed:
    Code:
    DELETE FROM `configuration` WHERE configuration_key = 'ATTRIBUTES_SBA_DISPLAY_CUSTOMID';
    Code will be incorporated into the plugin as well as a change of the default option for the HTML away from defaulting to true. That default will change in the future when Dynamic Dropdowns (or appropriate variation) does fully/sufficiently handles all of the basic types of option name.

    Code change needed in includes/classes/observers/class.products_with_attributes_stock.php:

    from line 163 through 184 inclusive changing (text to be changed is in red here):
    Code:
                      if (STOCK_SBA_DISPLAY_CUSTOMID == 'true' AND ! empty($products_options->fields['customid'])) {
                        $PWA_STOCK_QTY .= ' (' . $products_options->fields['customid'] . ') ';
                      }
                    }
                  } elseif (STOCK_SHOW_ATTRIB_LEVEL_STOCK == 'true' && $products_options->fields['pasqty'] < 1 && $products_options->fields['pasid'] < 1) {
                    //test, only applicable to products with-out the display-only attribute set
                    if ($products_options_DISPLAYONLY->fields['attributes_display_only'] < 1) {
                      //use the qty from the product, unless it is 0, then set to out of stock.
                      if ($this->_products_options_names_count <= 1) {
                        if ($products_options->fields['products_quantity'] > 0) {
                          $PWA_STOCK_QTY = PWA_STOCK_QTY . $products_options->fields['products_quantity'] . ' ';
                        } else {
                          $products_options->fields['products_options_values_name'] = $products_options->fields['products_options_values_name'] . PWA_OUT_OF_STOCK;
                        }
                      }
                      //show custom ID if flag set to true
                      if (STOCK_SBA_DISPLAY_CUSTOMID == 'true' AND ! empty($products_options->fields['customid'])) {
                        $PWA_STOCK_QTY .= ' (' . $products_options->fields['customid'] . ') ';
                      }
                    }
                  } elseif (STOCK_SBA_DISPLAY_CUSTOMID == 'true' AND ! empty($products_options->fields['customid'])) {
    To (replacing above red with below blue):
    Code:
                      if (!empty($products_options->fields['customid']) && (!defined('ATTRIBUTES_SBA_DISPLAY_CUSTOMID') || (STOCK_SBA_DISPLAY_CUSTOMID == 'true' && ATTRIBUTES_SBA_DISPLAY_CUSTOMID == '1') || ATTRIBUTES_SBA_DISPLAY_CUSTOMID == '2')) {
                        $PWA_STOCK_QTY .= ' (' . $products_options->fields['customid'] . ') ';
                      }
                    }
                  } elseif (STOCK_SHOW_ATTRIB_LEVEL_STOCK == 'true' && $products_options->fields['pasqty'] < 1 && $products_options->fields['pasid'] < 1) {
                    //test, only applicable to products with-out the display-only attribute set
                    if ($products_options_DISPLAYONLY->fields['attributes_display_only'] < 1) {
                      //use the qty from the product, unless it is 0, then set to out of stock.
                      if ($this->_products_options_names_count <= 1) {
                        if ($products_options->fields['products_quantity'] > 0) {
                          $PWA_STOCK_QTY = PWA_STOCK_QTY . $products_options->fields['products_quantity'] . ' ';
                        } else {
                          $products_options->fields['products_options_values_name'] = $products_options->fields['products_options_values_name'] . PWA_OUT_OF_STOCK;
                        }
                      }
    
                      //show custom ID if flag set to true
                      if (!empty($products_options->fields['customid']) && (!defined('ATTRIBUTES_SBA_DISPLAY_CUSTOMID') || (STOCK_SBA_DISPLAY_CUSTOMID == 'true' && ATTRIBUTES_SBA_DISPLAY_CUSTOMID == '1') || ATTRIBUTES_SBA_DISPLAY_CUSTOMID == '2')) {
                        $PWA_STOCK_QTY .= ' (' . $products_options->fields['customid'] . ') ';
                      }
                    }
                  } elseif (!empty($products_options->fields['customid']) && (!defined('ATTRIBUTES_SBA_DISPLAY_CUSTOMID') || (STOCK_SBA_DISPLAY_CUSTOMID == 'true' && ATTRIBUTES_SBA_DISPLAY_CUSTOMID == '1') || ATTRIBUTES_SBA_DISPLAY_CUSTOMID == '2')) {
    Now in testing this (which worked) I noticed that I may have left behind some errant code in the includes/functions/extra_functions/products_with_attributes.php file that cause an error... On lines 568 and 569 there is " . at the end of each that should be deleted (will be fixed momentarily on github). Also I hadn't incorporated the changes into the ZC 1.5.1 version of the plugin so need to do that as well... Anyways... Above should address the "concerns" expressed today by both michael_rebreathe and jnabird333...

    products_with_attributes.php
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  5. #2435
    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

    Another update pushed to github... Added the above code, corrected the above identified issue. Also in testing for the issue that jnabird333 is/was experiencing (outside of the lack of dynamic dropdowns displaying) discovered that there was some aspects of the data validation not performed for variants that are not listed in the SBA table but the product is tracked by SBA... (In other words for those conditions where say dynamic dropdowns is not functioning for multiple attribute product and therefore there is no "immediate"/"interactive" user notification of product availability. Instead, users adding product that meet that condition should immediately see the error message on the product page (at least with setup that don't go to the cart after adding product).

    Also updated the ZC 1.5.1 version of files as I hadn't gotten to that earlier.
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  6. #2436
    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

    My hubby assisted in fixing the pricing issue...had to turn off an option for those attributes. Now, still working on the dynamic dropdowns not displaying as intended and allowing out of stock items to be added to the cart without warning.

  7. #2437
    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 jnabird333 View Post
    My hubby assisted in fixing the pricing issue...had to turn off an option for those attributes. Now, still working on the dynamic dropdowns not displaying as intended and allowing out of stock items to be added to the cart without warning.
    Congrats on fixing that issue, mind sharing what was done so that others that experience the same issue can overcome it as well?
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

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

    Quote Originally Posted by mc12345678 View Post
    Congrats on fixing that issue, mind sharing what was done so that others that experience the same issue can overcome it as well?
    Under Catalog/Attributes Controller there is an option to "Apply discounts used by product Special/Sale: No or Yes" I had it marked as Yes and switched it to No. The additional charges disappeared.

  9. #2439
    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

    Quote Originally Posted by mc12345678 View Post
    Another update pushed to github... Added the above code, corrected the above identified issue. Also in testing for the issue that jnabird333 is/was experiencing (outside of the lack of dynamic dropdowns displaying) discovered that there was some aspects of the data validation not performed for variants that are not listed in the SBA table but the product is tracked by SBA... (In other words for those conditions where say dynamic dropdowns is not functioning for multiple attribute product and therefore there is no "immediate"/"interactive" user notification of product availability. Instead, users adding product that meet that condition should immediately see the error message on the product page (at least with setup that don't go to the cart after adding product).

    Also updated the ZC 1.5.1 version of files as I hadn't gotten to that earlier.

    What did you mean by this statement? Did you work this fix into the last update or are you still testing it?

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

    Quote Originally Posted by jnabird333 View Post
    My hubby assisted in fixing the pricing issue...had to turn off an option for those attributes. Now, still working on the dynamic dropdowns not displaying as intended and allowing out of stock items to be added to the cart without warning.
    Where does the quantity get checked for the attributes in SBA to show "out of stock"? What .php file controls this?

    While I am still setting up and testing, I have not gone through a test purchase to verify the correct product quantity goes down. (I buy 1 small blue t-shirt, then the small blue t-shirt product quantity in the SBA screen goes down.)

 

 

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