Temporarily disable some of Admin menu in Zen-Cart

Sometimes you may want to disable some menus that are not used by Store Admin for some reasons including security. You’ll need to do a few things to make it happen. – Add a new field called “is_active” in database table admin_menus. Set 1 as default. – Open the file admin/includes/functions/admin_access.php, look for the function zen_get_menu_titles(), change the query to get all menus that are active only. $sql = “SELECT menu_key, language_key FROM ” . TABLE_ADMIN_MENUS . ” WHERE is_active = 1 ORDER BY sort_order”;…

Continue reading »

How to detect screen resolution

PHP does not provide native function that can detect the device display resolution. Java Script can be used in this case, which will detect the display resolution. The script will do so, by using the width and height features of the screen. The required code for this has to be inserted into a HTML document. Once it is done, the settings can be switched to the PHP script through proper coding methods. This will be the codes that you can use to make your website…

Continue reading »

How to solve ZenCart upgrading issues

Many of my customers ask me why after upgrade a new version, their online store is working fine but the Admin Login is broken. Some store has front-end broken due to heavy customization. It just displays a blank page. So, this is what you can do to check and re-config everytime you upgrade. It doesn’t guarantee that it’ll work but these are the minimal things you must check before modifying any codes and logic. 1)  If you’ve heavily customized lot of codes and product attributes…

Continue reading »

HOW TO USE the HTML Mail Template System

To customize ZenCart email template such as adding company logo, slogan, add border, background, images so that it can represent your business professionally, you’ll need to know the email structures of ZenCart.  Open email folder to see all the email templates pre-defined by ZenCart, then you can start from there. The following info is from ZenCart docs that you can refer to when modifying all the codes that are related to email templates such as Welcome email, order processed email, contact-us, password forgotten, tell-a-friend,… The…

Continue reading »

Displaying scrolling DIV box

Sample for scrolling DIV box. You can scroll horizontally or vertically using overflow-x or overflow-y CSS stylesheet: #preview{ color:#cc0000; font-size:12px; border:1px #ff0000 solid; overflow: auto; white-space: nowrap; width: 300px; } .imgList{ max-height:150px;margin-left:5px; border:1px solid #dedede; padding:4px; /* float:left; //not working in this case if you want div scrolling horizontally */ display: inline-block; /* display:inline; not working in this case */ } HTML page: <div id=’preview’></div> <form id=”imageform” method=”post” enctype=”multipart/form-data” action=’ajaxImageUpload.php’ style=”clear:both”> <h1>Upload your images</h1> <div id=’imageloadstatus’ style=’display:none’><img src=”loader.gif” alt=”Uploading….”/></div> <div id=’imageloadbutton’> <input type=”file” name=”photos[]” id=”photoimg1″…

Continue reading »