Page 301 of 356 FirstFirst ... 201251291299300301302303311351 ... LastLast
Results 3,001 to 3,010 of 3558
  1. #3001
    Join Date
    Feb 2009
    Location
    UK
    Posts
    1,238
    Plugin Contributions
    1

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

    Actually, thought it best to confirm, for you and others, that yes your code change does resolve the issue.
    Simon

  2. #3002
    Join Date
    Jul 2012
    Posts
    16,732
    Plugin Contributions
    17

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

    Quote Originally Posted by simon1066 View Post
    Actually, thought it best to confirm, for you and others, that yes your code change does resolve the issue.
    Thank you for that. Yes, that was a good action. Cool, I'll incorporate it into github as soon as I can.
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  3. #3003
    Join Date
    Jul 2012
    Posts
    16,732
    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
    I would say that you are correct in the section of code. It would seem that the issue is in the else section of that. The reason I state that is because the first part generates a result from the query and as the error message that is generated suggests, the error message should not be generated when a product is tracked by SBA.

    So that leaves one to ask, how then is it that this error is being generated? Well, in the else section, a previous sql result is being accessed. More than likely (which I'll take a closer look at), the query was fully iterated before being stored. What that means is that in order to reuse the result, the query needs to be rewound. Because this software is compatible with older ZC versions, there are two ways to do this.

    Changing:
    Code:
       } else {
           $products_options_names = $this->_isSBA[(int)$products_id]['sql'];
        }
    To:
    Code:
       } else {
           $products_options_names = $this->_isSBA[(int)$products_id]['sql'];
            if (method_exists($products_options_names, 'rewind')) {
              $products_options_names->Rewind();
            } else {
              $products_options_names->Move(0);
              $products_options_names->MoveNext();
            }
        }
    Will likely resolve the issue for ZC 1.5.5 (in the first section) and pre-ZC 1.5.5 (in the else section that has been added).

    Thank you though for reporting this, I hadn't come across such an issue after having addressed other strict associated messages. I did review the list of plugins and considering the error and where it has occurred, I don't believe that they contribute to the issue.
    Quote Originally Posted by mc12345678 View Post
    Thank you for that. Yes, that was a good action. Cool, I'll incorporate it into github as soon as I can.
    Incorporated plus a few more code changes to address strict error reporting.
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  4. #3004
    Join Date
    Jan 2014
    Posts
    216
    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
    Ok. So. First overall issue I see for this method of implementation as it relates to the current options made available is initially populating all of the product with the associated color attribute "quickly". Now, I haven't gone through the export/import feature that potteryhouse had incorporated in a while, but it seemed to be written with single attribute (color) type functionality and likely could help with that aspect.

    So, how to address the rest. Once the color is associated with the product and a quantity of at least 1 is applied (assuming that the stock configuration settings are such not to decrease the quantity), then if want to show the out-of-stock option, a sql query would need to be written to set all of the item's attribute to a quantity of 0. If wanted to just not display the color option, then could use the catalog->iption Values manager to delete the color option from all product (problem there is that when it came back in stock it would also need to be added back to all product which can be done in much the same way but then also have to add back to the attribute tracking section).

    Now if the product had not yet been generated, there is the ability to copy attributes from an existing product to the new product including those tracked by SBA.

    If the sql route were used, a similar sql statement would be used to change the stock quantity to 1 (or whatever number) when the product came back in stock.

    It can also be set to not show the out-of-stock attributes.

    Now, I did just think/remember something. Not that long ago, I added a feature that would allow designating that an attribute was not tracked by stock (meaning can get indefinitely until it was turned off), which is a lot like you are seeking. Currently it is controlled only by sql statements, but it supports the ability of saying that an option value is in stock for all product (or all product that have a given option name (color)). The display and management of that feature hasn't been developed yet because the full possibilities haven't quite yet been realized. Didn't want to create something that was going to be difficult to expand upon and would prefer the interface to be understandable.
    So I caught on somewhat on what you are talking about. I'm building the site now so the products are being created now without attributes. I knew I could make one and copy attributes to others. when it comes to sql i'm lost that last part you were talking about sounds like what i want to do.

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

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

    Quote Originally Posted by cubmanky View Post
    So I caught on somewhat on what you are talking about. I'm building the site now so the products are being created now without attributes. I knew I could make one and copy attributes to others. when it comes to sql i'm lost that last part you were talking about sounds like what i want to do.
    I thought that option might be more along what you are wanting, just hadn't thought of it being used that way. :) users can be so creative!

    Suggest taking a look at/around post 2725. There had been a new feature added and it does require executing some SQL to make it work, but hopefully it isn't too complicated to figure out. Generally speaking you'll need to look at either/both of the options names manager and/or options values manager to identify the value associated with the needed options.

    Hmm, that did remind me. I don't think I implemented copying of product specific information when using that feature and copying product and it's attributes. Will start a new issue on that.
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  6. #3006
    Join Date
    Jan 2014
    Posts
    216
    Plugin Contributions
    0

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

    So I looked at 2725 I see
    Originally Posted by Christian_Wagner View Post
    Is there a way to have dropdowns on a page have independent quantities that aren't affected by each other? ie. I'm selling a product (dropdown #1)
    this is kinda the opposite of what I want to do.
    So I made two test products. one I assigned all the colors and linked to SBA, for the second one I copied all the attributes to it. I guess it needs to be dumed down a little more for me.

  7. #3007
    Join Date
    Jul 2012
    Posts
    16,732
    Plugin Contributions
    17

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

    Quote Originally Posted by cubmanky View Post
    So I looked at 2725 I see this is kinda the opposite of what I want to do.
    So I made two test products. one I assigned all the colors and linked to SBA, for the second one I copied all the attributes to it. I guess it needs to be dumed down a little more for me.
    The final "result" is still the same thing. You want to have an option that is always available (until you decide to make it not available) no matter what else is going on around it. In your case though, you want an option value to always be available (many option values really), but each one to be "assigned" as necessary... Now, considering that you've said that you don't really track the stock *quantity* AND when say "blue" is gone, it is to be gone everywhere, I suggest *not* assigning variants to the SBA tracked product. If you do, then the existence of the stock quantity will make the option available until the stock quantity is set to 0. And if you set the quantity to 0 (with the code as written), then the option will be unavailable even with the appropriate SQL statement. I do have a "comment" in the code that would work in an opposite way to this, but haven't assigned a constant to it yet.

    Anyways, for your situation where options_value_id 143 is to be available for all product that have it assigned in the attributes controller and the product is tracked by SBA, then one sql statement (to address a single option value) would be:

    Code:
    INSERT INTO products_with_attributes_stock_attributes_non_stock  (attribute_type, attribute_type_id, attribute_type_source_id) VALUES  ('OV', 143, 0);
    Where the option value id for your color is 143. The option value id can be found in the catalog->Option Values Manager section and is the number to the left of the option value's name... Then, when you want the item to be out-of-stock or "non-existent" you would do a SQL statement like this:
    Code:
    DELETE FROM products_with_attributes_stock_attributes_non_stock  WHERE attribute_type = 'OV' AND attribute_type_id = 143 AND attribute_type_source_id = 0;

    Hmmm.. Btw, just thinking about this, because I haven't tried it is that you may need to assign at least one variant to a product to be so tracked... Just thinking a little about the overall assignment(s)/operation(s) that basically the SBA code doesn't kick in unless a product is found in the SBA table which is to have a products_id in the list even if there is otherwise useless information.
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  8. #3008
    Join Date
    Jan 2014
    Posts
    216
    Plugin Contributions
    0

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

    So I ran the following code and replace # for the Option Value Name. I did this for all 59 colors.
    Code:
    INSERT INTO zc_products_with_attributes_stock_attributes_non_stock  (attribute_type, attribute_type_id, attribute_type_source_id) VALUES  ('OV', #, 0);
    I made two test products, added all the colors to one and then copied that attribute to the second one.
    I ran the full upgrade script along with the Add all Product Attributes
    I can see all colors on my two products.
    next I ran the following code
    Code:
    DELETE FROM zc_products_with_attributes_stock_attributes_non_stock  WHERE attribute_type = 'OV' AND attribute_type_id = 2 AND attribute_type_source_id = 0;
    2 is the id for white. White still showing as a color option. I have both test products linked to SBA

    my site is http://www.visionsinvinyldesigns.com...=index&cPath=1
    click on test or test 2 for products

  9. #3009
    Join Date
    Jan 2014
    Posts
    216
    Plugin Contributions
    0

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

    I just went in and add qty as 100 for variant of pick color on test2 product

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

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

    Quote Originally Posted by cubmanky View Post
    So I ran the following code and replace # for the Option Value Name. I did this for all 59 colors.
    Code:
    INSERT INTO zc_products_with_attributes_stock_attributes_non_stock  (attribute_type, attribute_type_id, attribute_type_source_id) VALUES  ('OV', #, 0);
    I made two test products, added all the colors to one and then copied that attribute to the second one.
    I ran the full upgrade script along with the Add all Product Attributes
    I can see all colors on my two products.
    next I ran the following code
    Code:
    DELETE FROM zc_products_with_attributes_stock_attributes_non_stock  WHERE attribute_type = 'OV' AND attribute_type_id = 2 AND attribute_type_source_id = 0;
    2 is the id for white. White still showing as a color option. I have both test products linked to SBA

    my site is http://www.visionsinvinyldesigns.com...=index&cPath=1
    click on test or test 2 for products
    Quote Originally Posted by cubmanky View Post
    I just went in and add qty as 100 for variant of pick color on test2 product
    I want to be sure that we are both considering addressing the same aspect of operation. In absence of the latest message where a variant quantity ended up being applied against an attribute selection, SBA basically would have not been a factor in this display. Now that every attribute variant has been provided a quantity of 100 (though it only needed one of them to have a quantity applied) test2 is actually a product tracked by SBA.

    So it seems to me that you're trying to validate that the non-stock feature can be used across the product. While that may be the ultimate goal, there are a few things yet to consider.

    At last check all attributes of the test2 product had quantity assigned. As a result of that the non-stock field setting presence/absence will not change the existence of the applicable option. Having stock overrides that an attribute is non-stock tracked as far as being displayed or not.

    Then there is the issue of whether an attribute is to be displayed or not and whether it is to be identified as out-of-stock. These other settings can affect whether an option is displayed or not. The important part as far as purchasing is whether the associated selection can be added to the cart. Ie. If the store can not be oversold and a selected combination is entered as not existing, then that combination should not be able to be added to the cart.

    Again at my last look, I would say that the test of the "white" attribute would require removing the quantity from the white variant (ie. Removing the variant that has that attribute.)

    On another note, it seems that the "Please select color..." option is not setup properly to be a display only, default attribute. I could be wrong.

    It does seem that the option name type is correctly set and that the dynamic dropdowns options are correctly set to use the SBA simple select (dropdown) options. I say this because the quantity of available product is shown and I don't see any remnants of the Dynamic Dropdown javascript in the source code.
    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