If this is your first visit, check our documentation. To post, register or login.

Unlimited quantity?

Locked

Started by hawkeye on 14 May 2007, 8:08 PM · Views: 11,097

Results 1 to 19 of 19
This thread is locked. New replies are disabled.
14 May 2007, 8:08 PM
#1
hawkeye avatar

hawkeye

New Zenner

Join Date:
May 2007
Posts:
10
Plugin Contributions:
0

Post #1 by hawkeye

Hi;

My site is about online services and download, so how do i make the quantity of products are unlimited; so i dont need to add them every time run out of stock? Since its never run out of stock...

Thanks

14 May 2007, 8:12 PM
#2
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,874
Plugin Contributions:
8

Post #2 by gjh42

In admin > Configuration > Stock, set check stock and subtract stock to false. Make sure you have a quantity in stock of 1 or more in the product entry/editing page.

14 May 2007, 8:32 PM
#3
hawkeye avatar

hawkeye

New Zenner

Join Date:
May 2007
Posts:
10
Plugin Contributions:
0

Post #3 by hawkeye

great thanks a lot

19 May 2007, 7:15 PM
#4
bjraines avatar

bjraines

Zen Follower

Join Date:
Jun 2006
Posts:
223
Plugin Contributions:
0

Post #4 by bjraines

gjh42:

In admin > Configuration > Stock, set check stock and subtract stock to false. Make sure you have a quantity in stock of 1 or more in the product entry/editing page.

thanks for this info but by doing this it says there is 1 in stock on my product info page

i want to show i have unlimited stock.....how?

19 May 2007, 9:01 PM
#5
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,874
Plugin Contributions:
8

Post #5 by gjh42

In Tools > Developers Toolkit, enter "units in stock" in the upper left box, select catalog files and search. This will show the file and line number where the text is defined. Edit that to say what you want and put the file in your template override folder.

To not show the number, find in tpl_product_info.php ```php

<!--bof Product details list --> <?php if ( (($flag_show_product_info_model == 1 and $products_model != '') or ($flag_show_product_info_weight == 1 and $products_weight !=0) or ($flag_show_product_info_quantity == 1) or ($flag_show_product_info_manufacturer == 1 and !empty($manufacturers_name))) ) { ?> <ul id="productDetailsList" class="floatingBox back"> <?php echo (($flag_show_product_info_model == 1 and $products_model !='') ? '<li>' . TEXT_PRODUCT_MODEL . $products_model . '</li>' : '') . "\n"; ?> <?php echo (($flag_show_product_info_weight == 1 and $products_weight !=0) ? '<li>' . TEXT_PRODUCT_WEIGHT . $products_weight . TEXT_PRODUCT_WEIGHT_UNIT . '</li>' : '') . "\n"; ?> <?php echo (($flag_show_product_info_quantity == 1) ? '<li>' . $products_quantity . TEXT_PRODUCT_QUANTITY . '</li>' : '') . "\n"; ?> <?php echo (($flag_show_product_info_manufacturer == 1 and !empty($manufacturers_name)) ? '<li>' . TEXT_PRODUCT_MANUFACTURER . $manufacturers_name . '</li>' : '') . "\n"; ?> </ul> ``` and delete

. $products_quantity

 <?php echo (($flag_show_product_info_quantity == 1) ? '<li>' . TEXT_PRODUCT_QUANTITY . '</li>'  : '') . "\n"; ?>
 
20 May 2007, 12:57 AM
#6
Kim avatar

Kim

Obaa-san

Join Date:
Jun 2003
Location:
West Coast, North America
Posts:
26,758
Plugin Contributions:
0

Post #6 by Kim

ACK! No need to touch the files to turn off the quantity - look in your Admin> Catalog> Product Types> Product General - click edit layout and then disable the product quantity display.

Please do not PM for support issues: a private solution doesn't benefit the community.

Be careful with unsolicited advice via email or PM - Make sure the person you are talking to is a reliable source.

20 May 2007, 1:11 AM
#7
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,874
Plugin Contributions:
8

Post #7 by gjh42

This was for the case where he wanted to have an "unlimited stock" message showing, so just turning it off would eliminate that.

Yes, it would be easier to just turn qty in stock off and indicate elsewhere that there is no limit.

23 Jul 2007, 5:08 PM
#8
hansi avatar

hansi

New Zenner

Join Date:
Aug 2006
Posts:
67
Plugin Contributions:
0

Post #8 by hansi

Hi,

I tried your suggestion for the Document-Product type but it does not work. I am selling a service and everytime a customer purchases a service, the service in the shopping cart will be displayed in red with 3 asterisks (out of stock).

Is there a way around it?

Regards,

Hansi

23 Jul 2007, 5:13 PM
#9
hansi avatar

hansi

New Zenner

Join Date:
Aug 2006
Posts:
67
Plugin Contributions:
0

Post #9 by hansi

Hi,

I think that I figured it out. You have to also set the Check Stock level option to false.

Hansi

23 Jul 2007, 5:17 PM
#10
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,874
Plugin Contributions:
8

Post #10 by gjh42

You didn't try all the suggestions, because at least one of them will work for your case.

In admin > Configuration > Stock, set check stock and subtract stock to false. Make sure you have a quantity in stock of 1 or more in the product entry/editing page.


Ok, good for you!

31 Oct 2007, 4:20 AM
#11
computer_candy avatar

computer_candy

New Zenner

Join Date:
Oct 2007
Posts:
17
Plugin Contributions:
0

Post #11 by computer_candy

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. :smile:

thX,
-CC

29 Nov 2007, 9:50 PM
#12
aesthetics avatar

aesthetics

New Zenner

Join Date:
Nov 2007
Posts:
54
Plugin Contributions:
0

Post #12 by aesthetics

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!

Aesthetics
Professional piercing, custom body jewelry.

12 Aug 2008, 3:52 PM
#13
bigman avatar

bigman

New Zenner

Join Date:
Aug 2008
Posts:
2
Plugin Contributions:
0

Post #13 by bigman

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.

14 Aug 2008, 5:52 AM
#14
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,874
Plugin Contributions:
8

Post #14 by gjh42

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

<?php echo (($flag_show_product_info_quantity == 1) ? '<li>' . $products_quantity . TEXT_PRODUCT_QUANTITY . '</li>' : '') . "\n"; ?>

to readphp

<?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.
14 Aug 2008, 6:00 AM
#15
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,874
Plugin Contributions:
8

Post #15 by gjh42

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.

30 Aug 2008, 4:22 AM
#16
kmwade avatar

kmwade

New Zenner

Join Date:
Feb 2007
Posts:
2
Plugin Contributions:
0

Post #16 by kmwade

gjh42:

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.

4 Jan 2009, 5:11 AM
#17
rhaught avatar

rhaught

New Zenner

Join Date:
Nov 2008
Location:
New York City
Posts:
95
Plugin Contributions:
0

Post #17 by rhaught

kmwade:

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?

The Film Bunker

4 Jan 2009, 5:50 AM
#18
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,874
Plugin Contributions:
8

Post #18 by gjh42

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.

8 Dec 2010, 12:02 AM
#19
susb8383 avatar

susb8383

Zen Follower

Join Date:
Feb 2008
Posts:
129
Plugin Contributions:
0

Post #19 by susb8383

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