How to change from eregi (deprecated) to preg_match function in Zencart with PHP5.3

eregi_replace() is deprecated as of PHP 5.3.0. Use preg_replace() with the i ( =================================================================== admin/includes/classes/phplot.php in function SetPlotType($which_pt): $accepted = "bars,lines,linepoints,area,points,pie,thinbarline"; //$asked = trim($which_pt); $asked = ‘/’.trim($which_pt).’/i’; if (preg_match($asked, $accepted)) { $this->plot_type = $which_pt; return true; } ============================================ admin/includes/functions/compatibility.php while(list($k, $line) = each($output)) { //if(eregi("^$host", $line)) { if( preg_match(‘/’.$host.’/i’, $line)) { return true; } } ============================================= admin/includes/functions/password_funcs.php if ( preg_match(‘/^[a-z0-9]$/i’, $char)) $rand_value .= $char; ========================================= admin/whos_online.php if ( preg_match (‘/^(.*)’ . zen_session_name() . ‘=[a-f,0-9]+[&]*(.*)/i’, $whos_online- >fields[‘last_page_url’], $array)) ===================================== includes/classes/language.php if ( preg_match(‘/^(‘ . $value[0] .…

Continue reading »

CSS fixes for IE browser

This is the CSS3 that can be added to stylesheet to fix styling in IE browser of all versions. /***** Attribute ******/ /* IE6 */ #once { _color: blue } /* IE6, IE7 */ #doce { *color: blue; /* or #color: blue */ } /* Everything but IE6 */ #diecisiete { color/**/: blue } /* IE6, IE7, IE8, but also IE9 in some cases 🙁 */ #diecinueve { color: blue\9; } /* IE7, IE8 */ #veinte { color/*\**/: blue\9; } /* IE6, IE7 — acts…

Continue reading »

Zen-Cart upgrade from 1.3.x to 1.5.3

If you upgrade Zencart from version 1.3.x to V1.5.4, chance is you’ll experience a lot of error on front-end and back-end Admin. Below is the list of files that you need to consider during the manual upgrade. Version 1.5.4 contains new features and bug fixes. NEW Files ADDED (since release of v1.5.3) /admin/includes/auto_loaders/config.admin.zcObserverLogEventListener.php (added in v1.5.4) /admin/includes/auto_loaders/config.admin.zcObserverLogWriterDatabase.php (added in v1.5.4) /admin/includes/auto_loaders/config.admin.zcObserverLogWriterTextfile.php (added in v1.5.4) /admin/includes/classes/class.admin.zcObserverLogEventListener.php (added in v1.5.4) /admin/includes/classes/class.admin.zcObserverLogWriterDatabase.php (added in v1.5.4) /admin/includes/classes/class.admin.zcObserverLogWriterTextfile.php (added in v1.5.4) /admin/includes/init_includes/init_cache_key_check.php (added in v1.5.2, updated in 1.5.4) /includes/classes/ajax/zcAjaxPayment.php (added…

Continue reading »

Change Zencart regular design to mobile responsive design

If you use bootstrap framework, each template can be modified as follow: – remove some tables that contain fixed width in the css – add a new div class=”row” – add multiple div and assign class=”col-sm-4 col-md-6 col-lg-12″ – moving codes by block For example: On the product_info_display template page, select the entire block “bof Attributes Module” and “eof Attributes Module”, move it into one of multile div, so that when viewing on mobile or tablet the entire block will be organized vertically

Continue reading »

Overwrite Inline Styles with your CSS

Usually we think of inline styles as a way to overwrite styles we set up in the CSS file. 99% of the time, this is the case, and it’s very handy. But there are some circumstances where you need to do it the other way around. As in SugarCRM, WordPress, Joomla, there are inline styles on some markup that you absolutely can’t remove, but you need to overwrite what those styles are. This could be markup that is being inserted onto the page from foreign…

Continue reading »