Page 179 of 356 FirstFirst ... 79129169177178179180181189229279 ... LastLast
Results 1,781 to 1,790 of 3558
  1. #1781
    Join Date
    Jun 2012
    Location
    Florida
    Posts
    123
    Plugin Contributions
    5

    Default Re: Quantities of items with attributes are incorrect, how to fix?

    Quote Originally Posted by magz View Post
    Hi,

    I'm testing SBA 1.5.2 (upgrade from 1.5.0) on ZC 1.5.1, and am grateful for the fact that available stock appears in the cart for products both with and without attributes. However, I'm having trouble with miscalculated stock for products with attributes. It's probably just a setting somewhere that I need to change, but can't figure out which one. Here's the situation:

    I have ukuleles that can be purchased with or without optional gig bags. In my test, I use 2 ukes of the same model. The desired behavior is: if someone orders 1 or 2 ukes (both with bags OR both without bags OR 1 with and 1 without), they should NOT get an insufficient stock message. If someone tries to buy 3 or more ukes (with or without bags), they SHOULD get the insufficient stock message. Currently, the system somehow thinks that I have 2 ukes with bags and 2 separate ukes without bags, so someone can put 2 ukes with bags and 2 without in their cart and not get the low stock warning, though they should. What am I doing wrong?

    Here's how I have the uke set up:
    - the gig bag attribute type is check box
    - quantity of the product (on product setup page) is set to 2
    - qty of attribute is 2 (when it was 0, I was getting low stock msg even when ordering 1 uke with bag, and available qty was blank, not even 0)
    - in Configuration->Stock, "SBA Show Available Stock Level in Cart (when less than order)" is set to true, the other SBA items are set to false.
    - settings in attributes controller:
    Attachment 13519

    I'll appreciate your guidance.... Thank you!
    Magz

    PS- sorry for this duplicate post, I didn't know before that I could change the subject and I think my msg from Dec 1 drowned in the flood and went unnoticed...
    Can you provide a screen shot of the product setup in the SBA stock page, this may help in understanding the issues cause.
    I will attempt to duplicate your settings this weekend and see what I find.
    Backup Files and Databases First. GitHub
    Suggestions, Plugins, etc. used at your own risk.

  2. #1782
    Join Date
    Apr 2013
    Location
    north carolina
    Posts
    110
    Plugin Contributions
    0

    Default Re: Quantities of items with attributes are incorrect, how to fix?

    Quote Originally Posted by potteryhouse View Post
    Can you provide a screen shot of the product setup in the SBA stock page, this may help in understanding the issues cause.
    I will attempt to duplicate your settings this weekend and see what I find.
    Thanks, Potteryhouse, here are the shots:

    Click image for larger version. 

Name:	sba-stock.jpg 
Views:	74 
Size:	30.0 KB 
ID:	13525
    Above quantities are NOT synchronized. Syncing changes total # to 4.

    Click image for larger version. 

