Results 1 to 5 of 5
  1. #1
    Join Date
    Jul 2009
    Posts
    41
    Plugin Contributions
    0

    Default Stock By Attributes help

    hello all
    im using the stock by atributes modual but theres a problem. it takes in to account of how much of the particular shoe i have in stock but not how much of the actuall size i have in stock. for example if i have 12 shoes but only 2 size 4s you can order 12 size 4s without it showing up as out of stock. any ways of fixing this.

    thanks for your help

  2. #2
    Join Date
    Feb 2005
    Location
    Lansing, Michigan USA
    Posts
    20,021
    Plugin Contributions
    3

    Default Re: Stock By Attributes help

    If I understand it, the Stock by Attributes mod is not a dependent attributes mod. If the original attribute is 'type of shoe', 'shoe size' would be a dependent attribute, and isn't supported.

  3. #3
    Join Date
    Jul 2006
    Location
    SF Bay Area
    Posts
    867
    Plugin Contributions
    1

    Default Re: Stock By Attributes help

    I think he means that if there are 4 black shoes and 4 red shoes, you can still checkout with 6 red shoes in your cart.

    Try this:

    in includes/modules/pages/checkout_shipping/header_php.php

    Find:

    HTML Code:
    // Stock Check
      if ( (STOCK_CHECK == 'true') && (STOCK_ALLOW_CHECKOUT != 'true') ) {
        $products = $_SESSION['cart']->get_products();
        for ($i=0, $n=sizeof($products); $i<$n; $i++) {
          if (zen_check_stock($products[$i]['id'], $products[$i]['quantity'])) {
            zen_redirect(zen_href_link(FILENAME_SHOPPING_CART));
            break;
          }
        }
      }
    and replace with:

    Code:
    // Stock Check
      if ( (STOCK_CHECK == 'true') && (STOCK_ALLOW_CHECKOUT != 'true') ) {
        $products = $_SESSION['cart']->get_products();
        for ($i=0, $n=sizeof($products); $i<$n; $i++) {
    
          // Added to allow individual stock of different attributes
          unset($attributes);
          if(is_array($products[$i]['attributes'])) {
    	      $attributes = $products[$i]['attributes'];
          } else  {
    	      $attributes = '';
          }
          // End change
    
          if (zen_check_stock($products[$i]['id'], $products[$i]['quantity'], $attributes)) {
            zen_redirect(zen_href_link(FILENAME_SHOPPING_CART));
            break;
          }
        }
      }
    This may make it act like you expect.

    Or maybe not.

  4. #4
    Join Date
    Jul 2009
    Posts
    41
    Plugin Contributions
    0

    Default Re: Stock By Attributes help

    thanks i just got so fustrated and reinstalled the stock by atributes mod like ten times but yay it did the trick lol. its such a good feature and it finally works.
    well thanks for your time and help. much love

  5. #5
    Join Date
    Jul 2006
    Location
    SF Bay Area
    Posts
    867
    Plugin Contributions
    1

    Default Re: Stock By Attributes help

    Coolies! Glad that work for you.

    Good luck with your shop.

 

 

Similar Threads

  1. v151 Using Stock By Attributes, In Stock Value Is Sum Of Attributes' Stock
    By y0ul053 in forum All Other Contributions/Addons
    Replies: 4
    Last Post: 29 Aug 2013, 04:23 PM
  2. Replies: 5
    Last Post: 3 Aug 2011, 08:15 AM
  3. Stock By Attributes Help
    By jazdeep in forum All Other Contributions/Addons
    Replies: 0
    Last Post: 17 May 2011, 10:29 PM
  4. Stock by Attributes Help
    By rawmuaythai in forum Setting Up Categories, Products, Attributes
    Replies: 1
    Last Post: 9 Mar 2010, 09:49 PM
  5. Combining Attributes with stock and attributes w/o stock
    By ~Meg~ in forum All Other Contributions/Addons
    Replies: 4
    Last Post: 10 Oct 2006, 09:20 AM

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