bbjrnse Posted September 24, 2013 Posted September 24, 2013 Is there any way to enter product information that is not displayed to customers only visible by administration?
♥mommaroodles Posted September 24, 2013 Posted September 24, 2013 use a if else statement where ever you want to display/hide the info. "The doorstep to the temple of wisdom is a knowledge of our own ignorance."
♥mommaroodles Posted September 24, 2013 Posted September 24, 2013 A person would need more information from you as to what you want to do exactly, but straight off, if you dont want anyone BUT admin to see the product information, meaning you want to disable the product information for everyone, customers and visitors to your site included. You could do the following: Bear in mind that the only way the site will be able to distinguish the difference between admin and a general visitor or customer, you would need to register a session first. So what I would do is: - First create an account at your site as if you were the customer. Then you need to look in the customers table in the database to see what the id is that has been assigned to you. Then in the product information page you could add soemthing like this: <?php if (tep_session_is_registered('customer_id') && $customer_id == '1') { echo stripslashes($product_info['products_description']); }elseif($customer_id != '1'){ echo ' '; } ?> In the above code the '1' would be your customers_id in the customers table in the database. if someone else knows of a better way, then perhaps they could share their method with us too. :) "The doorstep to the temple of wisdom is a knowledge of our own ignorance."
♥joli1811 Posted September 24, 2013 Posted September 24, 2013 well inventing the wheel again would be nice if you upload with the instructions for 2.3 Ps: we are missing a few update s for for the latest versions so go for it regards Joli To improve is to change; to be perfect is to change often.
♥mommaroodles Posted September 24, 2013 Posted September 24, 2013 well inventing the wheel again would be nice if you upload with the instructions for 2.3 Ps: we are missing a few update s for for the latest versions so go for it regards Joli not sure what you mean by "missing a few updates" for the latest versions - the snippet of code i added will work with any version and was tested first before I posted on 2.3.3.3 and in fact i implemented a similar snippet of code on a clients site on version ms2 rc2a some years back. "The doorstep to the temple of wisdom is a knowledge of our own ignorance."
burt Posted September 24, 2013 Posted September 24, 2013 First you need to say what type of data should not be seen by customers. Give an example. Then it will be possible to give further advice.
♥mommaroodles Posted September 24, 2013 Posted September 24, 2013 A person would need more information from you as to what you want to do exactly, but straight off, if you dont want anyone BUT admin to see the product information, meaning you want to disable the product information for everyone, customers and visitors to your site included. You could do the following: Bear in mind that the only way the site will be able to distinguish the difference between admin and a general visitor or customer, you would need to register a session first. So what I would do is: - First create an account at your site as if you were the customer. Then you need to look in the customers table in the database to see what the id is that has been assigned to you. Then in the product information page you could add soemthing like this: <?php if (tep_session_is_registered('customer_id') && $customer_id == '1') { echo stripslashes($product_info['products_description']); }elseif($customer_id != '1'){ echo ' '; } ?> In the above code the '1' would be your customers_id in the customers table in the database. if someone else knows of a better way, then perhaps they could share their method with us too. :) Obviously you need to comment out the line of code on the product_information.php page before adding the above snippet above the below commented out code. //echo stripslashes($product_info['products_description']); "The doorstep to the temple of wisdom is a knowledge of our own ignorance."
bbjrnse Posted October 11, 2013 Author Posted October 11, 2013 use a if else statement where ever you want to display/hide the info. I had in mind adding a extra input field when you enter product information. I need to add a supplier ID to the product i enter/ register. (I have thousands of products and hundreds if not thousand of different suppliers). It is preferable if it is a text field making it possible to enter several supplier IDs. One product may have many suppliers. Any one have any idea how to solve this?
bbjrnse Posted October 11, 2013 Author Posted October 11, 2013 In my case the customers have no need to see supplier information. Eg. urls, or supplier id numbers, or other supplier info I add concerning the product I enter.
burt Posted October 11, 2013 Posted October 11, 2013 Use an addon called "product extra fields". You could then upgrade this by adding in a "public" flag so entries can be seen by the public or not.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.