Name:	atrtrib-controller2.png 
Views:	51 
Size:	48.0 KB 
ID:	13526

    If you'd like to see this in action, the test product is at http://test.allstringsnylon.info/cordoba-ukulele-15sm .

    Thanks for all your work!
    Magz

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

    Default Re: Quantities of items with attributes are incorrect, how to fix?

    Ok, I may have missed something but, if the quantity amount for an attribute isn't filled in, is this treated as a zero quantity of stock or an infinite quantity of stock
    Webzings Design
    Semi retired from Web Design

  4. #1784
    Join Date
    Jul 2012
    Posts
    346
    Plugin Contributions
    0

    Default Re: Quantities of items with attributes are incorrect, how to fix?

    I think it shows out of stock with quantity of zero.

  5. #1785
    Join Date
    Jun 2012
    Location
    Florida
    Posts
    123
    Plugin Contributions
    5

    Default Re: Quantities of items with attributes are incorrect, how to fix?

    Quote Originally Posted by nigelt74 View Post
    Ok, I may have missed something but, if the quantity amount for an attribute isn't filled in, is this treated as a zero quantity of stock or an infinite quantity of stock
    The way I updated the code it should do the following:

    Option A: Product with no associated attributes, this uses the qty assigned to the product in the catalog.
    Option B: Product with Attribute(s), If no attribute is created in the SBA Stock page, this will use the qty from the product catalog.
    Option C: Product with Attribute(s), and attributes are created in the SBA stock page, this uses the qty from the SBA Stock page.

    In all cases,
    if the qty is zero, than the flag is set to indicate out of stock.
    if the qty is less than the order requested in the cart, than the flag will indicate low stock.
    The flag display is based on the settings in the "Configuration -> Stock" (Check Stock Level = true)

    There seems to be other configurations to support:
    1. Where the base product is to use the quantity in the catalog, and there is an "Optional" attribute to add something like a "Gig Bag".
    2. Where the same product is added to the cart, but one has a selected attribute combination as A,B,C, and the second entry for the same product has attribute combinations A,C. etc. These do not properly cross check the other attributes of the same product to test for available qty.

    Since I had not considered these configurations, the qty calculations in the cart may not work as expected.
    I will look at an update and will post for others to test if I can resolve these.

    If there are other configurations I did not account for please provide the configuration scenarios, with some expected results and explanations to help with understanding what you are looking for as a result. Since I am doing this in my spare time, the update may take some time.

    Additionally, as a note, the SBA versions in the Plug-ins, to-date support one attribute per row (Stock ID) in the SBA Stock page.
    The new test version I posted supports attribute combinations i.e., two or more attributes per row (Stock ID) in the SBA Stock page.
    I posting an updated version of this below and would like some feedback, looking for errors, etc.
    I believe this version resolves some errors on web hosts that do not permit the PHP eval() command.

    New Test version Attachment 13535
    Backup Files and Databases First. GitHub
    Suggestions, Plugins, etc. used at your own risk.

  6. #1786
    Join Date
    Jun 2012
    Location
    Florida
    Posts
    123
    Plugin Contributions
    5

    Default Re: Quantities of items with attributes are incorrect, how to fix?

    Quote Originally Posted by magz View Post
    Thanks, Potteryhouse, here are the shots:

    Click image for larger version. 

Name:	sba-stock.jpg 
Views:	74 
Size:	30.0 KB 
ID:	13525
    Above quantities are NOT synchronized. Syncing changes total # to 4.

    Click image for larger version. 

Name:	atrtrib-controller2.png 
Views:	51 
Size:	48.0 KB 
ID:	13526

    If you'd like to see this in action, the test product is at http://test.allstringsnylon.info/cordoba-ukulele-15sm .

    Thanks for all your work!
    Magz
    It is looking like the code needs to be updated to support your configuration scenario, I will give it a try and let you know.
    Backup Files and Databases First. GitHub
    Suggestions, Plugins, etc. used at your own risk.

  7. #1787
    Join Date
    Apr 2013
    Location
    north carolina
    Posts
    110
    Plugin Contributions
    0

    Default Re: Quantities of items with attributes are incorrect, how to fix?

    Quote Originally Posted by potteryhouse View Post
    It is looking like the code needs to be updated to support your configuration scenario, I will give it a try and let you know.
    Thanks Potteryhouse, I do appreciate!
    Magz

  8. #1788
    Join Date
    Jun 2012
    Location
    Florida
    Posts
    123
    Plugin Contributions
    5

    Default Re: Quantities of items with attributes are incorrect, how to fix?

    Quote Originally Posted by magz View Post
    Thanks Potteryhouse, I do appreciate!
    Magz
    Hi,
    This took much longer than I thought, but I think it resolves most of the duplicate product issues you identified.
    It is not perfect, but much better I think than it was.

    It is a big change so you should try this on a test machine before trying on any production site.
    Verify everything works as you want. No guarantees, but I hope it will work for you.

    A note, for products that have attributes, you must have "None" or "All" of the products attributes setup in the SBA Stock page, it will not work if you only put one attribute in the stock page but there are others for the product.
    Also, the "Attributes Controller" for the "Uke" product should be set like I have in the attached image sample.
    Click image for larger version. 

