Jump to content



Latest News: (loading..)

- - - - -

CONTRIBUTION Product Tabs


  • Please log in to reply
127 replies to this topic

#121   newburns

newburns
  • Members
  • 93 posts
  • Real Name:Ray Burns
  • Gender:Male
  • Location:Texas

Posted 22 May 2013 - 04:40 PM

@Comesticage
I told you it was already built in
Put this into your configure.php
  define ( 'PRODUCT_TABS_REVIEWS_TAB','True' )
My issue is I want to set this value in the admin control panel. Not hard coded.

If you take a look at /includes/modules/product_tabs.php you will see where it calls for reviews and some other things.

#122 ONLINE   Comesticage

Comesticage
  • Members
  • 30 posts
  • Real Name:Eugene Gan

Posted Yesterday, 05:35 AM

@newburns

You are correct.

After inserting
define ( 'PRODUCT_TABS_REVIEWS_TAB','True' )
into both configure.php files of

/shop/catalog/includes

and

/shop/catalog/admin/includes

There is an additional tab that says reviews.

But when i went into my website of each individual product,

i got an error msg.

Warning: include(includes/modules/product_reviews.php) [function.include]: failed to open stream: No such file or directory in /home/content/17/8283017/html/shop/catalog/includes/modules/products_tabs.php on line 135

Warning: include() [
function.include]: Failed opening 'includes/modules/product_reviews.php' for inclusion (include_path='.:/usr/local/php5/lib/php') in /home/content/17/8283017/html/shop/catalog/includes/modules/products_tabs.php on line 135

#123   newburns

newburns
  • Members
  • 93 posts
  • Real Name:Ray Burns
  • Gender:Male
  • Location:Texas

Posted Today, 02:35 AM

@Comesticage
Upload the attached file to \includes\modules\
My PHP is very rough, just a lot of copying and pasting from other places, but as soon as I understand what's going on with PHP, I promise to fix it and update the contrib file.

Attached Files


Edited by newburns, Today, 02:35 AM.


#124 ONLINE   Comesticage

Comesticage
  • Members
  • 30 posts
  • Real Name:Eugene Gan

Posted Today, 04:06 AM

@newburns

It is working now!

It's perfect! =)) I am impressed by you.

Another question, why are the default "stars ratings so ugly" the stars are not yellow and symmetrical.. look more like a starfish. Do you know how to change them?

#125 ONLINE   joli1811

joli1811
  • Community Sponsor
  • 777 posts
  • Real Name:john dunlop
  • Gender:Male
  • Location:Ireland

Posted Today, 06:08 AM

Hi Eugene ,

Like these buttons myself

http://addons.oscommerce.com/info/5512

regards
Joli

#126   newburns

newburns
  • Members
  • 93 posts
  • Real Name:Ray Burns
  • Gender:Male
  • Location:Texas

Posted Today, 10:20 AM

@Comesticage
Line 100 Calls for the stars
<?php echo tep_break_string(tep_output_string_protected($reviews['reviews_text']), 440, '-<br />') . ((strlen($reviews['reviews_text']) >= 500) ? '...' : '') . '<br /><br /><i>' . sprintf(TEXT_REVIEW_RATING, tep_image(DIR_WS_IMAGES . 'stars_' . $reviews['reviews_rating'] . '.gif', sprintf(TEXT_OF_5_STARS, $reviews['reviews_rating'])), sprintf(TEXT_OF_5_STARS, $reviews['reviews_rating'])) . '</i>'; ?>
Basically, it calls for tep_image(
Then it goes into the image directory
Looks for "stars_"
The "." in PHP is just a connector
So connected to "stars_" is $reviews['reviews_rating'] . gif
Or in other words "stars_1.gif" if it is a 1 star review
To change either change the image in the image folder, or create our own, and replace "stars_" with the replacement

Edited by newburns, Today, 10:21 AM.


#127   newburns

newburns
  • Members
  • 93 posts
  • Real Name:Ray Burns
  • Gender:Male
  • Location:Texas

Posted Today, 10:26 AM

See my example here.
http://mtrosemedia.tk/store/product_info.php/the-faith-mother-and-grandmother-p-102
I don't really like it, but I will make it look better later
Have to finish my courses for http://www.w3schools.com/php/
May even buy the certification afterwards

#128 ONLINE   Comesticage

Comesticage
  • Members
  • 30 posts
  • Real Name:Eugene Gan

Posted Today, 02:05 PM

@newburns

omg, bad news. ever since i did the added the reviews tab
by adding the products_reviews.php that you provided.

my footer from all my web pages are gone!

SOS! what happen?

When i remove the products_reviews.php and restore both configure.php to the original. The footer is still missing. =(

Then i used my backup, but i still have my footers missing...

SOS!

Edited by Comesticage, Today, 02:09 PM.