Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Product information not seen by customer


bbjrnse

Recommended Posts

Posted

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."

Posted

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."

Posted

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.

 

Posted

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."

Posted

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.

Posted

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."

  • 3 weeks later...
Posted

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?

Posted

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.

Posted

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.

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...