Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Review Approval System


d4funky1

Recommended Posts

Hi,

 

I have just added the little bit of code for receiving email notifications to this contribution with no joy?

 

I have tested it with a couple of products but no email has been sent??

 

The email account has been set up with my host and within outlook so i wonderd if anyone could take a quick look at the code below just to confirm that i have followed the instructions correctly???

 

	  tep_db_query("insert into " . TABLE_REVIEWS_DESCRIPTION . " (reviews_id, languages_id, reviews_text) values ('" . (int)$insert_id . "', '" . (int)$languages_id . "', '" . tep_db_input($review) . "')");
//notify store owner of new review to approve => added by Brian Christensen on 03-16-06
$subject = 'Product Review';
$message = 'There is a new product review awaiting approval';
$from_name = 'Product Reviews';
$from_email = '[email protected]'; //change YOURDOMAIN.com to your store's domain
tep_mail(STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS, $subject, $message, $from_name, $from_email);
//end notify store owner
  tep_redirect(tep_href_link(FILENAME_PRODUCT_REVIEWS, tep_get_all_get_params(array('action'))));

 

This amendment has been made to my catalog/product_reviews_write.php file.

 

If anyone could just confirm that this is present and correct and maybe if you know what the issue may be????

 

Many Thanks

D4

Link to comment
Share on other sites

  • 8 months later...
Hi,

 

I have just added the little bit of code for receiving email notifications to this contribution with no joy?

 

I have tested it with a couple of products but no email has been sent??

 

The email account has been set up with my host and within outlook so i wonderd if anyone could take a quick look at the code below just to confirm that i have followed the instructions correctly???

 

	  tep_db_query("insert into " . TABLE_REVIEWS_DESCRIPTION . " (reviews_id, languages_id, reviews_text) values ('" . (int)$insert_id . "', '" . (int)$languages_id . "', '" . tep_db_input($review) . "')");
//notify store owner of new review to approve => added by Brian Christensen on 03-16-06
$subject = 'Product Review';
$message = 'There is a new product review awaiting approval';
$from_name = 'Product Reviews';
$from_email = '[email protected]'; //change YOURDOMAIN.com to your store's domain
tep_mail(STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS, $subject, $message, $from_name, $from_email);
//end notify store owner
  tep_redirect(tep_href_link(FILENAME_PRODUCT_REVIEWS, tep_get_all_get_params(array('action'))));

 

This amendment has been made to my catalog/product_reviews_write.php file.

 

If anyone could just confirm that this is present and correct and maybe if you know what the issue may be????

 

Many Thanks

D4

 

Hi, I was having the same problem. For some reason I couldn't figure out to get "$from_name" and "$from_email" to work on tep_mail so I just went and changed this:

 

tep_mail(STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS, $subject, $message, $from_name, $from_email);

 

To this:

tep_mail(STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS, $subject, $message, REVIEWS, STORE_OWNER_EMAIL_ADDRESS);

 

After I did that, it worked. I hope it works for you too.

 

aegrnberg

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...