Page 1 of 356 1231151101 ... LastLast
Results 1 to 10 of 3552
  1. #1
    Join Date
    Apr 2006
    Location
    London, UK
    Posts
    10,569
    Plugin Contributions
    25

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

    This is the support thread for the updated Stock by Attributes add-on for Zen Cart 1.3.5. If you are using an version of Zen Cart prior to 1.3.5 then you will need to upgrade before you can use this add-on.

    The add-on can be downloaded from here.

    There is also a Wiki with more information about the add-on. You can find the Wiki here.

    To put this add-on in context, it is a stop gap. This feature is scheduled to be added to the next major release of Zen Cart, and probably in a rather more integrated way than is appropriate for an add-on such as this. Furthermore the add-on from which this was adapted has a major flaw in its table structure, which I am sure the Zen Cart team will not replicate.

    So I have no desire to add extra functionality that will probably have a very short shelf life, may not be included in the Zen Cart solution anyway and might make future conversion to the differently structured and more integrated Zen Cart version more complex. So please don't post requests for new functionality in this support thread.

    However, if you are having problems installing or using the add-on or think that there are errors / bugs in it, then your posts will be welcome.
    Kuroi Web Design and Development | Twitter

    (Questions answered in the forum only - so that any forum member can benefit - not by personal message)

  2. #2
    Join Date
    Apr 2006
    Location
    London, UK
    Posts
    10,569
    Plugin Contributions
    25

    Default Re: Stock by Attribute v4.0 for Zen Cart 1.3.5

    I guess I should never have referred to v4.0, as just a few hours later, v4.1 has been released. This is a minor bug fix release that incorporates two Zen Cart 1.3.5 bug fixes, removes a diagnostic line and makes a syntactic correction to the SQL file.
    Kuroi Web Design and Development | Twitter

    (Questions answered in the forum only - so that any forum member can benefit - not by personal message)

  3. #3
    Join Date
    May 2005
    Posts
    532
    Plugin Contributions
    0

    Default Re: Stock by Attribute v4.0 for Zen Cart 1.3.5

    -removed as I have fixed issue and was being daft -



    Thanks

    MG
    Last edited by MikeyG; 26 Sep 2006 at 02:31 AM.

  4. #4
    Join Date
    May 2005
    Posts
    532
    Plugin Contributions
    0

    Default Re: Stock by Attribute v4.0 for Zen Cart 1.3.5

    I have been testing this further and I have issue with the maths.

    If I have sizes small, medium, large and stock of 1 of each and some one buys 2 of medium the stock by attributes will tell me that I have 1 in stock in total. But I have 2 in stock (one large and one small)

    So mathmatically 1+1+(-1)=1 but reality 1+1+(-1)=2

    can this be fixed - do people want it to be fixed? ie top line tells you total in stock. Variant lines tell you the exact stock for each one.

    Logic if I have this right would mean that if I have any positive stock add them up and tell me (ignoring any negatives). If I have all 0 or negative stock added them up and report all as a negative or as 0.

    Also a bit of a wish list - is it possible to work out all variants and add them to the database so only the qty has to be added. I know some have asked for a quicker way of entering the data.

    Thanks

    MG

  5. #5
    Join Date
    Oct 2006
    Posts
    5
    Plugin Contributions
    0

    Default Re: Stock by Attribute v4.0 for Zen Cart 1.3.5

    I just installed this mod and have the following problem.
    When "Add Quantity for Product Variant" I can select the varant from the drop down menus of attributes OK, but then when the variant is listed as
    Stock ID Variant Quantity in Stock etc
    all the variant are just listed as ":".
    Presumably this column is supposed to show the value of the attribute.

    Now I have no way of telling which variant is which,

    Any ideas?

  6. #6
    Join Date
    May 2006
    Posts
    98
    Plugin Contributions
    0

    Default Re: Stock by Attribute v4.0 for Zen Cart 1.3.5

    I installed this mod a couple of days ago to my test site and it was working just fine, but after some wrestling with some other issues on the site it is now not working. When I try to apply the sql patch in admin, I get the following error:

    1062 Duplicate entry 'STOCK_SHOW_LOW_IN_CART' for key 2
    in:
    [INSERT INTO configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES ('Show stock when low', 'STOCK_SHOW_LOW_IN_CART', 'false', 'When customer places more items in cart than are available, show the available amount on the shopping cart page:', '9', '6', NULL, now(), NULL, "zen_cfg_select_option(array('true', 'false')," );]

    I'm thinking this is probably why it's not working, but I'm just not savvy enough to know what I need to do to get it working again. Can someone help guide me?

    TIA!

  7. #7
    Join Date
    Apr 2006
    Location
    London, UK
    Posts
    10,569
    Plugin Contributions
    25

    Default Re: Stock by Attribute v4.0 for Zen Cart 1.3.5

    Quote Originally Posted by MikeyG View Post
    If I have sizes small, medium, large and stock of 1 of each and some one buys 2 of medium the stock by attributes will tell me that I have 1 in stock in total. But I have 2 in stock (one large and one small)
    That's a good point. This logic works in for Zen Cart's normal stock control where negative values indictate back orders but not for variants when the variant stock gets offset. Sadly this probably won't be fixed in Stock by Attributes, but will hopefully be taken into consideration when the function is absorded into Zen Cart's core code.

    Quote Originally Posted by trollboy View Post
    I just installed this mod and have the following problem.
    When "Add Quantity for Product Variant" I can select the varant from the drop down menus of attributes OK, but then when the variant is listed as
    Stock ID Variant Quantity in Stock etc
    all the variant are just listed as ":".
    This problem is not unique to this this version. It has just surfaced in the mod from which which this one was derived. I have located the problem and am working on a fix. Watch this space.

    Quote Originally Posted by buzzville View Post
    I installed this mod a couple of days ago to my test site and it was working just fine, but after some wrestling with some other issues on the site it is now not working. When I try to apply the sql patch in admin, I get the following error:

    1062 Duplicate entry 'STOCK_SHOW_LOW_IN_CART' for key 2
    in:
    [INSERT INTO configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES ('Show stock when low', 'STOCK_SHOW_LOW_IN_CART', 'false', 'When customer places more items in cart than are available, show the available amount on the shopping cart page:', '9', '6', NULL, now(), NULL, "zen_cfg_select_option(array('true', 'false')," );]
    This error is most likely because you are trying to run the patch a second time and MySQL is kicking up a fuss because you're trying to ram data that must be unique into the database for a second time. So it's unlikely to explain why the mod's not working for you. To hazard a guess at that would require something more specific than "after some wrestling with some other issues on the site it is now not working"
    Kuroi Web Design and Development | Twitter

    (Questions answered in the forum only - so that any forum member can benefit - not by personal message)

  8. #8
    Join Date
    May 2006
    Posts
    98
    Plugin Contributions
    0

    Re: Stock by Attribute v4.0 for Zen Cart 1.3.5

    Quote Originally Posted by kuroi View Post
    This error is most likely because you are trying to run the patch a second time and MySQL is kicking up a fuss because you're trying to ram data that must be unique into the database for a second time. So it's unlikely to explain why the mod's not working for you. To hazard a guess at that would require something more specific than "after some wrestling with some other issues on the site it is now not working"
    Ok, fair enough! The mod was working nicely before I imported my database into my test site (with test products). I had some issues importing my database into the install of 1.3.5 on my test site. Once it was finally imported to the test site I also had to rename all of the database tables to remove the "zen" prefix that was still present in my "live" database. Renaming all the tables got everything working again on the test site, but the mod doesn't appear to be working fully. I get the insufficient stock warning, but it doesn't show the remaining stock quantity so that customers know how to adjust the contents of their cart.

    Is it something in the tpl_shopping_cart_default.php file? This is what I found in what I thought was the relevant section of the file:

    Code:
    <?php if ((STOCK_SHOW_LOW_IN_CART == 'true') && $product['flagStockCheck']) {
             echo '<span class="alert bold">';
             echo PWA_STOCK_AVAILABLE;
    				 echo ((isset($product['stockAvailable'])) ? $product['stockAvailable']: 0);
             echo '</span>';
    			}?>
    Does this help at all? Thanks so much for the help!

  9. #9
    Join Date
    Apr 2006
    Location
    London, UK
    Posts
    10,569
    Plugin Contributions
    25

    Default Re: Stock by Attribute v4.0 for Zen Cart 1.3.5

    Quote Originally Posted by buzzville View Post
    I get the insufficient stock warning, but it doesn't show the remaining stock quantity so that customers know how to adjust the contents of their cart.

    Is it something in the tpl_shopping_cart_default.php file?
    You've found the right bit of code, but hopefully your solution will be much more straightforward. I suspect that your problem may be no more than that whilst wrestling your site back under control your Admin > Stock > "Show stock when low" flag has been reset to false (fingers crossed)
    Kuroi Web Design and Development | Twitter

    (Questions answered in the forum only - so that any forum member can benefit - not by personal message)

  10. #10
    Join Date
    May 2006
    Posts
    98
    Plugin Contributions
    0

    Default Re: Stock by Attribute v4.0 for Zen Cart 1.3.5

    Yes! Thank you! I hadn't thought to re-check there, but that seems to be exactly what happened. Now the remaining stock is showing! Thanks so much for this *much needed* addition!

 

 
Page 1 of 356 1231151101 ... LastLast

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