Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

CONTRIBUTION Product Tabs


Cyperis

Recommended Posts

Product Tabs Version 1.0

 

Description:

This contribution will change the way that the product_info.php displays the product information. It moves the product description into a new tab system and allows for customization of up to 5 tabs. They are customized via the admin page. Customization in this case refers to renaming them.

 

When editing or adding new product the tabs are displayed there and if you put something in the tab when adding the product, it will reflect the changes on the store side. So if a tab is left blank, it will not show for the customer.

 

Download Link: http://addons.oscommerce.com/info/8536

 

Screenshots:

post-312721-0-93292500-1345620993_thumb.jpgpost-312721-0-57941200-1345620995_thumb.jpgpost-312721-0-51606900-1345620997_thumb.jpg

Edited by EchoGuns
Link to comment
Share on other sites

hello my name is ron, my problem its compare admin/categories php, but your file its te old version 2.2rca -require template top, my file its totalment a diferent, you can write the instruction, code changes of categories? thanks!

Link to comment
Share on other sites

Hi EchoGuns,

congratulations for the excellent work.

 

Would be possible to see a screenshoot of the product edit page?

 

Is this Contribution compatible with wysiwyg editor like CKEditor OSC 2.3.1?

 

Thanks

Link to comment
Share on other sites

@@flane

 

The first post has three screenshots, the one in the middle has the Product Edit page in it.

 

I have not installed it alongside this tab system but it should be compatible. I will test later tonight when I have more time.

 

Thanks,

Clint

Link to comment
Share on other sites

A very good work EchoGuns !!

 

But i would like to ask a question. Is it possible to use this addon in a multilingual website ? I am using two languages, english and greek, and i dont understand how to show the tabs in their right language, since if i set a name in a tab in the admin section, thiw name shows in both languages.

 

Thanks youy in advanced :)

Link to comment
Share on other sites

Hi, in the product_tab.php, may I know how to enable or set "PRODUCT_TABS_REVIEWS_TAB" to true?

 

 

<?php

// Review Tab

if (PRODUCT_TABS_REVIEWS_TAB == 'True') {

echo ' <div id="tabs-6">';

include( DIR_WS_MODULES . FILENAME_PRODUCT_REVIEWS );

echo ' </div><div style="clear: both;"></div>';

}

?>

Link to comment
Share on other sites

@@Bonnie

 

That is some code that I worked in there but never put live. As it currently stands the product tabs contribution is missing the files necessary for the reviews to work. I had planned to at a later time add them into the contribution. Since then I uploaded the contribution Product Info Page Box which adds the feature you are looking for and bringing the overall appearance of the product_info.php back to an acceptable look.

 

If you have just the Product Tabs installed, there is a void area to the left of the picture. With the aforementioned contribution installed it takes care of that void area. See the demo pages in my signature for more info.

 

@@Bonnie Let me know what you think.

Link to comment
Share on other sites

Very nice add-on, thanks. I have a question, though. Right now it only shows the very first tab, which is DESCRIPTION, in the product's preview in admin. All the other tabs aren't shown. How to show all of the tabs? Thanks.

Link to comment
Share on other sites

@@mbuist

 

I would personally use it alongside this other contribution I made: www.oscommerce.com/forums/topic/388721-product-info-page-box/ giving you everything you need there and much more.

 

Thanks,

Clint

 

Hi EchoGuns,

 

Well I finaly did it. I brought the 2 contributions to 1.

 

If you want to see it in action here is the link. I did swith price with model. As it is more friendly. And I fix the issue with the layout of the buttons

 

http://www.shoptuin.nl/product_info.php?cPath=21&products_id=28&language=en

Link to comment
Share on other sites

Hi Clint,

 

I integrated review function in one of the product tab, looks great . below is the code.

 

 

<?php

/*

$Id$

 

osCommerce, Open Source E-Commerce Solutions

http://www.oscommerce.com

 

Copyright © 2010 osCommerce

 

Released under the GNU General Public License

*/

 

 

