kep@ Posted February 15, 2022 Posted February 15, 2022 Is it somehow possible to set that only Login Members can see the quantities ?
Demitry Posted February 15, 2022 Posted February 15, 2022 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. 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
kep@ Posted February 15, 2022 Author Posted February 15, 2022 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.
kep@ Posted February 15, 2022 Author Posted February 15, 2022 Now I see that all these files are used to display product_listing.php except the file product_info.php
Demitry Posted February 15, 2022 Posted February 15, 2022 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. 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
kep@ Posted February 15, 2022 Author Posted February 15, 2022 I don't have the Guest Checkout add-on installed
Demitry Posted February 15, 2022 Posted February 15, 2022 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. 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
kep@ Posted February 18, 2022 Author Posted February 18, 2022 Yes, it is exactly as you wrote And now everything works as I wanted
Demitry Posted February 18, 2022 Posted February 18, 2022 Good! I'm glad this was helpful. 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
kep@ Posted February 18, 2022 Author Posted February 18, 2022 Now I'm trying to figure out how to add it to the product_info.php page
Demitry Posted February 18, 2022 Posted February 18, 2022 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
Recommended Posts
Archived
This topic is now archived and is closed to further replies.