Name:	sample1.jpg 
Views:	83 
Size:	26.6 KB 
ID:	13601

    Attachment 13600

    If you find other things or have suggestion please post them.
    Backup Files and Databases First. GitHub
    Suggestions, Plugins, etc. used at your own risk.

  9. #1789
    Join Date
    Apr 2013
    Location
    north carolina
    Posts
    110
    Plugin Contributions
    0

    Default Re: Quantities of items with attributes are incorrect, how to fix?

    Thank you, Potteryhouse! Nothing wrong with how long it took, we're all busy and you're doing this with no pay so those of us who don't know the first thing about coding can have functional ecommerce websites... I do appreciate all the time and effort you and many others are putting into Zen-Cart and its plugins, and hope to be able to send out lots of donations sometime soon.

    The update seems to be functioning fine (done very limited testing so far), except it now doesn't say what the available quantity is. Unless it's a quick and easy fix, I can live with that until the "perfect" version is released. I'm also noticing a few "cosmetic" issues... Although I set sort order of "base" to 1 and "add" to 2 and in Attributes Controller they do appear in that order, on the product page and in the shopping cart, "add" is first and "base" second. Short of numbering them, how do I force them to display in the desired order? Also on the product page, the vertical space between the 2 attributes is quite large and the text doesn't align vertically with the checkbox. How do I fix that?

    Thank you!
    Magz

    Quote Originally Posted by potteryhouse View Post
    Hi,
    This took much longer than I thought, but I think it resolves most of the duplicate product issues you identified.
    It is not perfect, but much better I think than it was.

    It is a big change so you should try this on a test machine before trying on any production site.
    Verify everything works as you want. No guarantees, but I hope it will work for you.

    A note, for products that have attributes, you must have "None" or "All" of the products attributes setup in the SBA Stock page, it will not work if you only put one attribute in the stock page but there are others for the product.
    Also, the "Attributes Controller" for the "Uke" product should be set like I have in the attached image sample.
    Click image for larger version. 

Name:	sample1.jpg 
Views:	83 
Size:	26.6 KB 
ID:	13601

    Attachment 13600

    If you find other things or have suggestion please post them.

  10. #1790
    Join Date
    Jun 2012
    Location
    Florida
    Posts
    123
    Plugin Contributions
    5

    Default Re: Quantities of items with attributes are incorrect, how to fix?

    Quote Originally Posted by magz View Post
    Thank you, Potteryhouse! Nothing wrong with how long it took, we're all busy and you're doing this with no pay so those of us who don't know the first thing about coding can have functional ecommerce websites... I do appreciate all the time and effort you and many others are putting into Zen-Cart and its plugins, and hope to be able to send out lots of donations sometime soon.

    The update seems to be functioning fine (done very limited testing so far), except it now doesn't say what the available quantity is. Unless it's a quick and easy fix, I can live with that until the "perfect" version is released. I'm also noticing a few "cosmetic" issues... Although I set sort order of "base" to 1 and "add" to 2 and in Attributes Controller they do appear in that order, on the product page and in the shopping cart, "add" is first and "base" second. Short of numbering them, how do I force them to display in the desired order? Also on the product page, the vertical space between the 2 attributes is quite large and the text doesn't align vertically with the checkbox. How do I fix that?

    Thank you!
    Magz
    (1) The qty display on the page was not changes, you will need to turn it back on in the "Configuration -> Stock" page in admin.
    When you run the installation script it resets all the display flags to false.

    (2) You control the Option order by the setting the applicable "Sort Order" in the "Catalog ->Options Name Manager" Product Options page in admin.

    (3) I think the layout alignment you mentioned is a template thing you will have to adjust to make it look as you need, the file to work with is:
    \includes\templates\YOURTEMPLATE\templates\tpl_product_info_display.php
    Backup Files and Databases First. GitHub
    Suggestions, Plugins, etc. used at your own risk.

 

 

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