Zen Cart Logo
If this is your first visit, check our documentation. To post, register or login.
Forums / General Questions / General Questions / Option of displaying number of units in stock

Option of displaying number of units in stock

Locked

Started by dhau on 3 Nov 2007, 7:39 PM · Views: 2,558

Results 1 to 17 of 17
This thread is locked. New replies are disabled.
3 Nov 2007, 7:39 PM
#1
dhau avatar

dhau

New Zenner

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

Post #1 by dhau

When I'm creating a new product and choosing the minimum and maximum quantity, how can I set the minimum quantity to be unlimited?

For example with Product Qty Maximum: I can choose 0 = Unlimited

But I can't do the same with Product Qty Minimum:

If I set it to 0 and insert the product, it will always default back to 1.

The reason I'm asking is because my store is divided into Products and Services. For my services, there's no quantity involved which is why I don't want it to say for example "19 Units in Stock" cause it's a service and not a product which increases or decreases according to what's in stock.

Please help, thanks.

Daniel

3 Nov 2007, 7:59 PM
#2
dhau avatar

dhau

New Zenner

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

Post #2 by dhau

I would like to know how can I have the option of displaying or hiding the number of Units in Stock for certain products?

For example I want a product to have 1000000 units. But I don't want it to say on the product page "100000 Units in Stock"

However for some of my other products, I do want it to show the number of Units in Stock.

Please help, thanks.

Daniel

3 Nov 2007, 10:55 PM
#3
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Post #3 by ajeh

What is the criteria for when you do and don't want the products_quantity to show? :smile:

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

4 Nov 2007, 1:31 AM
#4
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Post #4 by ajeh

You cannot order a Minimum of 0 ...

Just set it to 1 as a Minimum is the least amount you can buy and usually you want to buy a whole Widget and not pay money of 0 Widgets ... :smile:

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

4 Nov 2007, 2:22 AM
#5
dhau avatar

dhau

New Zenner

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

Post #5 by dhau

Sorry, let me explain my situation better.

I would like to know how can I have the option of displaying or hiding the number of Units in Stock for certain products?

For example I want a product to have 1000000 units. But I don't want it to say on the product page "100000 Units in Stock"

However for some of my other products, I do want it to show the number of Units in Stock.

Please help, thanks.

Daniel

4 Nov 2007, 2:24 AM
#6
Kim avatar

Kim

Obaa-san

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

Post #6 by Kim

Use 2 different product types - one for the display and one without.

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.

4 Nov 2007, 2:28 AM
#7
dhau avatar

dhau

New Zenner

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

Post #7 by dhau

I have some parts of the shopping site selling as services, so showing the number of units for the service is irrelevant.

However other parts of the shopping site have products so the number of units for that product would be relevant.

This is why I'm trying to find out how to make the number of Units in Stock to display as an option.

Please help, thanks.

Daniel

4 Nov 2007, 2:33 AM
#8
Kim avatar

Kim

Obaa-san

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

Post #8 by Kim

Your 2 separate threads have been merged into one. Please DO NOT post the same question in different places.

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.

4 Nov 2007, 2:39 AM
#9
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Post #9 by ajeh

If all Services are marked as:
Product is Virtual: YES

and all Virtual Products should NOT show the products_quantity ... you could customize the product _info file using the templates and overrides ...

Or, use the method Kim suggested so you are not confused as to who is who in the zoo ... :cool:

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

4 Nov 2007, 4:47 AM
#10
dhau avatar

dhau

New Zenner

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

Post #10 by dhau

I'm currently using different product types. For example you'll see Decor 3 on this page has a quantity of 12345,

http://homemade-remedies.com/p2g/index.php?main_page=index&cPath=68

Ideally no number should be displayed at all. But I can't find an option to hide it.

I can certainly remove the quantity field altogether in the php file, but that would affect the actual products on the site which do require the quantity shown.

Please help, thanks.

4 Nov 2007, 5:00 AM
#11
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Post #11 by ajeh

Aha! a clue ... you mean that one ... :smartalec:

You could customize the products_listing module by changing the code that reads:

        case 'PRODUCT_LIST_QUANTITY':
        $lc_align = 'right';
        $lc_text = $listing->fields['products_quantity'];
        break;

to read:

        case 'PRODUCT_LIST_QUANTITY':
        $lc_align = 'right';
        if ($listing->fields['products_type'] == 4) {
        $lc_text = '';
        } else {
        $lc_text = $listing->fields['products_quantity'];
        }
        break;

NOTE: this assumes that document_product is still 4 ...

NOTE: Be sure to use your templates and overrides for this ...

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

4 Nov 2007, 7:27 AM
#12
dhau avatar

dhau

New Zenner

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

Post #12 by dhau

Wow, that's exactly what I need.

Which php file would this case statement be in?

Thanks.

4 Nov 2007, 3:54 PM
#13
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Post #13 by ajeh

In the module for the product_listing ... :smile:

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

4 Nov 2007, 5:30 PM
#14
dhau avatar

dhau

New Zenner

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

Post #14 by dhau

Thank you so much.

I really appreciate it.

Daniel

26 Nov 2008, 3:36 PM
#15
tracib avatar

tracib

Zen Follower

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

Post #15 by tracib

Ajeh:

NOTE: this assumes that document_product is still 4 ...

I am trying to do the same thing, and made the change in the php file, but the quantity still shows for the customer. And I'm not sure what you mean by assuming that document_product is still 4.

26 Nov 2008, 4:48 PM
#16
tracib avatar

tracib

Zen Follower

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

Post #16 by tracib

After I made that change, it caused the products not to show up in the category when viewing the shop, but after I deleted the change, they appeared again.

26 Nov 2008, 7:07 PM
#17
tracib avatar

tracib

Zen Follower

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

Post #17 by tracib

With some searching, I found a thread with a solution that worked for me. I'll post the link in case someone has the same situation.