I faced a problem last day while updating the header_php.php file for one of the pages I created in Zen Cart. Even after making changes in the header_php file, the changes were not reflected when I viewed the page in browser. The header_php.php file is present in \includes\modules\pages\{page_name}\where {page_name} should be replaced by the name… Continue reading Zen Cart header_php File Not Updating
Tag: PHP
Magento :: How To Call Static Blocks From PHTML Pages
Magento offers the web master to put static contents where ever he likes in the site with the help of CMS -> Static Blocks. These blocks can be easily edited from the admin panel. To call and show their contents on any phtml file write the following code. echo $this->getLayout()->createBlock(‘cms/block’)->setBlockId(‘identifier’)->toHtml() ; Here identifier should be… Continue reading Magento :: How To Call Static Blocks From PHTML Pages
Make Website Compatible in Internet Explorer 7 and 8
Making a website compatible with the main browsers is any UI developer’s nightmare. Specially with the weird behaviors if IE. Now to add to that pain IE 6, 7 and 8 all act differently. So, if you are an UI developer, here’s a little trick to make your life a bit happier. If have succeeded… Continue reading Make Website Compatible in Internet Explorer 7 and 8
PHP :: Single And Double Quote Difference
We all use plenty of ‘ {single quote} and ” {double quote} in our PHP code. As a beginner a lot of us use them without knowing the difference and use it according to our personal choice. The confusion starts to build up when we start using variables. And a lot of time is lost… Continue reading PHP :: Single And Double Quote Difference
Opning phtml thtml ctp Files In Dreamweaver
To open and read the .phtml (Zend Framework) .thtml or .ctp (CakePHP) files in Dreamweaver just like the .php files follow these steps – 1. Open the file – C:\Program Files\Macromedia\{Dreamweaver Folder}\Configuration\DocumentTypes\MMDocumentTypes.xml (Replace C: with the drive name where your OS is installed) 2. Search “php,php3,php4,php5” (It will be line # 75). After php5 add… Continue reading Opning phtml thtml ctp Files In Dreamweaver
Magento Admin Login Problem
From Magento version 1.2.1 you will notice that suddenly you cannot log in to the admin panel after you have installed Magento. And this happens only when you install it locally and use http://localhost/ The reason is Magento have implemented a security check to see the domain is a valid one with dots in it.… Continue reading Magento Admin Login Problem
Create New Layout In Magento
Magento comes in-built with a few page layouts like 1 column, 2 columns with left bar, 2 columns with right bar etc.If you want to add new layouts of your own follow these steps. 1. Open file /app/etc/local.xml2. Just before the </global> tag add the following Home Page page/home-page.phtml home_page If you are using the… Continue reading Create New Layout In Magento
Zen Cart Multi Level Category Slide Out Menu
This hack is now available as a downloadable plugin from the Zen Cart site. Please visit this link to download it. The plugin uses separate files of its own and doesn’t need any of the existing files to be updated. The Zen Cart Category Menu shows only the sub categories of the currently selected category.… Continue reading Zen Cart Multi Level Category Slide Out Menu
Get Cart Quantity in Magento
You can get the number of items currently in the cart using the following code. $cart = Mage::getModel(‘checkout/cart’)->getQuote()->getData(); echo (int)$cart[‘items_qty’]; However,if the cart is empty, writing only the above code will show error (Because $cart[‘items_qty’] is only set when there are items on the cart). For that you need to check if the value is… Continue reading Get Cart Quantity in Magento
Zen Cart "Invalid Country Code" problem with shipping and payment module
While using Zen Cart a common problem is the countries table. A lot of Shipping and Payment module throws errors and the reason is the invalid country code. The Zen Cart countries table at id 74 stores country “France, Metropolitan” with countries_iso_code_2 => FX and countries_iso_code_3 => FXX The problem is the ISO does not… Continue reading Zen Cart "Invalid Country Code" problem with shipping and payment module