Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Sign in to follow this  
assembler

Reviews on Product Info Page v1.0

Recommended Posts

Hi there,

 

I like this contribution and am using it on my site www.myfirstchopper.com but this is not working with the review approval system contribution.

 

Any ideas how to remedy this?

 

thanks

 

stubbsy

Share this post


Link to post
Share on other sites

Hi,

 

ive just uploaded your contrib. Ive been looking for something like this for a while. Thanks.

 

Ive made a minor change to it to make the review look nicer in same way as standard product_review_info.php - putting line breaks into it.

 

find around line 21:
$reviews['reviews_text']);

replace with:
tep_break_string(nl2br(tep_output_string_protected($reviews['reviews_text'])), 60, '-<br>'));

 

I also plan to mod the product_info.php so that the existing review links and stars are not displayed. I think that may have been from another contrib but am not sure at the moment.

 

Thanks for the contrib anyway.

 

regards

mark


Regards

Mark Brindle

Share this post


Link to post
Share on other sites
ive just uploaded your contrib. Ive been looking for something like this for a while. Thanks.
Did you add it to the contrib page?

--- Denver Prophit Jr.

Share this post


Link to post
Share on other sites

For anyone wishing to use this with the Review Approval System contribution then I have found the change required to make sure the review doesn't appear in your product info unless it is approved...

 

In product_reviews_info.php find this

 

$reviews_query = tep_db_query("select r.reviews_id, r.customers_name, r.date_added, rd.reviews_text, r.reviews_rating FROM reviews r, reviews_description rd WHERE r.reviews_id = rd.reviews_id AND r.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' AND rd.languages_id = '" . (int)$languages_id . "' ORDER BY r.date_added DESC LIMIT " . MAX_REVIEWS);

 

and replace with this

 

$reviews_query = tep_db_query("select r.reviews_id, r.customers_name, r.date_added, rd.reviews_text, r.reviews_rating FROM reviews r, reviews_description rd WHERE r.reviews_id = rd.reviews_id AND r.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' AND rd.languages_id = '" . (int)$languages_id . "' and r.approved = '1' ORDER BY r.date_added DESC LIMIT " . MAX_REVIEWS);

 

hope this is of use to someone

 

stubbsy

Share this post


Link to post
Share on other sites
Guest
For anyone wishing to use this with the Review Approval System contribution then I have found the change required to make sure the review doesn't appear in your product info unless it is approved...

 

In product_reviews_info.php find this

 

$reviews_query = tep_db_query("select r.reviews_id, r.customers_name, r.date_added, rd.reviews_text, r.reviews_rating FROM reviews r, reviews_description rd WHERE r.reviews_id = rd.reviews_id AND r.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' AND rd.languages_id = '" . (int)$languages_id . "' ORDER BY r.date_added DESC LIMIT " . MAX_REVIEWS);

 

and replace with this

 

$reviews_query = tep_db_query("select r.reviews_id, r.customers_name, r.date_added, rd.reviews_text, r.reviews_rating FROM reviews r, reviews_description rd WHERE r.reviews_id = rd.reviews_id AND r.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' AND rd.languages_id = '" . (int)$languages_id . "' and r.approved = '1' ORDER BY r.date_added DESC LIMIT " . MAX_REVIEWS);

 

hope this is of use to someone

 

stubbsy

 

Thanks! I have been trying to make the two contribution play well together. You solved it for me.

 

:thumbsup:

Share this post


Link to post
Share on other sites

Anybody know what is necessary to get the reviews count appearing on the index page with the code inserted into the modules/products_reviews_info.php file?

 

Reason for this is because I'd like to integrate it in between the 'Read All Reviews' and the 'Write a review' links.

Share this post


Link to post
Share on other sites

hi, i'm having trouble getting this to work with STS. i've added the code and uploaded the file, but the reviews don't show up. any ideas?

Edited by proteinos

Share this post


Link to post
Share on other sites
Anybody know what is necessary to get the reviews count appearing on the index page with the code inserted into the modules/products_reviews_info.php file?

 

Reason for this is because I'd like to integrate it in between the 'Read All Reviews' and the 'Write a review' links.

 

The stock code to display the number of reviews a product has is in product_info.php is:

 

