Magento Themes and Magento Extensions

How to change Weight Attribute decimals Magento

Posted on December 9th, 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:

$_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']) ?>

How To Pre Populate Product Dropdown Attribute Values

Posted on July 20th, 2011 | Posted by admin

If you are looking to pre-populate product drop down attributes (custom types) i.e. “Partners” attribute etc. then you must be wondering how to pre-populate the product drop down attribute values in that attribute. One option is to manually enter all the data which is time consuming specially if you are supposed to fill large data set. What if the source of the data is large enough to enter and update? Situation gets worse if you are asked to check whether the data is upto-date or not.

Lets take a scenario where people are coming to a separate part of your website and registering as a partner which is getting stored in other database (Non-Magento database).

Now, we have to fetch partners from this remote site and pre-populate (upto-date) data in our newly created custom attribute dropdown (partners).

Add custom attribute to Magento’s PDF invoice

Posted on July 12th, 2011 | Posted by admin

Hello everyone! Today I’ll show you how to add custom attribute to Magento’s generated PDF invoice in just a few steps. Since this article is pretty straight-forward, here we go.

One of my recent tasks was to create a custom attribute for products called inchoo_warehouse_location, and output it when click on “Print” (invoice in admin section) occurs. Since PDF generation is Magento’s core functionality, we’ll have to rewrite it a bit.

Step 1

Create the following three files in your Magento’s installation:

Those will be used for our extension that will modify Magento’s core functionality.

Listing products by attribute

Posted on June 23rd, 2011 | 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

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

Page 2 of 2«12