Cyperis 6 Posted August 22, 2012 (edited) 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: Edited August 22, 2012 by EchoGuns Share this post Link to post Share on other sites
roneada 0 Posted August 22, 2012 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! Share this post Link to post Share on other sites
Cyperis 6 Posted August 22, 2012 Added a step by step installation guide to the package. Found at http://addons.oscommerce.com/info/8536 Share this post Link to post Share on other sites
flane 0 Posted August 22, 2012 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 Share this post Link to post Share on other sites
Cyperis 6 Posted August 23, 2012 @@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 Share this post Link to post Share on other sites
Cyperis 6 Posted August 23, 2012 @@flane Confirmed to work with CKEditor Share this post Link to post Share on other sites
flane 0 Posted August 23, 2012 Thanks Echoguns excellent work :thumbsup: Share this post Link to post Share on other sites
Guest Posted August 23, 2012 Nice work. But would it nopt be better to move the Product image to the left. en next to it the add to cart button and revieuw? I have seen it on this site www.tincube.nl Share this post Link to post Share on other sites
Cyperis 6 Posted August 23, 2012 @@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 Share this post Link to post Share on other sites
roneada 0 Posted August 23, 2012 excelent work congratulations! Share this post Link to post Share on other sites
Cyperis 6 Posted August 27, 2012 For anyone interested I have put up a test site for this contribution: Demo: http://producttabs.echo-guns.com/ Admin: http://producttabs.echo-guns.com/admin/index.php Username: admin Passwor d: test Share this post Link to post Share on other sites
29gk 3 Posted August 27, 2012 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 :) Share this post Link to post Share on other sites
Cyperis 6 Posted August 27, 2012 I will look into that, I can see that as a common request. Share this post Link to post Share on other sites
Bonnie 0 Posted August 31, 2012 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>'; } ?> Share this post Link to post Share on other sites
Cyperis 6 Posted August 31, 2012 @@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. Share this post Link to post Share on other sites
Bonnie 0 Posted September 1, 2012 Thank you for your hard work to make this happen. Let me try to enable/add the review post in the tab :) for v.2.2 the popup also nice ~. Share this post Link to post Share on other sites
Irin 3 Posted September 3, 2012 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. Share this post Link to post Share on other sites
Cyperis 6 Posted September 3, 2012 @@Irin The other tabs only show when there is something in them. Share this post Link to post Share on other sites
Irin 3 Posted September 4, 2012 Even when they're filled, they do not show. Share this post Link to post Share on other sites
Guest Posted September 4, 2012 @@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 Share this post Link to post Share on other sites
Bonnie 0 Posted September 5, 2012 May I know is that support multiple language? if not any tips to modify it. Share this post Link to post Share on other sites
Cyperis 6 Posted September 5, 2012 @@Bonnie I have not came up with an easy way to support multiple languages. Share this post Link to post Share on other sites
thejudge99 8 Posted September 6, 2012 an alternative is products fields groups http://addons.oscommerce.com/info/8247 flexible tabs - multilanguage and built in support for showing reviews. ps. sorry for hijacking - posted for those that require multilanguage support. Jules Share this post Link to post Share on other sites
Bonnie 0 Posted September 7, 2012 Thank you Jules, you look after all osc newbie like me :* Share this post Link to post Share on other sites
Bonnie 0 Posted September 7, 2012 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> Share this post Link to post Share on other sites