tgely Posted September 13, 2011 Share Posted September 13, 2011 Hi Jim, there are some good sounds! I post some bugs for oscommerce v2.3.1 Products Specification contribution. 1. The install method not content defines: // Start Documents Manager define('TABLE_DOCUMENTS', 'documents'); define('TABLE_DOCUMENT_TYPES', 'document_types'); define('TABLE_PRODUCTS_TO_DOCUMENTS', 'products_to_documents'); // End Documents Manager So I found sql errors on catalog site (by TABLE_PRODUCTS_TO_DOCUMENTS). 2. PHP 5.3 compatibility when create new specification: Deprecated: Function ereg_replace() is deprecated in ///specification/adminka/products_specifications.php on line 1442 Deprecated: Function ereg_replace() is deprecated in ///specification/adminka/products_specifications.php on line 1442 and filter in actions Deprecated: Function ereg() is deprecated in ///specification/products_filter.php on line 177 3. Magic Quotes compatibility My Magic quotes gpc is on so the product description in categories.php fill /n/r characters the description text. 4. Old designs The categories filter module use old face of oscommerce design. and admin/products_specifications.php use somewhere gif buttons. I think it will be the best of tens contribution later. I am using another products tab at now with stabilized figures of linking and listing page navigations in tabs for reviews and master products. Best Regards, Gergely Quote osCommerce based shop owner with minimal design and focused on background works. When the less is more.Email managment with tracking pixel, package managment for shipping, stock management, warehouse managment with bar code reader, parcel shops management on 3000 pickup points without local store. Link to comment Share on other sites More sharing options...
♥kymation Posted September 13, 2011 Author Share Posted September 13, 2011 Thanks for the bug reports. I'm really busy right now, so I'll have to take a look at these later. Regards Jim Quote See my profile for a list of my addons and ways to get support. Link to comment Share on other sites More sharing options...
tgely Posted September 20, 2011 Share Posted September 20, 2011 Thanks for the bug reports. I'm really busy right now, so I'll have to take a look at these later. Regards Jim Hi Jim, I hope you will have time. I changed javascript in products_tab so it looks like stabilized for returns. <script type="text/javascript"> $(function() { $( "#tabs" ).tabs({ cookie: { // store cookie for a day, without, it would be a session cookie expires: 1 } }); }); </script> and add cookie script for header in products_info.php. $head_javascript .= ' <script src="ext/jquery/jquery.cookie.js" type="text/javascript" language="javascript"></script>' . PHP_EOL; and add new file as jquery.cookie.js /*jslint browser: true */ /*global jQuery: true */ /** * jQuery Cookie plugin * * Copyright (c) 2010 Klaus Hartl (stilbuero.de) * Dual licensed under the MIT and GPL licenses: * http://www.opensource.org/licenses/mit-license.php * http://www.gnu.org/licenses/gpl.html * */ // TODO JsDoc /** * Create a cookie with the given key and value and other optional parameters. * * @example $.cookie('the_cookie', 'the_value'); * @desc Set the value of a cookie. * @example $.cookie('the_cookie', 'the_value', { expires: 7, path: '/', domain: 'jquery.com', secure: true }); * @desc Create a cookie with all available options. * @example $.cookie('the_cookie', 'the_value'); * @desc Create a session cookie. * @example $.cookie('the_cookie', null); * @desc Delete a cookie by passing null as value. Keep in mind that you have to use the same path and domain * used when the cookie was set. * * @param String key The key of the cookie. * @param String value The value of the cookie. * @param Object options An object literal containing key/value pairs to provide optional cookie attributes. * @option Number|Date expires Either an integer specifying the expiration date from now on in days or a Date object. * If a negative value is specified (e.g. a date in the past), the cookie will be deleted. * If set to null or omitted, the cookie will be a session cookie and will not be retained * when the the browser exits. * @option String path The value of the path atribute of the cookie (default: path of page that created the cookie). * @option String domain The value of the domain attribute of the cookie (default: domain of page that created the cookie). * @option Boolean secure If true, the secure attribute of the cookie will be set and the cookie transmission will * require a secure protocol (like HTTPS). * @type undefined * * @name $.cookie * @cat Plugins/Cookie * @author Klaus Hartl/klaus.hartl@stilbuero.de */ /** * Get the value of a cookie with the given key. * * @example $.cookie('the_cookie'); * @desc Get the value of a cookie. * * @param String key The key of the cookie. * @return The value of the cookie. * @type String * * @name $.cookie * @cat Plugins/Cookie * @author Klaus Hartl/klaus.hartl@stilbuero.de */ jQuery.cookie = function (key, value, options) { // key and value given, set cookie... if (arguments.length > 1 && (value === null || typeof value !== "object")) { options = jQuery.extend({}, options); if (value === null) { options.expires = -1; } if (typeof options.expires === 'number') { var days = options.expires, t = options.expires = new Date(); t.setDate(t.getDate() + days); } return (document.cookie = [ encodeURIComponent(key), '=', options.raw ? String(value) : encodeURIComponent(String(value)), options.expires ? '; expires=' + options.expires.toUTCString() : '', // use expires attribute, max-age is not supported by IE options.path ? '; path=' + options.path : '', options.domain ? '; domain=' + options.domain : '', options.secure ? '; secure' : '' ].join('')); } // key and possibly options given, get cookie... options = value || {}; var result, decode = options.raw ? function (s) { return s; } : decodeURIComponent; return (result = new RegExp('(?:^|; )' + encodeURIComponent(key) + '=([^;]*)').exec(document.cookie)) ? decode(result[1]) : null; }; One day cookie is optimal. Your code better than TMS contribution. TMS is disintegrate tabs when zooming page. As soon as possible I will do an intagration with extra fields. Regards, Gergely Quote osCommerce based shop owner with minimal design and focused on background works. When the less is more.Email managment with tracking pixel, package managment for shipping, stock management, warehouse managment with bar code reader, parcel shops management on 3000 pickup points without local store. Link to comment Share on other sites More sharing options...
bassart Posted September 20, 2011 Share Posted September 20, 2011 (edited) Hi, can someone help me .. I have a problem with specifications show on the product_info. If I choose admin spec link all and I am in category 55 on product_info, I see the specification on both product_info and filter box. If I choose admin link spec only subcategory for example (seat category ID 55) and I am on product_info cat55 then the spec is gone. In the filter box, he does when I'm in category 55. In the database i have specification_groups_to_categories specification_group_id = 1, and categories_id = 55 If I place this in product_info, <? Php echo $ current_category_id;?> I see 55 If I manually adjust the categories_id in the database to 0. Then the specification is displayed on the product_info. But the problem is that the filter box is now visible on all categories. In one way or another in modules products_specifications.php (int) $ current_category_id not read the correct category. I have updated all files to products_specifications_1_1_11 and use oscommerce 2.2. I have made no changes to the code of product specifications. Sorry for my english language as I've made mistakes. Advance thanks for your help. Edited September 20, 2011 by bassart Quote Link to comment Share on other sites More sharing options...
♥kymation Posted September 20, 2011 Author Share Posted September 20, 2011 Hi Jim, I hope you will have time. I changed javascript in products_tab so it looks like stabilized for returns. [<snip> One day cookie is optimal. Your code better than TMS contribution. TMS is disintegrate tabs when zooming page. As soon as possible I will do an intagration with extra fields. Regards, Gergely I'm working on a site redesign that need to go live in less than two weeks. This is taking most of my spare time. Go ahead and publish what you have done if you want to. I'll catch up with you later. Regards Jim Quote See my profile for a list of my addons and ways to get support. Link to comment Share on other sites More sharing options...
♥kymation Posted September 20, 2011 Author Share Posted September 20, 2011 <snip> I have updated all files to products_specifications_1_1_11 and use oscommerce 2.2. I have made no changes to the code of product specifications. Sorry for my english language as I've made mistakes. Advance thanks for your help. Products Specifications 1.1x is for osCommerce 2.3x. You should use PS 1.0.2 with osC 2.2x. If you want to use the later versions, you will need to make a lot of changes to fit your older copy of osCommerce. Regards Jim Quote See my profile for a list of my addons and ways to get support. Link to comment Share on other sites More sharing options...
bassart Posted September 20, 2011 Share Posted September 20, 2011 Thanks Jim for your answer. I have version 1.02 but I mean that I have all the files compared to version 1_1_11 for any changes or bug fixes. I know the differences of 2.2 and 2.3 and thus make use of the 2.2 code. My modules / products_specifications.php looks like: <?php /* $Id: products_specifications.php, v1.0.1 20090917 kymation Exp $ $Loc: catalog/includes/modules/ $ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2009 osCommerce Released under the GNU General Public License */ /* * This file produces the product specification list on the Product Info page. * * $current_category_id and $_GET['products_id'] are required to determine which * specifications to show. */ // Show the products description text if (SPECIFICATIONS_BOX_FRAME_STYLE != 'Tabs') { echo '<p>' . stripslashes ($product_info['products_description']) . '</p>'; } $specification_box_heading = array(); $specification_box_heading[] = array ('text' => SPECIFICATION_TITLE_PRODUCTS); $specifications_query_raw = "select ps.specification, s.filter_display, s.enter_values, sd.specification_name, sd.specification_prefix, sd.specification_suffix from " . TABLE_PRODUCTS_SPECIFICATIONS . " ps, " . TABLE_SPECIFICATION . " s, " . TABLE_SPECIFICATION_DESCRIPTION . " sd, " . TABLE_SPECIFICATION_GROUPS . " sg, " . TABLE_SPECIFICATIONS_TO_CATEGORIES . " sg2c where sg.show_products = 'True' and s.show_products = 'True' and s.specification_group_id = sg.specification_group_id and sg.specification_group_id = sg2c.specification_group_id and sd.specifications_id = s.specifications_id and ps.specifications_id = sd.specifications_id and sg2c.categories_id = '" . (int) $current_category_id . "' and ps.products_id = '" . (int) $_GET['products_id'] . "' and sd.language_id = '" . (int) $languages_id . "' and ps.language_id = '" . (int) $languages_id . "' order by s.specification_sort_order, sd.specification_name "; // print $specifications_query_raw . "<br>\n"; $specifications_query = tep_db_query ($specifications_query_raw); $count_specificatons = tep_db_num_rows ($specifications_query); if ($count_specificatons >= SPECIFICATIONS_MINIMUM_PRODUCTS || SPECIFICATIONS_BOX_FRAME_STYLE == 'Tabs') { $specifications_box_contents = array(); $specification_text = '<ul><table colspan="2" border="0" cellpadding="0" cellspacing="0" width="90%" class="spectable">' . "\n"; while ($specifications = tep_db_fetch_array ($specifications_query) ) { if ($specifications['specification'] != '') { $specification_text .= ''; $specification_text .= '<tr>'; if (SPECIFICATIONS_SHOW_NAME_PRODUCTS == 'True') { $specification_text .= '<td width="25%" class="specification_bold"><li>'; $specification_text .= $specifications['specification_name'] . ': '; $specification_text .= '</li></td>'; } $specification_text .= '<td width="55%" class="specification">'; $specification_text .= $specifications['specification_prefix'] . ' '; if ($specifications['filter_display'] == 'image' || $specifications['filter_display'] == 'multiimage' || $specifications['enter_values'] == 'image' || $specifications['enter_values'] == 'multiimage') { $specification_text .= tep_image (DIR_WS_IMAGES . $specifications['specification'], $specifications['specification_name']); } else { $specification_text .= $specifications['specification'] . ' '; } $specification_text .= $specifications['specification_suffix']; $specification_text .= '</td></tr>'; $specification_text .= '' . "\n"; } // if ($specifications['specification'] } // while ($specifications $specification_text .= '</table>'; $specification_text .= '</ul>' . "\n"; $specifications_box_contents[0] = array ('align' => 'left', 'params' => 'class="main" valign="middle"', 'text' => $specification_text ); ?> <table border="0" width="95%" cellspacing="2" cellpadding="2" class="specs_box"> <tr> <td class="main" valign="top"> <!-- products_specifications_box //--> <?php // Show the heading if selected if (SPECIFICATIONS_SHOW_TITLE_PRODUCTS == 'True' && (SPECIFICATIONS_BOX_FRAME_STYLE == 'Plain' || SPECIFICATIONS_BOX_FRAME_STYLE == 'Simple') ) { echo '<b>' . $specification_box_heading[0]['text'] . '</b>'; } // Output the specifications in the selected style switch (SPECIFICATIONS_BOX_FRAME_STYLE) { case 'Tabs': include_once (DIR_WS_MODULES . FILENAME_PRODUCTS_TABS); break; case 'Plain': new borderlessBox ($specifications_box_contents); break; case 'Simple': new productListingBox ($specifications_box_contents); break; case 'Stock': default: new contentBoxHeading ($specification_box_heading, false, false); new contentBox ($specifications_box_contents); break; } // switch ?> <!-- products_specifications_box_eof //--> </td> </tr> </table> <?php } //if ($count_specificatons ?> Maybe it's an installed contribution which causes problems in reading the categorie_id in product_info. Maybe someone who has the same problem as me?? But I do not understand why product filter box (products_filter.php) does not give problems and the specification does show If I have linked only one subcategory and not all. Regards, Sebastiaan Quote Link to comment Share on other sites More sharing options...
♥kymation Posted September 20, 2011 Author Share Posted September 20, 2011 The specification groups are linked to categories by adding rows to the specifications_to_categories table. The Link All button just goes through your list of categories and adds one row for each category. The result is exactly the same as adding each category one at a time. Is there something yo have added or changed that changes the way categories work? Or possibly, as you say, something is interfering with $current_category_id, which is set in application_top.php. That value is required for a number of things, including the specifications list. Having a wrong/missing value will not prevent the filters from working, but you may get incorrect results from the filter as it will be applied to the wrong category, or to all categories when you were expecting just one. Regards Jim Quote See my profile for a list of my addons and ways to get support. Link to comment Share on other sites More sharing options...
bassart Posted September 21, 2011 Share Posted September 21, 2011 Thanks for your quick reply Jim, I appreciate that. I found what my problem is. near the top in product_info, I have include the contribution products_next_previous.php. This causes sg2c.categories_id = '0 '. Is it possible to use this contribution together with the contribution from you. and the following code to modify? // Show the category/manufacturer name true or false $cat_show = 'true'; // calculate the previous and next if (isset($_GET['manufacturers_id'])) { $products_ids = tep_db_query("select p.products_id from " . TABLE_PRODUCTS . " p where p.products_status = '1' and p.manufacturers_id = '" . (int)$_GET['manufacturers_id'] . "'"); $category_name_query = tep_db_query("select manufacturers_name from " . TABLE_MANUFACTURERS . " where manufacturers_id = '" . (int)$_GET['manufacturers_id'] . "'"); $category_name_row = tep_db_fetch_array($category_name_query); $prev_next_in = PREV_NEXT_MB . ' ' . $category_name_row['manufacturers_name']; $fPath = 'manufacturers_id=' . (int)$_GET['manufacturers_id']; } else { if (!$current_category_id) { $cPath_query = tep_db_query ("select categories_id FROM " . TABLE_PRODUCTS_TO_CATEGORIES . " where products_id = '" . (int)$_GET['products_id'] . "'"); $cPath_row = tep_db_fetch_array($cPath_query); $current_category_id = $cPath_row['categories_id']; } $products_ids = tep_db_query("select p.products_id from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c where p.products_status = '1' and p.products_id = p2c.products_id and p2c.categories_id = '" . (int)$current_category_id . "'"); $category_name_query = tep_db_query("select categories_name from " . TABLE_CATEGORIES_DESCRIPTION . " where categories_id = '" . (int)$current_category_id . "' and language_id = '" . (int)$languages_id . "'"); $category_name_row = tep_db_fetch_array($category_name_query); $prev_next_in = PREV_NEXT_CAT . ' <u><b><font size="1"><a style="text-decoration: underline" href="' . tep_href_link(FILENAME_DEFAULT, tep_get_path($current_category_id = '')) . '">' . $category_name_row['categories_name'] . '</u></b></font>'; $fPath = 'cPath=' . $cPath; } // Check if there is at least 1 product if($product_row = tep_db_fetch_array($products_ids)) { $position = 1; $counter = tep_db_num_rows($products_ids); // Just in case there is no other product, previous and next will be the same as the current product $previous = $next_item = $product_row['products_id']; // First row is the current product, so previous product will be the last one if($product_row['products_id'] == (int)$_GET['products_id']) { // Set the next row if($product_row = tep_db_fetch_array($products_ids)) { $previous = $next_item = $product_row['products_id']; while ($product_row = tep_db_fetch_array($products_ids)) $previous = $product_row['products_id']; } } else {// First row is not the current one // Look for the current item while ($product_row = tep_db_fetch_array($products_ids)) { $position++; // This is the current product, we now just need to look at the next one if exist if($product_row['products_id'] == (int)$_GET['products_id']) { if($product_row = tep_db_fetch_array($products_ids)) $next_item = $product_row['products_id']; break; } // Update previous id else $previous = $product_row['products_id']; } } // Products Id of the first product in the category tep_db_data_seek($products_ids, 0); $product_row = tep_db_fetch_array($products_ids); $first = $product_row['products_id']; // Products Id of the last product in the category tep_db_data_seek($products_ids, $counter-1); $product_row = tep_db_fetch_array($products_ids); $last = $product_row['products_id']; if ($counter > 1) { ?> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> <tr> <td align="center"><table border="0" cellspacing="0" cellpadding="3"> <tr> <?php if ($first != (int)$_GET['products_id']) { ?> <td align="right" class="main"><?php echo '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, "$fPath&products_id=$previous") . '">' . tep_image(DIR_WS_IMAGES . 'chevron_previous.gif', PREV_NEXT_ALT_PREVIOUS) . '</a>'; ?></td> <?php } else { ?> <td align="right" class="main"><?php echo tep_image(DIR_WS_IMAGES . 'chevron_previous.gif', PREV_NEXT_ALT_PREVIOUS); ?></td> <?php } ?> <td align="center" class="main"><?php echo PREV_NEXT_PRODUCT . ' ' . $position . ' ' . PREV_NEXT_OF . ' ' . $counter . ' ' . $prev_next_in; ?></td> <?php if ($last != (int)$_GET['products_id']) { ?> <td align="left" class="main"><?php echo '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, "$fPath&products_id=$next_item") . '">' . tep_image(DIR_WS_IMAGES . 'chevron_next.gif', PREV_NEXT_ALT_NEXT) . '</a>'; ?></td> <?php } else { ?> <td align="left" class="main"><?php echo tep_image(DIR_WS_IMAGES . 'chevron_next.gif', PREV_NEXT_ALT_NEXT); ?></td> <?php } ?> I also added some code to your contribution. show_filter_box or show_filter. And have made the necessary changes in all files to decide in which position I want the filter. Filter spec one and two in leftbox (column left), Filter spec three and four in top box (header). So I can use multiple filters in places where I want. because everything from me based on oscommerce 2.2. and your contribution has been further developed to 2.3, where can I post my changes so that everyone can use. Perhaps President a few flaws, but for me it works wel. Regards, Sebastiaan Quote Link to comment Share on other sites More sharing options...
♥kymation Posted September 21, 2011 Author Share Posted September 21, 2011 Your best option is to change the Next Previous code to not interfere with $current_categories_id. That's bad coding anyway. The old download for Products Specifications is still there, so you could upload Version 1.0.3 if you want. Regards Jim Quote See my profile for a list of my addons and ways to get support. Link to comment Share on other sites More sharing options...
OSC-Sevilla Posted September 21, 2011 Share Posted September 21, 2011 I had the same issue re Next Previous code - just took that mod out for the time being - please let me know if you get it working together. Thanks! Quote Link to comment Share on other sites More sharing options...
bassart Posted September 22, 2011 Share Posted September 22, 2011 change the following in next previous to get it working $prev_next_in = PREV_NEXT_CAT . ' <u><b><font size="1"><a style="text-decoration: underline" href="' . tep_href_link(FILENAME_DEFAULT, tep_get_path($current_category_id = '')) . '">' . $category_name_row['categories_name'] . '</u></b></font>'; $fPath = 'cPath=' . $cPath; to $prev_next_in = PREV_NEXT_CAT . ' <u><b><font size="1"><a style="text-decoration: underline" href="' . tep_href_link(FILENAME_DEFAULT, "cPath=$current_category_id") . '">' . $category_name_row['categories_name'] . '</u></b></font>'; $fPath = 'cPath=' . $cPath; Another solution for users of seo url some versions the BUY NOW Button adds a amp character to the url This causes problems when returning to filters. Update seo contri or insert the following in functions/general.php /*****START_REPLACE_&_WITH_&*****/ $url = preg_replace('/&/','&',$url); /*****END_REPLACE_&_WITH_&*****/ directly under // Redirect to another page or site function tep_redirect($url) { does anyone products-specifications working in Ultimate SEO URLs? Regards, Sebastiaan Quote Link to comment Share on other sites More sharing options...
♥kymation Posted September 22, 2011 Author Share Posted September 22, 2011 change the following in next previous to get it working $prev_next_in = PREV_NEXT_CAT . ' <u><b><font size="1"><a style="text-decoration: underline" href="' . tep_href_link(FILENAME_DEFAULT, tep_get_path($current_category_id = '')) . '">' . $category_name_row['categories_name'] . '</u></b></font>'; $fPath = 'cPath=' . $cPath; to $prev_next_in = PREV_NEXT_CAT . ' <u><b><font size="1"><a style="text-decoration: underline" href="' . tep_href_link(FILENAME_DEFAULT, "cPath=$current_category_id") . '">' . $category_name_row['categories_name'] . '</u></b></font>'; $fPath = 'cPath=' . $cPath; <snipped> It would probably be better to change this to $prev_next_in = PREV_NEXT_CAT . ' <u><b><font size="1"><a style="text-decoration: underline" href="' . tep_href_link(FILENAME_DEFAULT, tep_get_path($current_category_id)) . '">' . $category_name_row['categories_name'] . '</u></b></font>'; $fPath = 'cPath=' . $cPath; Regards Jim Quote See my profile for a list of my addons and ways to get support. Link to comment Share on other sites More sharing options...
bassart Posted September 22, 2011 Share Posted September 22, 2011 Thanks Jim, I've uploaded my customizations to use multiple filters in places where I want, for Only box left or both left box and module box visa versa.. based on oscommerce 2.2 for anyone who wants it! Link to file uploaded files are only adjustments I've done! Regards, Sebastiaan Quote Link to comment Share on other sites More sharing options...
tonybarbu Posted October 30, 2011 Share Posted October 30, 2011 Hi, i am using oscommerce OSC v2.2rc2a and I installed Products Specifications v 1_0_2 but things doesn't look right. Filters don't show up although they are set in admin and I have a lot of errors like: 1146 - Table 'rsma4971_smartpc.TABLE_PRODUCTS_IMAGES' doesn't exist select p.products_id, pd.products_name, pd.products_description, pd.products_index_description, p.products_quantity, p.products_model, pi.image_filename, p.products_price, p.products_price1, p.products_price2, p.products_price3, p.products_price4, p.products_weight, p.products_tax_class_id, m.manufacturers_name, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status, s.specials_new_products_price, p.products_price) as final_price from products p left join specials s on (p.products_id = s.products_id) left join manufacturers m on ( p.manufacturers_id = m.manufacturers_id ) join products_description pd on (pd.products_id = p.products_id) left join TABLE_PRODUCTS_IMAGES pi on (pd.products_id = pi.products_id and pi.category_page = '1') where pd.products_id = '115' and pd.language_id = '4' or 1054 - Unknown column 'c.show_comparison' in 'field list' or 1054 - Unknown column 'p.products_sort_order' in 'order clause' or 1146 - Table 'rsma4971_smartpc.TABLE_PRODUCTS_IMAGES' doesn't exist From these errors i'm guessing this version of Products Specifications was not designed for my version of OSC. Can you tell me please if I'm doing something wrong? Thanks! Quote Link to comment Share on other sites More sharing options...
♥kymation Posted October 30, 2011 Author Share Posted October 30, 2011 Version 1.0.2 is old and has a number of bugs. I don't know why you chose that one. Use Version 1.1.9 for osCommerce 2.2x. Also, please understand that development has stopped for osC versions prior to 2.3, so there will not be any more fixes/updates for your old version. I don't have the time to support more than the current version. There are times when I struggle to do even that. Regards Jim Quote See my profile for a list of my addons and ways to get support. Link to comment Share on other sites More sharing options...
tonybarbu Posted October 31, 2011 Share Posted October 31, 2011 I think 1.1.9 is for OSC 2.3.1. This is what it is written in the contribution' description and it seems that after installing this version, I get a all new series of errors about files specific to OSC 2.3.1. So I'll take your advice and upgrade my version of OSC. Thanks! Tony Quote Link to comment Share on other sites More sharing options...
♥kymation Posted October 31, 2011 Author Share Posted October 31, 2011 I was wrong -- version 1.0.2 was the last version for osC 2.2x. Mea culpa. Upgrading will allow you to use the latest version and get new upgrades as they become available, so it's probably the better choice. It all depends on what other Addons you have or want to add. Regards Jim Quote See my profile for a list of my addons and ways to get support. Link to comment Share on other sites More sharing options...
alman Posted March 14, 2012 Share Posted March 14, 2012 for all that use the alt products_specification.php the alt colour was added to the other tabs this corrects it look for; $specification_text = '<ul><table colspan="2" border="0" cellpadding="0" cellspacing="0" width="100%">' . and change to: $specification_text = '<ul><table colspan="2" border="0" cellpadding="0" cellspacing="0" width="100%" class="altspec">' . in products_info.php $('div.content tr:even').addClass('alt'); change to: $('table.altspec tr:even').addClass('alt'); in stylesheet.css add: table.spec{ text-align: left; } Al Quote Link to comment Share on other sites More sharing options...
OSC-Sevilla Posted April 25, 2012 Share Posted April 25, 2012 (edited) html_output.php HTML VALIDATION ERROR ON: case ($link_data['count'] != '' && $link_data['count'] < 1 && SPECIFICATIONS_FILTER_NO_RESULT == 'grey'): $field .= '<optgroup class="no_results" label="'; $field .= tep_output_string ($link_data['text'] ); if (SPECIFICATIONS_FILTER_SHOW_COUNT == 'True' && $link_data['count'] != '') { $field .= ' (' . $link_data['count'] . ')'; } $field .= '"></optgroup>'; break; CHNAGED TO: case ($link_data['count'] != '' && $link_data['count'] < 1 && SPECIFICATIONS_FILTER_NO_RESULT == 'grey'): $field .= '<option disabled="disabled" class="no_results" >'; $field .= tep_output_string ($link_data['text'] ); if (SPECIFICATIONS_FILTER_SHOW_COUNT == 'True' && $link_data['count'] != '') { $field .= ' (' . $link_data['count'] . ')'; } $field .= '</option>'; break; Edited April 25, 2012 by gfasal Quote Link to comment Share on other sites More sharing options...
♥kymation Posted April 25, 2012 Author Share Posted April 25, 2012 optgroup is valid XHTML, and option is not a valid substitute for optgroup even if you add the disabled tag. I don't know what your validator is complaining about, but that's the wrong answer. Regards Jim Quote See my profile for a list of my addons and ways to get support. Link to comment Share on other sites More sharing options...
OSC-Sevilla Posted April 25, 2012 Share Posted April 25, 2012 (edited) most of my pages i validate through http://validator.w3.org/ im not that offay with many, which one do you recommend? I actually have the orgional code but for the time being have referenced it as another case. also, re validation, xhtm transitional and html5 ui references (not sure), such as role="button" umongst others... what validation measures do you undertake? what is your take on it, im wondering about best practises...? some page of mine are 100% (no errors), others are not. Thank you. Edited April 25, 2012 by gfasal Quote Link to comment Share on other sites More sharing options...
♥kymation Posted April 25, 2012 Author Share Posted April 25, 2012 The W3 validator is good, but it sometimes finds errors that don't exist, and occasionally is flat wrong. I use it, but I don't rely on it. My first pass is validation in Eclipse, which checks PHP as well as HTML. It's not perfect either, but it catches gross errors. Another way to check is to use View Source in Firefox and look for the red tags. I take a practical approach to validation: The code doesn't have to be perfect, it just has to work. If all the major browsers display it without problems, you have probably done well enough. Search engines only read a subset of HTML, so they are generally less of a problem. I look mainly for tags out of order or not closed properly, or tags used where they are not allowed. Minor errors, like the use of & instead of & are not that important. Regards Jim Quote See my profile for a list of my addons and ways to get support. Link to comment Share on other sites More sharing options...
OSC-Sevilla Posted April 25, 2012 Share Posted April 25, 2012 Thanks, thats what i tend to do, but one get carried away picking at it! many thanks Quote Link to comment Share on other sites More sharing options...
♥bruyndoncx Posted July 10, 2012 Share Posted July 10, 2012 Jim, My site is getting slow, and I'm looking to see where I can speed things up with indexes, but also noticed quite a number of repetitive queries as I have a filter on manufacturer for all products on the site. So I'm trying to optimize the filter box for exact queries. Currently, a query is run to retrieve the products_id count for each possible filter value. I would like to change this logic so that only a single query is used like select filter, count(products_id) as count from ... where ... group by filter and then the counts are taken from the returned array. or maybe I could just return the different filter values, and execute the getFilterCount only for the ones that are in use. BTW, the filtering on % discount is working on category pages (not yet on specials) Quote KEEP CALM AND CARRY ON I do not use the responsive bootstrap version since i coded my responsive version earlier, but i have bought every 28d of code package to support burts effort and keep this forum alive (albeit more like on life support). So if you are still here ? What are you waiting for ?! Find the most frequent unique errors to fix: grep "PHP" php_error_log.txt | sed "s/^.* PHP/PHP/g" |grep "line" |sort | uniq -c | sort -r > counterrors.txt Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.