Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Sign in to follow this  
kep@

Quantity for Login Members Only

Recommended Posts

Is it somehow possible to set that only Login Members can see the quantities ?

Share this post


Link to post
Share on other sites

You can do this if you are at least semi-technical. The database setting to display quantity is called, PRODUCT_LIST_QUANTITY.

It's found in the following 4 core files, though there could be other instances depending on your add-ons.

advanced_search_results.php

products_new.php

specials.php

/includes/modules/product_listing.php

There are different ways to do this, but one of the simplest is to condition the code related to PRODUCT_LIST_QUANTITY by wrapping it in an IF statement, like:

if (tep_session_is_registered('customer_id')) {

// PRODUCT_LIST_QUANTITY related code

}

If this is too technical for you, then you will need to find someone to do it for you. I just gave you the blueprint for it.

However, I think you should first search the osC add-ons marketplace to see if someone might have posted an add-on for this.

 

 

Edited by Demitry

osCommerce: made for programmers, ...because store owners do not want to be programmers.

https://trends.google.com/trends/explore?date=all&geo=US&q=oscommerce

Share this post


Link to post
Share on other sites

thanks
That's it

But for me it only exists in product_listing.php

PRODUCT_LIST_QUANTITY does not exist in these files

advanced_search_result.php
products_new.php
specials.php
product_info.php

It would be good to add them there just to see how I would do it.

 

Share this post


Link to post
Share on other sites

Now I see that all these files are used to display product_listing.php except the file product_info.php

Share this post


Link to post
Share on other sites

What osCommerce version do you have?

I did a quick search for that database constant and those 4 files came up.

Also, your IF statement will be slightly different if you have the Guest Checkout add-on installed.

 

 

Edited by Demitry

osCommerce: made for programmers, ...because store owners do not want to be programmers.

https://trends.google.com/trends/explore?date=all&geo=US&q=oscommerce

Share this post


Link to post
Share on other sites

Ok, ..so I don't have that version here. The closest to this that I have is v2.3.4

I ran a quick scan on that version and the results were slightly different.

advanced_search_results.php

index.php

/includes/modules/product_listing.php

That product_listng module is included in several files.

 

 

Edited by Demitry

osCommerce: made for programmers, ...because store owners do not want to be programmers.

https://trends.google.com/trends/explore?date=all&geo=US&q=oscommerce

Share this post


Link to post
Share on other sites

As I recall, core osC for that version does not provide an "available stock" display field on the product_info.php page. I'm sure there's a simple add-on for this. When you locate it, just wrap the available stock code using the same IF statement. 

 

 


osCommerce: made for programmers, ...because store owners do not want to be programmers.

https://trends.google.com/trends/explore?date=all&geo=US&q=oscommerce

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×