if (!isset($HTTP_GET_VARS['products_id']) || !is_numeric($HTTP_GET_VARS['products_id'])) {

tep_redirect(tep_href_link(FILENAME_REVIEWS));

}

 

$product_info_query = tep_db_query("select p.products_id, p.products_model, p.products_image, p.products_price, p.products_tax_class_id, pd.products_name from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and p.products_status = '1' and p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "'");

if (!tep_db_num_rows($product_info_query)) {

tep_redirect(tep_href_link(FILENAME_REVIEWS));

} else {

$product_info = tep_db_fetch_array($product_info_query);

}

 

?>

 

<?php

if ($messageStack->size('product_reviews') > 0) {

echo $messageStack->output('product_reviews');

}

?>

 

<div class="contentContainer">

 

 

 

<?php

 

$reviews_query_raw = "select r.reviews_id, left(rd.reviews_text, 100) as reviews_text, r.reviews_rating, r.date_added, r.customers_name from " . TABLE_REVIEWS . " r, " . TABLE_REVIEWS_DESCRIPTION . " rd where r.products_id = '" . (int)$product_info['products_id'] . "' and r.reviews_id = rd.reviews_id and r.reviews_status = 1 order by r.reviews_id desc";

$reviews_split = new splitPageResults($reviews_query_raw, MAX_DISPLAY_NEW_REVIEWS);

 

if ($reviews_split->number_of_rows > 0) {

if ((PREV_NEXT_BAR_LOCATION == '1') || (PREV_NEXT_BAR_LOCATION == '3')) {

?>

 

<div class="contentText">

<p style="float: right;"><?php echo TEXT_RESULT_PAGE . ' ' . $reviews_split->display_links(MAX_DISPLAY_PAGE_LINKS, tep_get_all_get_params(array('page', 'info'))); ?></p>

 

<p><?php echo $reviews_split->display_count(TEXT_DISPLAY_NUMBER_OF_REVIEWS); ?></p>

</div>

 

<br />

 

<?php

}

 

$reviews_query = tep_db_query($reviews_split->sql_query);

while ($reviews = tep_db_fetch_array($reviews_query)) {

?>

 

<div>

<span style="float: right;"><?php echo sprintf(TEXT_REVIEW_DATE_ADDED, tep_date_long($reviews['date_added'])); ?></span>

<h2><?php echo '<a href="' . tep_href_link(FILENAME_PRODUCT_REVIEWS_INFO, 'products_id=' . $product_info['products_id'] . '&reviews_id=' . $reviews['reviews_id']) . '">' . sprintf(TEXT_REVIEW_BY, tep_output_string_protected($reviews['customers_name'])) . '</a>'; ?></h2>

</div>

 

<div class="contentText">

<?php echo tep_break_string(tep_output_string_protected($reviews['reviews_text']), 60, '-<br />') . ((strlen($reviews['reviews_text']) >= 100) ? '..' : '') . '<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>'; ?>

</div>

 

<?php

}

} else {

?>

 

<div class="contentText">

<?php echo TEXT_NO_REVIEWS; ?>

</div>

 

<?php

}

 

if (($reviews_split->number_of_rows > 0) && ((PREV_NEXT_BAR_LOCATION == '2') || (PREV_NEXT_BAR_LOCATION == '3'))) {

?>

 

<div class="contentText">

<p style="float: right;"><?php echo TEXT_RESULT_PAGE . ' ' . $reviews_split->display_links(MAX_DISPLAY_PAGE_LINKS, tep_get_all_get_params(array('page', 'info'))); ?></p>

 

<p><?php echo $reviews_split->display_count(TEXT_DISPLAY_NUMBER_OF_REVIEWS); ?></p>

<span class="buttonAction">

<?php echo tep_draw_button(IMAGE_BUTTON_WRITE_REVIEW, 'comment', tep_href_link(FILENAME_PRODUCT_REVIEWS_WRITE, tep_get_all_get_params()), 'primary'); ?>

</span>

</div>

 

<?php

}

?>

 

<br />

 

</div>

 

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...