Magento Themes and Magento Extensions

Add Manufacturer block in Magento

Share
Posted on June 27th, 2014 | Posted by admin

To add the Manufacturer block in Magento is very easy. Just follow the steps mentioned bellow.

Create a new template file manufacturer.phtml inapp/design/frontend/default/<your_template>/template/catalog/navigation/
(if you are not able to find catalog or navigation directory in template then please create them in respective order)

Put the following code in  manufacturer.phtml

<ul>
<?php
$collection = Mage::getResourceModel('catalog/product_attribute_collection') ->addFieldToFilter('attribute_code', array('eq'=>'manufacturer'))
->addStoreLabel(Mage::app()->getStore()->getId())

Reset use secure in front end in database magento

Share
Posted on June 26th, 2014 | Posted by admin

I ran into an issue this week where I switched on SSL on a development site and then realized the SSL cert was not installed correctly. This is a big issue in Magento because there is no way to get back to the admin to switch it back off.

If this ever happens do the following to switch back:

1. Open up your admin panel (cPanel or other)
2. Go to phpMyAdmin (if MySql)
3. Find your Magento Database
4. Find table “core_config_data”

Magento robots.txt file content

Share
Posted on June 20th, 2014 | Posted by admin

From today onwards I am going to apply these rules to fix issues with SEO.

Magento admin / System / configuration / General / Web / Auto-redirect to Base URL / Yes (301 Moved Permanently)

Also, add robots.txt file with below content.

User-agent: *
Disallow: /*.css$
Disallow: /*.js$
Disallow: /*.php$
Disallow: /*?SID=
Disallow: /404/
Disallow: /app/
Disallow: /catalog/category/view/
Disallow: /catalog/product/view/
Disallow: /catalog/product_compare/
Disallow: /catalogsearch/
Disallow: /cgi-bin/
Disallow: /checkout/
Disallow: /control/
Disallow: /cron.php

How to Create CSV files in Magento

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

How to Create CSV files in Magento

If you want to create downloadable csv of you ordered item’s you can use following script.

$orders = Mage::getModel(“sales/order”)->getCollection();
// prepare CSV header
$csv = ”;
$_columns = array(
“Order Id”,
“Product Name”,
“Sku”,
“Price”
);
$data = array();
// prepare CSV header…
foreach ($_columns as $column) {
$data[] = ‘”‘.$column.’”‘;

How to hide the price for a 0 priced product in Magento

Share
Posted on June 18th, 2014 | Posted by admin

here are several ways to show the text “FREE” on the product page in case the product price is 0 in Magento you will need to do an if statement inside the view.phtml file located in app/design/frontend/default/YOUR_TEMPLATE/template/catalog/product/view.phtml

You will need to find the

<?php echo $this->getChildHtml('product_type_data') ?>

and replace it with:

<?php if($_product->price==0): ?>
<?php echo 'FREE'; ?>
<?php else: ?>
<?php echo $this->getChildHtml('product_type_data') ?>
<?php endif; ?>
Page 1 of 212»