Magento CMS syntax – part2

Share
Posted on July 25th, 2011 | Posted by admin

Every Magento user noticed that there is special {{magentocode}} syntax available in cms pages and static blocks. We traced a bit to find out which params are available and what exactly they do.

Magento CMS syntax – part1
is first part of this series. Please read before this.

Since the part1 article 4 new codes were introduced in newer Magento versions, so now there’s 10 of them total: skin, media, htmlescape, store, block, layout, config, customvar, protocol and widget.

They are currently handled by Mage_Widget_Model_Template_Filter processor class (which extends Mage_Cms_Model_Template_Filter which extends Mage_Core_Model_Email_Template_Filter).

How to create custom attribute source type?

Share
Posted on July 25th, 2011 | Posted by admin

Have you ever need to create custom attribute source type? This is small example which will help you to create custom source type. I hope that it will be helpful.

Let’s go….
First of all you need to create sql setup file which will add attribute to your system with custom source type. Source type is defined in array : ‘source’ => ‘sourcetype/attribute_source_type’.

Create language packages for an extension in Magento

Share
Posted on July 23rd, 2011 | Posted by admin

Dear my friends, last post I wrote about “How to create a multiple language website in Magento”, now I’ll continue with a related topic “How to create language packages for an extension in Magento”.
In this topic, I’ll use our FAQ extension as a real example.

  • Step 1: Edit config.xm file in : your_module/etc/config.xml
    Find section and add below piece of code:

How to add custom PHP code into CMS page in Magento?

Share
Posted on July 23rd, 2011 | Posted by admin

Today I saw that there are many topics asked about “How to add custom php code into CMS page on Magento”. Someone uses regular expressions, someone creates a new Module and puts their custom php codes into a block which they called from CMS page. But I don’t think that’s a good way.

I’m thinking about one module that we can create some custom piece of php codes in admin section then use them in any CMS page you want.

The idea is that we’ll create a new module called “customphp” that contains two parts:

Add new product type for magento

Share
Posted on July 23rd, 2011 | Posted by admin

Hi everyone!

As you may know, the resh version of Magento have five product types now :

  • Simple Product
  • Configurable Product
  • Group Product
  • Virtual Product
  • Downloadable Product.

You can create a new product type by yourself to embed to the Magento system. It’s easy to create a new product type, on this tutorial I will show you how to create a new product type. This step is to create a new product type on Magento:

  1. Create a new module by yourself or use module Creator.
  2. On file config.xml you define product by XML with tags like :