<?php
$reviews_query = tep_db_query("select count(*) as count from " . TABLE_REVIEWS . " where products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "'");
$reviews = tep_db_fetch_array($reviews_query);
if ($reviews['count'] > 0) {
?>
  <tr>
	<td class="main"><?php echo TEXT_CURRENT_REVIEWS . ' ' . $reviews['count']; ?></td>
  </tr>
  <tr>
	<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
  </tr>
<?php
}

 

You could also change the contribution to find this information with the main review query. However, you would also have to change the way that the reviews box gets created.

Share this post


Link to post
Share on other sites
Guest

Does anyone know how I would get just the first name of the reviewer to appear insted of first and last name?

Share this post


Link to post
Share on other sites
Does anyone know how I would get just the first name of the reviewer to appear insted of first and last name?

 

The names are stored in the table reviews, in one column called customers_name. You would have to explode this field to get the first name. You could do something like:

 

$name_array = explode(" ",$reviews['customers_name']);
$firstname = $name_array[0];

Share this post


Link to post
Share on other sites

hello,

 

love this contribution, but have a small problem. i've installed it and it works fine, but when ever i submit a comment then go back to the product page the item number (right above the price) has extra escapes and a quote like so:

 

 

Item 208\\\"

 

what's the deal here?

 

thanks in advance!

Share this post


Link to post
Share on other sites

hello

 

I add this mod to my page. I have one question. What tables do i need i my database to make this mod work?

 

Can you show me a code in maybe phpmyadmin to add this tables?

 

Thanks chodus

Share this post


Link to post
Share on other sites

since admin must approve review is it possible to have anonymous to post review, so visitors don't have to register?

Share this post


Link to post
Share on other sites

I like this contrib and use it.

 

I have 1 big wish for someone clever enough to do it.

 

As it is now all the text from a review is shown: Example

Vivi - 07/01/2008

Jeg/vi bruger cremen imod psoriasis i ansigtet. Jeg smører cremen på den angrebne hud hver morgen og aften. Om aftenen inden sengetid, har jeg smurt et lidt tykkere lag creme på den angrebne hud. Og om morgenen et tyndt lag creme på, da cremen er meget fed og ikke absorberes helt. Jeg kunne hurtigt se en virkning. Det meste røde og irriterede udslæt blev hurtigt mindre og den brændende og kløende fornemmelse i huden forsvandt. Den skællede hud, som også har været et stort problem, er så godt som forsvundet. Forbedringen har betydet meget for psyken, når man nu har psoriasis i ansigtet og det at slippe for den irriterende brændende og kløene fornemmelse, er også en stor befrielse. Jeg kan bestemt anbefale cremen til andre. Pengene er givet godt ud og den er meget drøj i brug. Alle tiders at produktet sendes uden yderligere omkostninger for kunden. jeg har prøvet mange forskellige cremer, også lægeordinerede – men uden den store effekt og løsning på problemet. På trods af, at jeg kun har brugt cremen en god måneds tid, vil jeg tildele den topkarakter på 5 stjerner.

 

- I would like to have it like this: example

Vivi - 07/01/2008

Jeg/vi bruger cremen imod psoriasis i ansigtet. Jeg smører cremen på den angrebne hud hver morgen og aften. Om aftenen inden sengetid, har jeg smurt et lidt tykkere.... read more (link to click on)

 

 

(dont mind the danish :rolleyes: )

 

Anyone able to fix this....

 

I think it should be an apeticer for reading more and not showing the complete review.

 

Best regards

 

Michael / AgentJensen

Share this post


Link to post
Share on other sites
I like this contrib and use it.

 

I have 1 big wish for someone clever enough to do it.

 

As it is now all the text from a review is shown: Example

Vivi - 07/01/2008

Jeg/vi bruger cremen imod psoriasis i ansigtet. Jeg smører cremen på den angrebne hud hver morgen og aften. Om aftenen inden sengetid, har jeg smurt et lidt tykkere lag creme på den angrebne hud. Og om morgenen et tyndt lag creme på, da cremen er meget fed og ikke absorberes helt. Jeg kunne hurtigt se en virkning. Det meste røde og irriterede udslæt blev hurtigt mindre og den brændende og kløende fornemmelse i huden forsvandt. Den skællede hud, som også har været et stort problem, er så godt som forsvundet. Forbedringen har betydet meget for psyken, når man nu har psoriasis i ansigtet og det at slippe for den irriterende brændende og kløene fornemmelse, er også en stor befrielse. Jeg kan bestemt anbefale cremen til andre. Pengene er givet godt ud og den er meget drøj i brug. Alle tiders at produktet sendes uden yderligere omkostninger for kunden. jeg har prøvet mange forskellige cremer, også lægeordinerede – men uden den store effekt og løsning på problemet. På trods af, at jeg kun har brugt cremen en god måneds tid, vil jeg tildele den topkarakter på 5 stjerner.

 

- I would like to have it like this: example

Vivi - 07/01/2008

Jeg/vi bruger cremen imod psoriasis i ansigtet. Jeg smører cremen på den angrebne hud hver morgen og aften. Om aftenen inden sengetid, har jeg smurt et lidt tykkere.... read more (link to click on)

 

 

(dont mind the danish :rolleyes: )

 

Anyone able to fix this....

 

I think it should be an apeticer for reading more and not showing the complete review.

 

Best regards

 

Michael / AgentJensen

 

hello my friend, i think the code you need is similar to the code of includes/boxes/reviews.php and i think i need this too and i am working on it. I am not a developer or anything good on coding, i am just making small changes so maybe i'll make it. If i have news i'll post it ok?


I am Maintaining :

Product_Short_Description (i added it on specials.php and in shopping_cart.php)

City Shipping Rates With Admin (fixed the error that was giving wrong total shipping charges)

I had Created :

UTF bug fix on standard reviews system (admin & block)

Corrupted character on mysql with utf-8

Share this post


Link to post
Share on other sites
Guest

Has anyone used this mod in conjunction with the product tabs mod? I'd like to be able to call up the reviews as one of the tabs in the product tabs.

 

Thanks.

Share this post


Link to post
Share on other sites

I like this contrib and use it.

 

I have 1 big wish for someone clever enough to do it.

 

As it is now all the text from a review is shown: Example

Vivi - 07/01/2008

Jeg/vi bruger cremen imod psoriasis i ansigtet. Jeg smører cremen på den angrebne hud hver morgen og aften. Om aftenen inden sengetid, har jeg smurt et lidt tykkere lag creme på den angrebne hud. Og om morgenen et tyndt lag creme på, da cremen er meget fed og ikke absorberes helt. Jeg kunne hurtigt se en virkning. Det meste røde og irriterede udslæt blev hurtigt mindre og den brændende og kløende fornemmelse i huden forsvandt. Den skællede hud, som også har været et stort problem, er så godt som forsvundet. Forbedringen har betydet meget for psyken, når man nu har psoriasis i ansigtet og det at slippe for den irriterende brændende og kløene fornemmelse, er også en stor befrielse. Jeg kan bestemt anbefale cremen til andre. Pengene er givet godt ud og den er meget drøj i brug. Alle tiders at produktet sendes uden yderligere omkostninger for kunden. jeg har prøvet mange forskellige cremer, også lægeordinerede – men uden den store effekt og løsning på problemet. På trods af, at jeg kun har brugt cremen en god måneds tid, vil jeg tildele den topkarakter på 5 stjerner.

 

- I would like to have it like this: example

Vivi - 07/01/2008

Jeg/vi bruger cremen imod psoriasis i ansigtet. Jeg smører cremen på den angrebne hud hver morgen og aften. Om aftenen inden sengetid, har jeg smurt et lidt tykkere.... read more (link to click on)

 

 

(dont mind the danish :rolleyes: )

 

Anyone able to fix this....

 

I think it should be an apeticer for reading more and not showing the complete review.

 

Best regards

 

Michael / AgentJensen

 

Hello,

 

I have try this with this Code

tep_break_string(substr(tep_output_string_protected($reviews['reviews_text'])),0, 200) . "...");

