Page 284 of 356 FirstFirst ... 184234274282283284285286294334 ... LastLast
Results 2,831 to 2,840 of 3558
  1. #2831
    Join Date
    Oct 2004
    Posts
    1,045
    Plugin Contributions
    0

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

    I have downloaded the latest version and installed on a 1.5.5e store. I am having a problem with the display in the shopping cart. I checked in the shopping cart template file, but it has the right code. I can't understand why it's displaying the second "Out of Stock:" text when it should be showing "Available Stock:" with the available stock levels.

    Also, that product has 1 in stock of size 6-12 month, and 2 in stock of size 12-18 months. The stock levels are synced in the admin. If I have 1 of the 6-12 and 1 or 2 of the size 12-18 in the cart, it displays fine. But if I try and do 3 of the 12-18, it is showing that the 6-12 are out of stock as well, even though there is only 1 of those in the cart, and there is 1 in stock.

    Click image for larger version. 

Name:	sba.jpg 
Views:	42 
Size:	19.9 KB 
ID:	17394
    Danielle

  2. #2832
    Join Date
    Jul 2012
    Posts
    16,733
    Plugin Contributions
    17

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

    Quote Originally Posted by Danielle View Post
    I have downloaded the latest version and installed on a 1.5.5e store. I am having a problem with the display in the shopping cart. I checked in the shopping cart template file, but it has the right code. I can't understand why it's displaying the second "Out of Stock:" text when it should be showing "Available Stock:" with the available stock levels.

    Also, that product has 1 in stock of size 6-12 month, and 2 in stock of size 12-18 months. The stock levels are synced in the admin. If I have 1 of the 6-12 and 1 or 2 of the size 12-18 in the cart, it displays fine. But if I try and do 3 of the 12-18, it is showing that the 6-12 are out of stock as well, even though there is only 1 of those in the cart, and there is 1 in stock.

    Click image for larger version. 

