Page 2 of 2 FirstFirst 12
Results 11 to 19 of 19
  1. #11
    Join Date
    Oct 2007
    Posts
    17
    Plugin Contributions
    0

    Default Re: Unlimited quantity?

    Hello, i have a similar challenge. I have some products that will need a specific stock quantity defined while others need an infinite quantity.

    Currently we have many more products that are infinite quantity because they are drop shipped, etc. so we have the 'Configuration' setting set to not show 'Out of Stock' and allow customers to buy OOS products, etc.

    Becuase there are only a few products that need a stock quantity at the moment it is not the end of the world. However, at some point we will be adding many more products that will require a specifc quantity to be set and dissalow customers to buy OOS products, etc.

    I have done a lot of looking around here and it seems there is only an all or none solution to this. Have i missed a mod or solution to this problem? Isn't there just a way to enter a stock number for some itmes and an 'infinite' quantity to others? In concept it seems this shouldn't be all that hard but in execution it obviously must be much more difficult.

    As often as i have seen this paradox come up, it would seem like there would be some sort of solution. I am hopeful that i have just not come accross it yet and since i am not all that good of a coder i would certainly be very appreciative.

    Any help or suggestions would be greatly appreciated.

    thX,
    -CC

  2. #12
    Join Date
    Nov 2007
    Posts
    54
    Plugin Contributions
    0

    Default Re: Unlimited quantity?

    I'm looking for a solution to the exact same product, ComputerCandy.

    For now, just to get things up and going, I'm just listing the quantity as a large number and changing that as need be to keep it there, but that's obviously a temporary solution. Anyone that has input as to how to have some items unlimited and others limited? I would greatly appreciate it!

  3. #13
    Join Date
    Aug 2008
    Posts
    2
    Plugin Contributions
    0

    Default Re: Unlimited quantity?

    ComputerCandy / aesthetics - I know this is getting on for a year now, but did you ever find a solution to your problem? I'm setting up a shop for a client and I am in the same boat.

  4. #14
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: Unlimited quantity?

    You could add a bit of code to check the quantity in stock and, if it is more than 1000 (or whatever number you want), output "Unlimited".

    Alter this line in the <!--bof Product details list --> block of tpl_product_info_display.php:
    PHP Code:
      <?php echo (($flag_show_product_info_quantity == 1) ? '<li>' $products_quantity TEXT_PRODUCT_QUANTITY '</li>'  '') . "\n"?>
    to read
    PHP Code:
      <?php echo (($flag_show_product_info_quantity == 1) ? '<li>' . ($products_quantity >= 1000 'Unlimited' $products_quantity) . TEXT_PRODUCT_QUANTITY '</li>'  '') . "\n"?>
    Actually keeping the quantity above 1000 automatically when stock subtraction is enabled may require some database interaction. Simply modifying $products_quantity will likely not be effective, as it is probably determined anew from the db each time the product is viewed.

  5. #15
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: Unlimited quantity?

    The most effective location for managing unlimited stock quantities may be in the code that performs the subtraction. (I haven't looked for its location yet.)
    You could add code to check the quantity and skip subtraction if it is more than 1000.

  6. #16
    Join Date
    Feb 2007
    Posts
    2
    Plugin Contributions
    0

    Default Re: Unlimited quantity?

    Quote Originally Posted by gjh42 View Post
    The most effective location for managing unlimited stock quantities may be in the code that performs the subtraction. (I haven't looked for its location yet.)
    You could add code to check the quantity and skip subtraction if it is more than 1000.
    This is exactly what I did. In includes/classes/orders.php look for NOTIFY_ORDER_PROCESSING_STOCK_DECREMENT_BEGIN. In the second if statement I added
    && ($stock_values->fields['products_quantity'] < 999999) after the parentheses so that any quantity over and including 999,999 will never be decremented. I don't expect to ever have a million of any product. Now I just set the quantity to 999999 for products that are unlimited.

  7. #17
    Join Date
    Nov 2008
    Location
    New York City
    Posts
    95
    Plugin Contributions
    0

    Default Re: Unlimited quantity?

    Quote Originally Posted by kmwade View Post
    This is exactly what I did. In includes/classes/orders.php look for NOTIFY_ORDER_PROCESSING_STOCK_DECREMENT_BEGIN. In the second if statement I added
    && ($stock_values->fields['products_quantity'] < 999999) after the parentheses so that any quantity over and including 999,999 will never be decremented. I don't expect to ever have a million of any product. Now I just set the quantity to 999999 for products that are unlimited.
    Wanting unlimited stock for only one product but this might be as good. Still what would need to be changed for just one product?

  8. #18
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: Unlimited quantity?

    That suggestion will work for one product or a hundred. Just set the quantity for the product to a million.

    Products with smaller stock quantities will still work the normal way.

  9. #19
    Join Date
    Feb 2008
    Posts
    129
    Plugin Contributions
    0

    Default Re: Unlimited quantity?

    I know this thread is a year old, but thank you!!! This was exactly what I needed.

 

 
Page 2 of 2 FirstFirst 12

Similar Threads

  1. Unlimited Quantity??
    By timbreman in forum Setting Up Categories, Products, Attributes
    Replies: 6
    Last Post: 23 Jan 2014, 07:10 PM
  2. Unlimited products quantity
    By ampm11 in forum General Questions
    Replies: 7
    Last Post: 31 Dec 2010, 08:16 AM
  3. Unlimited Quantity not working
    By Tech NO Babble in forum Setting Up Categories, Products, Attributes
    Replies: 5
    Last Post: 11 Oct 2010, 08:25 PM
  4. Unlimited Quantity
    By GaryDaSnail in forum Setting Up Categories, Products, Attributes
    Replies: 15
    Last Post: 7 May 2008, 12:31 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