but i doesn´t working.

 

Has anyone an Idea?

Share this post


Link to post
Share on other sites

Should this code still work?

When I try it, it looks as though it is not picking up any data from the database, as it always returns "There are currently no reviews for this product" even though there is!

 

I think this is one of two things:

 

1. This piece of code is old and does not work with osc rc2.2a.

$reviews_query = tep_db_query("select r.reviews_id, r.customers_name, r.date_added, rd.reviews_text, r.reviews_rating FROM reviews r, reviews_description rd WHERE r.reviews_id = rd.reviews_id AND r.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' AND rd.languages_id = '" . (int)$languages_id . "' ORDER BY r.date_added DESC LIMIT " . MAX_REVIEWS);

Does it look right?

 

2. Or the code is not picking up the PRODUCT ID, hence is returning the following:

else {
 $info_box_contents[][0] = array('align' => 'left',
                         'params' => 'class="smallText" valign="top"',
                         'text' => NO_REVIEWS_TEXT);
}

 

Is there a test I could do to see what the problem is?

Share this post


Link to post
Share on other sites

Hi

I am having some problems with the product_reviews_info contribution (places reviews on product_info page)

Basically it is only set up in english and i need it in 3 other languages

 

The heading text is defined in the file that is in catalog/includes/modules

 

I have removed the definitions from the file and placed in a requires command at the top of the file

 

I have added define language file in the language folder

 

But no luck just keep getting php errors cant find the file

 

Any ideas

Share this post


Link to post
Share on other sites

Has anyone used this mod in conjunction with the product tabs mod? I'd like to be able to call up the reviews as one of the tabs in the product tabs.

 

Thanks.

 

Hi im looking for the same thing? has anyone found the fix for that?

 

ive tried adding <? include(DIR_WS_MODULES . 'product_reviews_info.php'); ?> into tabs section but it doesnot work that way :(


outside links are not allowed in signatures

Share this post


Link to post
Share on other sites

ive tried adding <? include(DIR_WS_MODULES . 'product_reviews_info.php'); ?> into tabs section but it doesnot work that way sad.png

 

What do you expect to work?

 

Do you have a file named "product_reviews_info.php" in the includes/modules/ directory? Is the file pulling the reviews from the database using the product_id of the product you are on right now?

 

If not, this is what you need to create, then you can include your new module

Share this post


Link to post
Share on other sites

 

What do you expect to work?

 

Do you have a file named "product_reviews_info.php" in the includes/modules/ directory? Is the file pulling the reviews from the database using the product_id of the product you are on right now?

 

If not, this is what you need to create, then you can include your new module

 

Hi,

ive installed this addon:

http://www.oscommerc...tributions,3340

to retrieve the reviews and yes its working fine if i put it anywhere except the product_tabs.php module.

 

ive attached the product_tabs.php

p.s. i want to show the reviews under:

<li><a href="#EXTRA1"><?PHP ECHO TEXT_TAB_EXTRA1;

?></a></li>

product_tabs.php

Edited by nahi_sonu

outside links are not allowed in signatures

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  

×