Magento – Adding Static Block content to a Page

Share
Posted on November 16th, 2012 | Posted by admin

Add Magento static blocks to your page easily! Simply copy this line of code below where you want the static block to appear and change the ‘identifier’ to the identifier of the static block you created. That’s it!
1
getLayout()->createBlock(‘cms/block’)->setBlockId(‘identifier’)->toHtml() ?>

Set “ship to this Address” the default in your Magento checkout

Share
Posted on November 15th, 2012 | Posted by admin

For some reason the Magento checkout sets the “Ship to different address” as the default option even though far more people actually want items delivered to their billing address. This quick tutorial explains how to change this default.

The first stage in making this change is to override the default Magento class that handles the checkout. You do his by simply copying the class file from the core folder into the local code folder.

1 cp app/code/core/Mage/Checkout/Block/Onepage/Billing.php app/code/core/Mage/Checkout/Onepage

All you then need to do is edit your new version of the file and change the function that sets the default. Change the code below…

Magento Deleting Stores Manually

Share
Posted on November 14th, 2012 | Posted by admin

If you ever ruin into a situation where you need to remove stores
or websites from Magento using the database .

You can do so using the tables listed below:

1
2
3
core_website - to remove websites
core_store  - to remove store views
core_store_group - to remove stores

Magento Exception with message ‘Warning: include(Mage\xxxx\Helper\Data.php)

Share
Posted on November 11th, 2012 | Posted by admin

If you receive this error with Magento Exception with message ‘Warning: include(Mage\xxxx\Helper\Data.php) then it means you’re calling a helper somewhere and the helper’s XML config is missing. For this example, let’s say we have a helper called “custom”. First, ensure you’ve created a class at /app/code/local/Yourcompany/Custom/Helper/Data.php . Inside Data.php, there should be the following class:

<?php
class Yourcompany_Custom_Helper_Data extends Mage_Core_Helper_Abstract{}

Then in the file /app/etc/config.xml OR /app/code/local/Yourcompany/Custom/etc/config.xml, add the below xml:

<global>
	<helpers>
	    <lpcustom>
	        <class>Yourcompany_Custom_Helper</class>
	    </lpcustom>
	</helpers>
  </global>

How to configure Magento Multistore with parked domains?

Share
Posted on November 9th, 2012 | Posted by admin

The Magento script allows you to setup multiple stores using different domains which you would have to add as parked for your account. To setup Magento Multistore with parked domains follow this steps:

  1. Login the Magento administration area
  2. Navigate to “Catalog” -> “Manage Categories”
  3. Click the “Add root category” button, which could be found on the left
  4. On the right side for “Name” enter your parked domain. For example magentostore2.com. For “Is active” and “Is Anchor” select “yes” from the dropdown menu.
  5. Click the “Save Category” button
  6. Now navigate to “System” -> “Manage Stores”
  7. Click the “Create website” button.
  8. For “Name” use magentostore2.com (in your case your parked domain). For code use magentostore2 (or one by your choice). It is important to remember these settings as you will need them later.
  9. Save the website.