WPservice DEVELOPMENT STUDIO PRESENTS
LONG-TERM GROWTH
We always design our websites with your future success in mind, carefully planning and optimizing all content to ensure maximum visibility and long-term profitability

Magento Theme Creation – Easy To Follow Guide For Designers

magento theme creation

Magento is a rising star on the e-commerce platform scene. And because online documentation is sparse for Magento theme creation, we decided to create a tutorial that gives you a leg up on all the in’s and out’s of how to create your own custom Magento theme and a few additional tips for a newbie theme developer.

Preparing For Installation

As well as purchasing Magento, you also need to get your hands on a database for the platform. You also need to have an LAMP setup first.

You need to them import some sample data. This sample data will be imported to your new database prior to installing Magento.

First, download the SQL before importing it via phpMyAdmin. It will do everything else for you.

Installation

Next step on the road to Magento theme creation is installing Magento. Thankfully, the installation process is mostly simple.

First, agree to the license agreement and accept the terms and conditions.

You can then setup your location, time zone and so on.

You will also need to enable some of the PHP extensions. These are absolutely essential for when you create a custom Magento theme, yet this part of the process is so easy to forget.

Finally, you can input your database credentials while adjusting the base URL of your store. You also get the chance to setup your SEO URL’s, too.

After all that is done, the last thing you need to do is set up your admin account.

Fix Test For Local Test Servers

When you login to your new installation, you may have noticed an error asking you to enable cookie. For the test setup, you can bypass this.

You need to open varien.php at magento\app\codeMage\Core\Model\Session\Abstract

Then locate the snippet below at line 77:

// session cookie params
$cookieParams = array(
'lifetime' => $cookie->getLifetime(),
'path'     => $cookie->getPath(),
'domain'   => $cookie->getConfigDomain(),
'secure'   => $cookie->isSecure(),
'httponly' => $cookie->getHttponly()
);
if (!$cookieParams['httponly']) {
unset($cookieParams['httponly']);
if (!$cookieParams['secure']) {
unset($cookieParams['secure']);
if (!$cookieParams['domain']) {
unset($cookieParams['domain']);
}
}
}
if (isset($cookieParams['domain'])) {
$cookieParams['domain'] = $cookie->getDomain();
}

Then implement the following code essential for Magento theme creation:

// session cookie params
$cookieParams = array(
'lifetime' => $cookie->getLifetime(),
'path'     => $cookie->getPath(),
'domain'   => $cookie->getConfigDomain(),
'secure'   => $cookie->isSecure(),
'httponly' => $cookie->getHttponly()
);
/* if (!$cookieParams['httponly']) {
unset($cookieParams['httponly']);
if (!$cookieParams['secure']) {
unset($cookieParams['secure']);
if (!$cookieParams['domain']) {
unset($cookieParams['domain']);
}
}
}
if (isset($cookieParams['domain'])) {
$cookieParams['domain'] = $cookie->getDomain();
}*/

How To Import Custom Products To Create A Custom Magento Theme

Lastly, you need to learn how to import custom products, which are essentially your own products. Importing one or two custom products is easy, but manually importing big batches is more tricky – but it can be done in a few simple steps:

  • Export sample products
  • Study the structure of CSV to understand it better
  • Import your updated CSV into Magento

Voila!

For more information on Magento theme creation and Magento template development, our website is packed with in-depth tutorials for your perusal

Comments are closed.