Jump to content
Sign in to follow this  
Arien

Problem with review approvals..

Recommended Posts

Heya Peeps,

 

I recently installed the Review Approval system contribution but when i go into my admin area to the review part i get this error.

 

Fatal error: Call to undefined function: tep_array_merge() in /home/m00ie/public_html/store/admin/reviews.php on line 225

 

Can anyone help me out? I haven't modified any of the files that came with the Contribution zip..

 

Kind Regards,

Robin Hawkes.

Share this post


Link to post
Share on other sites

hi you need to change all instances of

 

tep_array_merge(

 

to

 

array_merge(

 

the contributiong was probably written for an earlier version of osCommerce and the function was renamed in later versions.


Reddy to Rumble

 

Thank you osCommerce and all who Contribute to her!

Share this post


Link to post
Share on other sites

1064 - You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'select r.reviews_id, rd.reviews_text, r.reviews_rating, r.date_



select count(select r.reviews_id, rd.reviews_text, r.reviews_rating, r.date_added, p.products_id, pd.products_name, p.products_image, r.customers_name from reviews r, reviews_description rd, products p, products_description pd, categories c, products_to_categories p2c where p.products_status = '1' and p.products_id = r.products_id and r.reviews_id = rd.reviews_id and p.products_id = pd.products_id and pd.language_id = '1' and rd.languages_id = '1' and p.products_id = p2c.products_id and p2c.categories_id = c.categories_id and r.approved=1 order by r.reviews_id DESC) as total 



[TEP STOP]

 

I'm now getting that error on the the page where the reviews are shown to the public.. any ideas?

Share this post


Link to post
Share on other sites

try finding the actual code and pasting that line


Reddy to Rumble

 

Thank you osCommerce and all who Contribute to her!

Share this post


Link to post
Share on other sites

  $reviews_query_raw = "select r.reviews_id, rd.reviews_text, r.reviews_rating, r.date_added, p.products_id, pd.products_name, p.products_image, r.customers_name from " . TABLE_REVIEWS . " r, " . TABLE_REVIEWS_DESCRIPTION . " rd, " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_CATEGORIES . " c, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c where p.products_status = '1' and p.products_id = r.products_id and r.reviews_id = rd.reviews_id and p.products_id = pd.products_id and pd.language_id = '" . $languages_id . "' and rd.languages_id = '" . $languages_id . "' and p.products_id = p2c.products_id and p2c.categories_id = c.categories_id and r.approved=1 order by r.reviews_id DESC";

 

I think thats the line.. didn't actually give an exact line error.

Share this post


Link to post
Share on other sites

Try

 

$reviews_query_raw = "select r.reviews_id, rd.reviews_text, r.reviews_rating, r.date_added, p.products_id, pd.products_name, p.products_image, r.customers_name from " . TABLE_REVIEWS . " r, " . TABLE_REVIEWS_DESCRIPTION . " rd, " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_CATEGORIES . " c, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c where p.products_status = '1' and p.products_id = r.products_id and r.reviews_id = rd.reviews_id and p.products_id = pd.products_id and pd.language_id = '" . $languages_id . "' and rd.languages_id = '" . $languages_id . "' and p.products_id = p2c.products_id and p2c.categories_id = c.categories_id and r.approved= '1' order by r.reviews_id DESC";


Reddy to Rumble

 

Thank you osCommerce and all who Contribute to her!

Share this post


Link to post
Share on other sites

Try :)

 

$reviews_query_raw = "select r.reviews_id, rd.reviews_text, r.reviews_rating, r.date_added, p.products_id, pd.products_name, p.products_image, r.customers_name from " . TABLE_REVIEWS . " r, " . TABLE_REVIEWS_DESCRIPTION . " rd, " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_CATEGORIES . " c, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c where p.products_status = '1' and p.products_id = r.products_id and r.reviews_id = rd.reviews_id and p.products_id = pd.products_id and pd.language_id = '" . $languages_id . "' and rd.languages_id = '" . $languages_id . "' and p2c.categories_id = c.categories_id and r.approved = '1' order by r.reviews_id DESC";


Reddy to Rumble

 

Thank you osCommerce and all who Contribute to her!

Share this post


Link to post
Share on other sites

ok revert back to your version of that line, i suspect you've pasted the wrond lin anyway, it should contain select count somewhere in the line we need to fix! So look for that and paste me the line that includes that somewhere in there!

 

:)


Reddy to Rumble

 

Thank you osCommerce and all who Contribute to her!

Share this post


Link to post
Share on other sites

i think its in catalog/product_reviews_info.php


Reddy to Rumble

 

Thank you osCommerce and all who Contribute to her!

Share this post


Link to post
Share on other sites

Yup catalog/product_reviews_info.php


Reddy to Rumble

 

Thank you osCommerce and all who Contribute to her!

Share this post


Link to post
Share on other sites

    $review_check_query = tep_db_query("select count(*) as total from " . TABLE_REVIEWS . " r, " . TABLE_REVIEWS_DESCRIPTION . " rd where r.reviews_id = '" . (int)$HTTP_GET_VARS['reviews_id'] . "' and r.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and r.reviews_id = rd.reviews_id and rd.languages_id = '" . (int)$languages_id . "'");

 

Found it but it was in a file i didn't edit when installing the modification.

Share this post


Link to post
Share on other sites

Ok last try!!! :D

 

That other line in product_reviews.php try

 

$reviews_query_raw = "select r.reviews_id, rd.reviews_text, r.reviews_rating, r.date_added, p.products_id, pd.products_name, p.products_image, r.customers_name from " . TABLE_REVIEWS . " r, " . TABLE_REVIEWS_DESCRIPTION . " rd, " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_status = '1' and p.products_id = r.products_id and r.reviews_id = rd.reviews_id and p.products_id = pd.products_id and pd.language_id = '" . $languages_id . "' and rd.languages_id = '" . $languages_id . "' and r.approved='1' order by r.reviews_id DESC";

 

 

Last try im all out of suggestions!?


Reddy to Rumble

 

Thank you osCommerce and all who Contribute to her!

Share this post


Link to post
Share on other sites

If you meant reviews.php it didn't work.. if you meant product_reviews.php there is no such line i can find in there.

Share this post


Link to post
Share on other sites

ah thanks anyways, i guess if no one can figure it out i'll just have to remove the review system totally from my site unless a different/new contrubution is made to to the same as this one. :(

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×