RE: Only allow customer to write a review once for any product

WillemB <[email protected]> 11 Sep 2003 22:54:57 -0000
Newsgroups gmane.comp.web.oscommerce.tips
Message-ID <7af0def7a36b88b955302c74324a087d@osCommerce-Forums>
This message was sent from: Tips and Tricks
http://forums.oscommerce.com/viewtopic.php?p=228126#228126
----------------------------------------------------------------

I'm afraid you are using a distinctively different version than me. I use 2.2 MS2.

However, I think you can still get it to work if you have a little knowledge of PHP and common sense :)

Because I don't have your version, I can try to get you started but it is up to you to make necessary changes, if they are necessary. So no guarantees.

Your code snippet does the actual submitting of the review. You have to start making changes on the second line (directly after the IF line, before everything else.

Add my code snippet. Look for products_id in the entire file, to make sure that you are calling up the actual products_id value (it could be gathered from another variable in your version).

When you have done that, you add: 'else {'  (without the ' '). Then the existing code that used to be directly after the IF line.  Before the existing '}' you add another '}'.

There's a good chance this fix will now also work for you. Let me know, I don't have a lot of time but I've noticed it is very hard to get any replies on this forum so I'd be willing to try and help out.