Dr. Rolex Posted September 12, 2013 Author Share Posted September 12, 2013 (edited) Hi Dr. Rolex I'm almost ready to promote the Dynamic Checkout changes to my live store but IE8 doesn't work correctly; Other "style" changes I've applied don't work in IE8 so it's not your code Any suggestions how to make older browsers more compatible? Thanks so much I don't spend much time to get the code working on older IE versions, I don't understand why someone use IE8 in the year 2013? I don't understand why someone is using IE at all after all the warnings that have come out from various places.. There are plenty of webpages with hacks and help to get things working (somewhat properly) on IE. Look in the IE console and google the errors. As for me, I simply do this: <?php $u_agent = $_SERVER['HTTP_USER_AGENT']; if(preg_match('/(?i)msie [2-8]/',$u_agent)) { // put your code here for Internet Explorer Version 2-8 } else { // put your code here for modern browsers } ?> As a suggestion, you can try this in checkout_shipping.php: <?php $u_agent = $_SERVER['HTTP_USER_AGENT']; if(!preg_match('/(?i)msie [2-8]/',$u_agent)) { ?> <script type="text/javascript" src="js/jquery.easing.min.js"></script> <script type="text/javascript" src="js/jquery.checkout.engine.js?0912"></script> <?php } ?> This code check which browser version the customer use and if it's not IE version 2-8 then it will load the javascript. This Add-On should be safe for people without Javascript, but I haven't tested it. Edited September 12, 2013 by Dr. Rolex Quote osC OpenSSL Encryption with jCryptionSupport Forum jQuery/Ajax Advanced Statistics 2.3Support Forum jQuery/Ajax Advanced Order Handler 2.3.3Support ForumjQuery/Ajax Advanced Caching System 2.3.3Support ForumjQuery/Ajax Fast checkout/Shopping Cart/Login/Create Account 2.3.3Support ForumjQuery/Ajax Shopping Cart 2.3.3Support ForumjQuery/Ajax Dynamic Checkout 2.3.3Support ForumjQuery/Ajax Mini Cart for osCommerce 2.3.3Support ForumjQuery Cycle What's New InfoboxAuto Out Of Stock CSS Image OverlayjQuery-UI Autocomplete Product Search with Links & MySQLi support for osCommerce 2.X Link to comment Share on other sites More sharing options...
jackhill Posted September 12, 2013 Share Posted September 12, 2013 Thanks, I'll give that a try :) ps - do you freelance?? Quote Link to comment Share on other sites More sharing options...
Dr. Rolex Posted September 12, 2013 Author Share Posted September 12, 2013 (edited) Thanks, I'll give that a try :) ps - do you freelance?? Ha ha, no no.. No time for that. But I'm sure you can find people with greater coding skills than me. ;) Edited September 12, 2013 by Dr. Rolex Quote osC OpenSSL Encryption with jCryptionSupport Forum jQuery/Ajax Advanced Statistics 2.3Support Forum jQuery/Ajax Advanced Order Handler 2.3.3Support ForumjQuery/Ajax Advanced Caching System 2.3.3Support ForumjQuery/Ajax Fast checkout/Shopping Cart/Login/Create Account 2.3.3Support ForumjQuery/Ajax Shopping Cart 2.3.3Support ForumjQuery/Ajax Dynamic Checkout 2.3.3Support ForumjQuery/Ajax Mini Cart for osCommerce 2.3.3Support ForumjQuery Cycle What's New InfoboxAuto Out Of Stock CSS Image OverlayjQuery-UI Autocomplete Product Search with Links & MySQLi support for osCommerce 2.X Link to comment Share on other sites More sharing options...
fagulhas Posted November 5, 2013 Share Posted November 5, 2013 I need some help. I have a template, and some part of the code is giving me problems. This is the code in the template file "html_output.php": function tep_draw_button($title = null, $icon = null, $link = null, $priority = null, $params = null) { static $button_counter = 1; $types = array('submit', 'button', 'reset'); if ( !isset($params['type']) ) { $params['type'] = 'submit'; } if ( !in_array($params['type'], $types) ) { $params['type'] = 'submit'; } if ( ($params['type'] == 'submit') && isset($link) ) { $params['type'] = 'button'; } if (!isset($priority)) { $priority = 'secondary'; } $button = ''; if ( ($params['type'] == 'button') && isset($link) ) { $button .= '<a class="unishop_submit" href="' . $link . '"'; if ( isset($params['newwindow']) ) { $button .= ' target="_blank"'; } } else { $button .= '<button class="unishop_button" type="' . tep_output_string($params['type']) . '"'; } if ( isset($params['params']) ) { $button .= ' ' . $params['params']; } $button .= '>' . $title; if ( ($params['type'] == 'button') && isset($link) ) { $button .= '</a>'; } else { $button .= '</button>'; } $button .= ''; $button_counter++; return $button; } ?> And i need to replace to your code: function tep_draw_button($title = null, $icon = null, $link = null, $priority = null, $params = null) { global $button_counter; if (!tep_session_is_registered('button_counter')) { tep_session_register('button_counter'); $button_counter = 1; } if ($button_counter >= 1000 ) $button_counter = 1; $types = array('submit', 'button', 'reset'); if ( !isset($params['type']) ) { $params['type'] = 'submit'; } if ( !in_array($params['type'], $types) ) { $params['type'] = 'submit'; } if ( ($params['type'] == 'submit') && isset($link) ) { $params['type'] = 'button'; } if (!isset($priority)) { $priority = 'secondary'; } $button = '<span class="tdbLink">'; if ( ($params['type'] == 'button') && isset($link) ) { $button .= '<a id="tdb' . $button_counter . '" href="' . $link . '"'; if ( isset($params['newwindow']) ) { $button .= ' target="_blank"'; } } else { $button .= '<button id="tdb' . $button_counter . '" type="' . tep_output_string($params['type']) . '"'; } if ( isset($params['params']) ) { $button .= ' ' . $params['params']; } $button .= '>' . $title; if ( ($params['type'] == 'button') && isset($link) ) { $button .= '</a>'; } else { $button .= '</button>'; } $button .= '</span><script type="text/javascript">$("#tdb' . $button_counter . '").button('; $args = array(); if ( isset($icon) ) { if ( !isset($params['iconpos']) ) { $params['iconpos'] = 'left'; } if ( $params['iconpos'] == 'left' ) { $args[] = 'icons:{primary:"ui-icon-' . $icon . '"}'; } else { $args[] = 'icons:{secondary:"ui-icon-' . $icon . '"}'; } } if (empty($title)) { $args[] = 'text:false'; } if (!empty($args)) { $button .= '{' . implode(',', $args) . '}'; } $button .= ').addClass("ui-priority-' . $priority . '").parent().removeClass("tdbLink");</script>'; $button_counter++; return $button; } ?> When i change the code, the templante design dont work very well. Can you help me? Quote Link to comment Share on other sites More sharing options...
fagulhas Posted November 11, 2013 Share Posted November 11, 2013 No one can help me? Quote Link to comment Share on other sites More sharing options...
Dr. Rolex Posted November 26, 2013 Author Share Posted November 26, 2013 No one can help me? Hello Fagulhas, I've been away for a couple of weeks so I haven't been able to check the forum. Have you tried using your old code? It will take a while for me to "learn the code" again. Could you PM your shop address? You could always try using my current code, if you're lucky it might work better but I don't know if I have changed anything. function tep_draw_button($title = null, $icon = null, $link = null, $priority = null, $params = null) { global $button_counter; if (!tep_session_is_registered('button_counter')) { tep_session_register('button_counter'); $button_counter = 1; } if ($button_counter >= 1000 ) $button_counter = 1; $types = array('submit', 'button', 'reset'); if ( !isset($params['type']) ) { $params['type'] = 'submit'; } if ( !in_array($params['type'], $types) ) { $params['type'] = 'submit'; } if ( ($params['type'] == 'submit') && isset($link) ) { $params['type'] = 'button'; } if ( !isset($params['id']) ) { $params['id'] = 'tdb' . $button_counter; } if (!isset($priority)) { $priority = 'secondary'; } $button = '<span class="tdbLink">'; if ( ($params['type'] == 'button') && isset($link) ) { $button .= '<a id="' . $params['id'] . '" href="' . $link . '"'; if ( isset($params['newwindow']) ) { $button .= ' target="_blank"'; } } else { $button .= '<button id="' . $params['id'] . '" type="' . tep_output_string($params['type']) . '"'; } if ( isset($params['params']) ) { $button .= ' ' . $params['params']; } $button .= '>' . $title; if ( ($params['type'] == 'button') && isset($link) ) { $button .= '</a>'; } else { $button .= '</button>'; } $button .= '</span><script type="text/javascript">$("#' . $params['id'] . '").button('; $args = array(); if ( isset($icon) ) { if ( !isset($params['iconpos']) ) { $params['iconpos'] = 'left'; } if ( $params['iconpos'] == 'left' ) { $args[] = 'icons:{primary:"ui-icon-' . $icon . '"}'; } else { $args[] = 'icons:{secondary:"ui-icon-' . $icon . '"}'; } } if (empty($title)) { $args[] = 'text:false'; } if (!empty($args)) { $button .= '{' . implode(',', $args) . '}'; } $button .= ').addClass("ui-priority-' . $priority . '").parent().removeClass("tdbLink");$("#' . $params['id'] . '").button({label: "' . $title . '"});</script>'; $button_counter++; return $button; } Quote osC OpenSSL Encryption with jCryptionSupport Forum jQuery/Ajax Advanced Statistics 2.3Support Forum jQuery/Ajax Advanced Order Handler 2.3.3Support ForumjQuery/Ajax Advanced Caching System 2.3.3Support ForumjQuery/Ajax Fast checkout/Shopping Cart/Login/Create Account 2.3.3Support ForumjQuery/Ajax Shopping Cart 2.3.3Support ForumjQuery/Ajax Dynamic Checkout 2.3.3Support ForumjQuery/Ajax Mini Cart for osCommerce 2.3.3Support ForumjQuery Cycle What's New InfoboxAuto Out Of Stock CSS Image OverlayjQuery-UI Autocomplete Product Search with Links & MySQLi support for osCommerce 2.X 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.