Magento Themes and Magento Extensions

Working with date functions in Magento

Share
Posted on October 13th, 2014 | Posted by admin

The date time will be calculated based on the lacale timezone settings in administration:

$anyDate = ’2012-11-21 13:00:00′;
$dateTimestamp = Mage::getModel(‘core/date’)->timestamp(strtotime($anyDate));
echo $currentDate = date(‘Y-m-d H:i:s’, $dateTimestamp);

Other PHP scripts to find the offset for the timezone

/** Script to calculate the offset seconds fro the timezone */
$timezone = new DateTimeZone(“Europe/London”);
$offset = $timezone->getOffset(new DateTime(“now”)); // Offset in seconds

Magento – Fatal error of maximum time utilization

Share
Posted on September 22nd, 2014 | Posted by admin

In Magento some time it gives the Fatal error of maximum time utilization as

Fatal error: Maximum execution time of 120 seconds exceeded…

then just goto your php.ini file and set the max_execution_time and max_input_time as below

max_execution_time = 3600
max_input_time = 3600

Magento – Share compare product page on facebook to get review from your friends

Share
Posted on September 19th, 2014 | Posted by admin

Here I want to address one thing to you all it’s regarding to the compare product in magento. we all knows magento provides us an compare product functionality as a customer point of view while comparing some products we always have some questions, doubts about that products now it could be better to ask the review to your friends on facebook by sharing your compare product page.

As per developer point of view how to do that? Very Simple

Step 1: You have to override one function which is present in app/code/core/Mage/Catalog/controllers/Product/CompateController.php i.e. function indexAction()
and add the below line of code after $items = $this->getRequest()->getParam(‘items’);

Magento Compiler Mode

Share
Posted on September 15th, 2014 | Posted by admin

This article refers to a beta-ish feature of Magento Community Edition 1.4.2, and therefore the specifics may quickly fall out of date. Proceed will all due caution

There’s a performance improvement feature of Magento that exists in this weird pseudo-beta state. There’s no exposed interface for it, but it does ship with the core codebase and is in wide enough use that’s it’s worth mentioning. I’m talking about the Magento “Compiler”.

(It’s been pointed out to me on twitter that the compiler interface is located at
System -> Tools -> Compiler. We regret the error, and offer as defense HEY LOOK OVER THERE! That was close. Ahem. [awkward silence]. This article still has some useful tips for dealing with the compiler via the command line )

In computer science the term compiler usually refers to transforming code from one language (like C) into another language (like binary machine code). The Magento compiler transforms PHP code into – more PHP code!

Here’s the deal. Magento’s source is spread out over a large number of modules.

Setting up a second homepage in Magento

Share
Posted on September 5th, 2014 | Posted by admin

Setting up a second homepage in Magento
If you run multi-store in a single Magento installation with different themes (e.g. two stores), you need to setup a second homepage for your second store, and it’s fairly simple.

Simply go to CMS > Manage CMS pages to create a new page with below setting:

  • Page Title: Name for the title (try use something descriptive other than ‘home page’)
  • SEF URL Identifier *: Home
Page 2 of 90«12345»102030...Last »