How to add an ON SALE icon on the category list page

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

There are 2 ways of adding a Sales Icon for the products that have a special price set up:
1. Open the list.phtml Magento template file
You can find this file under app/design/frontend/default/ YOUR THEME FOLDER/template/catalog/product/list.phtml. Now depending on how you display your products, list or grid, you will have to replace the image anchor tag, which can be found on line 50 for list view and line 95 for grid view:

<a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $this->stripTags($this->getImageLabel($_product, 'small_image'), null, true) ?>"><img src="<?php echo $this->helper('catalog/image')->init($_product, 'small_image')->resize(135); ?>" width="135" height="135" alt="<?php echo $this->stripTags($this->getImageLabel($_product, 'small_image'),

Get country code from country name in magento

Share
Posted on November 10th, 2014 | Posted by admin

Get country code from country name in magento

Ever wanted to get country code or country id from full country name in en_US locale?

Here is a nice one liner:

$country_name = 'United States';
$country_code =
Zend_Locale_Data_Translation
::$regionTranslation[$country_name];
$country_id = Mage::getModel('directory/country')
->loadByCode($country_code);

Have been tested in CE 1.5.x, 1.6.x, 1.7.x.

Manually change magento admin password

Share
Posted on November 10th, 2014 | Posted by admin

Here is how to manually change magento admin password.

Magento uses pretty simple password hashing algorithm:

1
2
3
UPDATE admin_user
SET password=CONCAT(md5('<salt><pass>'),':<salt>')
WHERE user_id=<your id>

where <salt> – any string, <pass> – your new password.
Don’t forget the semicolon.

Magento CE 1.9 – RWD – SCSS / Compass compile error

Share
Posted on October 31st, 2014 | Posted by admin

Abweichend zu meinem MacBook bekam ich nach dem Upgrade auf OSX Yosemite beim compilen von SCSS des RWD-Themes immer denselben Fehler: NoMethodError: undefined method `specificity’ for [:not(.button)]:Array. Zuerst habe ich gedacht, diesen Fehler zu beseitigen, würde mein Problem lösen. Jedoch kamen dann immer neue Fehlermeldungen. Ärgerlich, denn entspanntes Arbeiten sieht anders aus.

Da eigentlich Rechner eigentlich gleich sind, bin ich erst später darauf gekommen, die Versionen von SASS zu vergleichen. Und siehe da, die funktionierende Version auf dem MacBook ist SASS 3.4.5 und die nicht funktionierende Version auf dem iMac ist SASS 3.4.6.

How To Create a Featured Product module in magento

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

Being new with magento and adding feature like “Featured Product”.  Most of the popular website has featured section/ featured product in magento for online shops;  to have a list of featured products on the homepage. I’ve set up quite a feweCommerce sites with Magento so far and always had to implement it myself since Magento doesn’t support it out of the box. Of course I could use a plugin, but the more independent solution is to do it myself.  Fortunately it’s quite easy toimplement. This example also supports the category and sub category product listing in featured product block.

The following tutorial aims at people who know how to use Magento and who know how to create and modify themes (Magento CE 1.4.1.0).

Step 1: Add a new attribute: (Login to magento Admin area)
Now to add new attribute option from  “Catalog (Top Menu) > Attributes > Manage Attributes > Add New Attribute
Add appropriate values for property mentioned bellow and Save the new attribute.

Attribute Properties

  • Attribute Identifier: featured
  • Scope: Store View
  • Catalog Input Type for Store Owner: Yes/No
  • Unique Value (not shared with other products): No
Page 5 of 95« First...«34567»102030...Last »