Name:	sba.jpg 
Views:	42 
Size:	19.9 KB 
ID:	17394
    I'm not yet able to reproduce the problem. I've tried two different product configurations. One where the product had multiple attributes and a group of attributes were assigned to offer a variant for each configuration. I've also gone to a product that had one attribute similar to the product in the image. I tried with mixed attributes as well as without and even applied a maximum number of product from which to select and was not able to reproduce the issue when the product quantity was synchronized with the number of product. Meaning if there were 2 size 12-18 and 1 of size 6-12 then the total quantity in stock for the product should be 3 as far as being synchronized. No matter how I approached modifying the quantity in the cart (modify on the shopping cart page or by trying to add from the product information page), I was always advised that the quantity was adjusted for the maximum quantity in stock and the value last modified was again updated to prevent exceeding either the total product in stock or the total for that attribute. I also repeated this by swapping the quantity available of the two attributes (in case there was some sort of sequence issue that was causing a problem) and didn't get a different result. Now I didn't try adding those product in reverse order, but...

    Now... When I reduced the total quantity of the product to be less than the synchronized quantity (ie. in the above if the total product quantity were 3 and the quantity available of size 12-18 were increased to 3 (by attribute 4 available, but by product only 3), then I was able to get the error message that you describe as soon as I refreshed the cart where it already had quantity in it that exceeded the total quantity of the available product (I actually did quantities differently than provided above where I had 1 and 3 instead of 1 and 2, then my original total quantity was 4. When I had in cart 1 and 3 of the respective product, then reduced the total quantity available (simulating someone purchased a product but the individual attribute quantity hadn't been reduced) then I had an error message for both product (or any quantity product that had the same products_id basically) that the product was out-of-stock. If I reduced my quantity of 3 down to a quantity of 2, then the message disappeared, but if I then increased the quantity to 3 again, the error message again appeared.

    So, it would seem to me that the issue is that at the time this occurs, there is a discrepancy between the sum of the quantity of attribute variants and the total product available such that the total quantity of product is less than the quantity for the applicable attribute product. As far as what to do in this situation, I'm certainly open to suggestions, I can tell you that there is a conflict in information at that point... What is the limiting factor? The quantity of attribute type product or the total quantity of product? How should the cart respond? If I'm allowed to pick X and Y items out of bag but the bag has some number less than the total of X and Y items, what should "auto" change the one that has the higher quantity, the one that was last modified (how can one tell which is last modified if both are modified on a single screen refresh)? Dump the changes made and just return back to whatever was last entered? (Think of having a long list of items, having determined just the right balance, selecting update cart and all the work done disappears? Not a good experience.) Should one reduce down to the lowest quantity permitted and then the other? Which one? "Higher quantity?" (What if both have the same quantity entered?) Last one added? Why should it get priority of reducing quantity?

    Okay, anyways, open to suggestions and ideas, just know that there are more questions than answers in some cases.. Some would say why even allow that type of discrepancy to exist? Why not? Could work for some stores...

    Now I didn't try with my store set to allow over-selling product, so that could be a condition you have set for yours, I don't know unless the settings associated with stock and SBA are shared.

    Oh, I'm also going to compare my fileset to the github fileset which I presume you downloaded: https://github.com/mc12345678/Stock_...butes_Combined as the source was not identified and some older versions certainly had issues.
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  3. #2833
    Join Date
    Jul 2012
    Posts
    16,733
    Plugin Contributions
    17

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

    Just did the following regarding file status:
    retrieved the remote files from github to my local computer (no differences existed for my local github repository).
    Reviewed where my local master pointer was at (one commit ahead as I was working on a feature for the admin menu), returned the pointer back one commit to where github was pointing and I did find one file that had a minor modification on my local computer as compared to github:
    functions affected by the difference:
    zen_get_customid
    zen_get_sba_attribute_ids
    zen_sba_has_text_field
    zen_get_sba_attribute_info

    The difference(s) are/were instead of simply checking if a value was empty, the value had to also be an array. This affected 5 lines of code.

    I'm going to upload it in the event that it could be causing what was seen. The file affected is includes/classes/class.products_with_attributes_class_stock.php

    After committing the above, I went through the tests again with the changes removed and didn't run into the described issue until again the total product quantity was less than the combination of attributes and the total in cart was more than the quantity that is entered on the product information page.

    Be glad to fix something that I can make happen (and hasn't already been considered to remain as is for general use) and have a reasonable direction to take.
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  4. #2834
    Join Date
    Oct 2004
    Posts
    1,045
    Plugin Contributions
    0

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

    Hi there,

    I appreciate your looking into this. However, I don't mean the error message above the cart, is that what you are referring to? I mean down below the product image, where it says "Out of Stock:". On the older versions, this would say "Stock Available:2". I've attached a screenshot of how it looks on the current site (SBA 1.5.3 running on Zen-Cart 1.5.1), as well as how it looks on the new site I'm working on (SBA 1.5.5 running on Zen-Cart 1.5.5e).

    Additionally, on the older version, if there was too many of one product variant in the cart, that one would show out of stock, but if there was another variant of the product also in the cart with the correct quantity for the variant, it would show in stock. You can also see this in the screenshot.

    It seems like the newer version is not treating each variant as having it's own stock. As soon as the total amount in stock is gone over, all variants show as out of stock in the cart, even though actually it's only the one variant that is over.

    Quote Originally Posted by mc12345678 View Post
    I'm not yet able to reproduce the problem. I've tried two different product configurations. One where the product had multiple attributes and a group of attributes were assigned to offer a variant for each configuration. I've also gone to a product that had one attribute similar to the product in the image. I tried with mixed attributes as well as without and even applied a maximum number of product from which to select and was not able to reproduce the issue when the product quantity was synchronized with the number of product. Meaning if there were 2 size 12-18 and 1 of size 6-12 then the total quantity in stock for the product should be 3 as far as being synchronized. No matter how I approached modifying the quantity in the cart (modify on the shopping cart page or by trying to add from the product information page), I was always advised that the quantity was adjusted for the maximum quantity in stock and the value last modified was again updated to prevent exceeding either the total product in stock or the total for that attribute. I also repeated this by swapping the quantity available of the two attributes (in case there was some sort of sequence issue that was causing a problem) and didn't get a different result. Now I didn't try adding those product in reverse order, but...

    Now... When I reduced the total quantity of the product to be less than the synchronized quantity (ie. in the above if the total product quantity were 3 and the quantity available of size 12-18 were increased to 3 (by attribute 4 available, but by product only 3), then I was able to get the error message that you describe as soon as I refreshed the cart where it already had quantity in it that exceeded the total quantity of the available product (I actually did quantities differently than provided above where I had 1 and 3 instead of 1 and 2, then my original total quantity was 4. When I had in cart 1 and 3 of the respective product, then reduced the total quantity available (simulating someone purchased a product but the individual attribute quantity hadn't been reduced) then I had an error message for both product (or any quantity product that had the same products_id basically) that the product was out-of-stock. If I reduced my quantity of 3 down to a quantity of 2, then the message disappeared, but if I then increased the quantity to 3 again, the error message again appeared.

    So, it would seem to me that the issue is that at the time this occurs, there is a discrepancy between the sum of the quantity of attribute variants and the total product available such that the total quantity of product is less than the quantity for the applicable attribute product. As far as what to do in this situation, I'm certainly open to suggestions, I can tell you that there is a conflict in information at that point... What is the limiting factor? The quantity of attribute type product or the total quantity of product? How should the cart respond? If I'm allowed to pick X and Y items out of bag but the bag has some number less than the total of X and Y items, what should "auto" change the one that has the higher quantity, the one that was last modified (how can one tell which is last modified if both are modified on a single screen refresh)? Dump the changes made and just return back to whatever was last entered? (Think of having a long list of items, having determined just the right balance, selecting update cart and all the work done disappears? Not a good experience.) Should one reduce down to the lowest quantity permitted and then the other? Which one? "Higher quantity?" (What if both have the same quantity entered?) Last one added? Why should it get priority of reducing quantity?

    Okay, anyways, open to suggestions and ideas, just know that there are more questions than answers in some cases.. Some would say why even allow that type of discrepancy to exist? Why not? Could work for some stores...

    Now I didn't try with my store set to allow over-selling product, so that could be a condition you have set for yours, I don't know unless the settings associated with stock and SBA are shared.

    Oh, I'm also going to compare my fileset to the github fileset which I presume you downloaded: https://github.com/mc12345678/Stock_...butes_Combined as the source was not identified and some older versions certainly had issues.
    Click image for larger version. 

Name:	sba-v153.jpg 
Views:	26 
Size:	21.7 KB 
ID:	17396Click image for larger version. 

Name:	sba-155.jpg 
Views:	26 
Size:	24.3 KB 
ID:	17397
    Danielle

  5. #2835
    Join Date
    Jul 2012
    Posts
    16,733
    Plugin Contributions
    17

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

    Quote Originally Posted by Danielle View Post
    Hi there,

    I appreciate your looking into this. However, I don't mean the error message above the cart, is that what you are referring to? I mean down below the product image, where it says "Out of Stock:". On the older versions, this would say "Stock Available:2". I've attached a screenshot of how it looks on the current site (SBA 1.5.3 running on Zen-Cart 1.5.1), as well as how it looks on the new site I'm working on (SBA 1.5.5 running on Zen-Cart 1.5.5e).

    Additionally, on the older version, if there was too many of one product variant in the cart, that one would show out of stock, but if there was another variant of the product also in the cart with the correct quantity for the variant, it would show in stock. You can also see this in the screenshot.

    It seems like the newer version is not treating each variant as having it's own stock. As soon as the total amount in stock is gone over, all variants show as out of stock in the cart, even though actually it's only the one variant that is over.

    Click image for larger version. 

Name:	sba-v153.jpg 
Views:	26 
Size:	21.7 KB 
ID:	17396Click image for larger version. 

Name:	sba-155.jpg 
Views:	26 
Size:	24.3 KB 
ID:	17397
    So, I'm going to need more information. Do you have your store set to allow ordering in excess of what is available? Ie. What are the settings for like the first three options in configuration->stock? What about in the "old" store?

    How is the product setup regarding min/max mixing? Do you have a maximum entered?

    Mind you, again. SBA won't allow adding product to the cart in excess of what is available for the variant when all of the files from the recent version are put on the server and the store is not set to allow purchase when product is out-of-stock. Additionally, the ZC 1.5.5 shopping cart class has been updated to not allow a quantity to be in the cart greater than the available and will do so by reducing the item quantity to that which is in stock and provide a message about the change.

    The fact that both product variants appeared to be out-of-stock is because the store does not allow over-selling, and the quantity of product available is less than the sum of the variant quantities associated with those in the cart. There is a setting that will allow the display of those quantities, but the display of the quantity available in stock won't happen if the store doesn't permit overselling and that both went out of stock is not because either variant ran out but the total supply did... that brings us back to one of the above long paragraphs. :)

    Need actual setup information, verification that only the files provided in this version of SBA have been installed (not those from a previous version).

    I can't reproduce the issue other than as described above. The additional discussion of other options and "activating" them depends on those settings and information.

    I didn't test on a store that allows checkout when product is out-of-stock as that did not appear to be related based on the discussion of only having certain quantity available.
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  6. #2836
    Join Date
    Oct 2004
    Posts
    1,045
    Plugin Contributions
    0

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

    OK, it appears then that this version of the module just doesn't work the same in that regard. The total product quantity really shouldn't even matter when it comes to products with attribute stock. In the older version, if there are 3 total in stock, you could have 4 in your cart, but only the variant that is putting the stock overlimit would show as out of stock. There is no reason for both variants to show as out of stock. How then does the customer know which one to reduce? It's super confusing as it makes it look like they have too many of both variants, when actually they only have too many of the one variant. I think the old behavior is much more user-friendly and logical. I would change it back, but I'm really not sure how.

    All settings are the same in both carts. The first three settings under Stock are all set to true.

    What about the issue with it not showing the available stock in the cart?

    Quote Originally Posted by mc12345678 View Post
    So, I'm going to need more information. Do you have your store set to allow ordering in excess of what is available? Ie. What are the settings for like the first three options in configuration->stock? What about in the "old" store?

    How is the product setup regarding min/max mixing? Do you have a maximum entered?

    Mind you, again. SBA won't allow adding product to the cart in excess of what is available for the variant when all of the files from the recent version are put on the server and the store is not set to allow purchase when product is out-of-stock. Additionally, the ZC 1.5.5 shopping cart class has been updated to not allow a quantity to be in the cart greater than the available and will do so by reducing the item quantity to that which is in stock and provide a message about the change.

    The fact that both product variants appeared to be out-of-stock is because the store does not allow over-selling, and the quantity of product available is less than the sum of the variant quantities associated with those in the cart. There is a setting that will allow the display of those quantities, but the display of the quantity available in stock won't happen if the store doesn't permit overselling and that both went out of stock is not because either variant ran out but the total supply did... that brings us back to one of the above long paragraphs. :)

    Need actual setup information, verification that only the files provided in this version of SBA have been installed (not those from a previous version).

    I can't reproduce the issue other than as described above. The additional discussion of other options and "activating" them depends on those settings and information.

    I didn't test on a store that allows checkout when product is out-of-stock as that did not appear to be related based on the discussion of only having certain quantity available.
    Danielle

  7. #2837
    Join Date
    Oct 2004
    Posts
    1,045
    Plugin Contributions
    0

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

    I did notice that on the SBA setup page in the admin, it says that one of the changed core files is includes/modules/pages/shopping_cart/header_php.php, however, that file isn't in the github download. Are there just no changes to that file anymore?
    Danielle

  8. #2838
    Join Date
    Oct 2004
    Posts
    1,045
    Plugin Contributions
    0

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

    Quote Originally Posted by Danielle View Post
    I did notice that on the SBA setup page in the admin, it says that one of the changed core files is includes/modules/pages/shopping_cart/header_php.php, however, that file isn't in the github download. Are there just no changes to that file anymore?
    I went through the commits and see that file was removed quite awhile ago...darn...a missing file would have been an easy fix ;)
    Danielle

  9. #2839
    Join Date
    Jul 2012
    Posts
    16,733
    Plugin Contributions
    17

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

    Quote Originally Posted by Danielle View Post
    I did notice that on the SBA setup page in the admin, it says that one of the changed core files is includes/modules/pages/shopping_cart/header_php.php, however, that file isn't in the github download. Are there just no changes to that file anymore?
    Quote Originally Posted by Danielle View Post
    I went through the commits and see that file was removed quite awhile ago...darn...a missing file would have been an easy fix ;)
    Ok. So hope you haven't run off and tried to "restore" the modified shopping_cart header file. The problem will persist even so.

    I found the issue and was able to reproduce it.

    Line 948 of includes/classes/observers/class.products_with_attributes_stock.php

    Change:
    Code:
              if ($SBAqtyAvailable - $products[$i]['quantity'] < 0 || $totalQtyAvailable - $_SESSION['cart']->in_cart_mixed($productArray[$i]['id']) < 0) {
    To:
    Code:
              if ($SBAqtyAvailable - $products[$i]['quantity'] < 0 || ($totalQtyAvailable - $_SESSION['cart']->in_cart_mixed($productArray[$i]['id']) < 0) && STOCK_ALLOW_CHECKOUT! !== 'true') {
    That will resolve the marking of all product in the cart associated with the one products_id where the total quantity of the item's variants has exceeded the total available quantity of the item.

    So, understand also that the concept of variant quantity and product quantity relates to some individuals conditions. Ie. Assume the shirts you sell are hand made/decorated. If you have 4 shirts, but enough product of one type to make 3 and enough product of another to make 2, well you only have 4 shirts. Which do you decide to not be able to make? Or do you let the purchase power of the customer figure it out for you by them buying what they want of what you have?

    As to the other notification? Well, at one point around the same location in that file, the "feature" was basically disabled... seeing that someone wants it/likes it? I'll gladly put it back. I haven't looked for it recently and can't recall where I saw it, but at one point there was a lot of discussion that the maximum available quantity of a product shouldn't be made known... the store has been designed/redesigned to quite the contrary, so guess it was a false alarm...

    The changes will be in that one file, so you don't have to do any sort of total reinstall. I have to figure out how to reinstate the remaining quantity and do so on something other than my cell phone. :)
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  10. #2840
    Join Date
    Jul 2012
    Posts
    16,733
    Plugin Contributions
    17

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

    Quote Originally Posted by Danielle View Post
    I went through the commits and see that file was removed quite awhile ago...darn...a missing file would have been an easy fix ;)
    The installer "information" does need to be updated. Last real modification to it was so that it would operate in a new install. Yes, there have been some changes to align more with ZC processes, but that identification is not applicable at least for ZC 1.5.5 where modifications have been pulled from the files.
    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