Page 172 of 360 FirstFirst ... 72122162170171172173174182222272 ... LastLast
Results 1,711 to 1,720 of 3592
  1. #1711
    Join Date
    Sep 2011
    Posts
    135
    Plugin Contributions
    0

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

    I would say using phpmyadmin you should be able to do this. There would be a query you could run that will populate all the fields with 15 or whatever stock level you want. Im not sure what the query would need to be exactly though.

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

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

    Quote Originally Posted by ray-the-otter View Post
    HI, is it possible to do a 'bulk' or 'batch' action to "Add Quantity For Product Variant" on all products at once?

    My problem see, is that I seem to have to mouse-click on "Add Quantity For Product Variant" for each product, then select ALL and the add Quantity to create the Stock ID.

    I'd like to be able to Add "Quantity For Product Variant" on all products that have attributes at once. As I have 2000+ products, all with the same 15 attributes. And it is taking some time to do this individually, product by product, just to create the 'Stock ID'

    All help appreciated, thanks


    This depends on what version of the mod you are running.
    If you are using the version 1.5.1.2, than this functionality is built into the installation script as a selection.

    After installation you can use the "Run Optional SQL", This script will Makes entries into the new SBA Table based on the products that have attributes associated.

    After running the script you can do an export 'Export Table Data' of the table to a CSV file and update the stock using excel (save file as CSV), use "Import Table Data'... This is explained in the documentation under Optional SQL:

    Optional.sql

    The Optional SQL script is intended to initially fill the stock table with the same quantity that the product has. The script only creates entries for products that have associated attributes.
    The first time the script is run on a clean new installation (the new SBA stock table is empty), then all found records are added.
    Backup Files and Databases First. GitHub
    Suggestions, Plugins, etc. used at your own risk.

  3. #1713
    Join Date
    Sep 2013
    Location
    Oregon, USA
    Posts
    2
    Plugin Contributions
    0

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

    I'm having a problem that I can't find reference to on this thread.

    When I have a product with attributes and stock for each attribute a customer can choose to order whichever version they want. However when they check out, stock is removed from the overall stock levels for the product, but not for the particular attribute.

    For example, if I have product A with variants Ab and Ac, and I start with stock of 10 each. A customer purchases 5 in variant Ac; my stock for product A now says 15, but Ab shows as 10, and Ac shows as ten. Worse (which has happened) a customer buys all of Ac, but then the next customer can still choose to buy 10 more that don't exist.

    I am using V1.5.0, SBA version 1.5.0, however I was having the same issue with an earlier SBA which I uninstalled over the summer and re-installed just recently. I merged all of the files needed, and everything else seems to work.

    Any ideas on where to even start looking?

    Thanks.

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

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

    Quote Originally Posted by NWCider View Post
    I'm having a problem that I can't find reference to on this thread.

    ...

    Any ideas on where to even start looking?

    Thanks.
    Hi,
    The code that should be doing this is in: includes\classes\order.php on about line 739, with the title:
    // kuroi: Begin Stock by Attributes additions
    // added to update quantities of products with attributes

    I was not aware this did not work correctly.
    This is an area of the code I have not looked closely at yet. If you solve the problem, would you let us know, I am working on an updated version of this mode to include some additional features, and could add that fix.
    Backup Files and Databases First. GitHub
    Suggestions, Plugins, etc. used at your own risk.

  5. #1715
    Join Date
    Dec 2012
    Posts
    607
    Plugin Contributions
    0

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

    In my case it works fine.

    I have Product A with 3 attributes.

    Prod A, Attribute A (9 QTY)
    Prod A, Attribute B (3 QTY)
    Prod A, Attribute C (1 QTY)

    Displaying 13 Units in Stock

    When I checkout one (purchase) from Prod A, Attribute B. After checkout, product_info page displays:

    Prod A, Attribute A (9 QTY)
    Prod A, Attribute B (2 QTY)
    Prod A, Attribute C (1 QTY)

    Displaying 12 Units in Stock

    It works fine for me.
    Using Zen Cart 1.5.1

  6. #1716
    Join Date
    Dec 2012
    Posts
    607
    Plugin Contributions
    0

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

    Tried another test. Checked out 5 of units of Prod A, Attribute A

    Prod A
    Attribute A (4 QTY)
    Attribute B (2 QTY)
    Attribute C (1 QTY)

    Displaying 7 Units in Stock

    Code works fine here.
    Last edited by Kevin205; 2 Oct 2013 at 06:05 AM.
    Using Zen Cart 1.5.1

  7. #1717
    Join Date
    Sep 2013
    Location
    Oregon, USA
    Posts
    2
    Plugin Contributions
    0

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

    Thanks for the ideas. The file you referenced was replaced in the install, so it should be fresh. Here is the code in that section, it all looks good to me, but I'm not an advanced code reader...

    I also re-checked my stock config settings and everything seems to be correct.

    // kuroi: Begin Stock by Attributes additions
    // added to update quantities of products with attributes
    $attribute_search = array();
    $attribute_stock_left = STOCK_REORDER_LEVEL + 1; // kuroi: prevent false low stock triggers

    if(isset($this->products[$i]['attributes']) and sizeof($this->products[$i]['attributes']) >0){
    foreach($this->products[$i]['attributes'] as $attributes){
    $attribute_search[] = $attributes['value_id'];
    }

    if(sizeof($attribute_search) > 1){
    $attribute_search = 'where options_values_id in ("'.implode('","', $attribute_search).'")';
    } else {
    $attribute_search = 'where options_values_id="' . $attribute_search[0].'"';
    }

    $query = 'select products_attributes_id from ' . TABLE_PRODUCTS_ATTRIBUTES . ' ' . $attribute_search .' and products_id="' . zen_get_prid($this->products[$i]['id']) . '" order by products_attributes_id';
    $attributes = $db->Execute($query);
    $stock_attributes_search = array();
    while(!$attributes->EOF){
    $stock_attributes_search[] = $attributes->fields['products_attributes_id'];
    $attributes->MoveNext();
    }
    if(sizeof($stock_attributes_search) > 1){
    $stock_attributes_search = implode(',', $stock_attributes_search);
    } else {
    foreach($stock_attributes_search as $attribute_search){
    $stock_attributes_search1 = $attribute_search;
    }
    $stock_attributes_search = $stock_attributes_search1;
    }

    $get_quantity_query = 'select quantity from ' . TABLE_PRODUCTS_WITH_ATTRIBUTES_STOCK . ' where products_id="' . zen_get_prid($this->products[$i]['id']) . '" and stock_attributes="' . $stock_attributes_search . '"';

    $attribute_stock_available = $db->Execute($get_quantity_query);
    $attribute_stock_left = $attribute_stock_available->fields['quantity'] - $this->products[$i]['qty'];

    $attribute_update_query = 'update ' . TABLE_PRODUCTS_WITH_ATTRIBUTES_STOCK . ' set quantity='.$attribute_stock_left.' where products_id="' . zen_get_prid($this->products[$i]['id']) . '" and stock_attributes="' . $stock_attributes_search . '"';
    $db->Execute($attribute_update_query);
    }
    // kuroi: End Stock by Attribute additions

  8. #1718
    Join Date
    Feb 2006
    Location
    NM
    Posts
    750
    Plugin Contributions
    1

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

    NWCider

    I solved this issue on my 1.5.1 cart on a Linux server...and it was addressed in the other thread. I'll try and refresh my memory of it and post.

    SBA for 1.5.x http://www.zen-cart.com/showthread.p...-5-0%29/page32

    In the mean time, I'm wondering why updates to this mod are here for zencart version 1.5.x?

  9. #1719
    Join Date
    Feb 2006
    Location
    NM
    Posts
    750
    Plugin Contributions
    1

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

    NWCider - just to follow up, especially if you are new to SBA and 1.5.1 - not sure if this is relevant as it seems this thread has taken over the development of this mod. Here is my post about the issue of sync quantities from that other thread...but, once our site was up and running for a few days on the Linux server the user RoboPhung's version began behaving without issues as long as we had the settings as described here. (Not trying to confuse things further, Just getting in the game, guys, so I can stay in the loop of the newer developments on this valuable zencart need.)

    We have mostly non-attribute items up to about 1200 total. About thirty of those have attributes. We have RoboPhungs version installed and are still working on a sync quantities issue; However, everything else seems to be working very well in 1.5.1.

    The sync issue for us is currently being solved by just pushing the "sync all quantities" link every day on the Config > SBA page, other wise, customers can check out without the help of a warning, only if the number of product with the chosen attribute is less than the total quantity of the product. Some weirdness that RoboPhung is working on and may just be some install issue on our end.

    Check your install, (as if you haven't...but check it again anyways). Also, because single drop down does not work, check that under Config > Stock you are using:

    Check stock level true
    Product Info Single Attribute - multiple_dropdowns
    Product Info Multiple Attribute - sequenced_dropdowns

  10. #1720
    Join Date
    Feb 2004
    Posts
    1,278
    Plugin Contributions
    0

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

    1.5.1 Questions

    What happens when I sync all quantities?

    Can I change it so when people DO NOT select an option it prevents from ordering?
    Can I change it so when products with attributes but no stock qty, it goes to unlimited?

 

 

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