Remove Estimate shipping and taxes block in Magento

Hello FriendsTo remove the Estimate shipping and taxes block you have to follow stepIn order to do this you can copy app/design/frontend/base/default/layout/checkout.xml intoapp/design/frontend/default/grayscale/layout/ (you need to replace default/grayscale with the path to your theme files) and after that customizeapp/design/frontend/default/grayscale/layout/checkout.xml removing the following line there:<block type=”checkout/cart_shipping” name=”checkout.cart.shipping” as=”shipping” template=”checkout/cart/shipping.phtml”/>Another, more correct way (as it will not override whole default […]

Read More »

Get Store Email Addresses in Magento

Hello FriendsIn Magento ( System > Configuration > Store Email Addresses) we have a section for storing various store email addresses used in various sections like Orders,Sales etcIf you want to Get Store Email Addresses then you use below code I am writing here the script to get these values<?php //General Contact echo $name = […]

Read More »

Change the Magento Admin URL

Hello FriendsTo protect your Magento backend against hackers and brute-force attacks, we recommend that you change the default URL to the Magento Admin Panel. It is a quick way to add an extra layer of security to your site.Follow these steps to change the admin URL/path.Note: Do NOT use the web interface in the Magento […]

Read More »

Get database connection details Magento

Hello FriendsI am writing here an important code snippet for getting the database connection details used in Magento$config  = Mage::getConfig()->getResourceConnectionConfig(“default_setup”);        $_host = $config->host;        $_uname = $config->username;        $_pass = $config->password;        $_dbname = $config->dbname;        echo $_host; ///likewiseLet me know your comment

Read More »

Directory paths structure Magento

Hello All,I am writing here the code to get various base directory paths, which might be useful.Assuming the directory is named ‘magento’ where your site is present and its the root directory of the filesystem.echo Mage::getBaseDir(‘base’);magento  echo Mage::getBaseDir(‘app’);magento/app echo Mage::getBaseDir(‘code’);magento/app/code echo Mage::getModel(‘core/config’)->getOptions()->getCodeDir();magento/app/code echo Mage::getBaseDir(‘design’);magento/app/design echo Mage::getBaseDir(‘etc’);magento/app/etc echo Mage::getBaseDir(‘lib’);magento/lib echo Mage::getBaseDir(‘locale’);magento/app/locale echo Mage::getBaseDir(‘media’);magento/media echo Mage::getBaseDir(‘skin’);magento/skin echo […]

Read More »

Enable inline translation magento

Hello friendsMagento inline translation can be enabled at System > Configuration > Developer > Inline Translation in Magento Backend:Please check image below  Please also make sure to disable Translation and Block output caches at System > Cache Management:Please check image below Let me know your comment

Read More »

Get table name with prefix magento

When writing database queries in modules for Magento it is often helpful to wrap the table names in a core function called “getTableName” this function will then prefix the table name if the install is using prefixes in the database.$table = “catalog_product_entity_int”; // use your own table name $tableName = Mage::getSingleton(“core/resource”)->getTableName($table); // if a table […]

Read More »

Drop Magento Database from query

The code below does as the title suggests. If anyone has been trying to remove the Magento database for whatever reason you’ll find that with all of the key constraints that come with Magento droping every table at once requires a special bit of code.Below is from a 1.7.0.2 store, different version of Magento may […]

Read More »

join EAV collection with Flat table Magento

Joining tables in Magento when it comes to EAV with Flat table is quite complicated. Consider you want to join sales_flat_order table with customer EAV tables to get Customer’s firstname and lastname, it becomes difficult as customer’s name comes from customer_entity_varchar table.Below code will join sales order flat table with customer EAV to get customer’s […]

Read More »