Meganto: Make A Magento 1.6 Theme From Scratch

This is the all-inclusive guide to Magento 1.6 theming: from the installation to a finished product. Installing Magento 1.6.1 Creating The Database Set Magento Up For Development Starting Our Theme Development Enabling The New Package and Theme Creating The Homepage Setting Template Layouts for CMS Pages Implementing Proper Magento Template Practices 1. Installing Magento 1.6.1 […]

Continue reading

Meganto : Get the Shipping Method Chosen by User During Checkout

Constructed from Magento app/code/core/Mage/Checkout/Block/Onepage/Shipping/Method/Available.php and others: app/design/frontend/base/default/template/checkout/onepage/shipping_method/available.phtml uses this code to determine which shipping method was selected:

app/code/core/Mage/Checkout/Block/Onepage/Shipping/Method/Available.php expands that code to this:

Let’s research a bit and expand it even deeper:

Parent block expands method getQuote():

And deeper:

Merging all that code gives us this:

That gives you […]

Continue reading

Silverstripe: Boolean Value Converter to Readable

Here is the solution for convert boolean value to be readable: Add a function to convert the value to Yes or No in your DataObject class, then refer to the function instead of the DB field when defining the DOM or in your $summary_fields.

Continue reading

Magento: Disable ‘Compare Product Box’ and ‘Recently Viewed Box’ on Right Column

Comment out / Delete the following two lines Find “app/design/frontend/base/default/layout/reports.xml” (line 27)

Find “app/design/frontend/base/default/layout/catalog.xml” (line 53)

Continue reading

Silverstripe: DataObject Compare Date

We want to show the events which key date are after the current date. Below function is not correct.

The where clause is MySQL. MySQL has a function CURDATE() that returns the DATE part of the current time, so no need to generate it yourself. Also, date is a reserved sql word, so it […]

Continue reading

WordPress: Highlight Search Terms Without Plugin

1. Add below 3 functions to your functions.php For height light the search terms in post excerpt

For height light the search terms in post title

For height light the search terms in post content

2. After that, in your loop or search.php file call

instead of

3. In your […]

Continue reading

Magento Admin URL Change

It is very easy to change admin URL for Magento. If you want to change URL from or TO or Here’s what I did (worked for me on 1.3.1): 1) Open /app/etc/local.xml 2) Find this code:

3) In that snippet of code, change


4) Save the local.xml […]

Continue reading