Global, Website, Store, Store View magento

Hello FriendsIf you want to know about keyword like Global, Website, Store, Store View in magento then read my below article Global: This refers to the entire installation.    Website: Websites are ‘parents’ of stores.  A website consists of one or more stores. Websites can be set up to share customer data, or not to share any data    Store […]

Read More »

Create an external database connection magento

Hello FriendsIF you want to add external database connection or custom database connection or multiple database connection in magento then you can use below config.xml file from app>code>codepool>packagename>modulename>etc>config.xml Add the following code  to your config.xml under global tagConsider keyur_shah module<global>        <resources>            <test_write>                <connection>    […]

Read More »

Order State and order Status in Magento

Hello FriendsIn Magento, there are two columns in sales_flat_order table.These are state and status, They both are different. State is used by magento to tell if the order is new, processing, complete, holded, closed, canceled, etc.while Statuses are the one that YOU would be defining at the backend in System -> Order Statuses. Magento displays […]

Read More »

product image change on mouse hover magento

Hello FriendsIf you want to change product image on mouse hover of more view image then you can use my below scriptStep1. open file on location given belowapp/design/frontend/default/default/template/catalog/product/view/media.phtmlStep2. Search the code in media.phtml file<a href=”#” onclick=”popWin(‘<?php echo $this->getGalleryUrl($_image) ?>’, ‘gallery’, ‘width=300,height=300,left=50,top=50,location=no,status=yes,scrollbars=yes,resizable=yes’); return false;”>     <!–nested img tag stays the same–>  </a>  Step 3. Replace searched code […]

Read More »

create customer programmatically magento

Hello FriendsIf you want to create customer programmatically magento then you can use my below script.$websiteId = Mage::app()->getWebsite()->getId();$store = Mage::app()->getStore(); $customer = Mage::getModel(“customer/customer”);$customer->website_id = $websiteId; $customer->setStore($store); $customer->firstname = “keyur”;$customer->lastname = “shah”;$customer->email = “keyurshah.it@gmail.com”;$customer->password_hash = md5(“test123”);$customer->save(); Let me know if you have any query

Read More »

Removing duplicate product image Magento

Hello FriendsIf you want to Removing duplicate product image in Magento then you can use my below script.While you importing product this problem occur.you can also use this script when you have duplicate more view images in magento.First of you have to copy below code and save with anyfilename.php and put in root folder folder and […]

Read More »

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 »