♥JcMagpie Posted November 4, 2018 Share Posted November 4, 2018 JcM Product info description_tabs CE A simple add-on to let you automatically place a Product Information Tabs dynamically on your product info page. Again totally standalone with no core code change. Simply copy all files of the into relevant sections and go to admin modules /content and install. Has been tested on CE BS4 and CE BS3 Link to comment Share on other sites More sharing options...
burt Posted November 4, 2018 Share Posted November 4, 2018 Copyright (c) 2018, G Burton All rights reserved. 😂 Link to comment Share on other sites More sharing options...
♥JcMagpie Posted November 4, 2018 Author Share Posted November 4, 2018 2 hours ago, burt said: Copyright (c) 2018, G Burton All rights reserved. 😂 Well it's your code all I did was add a few lines. 😊 Link to comment Share on other sites More sharing options...
burt Posted November 4, 2018 Share Posted November 4, 2018 58 minutes ago, JcMagpie said: Well it's your code all I did was add a few lines. 😊 Cool, just thought it was a bit strange to see my name in your addon, but as it's a derivative work I guess it has to be. You need to add in your details to that copyright, eg; Copyright (c) 2018, Z Iqbal based on code Copyright (c) 2018, G Burton (or something broadly equivalent to the above) ... and then make clear that any support requests must come here or elsewhere if you prefer them elsewhere (as I do support for my stuff off forum and wouldn't want people contacting me about it).. Link to comment Share on other sites More sharing options...
♥JcMagpie Posted November 5, 2018 Author Share Posted November 5, 2018 Has been updated to V1.1 to include the product GTIN bar-code on stock tab. Link to comment Share on other sites More sharing options...
♥JcMagpie Posted November 5, 2018 Author Share Posted November 5, 2018 Optional improvements to dynamic tabs. Can be seen on test site https://chilleddisplays.co.uk/product_info.php/cPath/1_9/products_id/29 The tabs are deliberately a no core or DB change add-on. It uses information already in the DB from stock CE. For most people this is all that is needed. If how ever you need additional then there is a small change you can make to add 2 additional tabs. Stock osC has 2 fields in product info that can be used. The first is 1) Product Meta Description for SEO: You should be using this to put a brief description of each product. If you are then use this as the product info tab input. It will give your page a nice clean look. You can then use the main product description box to add additional tech info on the product. So all the detail stuff can go in that. 2) Product Meta Keywords for SEO: This is obsolete for most people so why not use it. You could use it to add warranty info for each product or anything else you require. I’m not going to include this in the add-on as its not the best solution. However if you must have the additional tabs then these are the changes needed. Backup first. In product_info.php find areound line 38 $product_info_query = tep_db_query("select p.products_id, pd.products_name,pd.products_description, p.products_model, p.products_quantity, p.products_image, pd.products_url, p.products_price, p.products_tax_class_id, p.products_date_added, p.products_date_available, p.manufacturers_id, p.products_gtin from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_status = '1' and p.products_id = '" . (int)$_GET['products_id'] . "' and pd.products_id = p.products_id and pd.language_id = '" . (int)$languages_id . "'"); and replace with this $product_info_query = tep_db_query("select p.products_id, pd.products_name, pd.products_seo_keywords, pd.products_seo_description, pd.products_description, p.products_model, p.products_quantity, p.products_image, pd.products_url, p.products_price, p.products_tax_class_id, p.products_date_added, p.products_date_available, p.manufacturers_id, p.products_gtin from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_status = '1' and p.products_id = '" . (int)$_GET['products_id'] . "' and pd.products_id = p.products_id and pd.language_id = '" . (int)$languages_id . "'"); Then in /includes/modules/content/product_info/cm_pi_description_tabs.php find line, $manufacturers_image = stripslashes($manufacturer['manufacturers_image']); and add after it, $products_seo_description = stripslashes($product_info['products_seo_description']); $products_seo_keywords = stripslashes($product_info['products_seo_keywords']); Then open includes/modules/content/product_info/templates/tpl_cm_pi_description_tabs.php and find <ul class="tabs"> and add the new tabs in the order you need them for examle <li><a href="#tab-1">Product Info</a></li> <li><a href="#tab-2">Tech Info</a></li> <li><a href="#tab-3">Stock</a></li> <li><a href="#tab-4">QR Codes</a></li> <li><a href="#tab-5">Shipping</a></li> <li><a href="#tab-6">Privacy</a></li> <li><a href="#tab-7">Warranty</a></li> Then find <div id="tab-1"> and again add the tabs as required. <div id="tab-1"> <?php echo $products_seo_description; ?> </div> <-----your other tabs renumbered as required--------------> <div id="tab-7"> <?php echo $products_seo_keywords; ?> </div> That's about it Enjoy. Link to comment Share on other sites More sharing options...
valquiria23 Posted November 5, 2018 Share Posted November 5, 2018 Hi Zahid, Thank you very much for a new excellent contribution to the community! I will try it in the next days !! Best regards Valqui Community Oscommerce fan You'll find the latest osC community version here. Link to comment Share on other sites More sharing options...
valquiria23 Posted November 8, 2018 Share Posted November 8, 2018 Hello Zahid, how are you? I am trying this excellent addon but when I click on the tabs it gives me an error and goes to the homepage. Could you look at my site? Best regards Valqui Community Oscommerce fan You'll find the latest osC community version here. Link to comment Share on other sites More sharing options...
♥JcMagpie Posted November 9, 2018 Author Share Posted November 9, 2018 Yes defiantly something not right on your site. It’s only been tested on CE BS3 and CE BS4 I just don’t have the time to make them for every version. It’s working on both my test sites. Check you error log and see what is being reported. Link to comment Share on other sites More sharing options...
valquiria23 Posted November 9, 2018 Share Posted November 9, 2018 My site is in a folder. Your test site not. maybe this the problem? Best regards Valqui Community Oscommerce fan You'll find the latest osC community version here. Link to comment Share on other sites More sharing options...
♥JcMagpie Posted November 9, 2018 Author Share Posted November 9, 2018 I think it's more to do with you not having moduler product info page. Link to comment Share on other sites More sharing options...
♥JcMagpie Posted November 9, 2018 Author Share Posted November 9, 2018 I have checked and other people have it working fine in subdirectory store. Link to comment Share on other sites More sharing options...
♥JcMagpie Posted November 9, 2018 Author Share Posted November 9, 2018 Has been updated to V1.2 to fix browser error if no bar code was present. Also fix QR script so if QR code is not present nothing will show. Also fix BS3 code as it was not working on old Edge site. Link to comment Share on other sites More sharing options...
Fredi Posted November 12, 2018 Share Posted November 12, 2018 Hello Zahid, Your addon is very good and easy to install. But there is one problem: it does not supported multiple languages. This is the name of the tabs and the contents of some of them. To example: Condition. Delivery. My site already contains languages files, for example, languages/-LANG-/shipping.php, languages/-LANG-/condition.php Files shipping.txt and condition.txt - are not a very convenient and universal solution. How to add language constants? How can I change the code so that the addon would support many languages? Thanks, Fred. Support forum for osCommerce in russian language - from Ashkelon. Support since 2002.Best regards, Fredi Link to comment Share on other sites More sharing options...
Fredi Posted November 12, 2018 Share Posted November 12, 2018 I think half of the problem is solved. Need to adjust the second part. Change infile tpl_cm_pi_description_tabs.php <li><a href="#tab-1">Product Info</a></li> <li><a href="#tab-2">Tech Info</a></li> <li><a href="#tab-3">Stock</a></li> <li><a href="#tab-4">QR Codes</a></li> <li><a href="#tab-5">Shipping</a></li> <li><a href="#tab-6">Privacy</a></li> <li><a href="#tab-7">Warranty</a></li> To <li><a href="#tab-1"><?php echo TPD_INFO; ?></a></li> <li><a href="#tab-2"><?php echo TPD_DESC; ?></a></li> <li><a href="#tab-3"><?php echo TPD_STOCK; ?></a></li> <li><a href="#tab-4"><?php echo TPD_QRC; ?></a></li> <li><a href="#tab-5"><?php echo TPD_SHIP; ?></a></li> <li><a href="#tab-6"><?php echo TPD_PRIV; ?></a></li> <li><a href="#tab-7"><?php echo TPD_WARRANT; ?></a></li> Add to englisg.php and other languages files. /**** cm_pi_description_tabs ****/ //NOTE: text must be on one line define('TPD_INFO', 'Product Info'); define('TPD_DESC', 'Tech Info'); define('TPD_STOCK', 'Stock'); define('TPD_QRC', 'QR Codes'); define('TPD_SHIP', 'Shipping'); define('TPD_PRIV', 'Privacy'); define('TPD_WARRANT', 'Warranty'); /**** End cm_pi_description_tabs ****/ Support forum for osCommerce in russian language - from Ashkelon. Support since 2002.Best regards, Fredi Link to comment Share on other sites More sharing options...
♥JcMagpie Posted November 12, 2018 Author Share Posted November 12, 2018 Has been updated to V1.3 to to allow tab names to be entered in admin and allow privacy and shipping info to be added in admin. Hopefully this will sort out any language issues. Link to comment Share on other sites More sharing options...
LeeFoster Posted November 13, 2018 Share Posted November 13, 2018 On 11/9/2018 at 12:58 PM, JcMagpie said: I think it's more to do with you not having moduler product info page. Is modular product info page required for this addon? Link to comment Share on other sites More sharing options...
♥JcMagpie Posted November 13, 2018 Author Share Posted November 13, 2018 Yes you need modular product info or you will not be able to place it in order! You will find many product info add-ons work on non moduler page but get added at bottom of page. If you are using BS of any kind of edge (not gold have not tested) then you can simply add the new moduler product_info page and then add all the modules and it normaly just works. Link to comment Share on other sites More sharing options...
LeeFoster Posted November 13, 2018 Share Posted November 13, 2018 I have modular product page installed but I'm still getting the same error as @valquiria23 Link to comment Share on other sites More sharing options...
LeeFoster Posted November 13, 2018 Share Posted November 13, 2018 It's strange, I'm using the BS4 version of EDGE and it doesn't work. But when I change to the BS3 file in your upload it does. Link to comment Share on other sites More sharing options...
♥JcMagpie Posted November 13, 2018 Author Share Posted November 13, 2018 ? not sure please pm link to site so I can check. Link to comment Share on other sites More sharing options...
LeeFoster Posted November 13, 2018 Share Posted November 13, 2018 8 minutes ago, JcMagpie said: ? not sure please pm link to site so I can check. Site is local not live Link to comment Share on other sites More sharing options...
♥JcMagpie Posted November 13, 2018 Author Share Posted November 13, 2018 Then post errors from browser console and make sure you are using the correct js scripts. Orignal problem was purly js conflict. Link to comment Share on other sites More sharing options...
LeeFoster Posted November 13, 2018 Share Posted November 13, 2018 Quote jquery.qrcode.js:89 Uncaught ReferenceError: jQuery is not defined at jquery.qrcode.js:89 (anonymous) @ jquery.qrcode.js:89 product_info.php?cPath=21&products_id=28:267 Uncaught ReferenceError: jQuery is not defined at product_info.php?cPath=21&products_id=28:267 (anonymous) @ product_info.php?cPath=21&products_id=28:267 product_info.php?cPath=21&products_id=28:276 Uncaught ReferenceError: $ is not defined at product_info.php?cPath=21&products_id=28:276 (anonymous) @ product_info.php?cPath=21&products_id=28:276 www-embed-player.js:377 POST https://www.youtube.com/youtubei/v1/log_event?alt=json&key=AIzaSyAO_FJ2SlqU8Q4STEHLGCilw_Y9_11qcW8 net::ERR_SSL_PROTOCOL_ERROR Link to comment Share on other sites More sharing options...
♥JcMagpie Posted November 13, 2018 Author Share Posted November 13, 2018 can you post image of the browser console so I can see the details as shown, Also which version are you using? Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.