Page 312 of 356 FirstFirst ... 212262302310311312313314322 ... LastLast
Results 3,111 to 3,120 of 3558
  1. #3111
    Join Date
    Jul 2012
    Posts
    16,732
    Plugin Contributions
    17

    Default Re: Stock by Attribute v4.0 addon for v1.5.0-1.5.6

    Quote Originally Posted by GoldBuckle View Post
    I was referred here from the Easy Populate thread. I am looking for a plugin that will allow an attribute to be toggled on or off based on the selection of a previous attribute. Is this plugin capable of doing this? Also, I noticed that this is for versions 1.3.5 to 1.3.9. Is it safe to use with the current versions 1.5.4 to 1.5.6c?
    The thread title (until this particular post) has not really been updated over the years; however, generally speaking the software seems to have originated along this path of the original postings.

    The version of the software available from github has not been uploaded to the ZC plugin section because the documentation to properly identify all of the capability has not been completed. It's ability exceeds any previous documentation for the use of SBA.

    In relation to your question of operability, the github version does work in ZC 1.5.x. Please see previous postings about installation, but it is the main file folders (includes and admin) with associated merging/template placement and then installation of the file(s) from the ZC version associated with the store in question. (there is no need to install an older version then next version than next situation).

    Once installed, you identify the combination of attributes that are considered in stock and based on the option name sequence for the attributes, selection of the first option name will identify what is in stock, if any, of the attributes in the next option name. There are postings not so long ago about populating attributes that are not stock based such as a gift wrap option or other uses as otherwise described. The default settings for installation support the maximum flexibility of usage. There are other configuration changes that can be made, but those have remained available because of the history of the overall software and some of the flexibility that is available when using those features.

    Anyways, yes this software can offer/show the availability of an option value within an option name based on the selection of a previous option value within an option name. This is done through javascript primarily, so please be sure that your associated page(s) html validate before going to install this and troubleshoot why something may not work as expected.
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  2. #3112
    Join Date
    Sep 2005
    Location
    Waikato, New Zealand
    Posts
    1,539
    Plugin Contributions
    3

    Default Re: Stock by Attribute v4.0 addon for v1.5.0-1.5.6

    Zencart 1.5.1
    Stock By Attributes 1.5.2

    I haven't used Zencart in Years but a client has sold a site and the new owner wants help
    Existing Products with attributes are working and adding to the cart ok
    However I cannot for the life of me seem to get a new product with attributes to add to the cart and not be out of stock, I have set stock quantities for the various variants but they are being marked as out of stock when added to the cart, and yes each variant has 100 units sets
    Webzings Design
    Semi retired from Web Design

  3. #3113
    Join Date
    Jul 2012
    Posts
    16,732
    Plugin Contributions
    17

    Default Re: Stock by Attribute v4.0 addon for v1.5.0-1.5.6

    Quote Originally Posted by nigelt74 View Post
    Zencart 1.5.1
    Stock By Attributes 1.5.2

    I haven't used Zencart in Years but a client has sold a site and the new owner wants help
    Existing Products with attributes are working and adding to the cart ok
    However I cannot for the life of me seem to get a new product with attributes to add to the cart and not be out of stock, I have set stock quantities for the various variants but they are being marked as out of stock when added to the cart, and yes each variant has 100 units sets
    Although I would still recommend upgrading (both the Zen Cart version and the supporting software) I would at least recommend upgrading the SBA software.

    While I believe the "time" since making changes issue brought this to mind, may I suggest taking a look at the sequence of the option values and corresponding option name's attribute value for variants known to work against those found to be out-of-stock.

    Previously the sequence of those attributes had to be set/reset after generation so that they would work properly. The more recent version doesn't get hung up with that and offers some additional options. Available: https://github.com/mc12345678/Stock_...butes_Combined
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  4. #3114
    Join Date
    Sep 2005
    Location
    Waikato, New Zealand
    Posts
    1,539
    Plugin Contributions
    3

    Default Re: Stock by Attribute v4.0 addon for v1.5.0-1.5.6

    Quote Originally Posted by mc12345678 View Post
    Although I would still recommend upgrading (both the Zen Cart version and the supporting software) I would at least recommend upgrading the SBA software.

    While I believe the "time" since making changes issue brought this to mind, may I suggest taking a look at the sequence of the option values and corresponding option name's attribute value for variants known to work against those found to be out-of-stock.

    Previously the sequence of those attributes had to be set/reset after generation so that they would work properly. The more recent version doesn't get hung up with that and offers some additional options. Available: https://github.com/mc12345678/Stock_...butes_Combined
    Can you elaborate or point me to a post that explains the set/reset after generation bit, as for the life of me, no matter what i do it doesn't seem to work, and i have looked at the existing working ones and new ones and I cannot see a difference.

    I will see if I can get them to upgrade these bits,
    Webzings Design
    Semi retired from Web Design

  5. #3115
    Join Date
    Jul 2012
    Posts
    16,732
    Plugin Contributions
    17

    Default Re: Stock by Attribute v4.0 addon for v1.5.0-1.5.6

    Quote Originally Posted by nigelt74 View Post
    Can you elaborate or point me to a post that explains the set/reset after generation bit, as for the life of me, no matter what i do it doesn't seem to work, and i have looked at the existing working ones and new ones and I cannot see a difference.

    I will see if I can get them to upgrade these bits,
    Sorry to sound like (and possibly be) a jerk, but that in a way is like asking you what color of shoe string your shoes had when you were 8 years old on the first Saturday of the 3rd month of the year. I say that because it was this "criteria" that I rewrote the storage/retrieval code to have a consistency rather than to depend on "luck". As I seem to recall, the older system (well older than a year ago and considering reference to 1.5.2 which was also I believe before I got involved specifically.) generated the comma separated list of attribute_ids numerically sorted, but only "respected" or displayed the information if the option name/value pair was also in some sort of numerical order relative to other characteristics. It was some "twisted" not considered condition that most worked around by adding attributes to product in a very specific order or after generating a variant had to swap values around in the database.

    It was a lot of unnecessary work and nonsense. Further as far as pointing to a specific post, well this software has had something like 4 other variants generated not to include commercial offshoots. I've been doing Zen Cart work for about 7 years now and this particular module is something I felt like needed development from day one. It's still a work in progress in my opinion, but has come a long ways from its early days. I want to get rid of a few file merges, improve on the information display in the admin manager controller, complete instructions that at least hint at what is really possible, and even add an additional stock feature that would allow an attribute to have stock shared among all product that use that attribute (structure is there, just have to adopt it).
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  6. #3116
    Join Date
    Sep 2005
    Location
    Waikato, New Zealand
    Posts
    1,539
    Plugin Contributions
    3

    Default Re: Stock by Attribute v4.0 addon for v1.5.0-1.5.6

    Quote Originally Posted by mc12345678 View Post
    but that in a way is like asking you what color of shoe string your shoes had when you were 8 years old on the first Saturday of the 3rd month of the year.
    Finally a Question i can actually answer, they were white, as I had the coolest shoes around "Bata Bullets".

    Anyway i figured it out, and it is a convoluted way of doing it, (not logical to my way of thinking)and i will see if i can get them to upgrade at least that part
    Webzings Design
    Semi retired from Web Design

  7. #3117
    Join Date
    Nov 2005
    Location
    France
    Posts
    577
    Plugin Contributions
    8

    Default Re: Stock by Attribute v4.0 addon for v1.5.0-1.5.6

    I'm getting the following Warning when I use this module with PHP7.3
    Use of undefined constant PRODUCTS_OPTIONS_TYPE_SELECT_SBA
    The warning relates to /includes/classes/observers/class.products_with_attributes_stock.php on line 264

    On a standard define, i would have done something like

    if (!defined('PRODUCTS_OPTIONS_TYPE_SELECT_SBA')) {
    define('PRODUCTS_OPTIONS_TYPE_SELECT_SBA', '6');
    }

    but, PRODUCTS_OPTIONS_TYPE_SELECT_SBA is a database stored configuration value, so how do I add a !defined line to cover this?

    I'm also getting the same warning for PRODINFO_ATTRIBUTE_DYNAMIC_STATUS on line 439
    Last edited by strelitzia; 24 Sep 2019 at 12:56 AM.

  8. #3118
    Join Date
    Jul 2012
    Posts
    16,732
    Plugin Contributions
    17

    Default Re: Stock by Attribute v4.0 addon for v1.5.0-1.5.6

    Quote Originally Posted by strelitzia View Post
    I'm getting the following Warning when I use this module with PHP7.3
    Use of undefined constant PRODUCTS_OPTIONS_TYPE_SELECT_SBA
    The warning relates to /includes/classes/observers/class.products_with_attributes_stock.php on line 264

    On a standard define, i would have done something like

    if (!defined('PRODUCTS_OPTIONS_TYPE_SELECT_SBA')) {
    define('PRODUCTS_OPTIONS_TYPE_SELECT_SBA', '6');
    }

    but, PRODUCTS_OPTIONS_TYPE_SELECT_SBA is a database stored configuration value, so how do I add a !defined line to cover this?

    I'm also getting the same warning for PRODINFO_ATTRIBUTE_DYNAMIC_STATUS on line 439
    Questions I have are during what operation is this occurring? What plugins are installed? Why is the includes/modules/YOUR_TEMPLATE/attributes.php file and/or the observer loaded before the database is loaded? Has the installation process been performed or is the software in place without executing the database install?

    I have php 7.3 and this module loaded and not receiving any notices.
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  9. #3119
    Join Date
    Jul 2012
    Posts
    16,732
    Plugin Contributions
    17

    Default Re: Stock by Attribute v4.0 addon for v1.5.0-1.5.6

    Quote Originally Posted by mc12345678 View Post
    Questions I have are during what operation is this occurring? What plugins are installed? Why is the includes/modules/YOUR_TEMPLATE/attributes.php file and/or the observer loaded before the database is loaded? Has the installation process been performed or is the software in place without executing the database install?

    I have php 7.3 and this module loaded and not receiving any notices.
    For what it's worth, it looks like need to add into the observer functions an "escape" to not perform the operations in the functions if the module is not installed. I don't really like the idea of having multiple functions each of which will need to evaluate the existence of a defined value. Another option I'm trying to consider is to dump the observer during execution if the necessary data is not available. I thought I remembered something that would support it, but I'm drawing a blank at the moment. I know that it wouldn't be anything in the includes/auto_loaders files as those are loaded too early, but seems like there could be something __construct function to allow loading some of the functions to ensure some items are assigned and others to not cause notices or similar messages.

    Ideally the software should be able to be present without causing mydebug logs to be generated. That at least has been a goal for some time now. Input on the questions of the previous post would help with that. :)
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  10. #3120
    Join Date
    Jul 2012
    Posts
    16,732
    Plugin Contributions
    17

    Default Re: Stock by Attribute v4.0 addon for v1.5.0-1.5.6

    For those using this with Zen Cart 1.5.6 and above.

    Found an issue while trying to clean up the code a little.

    In Zen Cart 1.5.6 a notifier was added into the includes/functions/functions_lookup.php file that adds functionality of adjusting/determining the quantity to be returned when attempting to determine the stock available and another to determine if the product is in stock.

    These two notifiers were incorporated into the plugin which means that the file no longer needs to be modified or supplied with the plugin.

    Unfortunately, the as provided observer load point (again for Zen Cart 1.5.6 and above) is incorrect to properly report the quantity response during cart operations (add and update). In order for the observer to realize that the notifier has been triggered, it needs to be loaded before the notifier. The includes/extra_cart_actions file which is processed to handle SBA product manipulations gets loaded at load point 140. In order for the additional code to trigger when manipulating the cart contents, the load point of the observer needs to be moved up to at highest of 139, but am thinking that 135 would be sufficient. Of course, also need to now look to see what, if anything, uses those functions earlier.

    So the change as identified so far is to modify includes/auto_loaders/config.products_with_attributes_stock.php line 45 from:
    Code:
    $autoLoadConfig[199][] = array(
    To:

    Code:
    $autoLoadConfig[135][] = array(
    Now, because that code uses the class code that is also loaded at load point 199 into a session variable, that code (line 29) should also be loaded sooner (same load point) to support the first page load.

    A brief review of items loaded in config.core.php does identify that perhaps these items could be loaded before loading the shopping_cart class; however, review of the code there along with the notifiers present doesn't clearly identify points where the "early" use of the stock related notifiers would be of benefit. I'm not saying it's not possible to end up removing the extra_cart_actions file, but it seems like it would take a little effort to eliminate it's need. Currently to some extent it operates independent of the code in the shopping_cart class. If integrated more then there is the concern of modifications by other software affecting it's operation. Will still look into that but wanted to post these findings while working up the changes for github.
    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