Magento Themes and Magento Extensions

Create a custom category attribute in Magento

Share
Posted on April 4th, 2013 | Posted by admin

Create a custom category attribute in Magento
Copy and paste the following code in your header.phtml

Get all attributes from an attribute set in magento.

Share
Posted on March 31st, 2013 | Posted by admin

Get all attributes from an attribute set in magento.

$entityTypeId = Mage::getModel(‘eav/entity’)
->setType(‘catalog_product’)
->getTypeId();
$attributeSetName = ‘Default’; //Edit with your required Attribute Set Name
$attributeSetId = Mage::getModel(‘eav/entity_attribute_set’)
->getCollection()
->setEntityTypeFilter($entityTypeId)

Magento – Programmatically insert new attribute option

Share
Posted on December 21st, 2012 | Posted by admin
  • Magento add image label programatically
  • Magento add attribute options programmatically
  • Magento create attribute programmatically
  • Magento add attribute option programmatically
  • Magento add attribute programmatically
  • Magento attribute source model

Listing products by attribute

Share
Posted on October 17th, 2012 | Posted by admin

This is step by step tutorial for the beginners that will show you how to list products by attribute. I will start with functions that Magento already has built-in: New products and Promotional products. All the instructions below is made from Magento Professional 1.9.0.0

Listing products with attribute New

You can find settings for defining New attribute in  Magento administration under Manage products in Products management. For this tutorial I will use CMS page called Homepage as example. In CMS Page layout -> Layout Update XML is defined template for CMS page by

How to change Weight Attribute decimals Magento

Share
Posted on December 11th, 2011 | Posted by admin

There is no simple way to change the decimal numbers in the Weight Attribute in Magento.

And is not a specific solution either.

What can we do?

For example, we can force to all numeric attributes to show with 2 decimals.

Open the attributes.phtml located in:

app/design/frontend/YOUR THEME/template/catalog/product/view/

I changed this:

<?php echo $_helper->productAttribute($_product, strip_tags($_data['value']), $_data['code']) ?

To this:

<?php
$_MyValue = $_data['value'];
if (is_numeric($_MyValue))
{
$_MyValue = round($_MyValue, 2); //round to 0.00
}
?>
<?php echo $_helper->productAttribute($_product, strip_tags($my_data_value), $_data['code']) ?>
Page 1 of 212»