Jump to content



Latest News: (loading..)

- - - - -

CONTRIBUTION Product Tabs


  • Please log in to reply
133 replies to this topic

#121   newburns

newburns
  • Members
  • 105 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   Comesticage

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

Posted 23 May 2013 - 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
  • 105 posts
  • Real Name:Ray Burns
  • Gender:Male
  • Location:Texas

Posted 24 May 2013 - 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, 24 May 2013 - 02:35 AM.


#124   Comesticage

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

Posted 24 May 2013 - 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   joli1811

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

Posted 24 May 2013 - 06:08 AM

Hi Eugene ,

Like these buttons myself

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

regards
Joli

#126   newburns

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

Posted 24 May 2013 - 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, 24 May 2013 - 10:21 AM.


#127   newburns

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

Posted 24 May 2013 - 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   Comesticage

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

Posted 24 May 2013 - 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, 24 May 2013 - 02:09 PM.


#129   Comesticage

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

Posted 24 May 2013 - 07:09 PM

http://forums.oscommerce.com/topic/393111-footer-disappeared/#entry1671981

Found a solution finally! Solved it myself!

#130   newburns

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

Posted 24 May 2013 - 07:17 PM

I see it. You had an if statement without a function to run.
So the   if ($banner = tep_banner_exists('dynamic', '468x50')) { ?> was the error.
And thus, the ending function close "}"

What was that for originally?

#131   Comesticage

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

Posted 25 May 2013 - 07:42 AM

@newburns

Hi,

I believe it was because of this addon that i was doing.

http://forums.oscommerce.com/topic/379229-addon-banner-box-for-23/

Phew

#132   vampirehunter

vampirehunter
  • Members
  • 318 posts
  • Real Name:vampire

Posted 13 June 2013 - 05:08 PM

is this the best tabs plugin?

#133   newburns

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

Posted 13 June 2013 - 06:58 PM

@vampirehunter
This adds tabs to the "Products".
The TMS Plugin adds tabs to the menu. Similar to Pagination in a way.
Not Really, but TMS is for navigation moreso than product tabs.
I'm not aware of any other tab system

example -- http://mtrosemedia.tk/store

#134   kymation

kymation

    Believers

  • Community Sponsor
  • 6,758 posts
  • Real Name:Jim Keebaugh
  • Gender:Male
  • Location:Aberdeen WA USA

Posted 13 June 2013 - 11:24 PM

The Products Specifications addon includes tabs on the Product Info page, since it needs someplace to put the specifications. It all depends on what you need the tabs for. More information would be helpful.

Regards
Jim
My Addons

Banners Box 2.3.x  Support
Categories Accordion Box 2.3.x  Support
Categories Images Box 2.2x  2.3.x  Support
Closest Shipper 2.2x  Support
Document Manager 2.2x  Support
Generic Box 2.3.x  Support
Get 1 Free 2.2x  Support
jQuery Banner Rotator 2.2x  2.3.x  Support
Modular Front Page 2.3.x  Support
Modular SEO Header Tags 2.3.x  Support
MVS 2.2x  Support
PDF Datasheet 2.3.x  Support
Price Updater 2.2x
Products Specifications 2.2x  2.3.x  Development Version  Support  Bugs/Suggestions
Request a Review 2.2x - 2.3.x  Support
Similar Products Box 2.2x
Specials Image Overlay 2.3x Support
Theme Switcher 2.3.x  Support