Page 53 of 113 FirstFirst ... 343515253545563103 ... LastLast
Results 521 to 530 of 1125
  1. #521
    Join Date
    Aug 2008
    Location
    Utah
    Posts
    28
    Plugin Contributions
    0

    Default Re: Stocks by attributes

    posted in error
    Last edited by jjgtrading; 20 Aug 2008 at 10:28 PM.

  2. #522
    Join Date
    Aug 2008
    Location
    Utah
    Posts
    28
    Plugin Contributions
    0

    Default Re: Stocks by attributes

    Ok, I haven't made much progress but I do recognize specifically whats going wrong.

    If the quantity for the base item purchased is greater than what is in stock, the message that says these products are out of stock does come up. If it is only a portion of the product ordered, specifically if two items are ordered in two different attributes but only one is in stock, the message will not show up.

    For example, I tried ordering 6 of the same style/product shirts off my site, 3 in white and extra large, and 3 in black and small. Since I only have 1 of the small black in stock page 1 of the checkout process just cycles when you click checkout. No message will be shown. If I try ordering 1 small black and 5 large white of shirt model AA and on the base product page I only enter 5 in stock the message that indicates products are out of stock will show up on both the large and small shirts.

  3. #523
    Join Date
    May 2007
    Posts
    114
    Plugin Contributions
    0

    Default Re: Stocks by attributes

    I think this topic has been discussed before, but i never found a resolution for it. Is there any way to make this Stocks by attributes mod use only some attributes but not others? or better yet, link some attributes to other products in the DB all together?

    Thank you

  4. #524
    Join Date
    Sep 2008
    Posts
    24
    Plugin Contributions
    0

    Default Re: Stocks by attributes

    Quote Originally Posted by bencart View Post
    I have now fixed this so that Product Attribute Grid and Stock by Attributes work when the attribute grid is setup to use single attributes.

    The file admin/products_with_attributes_stock.php needs this modification:

    Original Code:
    PHP Code:
                foreach($product_attributes as $option_name => $options)
                {
                    echo 
    '<p><strong>'.$option_name.': </strong>';
                    echo 
    zen_draw_pull_down_menu('attributes[]',$options).'</p>'."\n";
                } 
    Fixed Code:
    PHP Code:
                foreach($product_attributes as $option_name => $options)
                {
                    
    // if the option isn't the attribute grids dummy quantity attribute
                    
    if($option_name != 'Quantity')
                    {
                        echo 
    '<p><strong>'.$option_name.': </strong>';
                        echo 
    zen_draw_pull_down_menu('attributes[]',$options).'</p>'."\n";
                    }

                } 
    Wow. I am sooooooo glad you posted your solution. I had the exact same problem and your fix worked, only the "echo '<p><strong>'.$option_name"... part was further under the foreach loop than I expected. After inserting your IF statement, the stock_attribute column stopped displaying the ",quantityID" and then stock started working correctly again.

    The weird thing is I could have sworn the two modules (Attributes by stock and product grid) were working fine together. I have no idea what would have stopped them from working though, so I'll assume I just overlooked the issue in the beginning.

  5. #525
    Join Date
    Dec 2008
    Posts
    10
    Plugin Contributions
    0

    Default Re: Stocks by attributes

    I just download this mod from the Zen-Cart site.
    On the admin/products_with_attributes_stock.php and the admin/functions/extra_functions/functions_qty_attribute.php files I had to fix the table calls. Instead of calling the defined tables, the scrips were calling the actual table names.

    Stock Attribute v3.01.1 is the version that was on Free Add On page. Obviously, this needs to be updated.

  6. #526
    Join Date
    Sep 2008
    Posts
    24
    Plugin Contributions
    0

    Default Re: Stocks by attributes

    Quote Originally Posted by LoganSix View Post
    I just download this mod from the Zen-Cart site.
    On the admin/products_with_attributes_stock.php and the admin/functions/extra_functions/functions_qty_attribute.php files I had to fix the table calls. Instead of calling the defined tables, the scrips were calling the actual table names.
    What's the difference between defined tables and actual table names in terms of examples and why it matters?

    If I were to guess I'd say that the difference is like that of creating a sql query or referencing a previously created sql query from one of the header_php.php files. My guess doesn't sound close to me.

  7. #527
    Join Date
    Dec 2008
    Posts
    10
    Plugin Contributions
    0

    Default Re: Stocks by attributes

    Quote Originally Posted by oboeonetwothree View Post
    What's the difference between defined tables and actual table names in terms of examples and why it matters?
    The difference:
    WRONG
    Code:
    "SELECT options_id FROM products_attributes WHERE products_id = $products_id..."
    CORRECT
    Code:
    "SELECT options_id FROM " . TABLE_PRODUCTS_ATTRIBUTES . " WHERE products_id = $products_id..."
    When the tables names are defined they include the assigned table prefix.

    Code:
    define('TABLE_PRODUCTS_ATTRIBUTES', DB_PREFIX . 'products_attributes');
    If you assigned a table prefix to your Zen Cart tables, then not using the defined table name would cause an "table not found" error.

  8. #528
    Join Date
    Dec 2008
    Posts
    10
    Plugin Contributions
    0

    Default Re: Stocks by attributes

    Apparently the Stock by Attributes from mcinallym is compatible with v1.3.8, unlike the StockAttribute from danielcor. So, I guess I will try to use that instead. I guess I'll pay more attention to the version numbers.

    However, the issue that I found still needs to be fixed for the older versions.

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

    Default Re: Stocks by attributes

    Quote Originally Posted by LoganSix View Post
    Apparently the Stock by Attributes from mcinallym is compatible with v1.3.8, unlike the StockAttribute from danielcor. So, I guess I will try to use that instead. I guess I'll pay more attention to the version numbers.

    However, the issue that I found still needs to be fixed for the older versions.
    The version that you originally downloaded was only compatible with Zen Cart versions prior 1.3.5. There's no need to update it, since 1.3.5 was a major security update and anybody using an easrlier version would use their time better by upgrading that trying to fix redunandant mods (there was a heap of other bugs in the older version too that were squeezed out in Stock by Attributes 4.0).
    Kuroi Web Design and Development | Twitter

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

  10. #530
    Join Date
    Dec 2008
    Posts
    10
    Plugin Contributions
    0

    Default Re: Stocks by attributes

    Quote Originally Posted by kuroi View Post
    There's no need to update it, since 1.3.5 was a major security update and anybody using an easrlier version would use their time better by upgrading that trying to fix redunandant mods
    They should remove it from the download page then.

 

 

Similar Threads

  1. v139h Stocks of certain products disappearing automatically
    By Lowwi in forum General Questions
    Replies: 4
    Last Post: 11 Aug 2015, 09:09 PM
  2. Installing Stocks by Attribute
    By dragon03kf in forum Setting Up Categories, Products, Attributes
    Replies: 1
    Last Post: 26 Oct 2008, 07:42 PM
  3. Stocks by attributes
    By hcd888 in forum General Questions
    Replies: 1
    Last Post: 12 May 2008, 08:52 AM
  4. Multiple stocks per product
    By jaycode in forum General Questions
    Replies: 4
    Last Post: 5 Aug 2007, 11:55 AM
  5. Products with attribute stocks
    By Svanis in forum All Other Contributions/Addons
    Replies: 4
    Last Post: 5 Jul 2006, 03:19 AM

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