Chủ Nhật, 29 tháng 11, 2015

The Properties tab in Magento



1.       The A†ribute Code is the name of the Atribute that you will use when managing the Atribute. It must contain only lowercase leters, numbers, and the underscore character. Also, it must begin with a leter.

2.      The Scope of this Atribute can be set to Store View, Website, or Global. For now, you can leave it set to the default—Store View. The other values become useful when you use one Magento installaNon to create mulNple stores, or mulNple web sites, both of which are beyond the scope of this book.

3.     The field Catalog Input Type for Store Owner enables you to select the kind of data that this Atribute will hold.
If you select Dropdown or MulIple Select for this field, then under, you will need to enter the list of choices (the list of values) for this field the Manage Label/ OpIons tab.



4.       If you select Yes for Unique Value, then no two products can have the same value for this Atribute.

5.       If you select Yes for Values Required, then you must select, or enter a value for, this Atribute. You will not be able to save a Product with this Atribute if you leave it blank.

6.     Input ValidaIon for Store Owner causes Magento to check the value entered for an Atribute, and confirm that it is the right kind of data. When entering a value for this Atribute, if you do not enter the kind of data selected, then Magento gives you a warning message.

7.     The Apply To field determines which Product Types can have this Atribute applied to them. Remember that the three Product Types in Magento are Simple, Grouped, and Configurable.

8.       If you select Yes for Use in advanced search, this atribute will have its own field on the Advanced Search page.

9.       If you select Yes for Comparable on Front-end, this atribute will appear in the Compare Products page.

10.   The Use in Layered NavigaIon seNng enables your customers to filter Products based on this Atribute. When this is enabled, your customer sees a filter on the leG side of the page, where (s)he can select values for this Atribute. Magento will then display only Products that have a value for the Atribute that falls within the range selected by the customer.
SelecNng No excludes this Atribute from the Layered NavigaNon Menu. SelecNng Filterable (with results) will put the Atribute into the Layered NavigaNon Menu, but only for those values that show some Products. SelecNng Filterable (no results) will put the Atribute into the Layered NavigaNon Menu, and all values will be displayed—even those that don't produce results.
You can make an atribute filterable only if the Input Type is Dropdown, MulIple Select, or Price.

11.   If you use this Atribute in the Layered NavigaNon menu (that is, if you allow your customers to filter by this Atribute), then PosiIon determines the posiNon of
the atribute in the Layered NavigaNon. Entering 1 puts this Atribute at the top of the menu.

12.   If you select Yes for Visible on Catalog Pages on Front-end, this Atribute will appear in the AddiIonal InformaIon secNon of each Product that uses the Atribute.

13.   Select the Manage Labels/OpIons tab.

14.   In the Admin field under Manage Titles, enter the name that you will use for this Atribute in the administraNve interface. In the Default Store View field, enter the name for this Atribute that your customers will see in your store.



15.   If this Atribute type is Dropdown or MulIple Select, then the Manage OpIons
secNon will appear.
In the Admin field, enter the name that you will use for this value in the administraNve interface. You will see this name when you are creaNng a Product and assigning a value to the Atribute.
In the Default Store View field enter the value that your customers will see in your store.
If this Atribute type is not Dropdown or MulIple Select, then this secNon will not appear.

16.   Click on Save A†ribute. The Atribute is saved and you are returned to the list of Atributes. You should see the one you just added in the list, and a success message at the top of the page.

This concludes the process for creaNng a new Atribute. Repeat this as needed.

Thứ Tư, 25 tháng 11, 2015

INTRODUCTION TO LAYOUTS

Layout is the tool with which you can assign content blocks to each structural block you create. Magento’s layout files are in the form of XML text-files and by modifying the layout you are able to move blocks around in a page and assign templates to the content blocks to produce markup for the structural blocks. In fact,
with the help of a few layout files alone, you are able to modify the visual layout of every page in your store.

Now look at the break-down of the above snapshot into Magento’s structural blocks and the content blocks assigned to each of those structural blocks.

In concept, the outlines in the left diagram above are the structural blocks. They are the parent blocks of content blocks and in realization, serve to position its content blocks within a store page context (as in the right diagram above). These structural blocks exist in the forms of the header area, left column area, right column, etc, which serve to create the visual structure for a store page. In this chapter, we’re going to work with Magento’s default structural blocks. Structural blocks are handled by Magento’s Page module and are defined in app/design/frontend/base/default/layout/page.xml file and the default page templates defined in
the app/design/frontend/base/default/template/page/ directory.

A content block is the individual-colored blocks that make up a structural block. In a store context, they are the true content of a store page. They are representations of each functionality featured in a page (such as category list, callout and product tags, etc.), and employ template files to generate xHTML to be inserted into its parent structural block. Content blocks make up the bulk of the remainder of the template files contained in the app/design/frontend/base/default/template/ directory.

Layout is the tool with which you can assign content blocks to each structural block you create. Layout
exists in the form of XML text-file and by modifying the layout you are able to move blocks around in a page and assign templates to the content blocks to produce markup for the structural blocks. In fact, with the help of a few layout files alone, you are able to modify the visual layout of every page in your store.

With Magento, you will no longer have a template file named “left_column.ext” and in it have the never- ending morass of markups that must be manually managed depending on each functionality needed for the page. Instead, your templates are managed on a per-functionality basis and you can load and unload
functionalities in your store page by the virtue of a couple of layout commands alone.