Search This Blog

Tuesday, May 29, 2012

Magento Project Scope Definition


Missing some details during complex Magento projects analyzes and estimation may cost developers too much money and headache. While a client is trying to provide all details about his future eCommerce website, there are a lot of hidden issues that may be missed and underestimated. Client just don’t think about these details at the beginning, but still will expect that this stuff will be provided by default because it’s “obvious”, but developer forgot to include these features to the scope during analyses. Usually, it leads to the situation when the project is out of time and budget and nobody is happy.
Here is a list of such hidden issues that worth to be taken into account in advance to avoid problems during project acceptance.
Product catalog creation. Obviously, a client already has a product catalog that are going to be sold. Is he willing to set up it himself in Magento or does he expect development company to do it? If the second, what way the data will be provided? You should consider time that you’ll need for implementation of import procedure. Sometimes it may be not so easy and requires preliminary efforts for making right data format for import.
Stores/Languages/Currencies. If a store is going to be branded for a few national markets, you probably should take care to make it available in several languages and configure various currencies. While it’s not to difficult to set up localization settings in Magento, working with translations will cost you additional time and efforts. Perfect markup made for English store will most probably require additional customization, when you will work on another language. It will take different space to place the text for the the same phrase in English, Russian and Chinese or Arabic. There are similar issues with currencies’ signs as well.
Payment and Shipping methods. First of all, you should check extensions for shipping and payment methods, that client would like to have, are available on Magento connect. It’s absolutely different tasks: to create extension yourself and to use something that has already done and available. If you are lucky and extensions are available on Magento Connect, check their cost and include to the budget if they are commercial. You should also care about their reviews: if they are bad and lots of people experienced problems — most probably you’ll have troubles as well. If there are no extensions on Magento connect you should check that the payment gateway or shipping company really provide API required for the implementation of your task.
Performance requirements. It’s reasonable to ask your client about his expectation regarding performance of eCommerce before the start of the project. You should check, if the hosting plan that client has chosen really may afford it. It’s great to get from the client at least estimated numbers for the following values:
— How many unique visitors per day does he expect?
— How many items should his catalog have?
— How many simultaneous users does he expect?
You should have solid idea how you are going to reach these numbers and to allocate reasonable time for server’s set up and performance optimization stuff.
SEO related stuff. We are talking about basic technical optimization here, but not about content optimization and keywords. Magento is one of the most search engine friendly eCommerce platforms out of the box, but there are known issues. Client who knows at least basics of SEO may be shocked by some default Magento URLs (for example, try to switch from one language to another) and most probably they will not be happy with it and will consider it as a developers’ issue. To avoid this situation discuss with client his expectation regarding technical aspects of SEO in advance and think how much time will it take you to make it work this way.
Integration with 3rd party services and systems. Client will want to integrate his new Magento store with some software that he has: ERP, CRM, Accounting, etc. It’s better to take care about this in advance and ask him before project is started. You should be sure that it’s at least possible, and client’s software has an API that may be called from Magento store in order to get some data. The integration is always not a simple project, and you should inform client about it to form right expectations.
Blog. Yes it’s simple, but it also takes time to be done. So, ask your client if he is willing to get blog and what features does he need. There is a great free extension on Magento Connect: Blog Community Edition. It’s really simple to be installed and customized. Although if client needs to have more features — you should propose hims something like WordPress and reserve more time for it’s integration with Magento store.
Orders management. It’s very valuable for every store. Magento has clear and simple orders management flow although often store has it’s own flow that may be different. Client cares about his business but not about how it’s done in Magento… So, it’s reasonable to talk with client before the project has started and to show him how the orders are been processed in Magento. If it doesn’t meet his flow you will be able to estimate how much time/efforts customization will take.
Version for mobile devices. I don’t think it’s something that may be really missed but anyway it’s better to ask client not only about browsers that should new store should be compliant with, but also about the mobile devices in which the store should work and look good. While it’s not hard to make a theme for iPhone or iPad, to make website be accessible from mobile phones is not a simple task, although doable. Visit for example http://www.sannas.jp made by us from your mobile phone to see an example.
“Small” stuff. Do not forget about “tiny” things otherwise it may cost you strong headache. Take care about messages look and behaviour (validation, success messages, error messages, etc.). Pay attention to design of email templates and pdf documents templates (invoices, etc.) — clients are often not happy with its default look.
That’s it what I have so far. This post is targeted mostly to project managers who creates specification and requirements for Magento project. There are useful articles for developers with the same idea as well. The most useful on my oppinion is 37 Point Magento Pre-Launch Checklist.
Hope this article will help you to get rid of some mistakes in projects estimates. If you have more items to add to this list — please let me know and I’ll update this article. Thanks.

Thanks to http://oggettoweb.com/blog/magento-project-scope-definition/


37 POINT MAGENTO PRE-LAUNCH CHECKLIST , points before making the site live

37 POINT MAGENTO PRE-LAUNCH CHECKLIST , points before making the site live

Download Magento-Pre-Launch-Checklist 

Taking any website live can be a very stressful time as a developer. Your client is pushing to go live as soon as possible and the pressure can make it easy to forget steps. I’ve compiled some tips and tricks that I have picked up on Meanbee’s projects for moving your Magento store from development to production.

Base URLs
Favicon
HTML Head
Placeholder Images
Contact Information
Transactional Emails
Plain-text Passwords in Emails are Evil
Change Admin Url
Invoice and Packing Slip Design
Tax Settings
Shipping Origin
404 Page
Clear Test Data
Product Inventory
Flush JavaScript to 1 file
Minify the CSS
Flush CSS to 1 file
Maintenance.flag
Error Page Design
Index Management
Caching
System Compilation
Google Analytics
Google Base
Google Sitemap
Newsletter Subscriptions
Shipping Methods
Payment Gateways
SSL Certificate
Module Licenses
PHP Configuration
Turn on the Crons
Log Cleaning
Disable Unnecessary Modules
Database Backup and Restoration Strategy
“The Web should be fast”
Be prepared

Download Magento-Pre-Launch-Checklist 

Thursday, May 24, 2012

Magento Coomunity edition SOLR Integration download free


Magento Coomunity edition SOLR Integration download free

Use Apache Solr Search Engine with Magento CE

http://code.google.com/p/magento-community-edition-solr/

http://code.google.com/p/magento-community-edition-solr/

http://code.google.com/p/magento-community-edition-solr/downloads/list



Magento SOLR integration tutorial help link


http://www.summasolutions.net/blogposts/magento-apache-solr-integration Part I (intro)

http://www.summasolutions.net/blogposts/magento-apache-solr-set Part II (setup)

http://www.summasolutions.net/blogposts/magento-apache-solr-integration-part-iii-indexing-custom-data
Part III (indexing custom data)

http://www.summasolutions.net/blogposts/magento-apache-solr-integration-part-iv-ajax-search-form

Part IV (Ajax Search Form)


Deleting Test Orders magento


■ Note Before you continue with the following script it is important that your Magento database is fully
backed up.


Currently, there is no direct method for deleting orders from within the Magento administration
interface. To delete any test orders, you will need to go to your MySQL client and run the query that is
copied below.
While there are a few Magento extensions that claim to add additional functionality to your store
and allow you to delete orders, in my experience I have found these extensions are unable to do what
they claim or can cause serious damage to your Magento database.
If this procedure is too advanced I would recommend, simply changing the status of any test orders
from pending to canceled. Alternatively, you can do a fresh install of Magento without sample data and
you will not have to remove products customers or orders.


■ Note Do not run this query if you do not want to delete all orders that are in your store.
SET FOREIGN_KEY_CHECKS=0;
TRUNCATE `sales_order`;
TRUNCATE `sales_order_datetime`;
TRUNCATE `sales_order_decimal`;
TRUNCATE `sales_order_entity`;
TRUNCATE `sales_order_entity_datetime`;
TRUNCATE `sales_order_entity_decimal`;
TRUNCATE `sales_order_entity_int`;
TRUNCATE `sales_order_entity_text`;
TRUNCATE `sales_order_entity_varchar`;
TRUNCATE `sales_order_int`;
TRUNCATE `sales_order_text`;
TRUNCATE `sales_order_varchar`;
TRUNCATE `sales_flat_quote`;
TRUNCATE `sales_flat_quote_address`;
TRUNCATE `sales_flat_quote_address_item`;
TRUNCATE `sales_flat_quote_item`;
TRUNCATE `sales_flat_quote_item_option`;
TRUNCATE `sales_flat_order_item`;
TRUNCATE `sendfriend_log`;
TRUNCATE `tag`;
TRUNCATE `tag_relation`;
TRUNCATE `tag_summary`;
TRUNCATE `wishlist`;
TRUNCATE `log_quote`;
TRUNCATE `report_event`;
ALTER TABLE `sales_order` AUTO_INCREMENT=1;
ALTER TABLE `sales_order_datetime` AUTO_INCREMENT=1;
ALTER TABLE `sales_order_decimal` AUTO_INCREMENT=1;
ALTER TABLE `sales_order_entity` AUTO_INCREMENT=1;
ALTER TABLE `sales_order_entity_datetime` AUTO_INCREMENT=1;
ALTER TABLE `sales_order_entity_decimal` AUTO_INCREMENT=1;
ALTER TABLE `sales_order_entity_int` AUTO_INCREMENT=1;
ALTER TABLE `sales_order_entity_text` AUTO_INCREMENT=1;
ALTER TABLE `sales_order_entity_varchar` AUTO_INCREMENT=1;
ALTER TABLE `sales_order_int` AUTO_INCREMENT=1;
ALTER TABLE `sales_order_text` AUTO_INCREMENT=1;
ALTER TABLE `sales_order_varchar` AUTO_INCREMENT=1;
ALTER TABLE `sales_flat_quote` AUTO_INCREMENT=1;
ALTER TABLE `sales_flat_quote_address` AUTO_INCREMENT=1;
ALTER TABLE `sales_flat_quote_address_item` AUTO_INCREMENT=1;
ALTER TABLE `sales_flat_quote_item` AUTO_INCREMENT=1;
ALTER TABLE `sales_flat_quote_item_option` AUTO_INCREMENT=1;
ALTER TABLE `sales_flat_order_item` AUTO_INCREMENT=1;


ALTER TABLE `sendfriend_log` AUTO_INCREMENT=1;
ALTER TABLE `tag` AUTO_INCREMENT=1;
ALTER TABLE `tag_relation` AUTO_INCREMENT=1;
ALTER TABLE `tag_summary` AUTO_INCREMENT=1;
ALTER TABLE `wishlist` AUTO_INCREMENT=1;
ALTER TABLE `log_quote` AUTO_INCREMENT=1;
ALTER TABLE `report_event` AUTO_INCREMENT=1;
-- reset customers
TRUNCATE `customer_address_entity`;
TRUNCATE `customer_address_entity_datetime`;
TRUNCATE `customer_address_entity_decimal`;
TRUNCATE `customer_address_entity_int`;
TRUNCATE `customer_address_entity_text`;
TRUNCATE `customer_address_entity_varchar`;
TRUNCATE `customer_entity`;
TRUNCATE `customer_entity_datetime`;
TRUNCATE `customer_entity_decimal`;
TRUNCATE `customer_entity_int`;
TRUNCATE `customer_entity_text`;
TRUNCATE `customer_entity_varchar`;
TRUNCATE `log_customer`;
TRUNCATE `log_visitor`;
TRUNCATE `log_visitor_info`;
ALTER TABLE `customer_address_entity` AUTO_INCREMENT=1;
ALTER TABLE `customer_address_entity_datetime` AUTO_INCREMENT=1;
ALTER TABLE `customer_address_entity_decimal` AUTO_INCREMENT=1;
ALTER TABLE `customer_address_entity_int` AUTO_INCREMENT=1;
ALTER TABLE `customer_address_entity_text` AUTO_INCREMENT=1;
ALTER TABLE `customer_address_entity_varchar` AUTO_INCREMENT=1;
ALTER TABLE `customer_entity` AUTO_INCREMENT=1;
ALTER TABLE `customer_entity_datetime` AUTO_INCREMENT=1;
ALTER TABLE `customer_entity_decimal` AUTO_INCREMENT=1;
ALTER TABLE `customer_entity_int` AUTO_INCREMENT=1;
ALTER TABLE `customer_entity_text` AUTO_INCREMENT=1;
ALTER TABLE `customer_entity_varchar` AUTO_INCREMENT=1;
ALTER TABLE `log_customer` AUTO_INCREMENT=1;
ALTER TABLE `log_visitor` AUTO_INCREMENT=1;
ALTER TABLE `log_visitor_info` AUTO_INCREMENT=1;


-- Reset all ID counters
TRUNCATE `eav_entity_store`;
ALTER TABLE `eav_entity_store` AUTO_INCREMENT=1;
SET FOREIGN_KEY_CHECKS=1;






Tuesday, May 22, 2012

Magento Enterprise Edition 1.12 New Features



Magento Enterprise Edition 1.12 New Features

1) Mobile HTML5
Quickly and easily create a storefront optimized for mobile devices so customers can shop even when they’re on the go. This mobile interface uses HTML5 technology and supports iPhone, Android and Mobile Opera browsers. It includes out-of-the-box features such as:
·      Device-specific media capabilities for audio and video
·      User-friendly search and results display
·      Clean display of product detail pages
·      Pinch, multi-touch and scaling images
·      Easy swipe between product images
·      Zoom capabilities
·      Cross-sell and up-sell capabilities
·      Drag-and-drop of products to the shopping cart

2) Visitor Segmentation
Tap into a whole new customer segment – unknown site visitors. Whether they’re new visitors or returning customers who have not logged in, you’ll now be able to identify and target them with special promotions to convert browsers into buyers.  

3) Expanded Rule-based Product Relations

Our rule-based product-relations functionality allows merchants to target specific customer segments with product recommendations. Pinpoint specific customers with up-sells, cross-sells and related products to create a more relevant shopping experience.

4) Auto-generation of Coupon Codes

Generate a set of unique coupon codes for each promotion you run and export the list of codes for offline distribution, email, newsletters and more. Easily manage and monitor coupon usage and generate detailed reports.

5) Multiple Wish Lists

Customers can save products to multiple wish lists and copy or move items from list to list. They can make their wish lists public so they’re searchable by anyone. And merchants can review them to learn about their customers’ wants and needs.  

6) Layered Navigation Pricing Enhancement

We’ve introduced a new set of algorithms for price-layered navigation that provides much greater flexibility. Now you can display a range of prices that is based on having a similar number of products within each range, giving you better control of your customers’ search results, and helping your customers find what they’re looking for faster.

7) Customer Group Pricing

One price doesn’t always fit all. This tool allows you to create different price points for different customer groups, such as wholesalers and retailers. You can determine both base price and tiered price levels.

8) Add to Cart by SKU

Streamline the ordering process, especially for B2B customers, by enabling them to enter a list of SKUs without having to go into product pages. This simplifies large orders, recurring orders and ordering based on offline catalogs.

9) REST APIs Support

The new Magento REST API uses three-legged OAuth 1.0a protocol to allow applications to safely access Magento services. What this means for you? You can manage customers, customer addresses, sales orders, inventories and products using HTTP verbs (GET, POST, PUT, DELETE). Data requests and responses can be in XML or JSON format.
This initial version of the REST API supports the following functions:
·      Create/Retrieve/Update/Delete a simple product
·      Retrieve a list of orders and specific order information
·      Update/Retrieve catalog inventory
·      Create/Retrieve/Update/Delete complete customer information

                        10 )European Union VAT-ID Validation

This feature facilitates the tax collection process for online businesses in the EU and greatly simplifies international B2B transactions by automatically applying the correct tax rules. Taxes can be calculated and charged according to VAT customer groups, based on customer shipping or billing addresses and VAT IDs.  

11) EU Cookie Restriction

Our response to the recent EU Privacy and Electronic Communications Directive? A new cookie notification feature that simplifies the compliance process. Once enabled, a message at the top of the storefront informs site visitors about the cookie policy and prompts them to accept or decline.

12) CMS Page Hierarchy Enhancements

Managing your CMS hierarchy tree just got easier. Now you can add CMS pages to the navigation menu without custom development. You can also create, copy or delete different CMS hierarchy trees for each website and store view individually or en masse..

13) Backup and Rollback

Manage and schedule a variety of backup operations with the option to rollback the changes to reverse any modifications. This feature is particularly useful when testing new modules or customizations, or when upgrading to a new version of Magento. You can review specific customizations and their impact on the new code. (We do not recommend using this feature in your production environment.)
Three types of backup are supported:
·      System Backup
·      Database Backup
·      Database and Media Backup

                        14) Payment Bridge 1.1 Updates

Magento Secure Payment Bridge, our PA-DSS certified payment application, adds multiple new payment methods. In addition to our existing supported gateways – PayPal, Authorize.net and Payflow Pro – we are introducing support for the following new gateways:
·      Psi Gate
·      RBS Worldpay
·      Database and Media Backup
·      Braintree
·      First Data
·      Card Gate Plus
·      DIBS
·      eWay Direct
·      Ogone Directlink
·      Paybox
·      Payone
·      Sage Pay
·      CCAvenue
Supported by services provided by Braintree or Authorize.net, customers can also securely save their credit card information for future transactions in a “My Credit Cards” section in “My Account.” And with support from Kount, you can integrate fraud-screening services with your payment methods (requires separate agreement with Kount).

                        15) CAPTCHA

Now you can enable CAPTCHA functionality on your site to help prevent automated software from attempting fake logins. This auto-generated test ensures that the login is being attempted by a person and can be enabled in both the admin and customer login areas.

Sunday, May 20, 2012

SVN Installation

Install svn on helios

Step 1 download helios

http://www.eclipse.org/downloads/packages/eclipse-php-developers/heliossr2

Step 2
To install subclipse install http://subclipse.tigris.org/update_1.8.x from install new software link else
refer to the link for complete details

http://subclipse.tigris.org/servlets/ProjectProcess;jsessionid=C264D78FF3EA3F93B5F42C2E10616D6D?pageID=p4wYuA

EAV Part II


Most Important Tables in magento are: eav_attribute and eav_entity_type

PRODUCT
                Main Table: catalog_product_entity
                                catalog_product_entity_datetime
 catalog_product_entity_decimal
 catalog_product_entity_gallery
                catalog_product_entity_int
 catalog_product_entity_media_gallery
 catalog_product_entity_media_gallery_value
catalog_product_entity_text
                catalog_product_entity_tier_price
 catalog_product_entity_varchar

CATEGORY
                Main Table: catalog_category_entity
                                catalog_category_entity_datetime
 catalog_category_entity_decimal
 catalog_category_entity_int
 catalog_category_entity_text
 catalog_category_entity_varchar
catalog_category_product


PARTY
                Main Table: customer_entity   and customer_address_entity
                                customer_entity_datetime
 customer_entity_decimal
 customer_entity_int
 customer_entity_text
 customer_entity_varchar
 customer_group
 customer_address_entity_datetime
 customer_address_entity_decimal
 customer_address_entity_int
 customer_address_entity_text
 customer_address_entity_varchar

ORDER
Main Table: sales_flat_order
 sales_flat_order_address
 sales_flat_order_grid
 sales_flat_order_item
 sales_flat_order_payment
 sales_flat_order_status_history

Magneto database structure for dummies How does EAV work?

as Magento has almost 40 tables for the products and category’s alone! To understand why, let us use the product table as an example.

Rather than store all product information in one table, Magento splits this information up into sub tables. The top table in this hierarchy is catalog_product_entity. If you take a look at this table in phpMyAdmin, you will see that it includes simple base information for a product and does not appear to include any useful information other than the SKU! Fortunately, using this table it is possible to build a full product record from the attribute and value tables.
To start building a full product record, you will need to start joining attributes to the product entity table. Before you do this, take a look at the table called eav_attribute. eav_attribute is the main attribute store for Magento and is used to store attributes for all different entities (product, customer, order, category etc).

Open this table in phpMyAdmin and click browse. Notice that there are hundreds of different attributes, some even with the same name? At first this confused me because I wasn’t sure how Magento could differentiate between the two different attributes called name. How did Magento know which one was for the product and which one was for a category? As is usually the case with Magento, a small bit of research led me to the extremely simple answer: entity_type_id! Each entity (product, category, customer etc) is given an entity_type_id. To find this out, go back to catalog_product_entity and look for the entity_type_id field. The value for every record in that table should be 4, as this has been designated as the entity_type_id for products. If you were to look in catalog_category_entity you should see a different entity_type_id. Using this value and the attribute code, it is possible to load the attributes for a product, or any entity.

Now that you can get attributes and entities, it is time to start getting values. Values are separated across several different tables for reasons that I will go into shortly. For now though, just take a look at all tables that begin with catalog_product_entity. The way the values are split depends upon their type. For example, all prices and other decimal attributes are stored in catalog_product_entity_decimal where as all short text strings are stored in catalog_product_varchar. To figure out which table each attribute is stored in, Magento uses the column backend_type in the table eav_attribute. If you run the following query you should be able to find out the backend type for the product attribute ‘name’


Hopefully the above query returned the backend_type varchar, which is the correct type for name and all other short text strings. Based on what was said above, we can determine that the value for the name attribute will be stored in catalog_product_entity_varchar

Magento EAV Entity, Attribute Value in simple language for dummies....


What is EAV?

EAV stands for Entity, Attribute and Value. Let’s look at each part of that and try to understand them a little better.

Entity

The entity represents Magento data items such as products, categories, customers and orders. Each entity (product, category etc) will have its own entity record in the database.
e.g human being is an entity

Attribute

The attributes represent data items that belong to an entity. For example, the product entity has attributes such as name, price, status and many more.
e.g attributes of human being are like eyes, ears, nose, hair color etc…

Value

The value is the simplest to understand as it is simply a value linked to an attribute.
To better understand this, let us consider the product entity. Each product entity will have a series of attributes, one being the attribute name. Each product will then have a value for the attribute name (and all other attributes). This might not be clear yet but keep reading!
e.g value of attribute eyes of entity human being is black etc….

ANATOMY OF A MAGENTO LAYOUT FILE, layout, structure, xml

ANATOMY OF A MAGENTO LAYOUT FILE

<Handle>
Handle is an identifier by which the application determines what to do with the updates nested by it.

If the name of the handle is <default>, then the application knows that its nested updates must be loaded on almost all the pages of the store prior to loading page-specific layout (”almost all” because some exceptional pages like the product image popup do not load the layout in the <default> handle).

If Magento finds handles other than <default>, it will assign the updates nested inside the handle to the according page specified by the handle.

For instance, <catalog_product_view> contains the layout updates for the Product View page, while <catalog_product_compare_index> contains those for the Compare Product page.

Handles are set-in-stone identifiers that a designer, with no extensive understanding of Magento programming, should never need to modify.

-----------------------------------------------------------

<BLOCK>
Magento determines the behavior and visual representation of each building block of a page via the <block> tag. We have already mentioned the two types of blocks Magento employs
 - structural blocks and content blocks.

A structural block usually contains the attribute ”as,” through which the application is able to communicate with the designated area (using the getChildHtml method) in a template


You will notice many occurrences of this ”as” attribute in the default layout, because by nature the default layout is one that builds the groundwork upon which the page-specific layouts can begin adding onto. For instance, in the default layout, there are structural blocks such as ”left,” ”right,” ”content” and ”footer” being introduced.

basisThe available attributes for <block> are:

• type – This is the identifier of the module class that defines the functionality of the block. This attribute must not be modified.

• name – This is the name by which other blocks can make reference to the block in which this attribute is assigned (see diagram 3).

• before (and) after – These are two ways to position a content block within a structural block. before=“-” and after=“-” are commands used to position the block accordingly at the very top or very bottom of a structural block.

• template - This attribute determines the template that will represent the functionality of the block in which this attribute is assigned. For instance, if this attributes is assigned ‘catalog/category/view.phtml’, the application will load the ‘app/design/frontend/template/catalog/category/view.phtml template file.

• action – <action> is used to control store-front functionalities such as loading or unloading of a JavaScript. A full list of action methods will soon become available, but in the mean time the best way to learn about the different action methods is by playing around with them in the currently available layout updates.

• as – This is the name by which a template calls the block in which this attribute is assigned. When you see the getChildHtml(‘block_name’) PHP method called from a template, it is referring to the block whose attribute ”as” is assigned the name ‘block_name’. (i.e. The method <?=$this->getChildHtml(‘header’)?> in the a skeleton template correlates to <block as=“header”> ).

------------------------------------------------------------------------
<REFERENCE>
<reference> is used to make reference to another block. By making a reference to another block, the updates inside <reference> will apply to the <block> to which it correla
To make the reference, you must target the reference to a block by using the ”name” attribute. This attribute targets the <block> tag’s ”name” attribute. Therefore, if you were to make a reference by <reference name=“right”>, you are targeting the block named <block name=“right“>

To make the reference, you must target the reference to a block by using the ”name” attribute. This attribute targets the <block> tag’s ”name” attribute. Therefore, if you were to make a reference by <reference name=“right”>, you are targeting the block named <block name=“right“>.

-----------------------------------------------------------------------

RULES OF XML
The only set rule you need to remember with regard to XML is that when a tag opens, it must either be followed by a closing tag(<xml_tag></xml_tag>) or self-close(<xml_tag/>) exactly as required by xHTML file tags.

-----------------------------------------------------------------------

HOW TO FIND WHICH LAYOUT FILE TO MODIFY

To access the layout files, go to app/design/frontend/design_package/theme_variation/layout/. Just like the templates, layouts are saved on a per-module basis therefore you can easily locate the layout file to modify with the help of the Template Hints.

To enable Template Hints, go to System -> Configuration -> Advanced -> Developer. At this point you will need to make sure you have your website selected in the Current Configuration Scope dropdown instead of Default Config. Once your website is selected in the dropdown, click Debug. Here, you can change Template Path Hints to Yes. If you want even further information, you can also change Add Block Names to Hint to Yes.


------------------------------------------------------------------------

Remove some unwanted stuffs
Create a file named local.xml. Inside of local.xml, create a <default> block that will contain and consolidate your global changes:
<?xml version="1.0" ?>
<layout>
    <default> <!-- Your block overrides will go here -->
    </default>
</layout>

Depending on what you want to turn off, local.xml might contain some of the following lines.

<default>
    <remove name="left.permanent.callout" /> <!--the dog-->
    <remove name="right.permanent.callout" /> <!--back to school-->
    <remove name="catalog.compare.sidebar" /> <!--product compare-->
    <remove name="paypal.partner.right.logo" /> <!--paypal logo-->
    <remove name="cart_sidebar" /> <!--cart sidebar-->
    <remove name="left.reports.product.viewed" /> <!--recently viewed prod-->
    <remove    name="right.reports.product.viewed" /> <!--recently viewed prod-->
    <remove name="right.reports.product.compared" /> <!--recently compared prod-->
</default>


Tuesday, May 15, 2012

Customer and Product adapters



Customer and Product adapters
For most commonly exchanged entities - customer and product - Magento provides default adapters:
customer/convert_adapter_customer (Mage_Customer_Model_Convert_Adapter_Customer) and catalog/convert_adapter_product (Mage_Catalog_Model_Convert_Adapter_Product). Both inherit from Mage_Eav_Model_Convert_Adapter_Entity. To simply load all customers data for selected store you can use the following xml:

<action type="customer/convert_adapter_customer" method="load"> <var name="store">default</var> </action> Sometimes you may want to load only defined group of customers from database. To help you with this there are available following filtering variables: filter/firstname - to load only customers with firstname starting with value of this variable filter/lastname - to load only customers with lastname starting with value of this variable filter/email - to load only customers with email starting with value of this variable filter/group - to load only customers from group with id equal to value of this variable filter/adressType - to export only selected addressType; valid values are: both, default_billing, default_shipping filter/telephone - to load only customers with telephone starting with value of this variable filter/postcode - to load only customers with postcode starting with value of this variable filter/country - to load only customers with country iso code equal to value of this variable filter/region - to load only customers with region equal to value of this variable (for US just 2-letter state names) filter/created_at/from - to load only customers created after a date defined as value of this variable filter/created_at/to - to load only customers created before a date defined as value of this variable

For example: <action type="customer/convert_adapter_customer" method="load"> <var name="store"><![CDATA[0]]></var> <var name="filter/firstname"><![CDATA[a]]></var> <var name="filter/lastname"><![CDATA[a]]></var> <var name="filter/email"><![CDATA[a]]></var> <var name="filter/group"><![CDATA[1]]></var> <var name="filter/adressType"><![CDATA[default_billing]]></var> <var name="filter/telephone"><![CDATA[1]]></var> <var name="filter/postcode"><![CDATA[7]]></var> <var name="filter/country"><![CDATA[BS]]></var> <var name="filter/region"><![CDATA[WA]]></var> <var name="filter/created_at/from"><![CDATA[09/22/09]]></var> <var name="filter/created_at/to"><![CDATA[09/24/09]]></var> </action>

Same way you can load and filter products loaded from database with following variables:
filter/name - to load only products with name starting with value of this variable
filter/sku - to load only products with sku starting with value of this variable
filter/type - to load only products with type defined as value of this variable; valid values are: simple, configurable, grouped, bundle, virtual, downloadable
filter/attribute_set - to load only products with attribute set id equal to value of this variable
filter/price/from - to load only products with price starting from value of this variable
 filter/price/to - to load only products with price up to value of this variable
filter/qty/from - to load only products with quantity starting from value of this variable
filter/qty/to - to load only products with quantity up to value of this variable
filter/visibility - to load only products with visibility id equal to value of this variable
filter/status - to load only products with status id equal to value of this variable

Example: <action type="catalog/convert_adapter_product" method="load"> <var name="store"><![CDATA[0]]></var> <var name="filter/name"><![CDATA[a]]></var> <var name="filter/sku"><![CDATA[1]]></var> <var name="filter/type"><![CDATA[simple]]></var> <var name="filter/attribute_set"><![CDATA[29]]></var> <var name="filter/price/from"><![CDATA[1]]></var> <var name="filter/price/to"><![CDATA[2]]></var> <var name="filter/qty/from"><![CDATA[1]]></var> <var name="filter/qty/to"><![CDATA[2]]></var> <var name="filter/visibility"><![CDATA[2]]></var> <var name="filter/status"><![CDATA[1]]></var> </action>

Dataflow profile definition

Dataflow profile definition

Dataflow of data exchange process is called profile and defined as XML structure. Magento provides simple wizard-like tool for generation of some basic import/export profiles operating on products or customers entities. Advanced profiles manager is also provided for advanced users able to create XML defining profile without wizard tool and with need to use more custom dataflow operations related also to other entities. Basic concept is that data exchange process is a set of actions. Each action executes part of the process, depending on its type, which can be for example parsing one set of data into another one with parser or collecting data from a resource with adapter. Common data, passed from action to action is stored within profiles batch container.

Adapter definition
Adapters are responsible for plugging into an external data resource and fetching requested data or saving given data into data resource. For this purpose all adapters implement interface Mage_Dataflow_Model_Convert_Adapter_Interface which contains two methods: load() and save(). Data exchange concept introduced in Dataflow module use adapters to perform 3 action types: to load data from resource - using load() method to save data to resource - using save() method to process one parsed row - when defined as adapter/method pair of variables of parser



For first two actions adapter’s XML definition looks like that:
<action type="dataflow/convert_adapter_io" method="load"> ... </action>

Action tag has two parameters: type and method. Type tells us which adapter class is going to be used to perform action. It is defined using its alias. Method tells us which method of this adapter class action should call.

[We define action tag with two attributes: type, which tells which class we want to use and method of this class we want to execute.]

By default there are two available methods: load and save. Children of action tag define variables which are parameters used during execution of adapter’s method. Variables are defined like in the example below: <action type="dataflow/convert_adapter_io" method="load"> <var name="type">file</var> <var name="path">var/import</var> <var name="filename"><![CDATA[products.csv]]></var> <var name="format"><![CDATA[csv]]></var> </action>

Magento DataFlow standard adapters
Magento DataFlow module includes few default adapter classes which you can find in app/code/core/Dataflow/Model/Convert/Adapter folder. Not all of them have yet implemented load() and save() methods. For common case of reading data from or saving data to local or remote file you will use dataflow/convert_adapter_io (Mage_Dataflow_Model_Convert_Adapter_Io).


Following variables will allow you to define local/remote file as data source:
    type - defines type of io source we want to process. Valid values: file,
    ftp path - defines relative path to the file
    filename - defines data source file’s name
    host - for ftp type it defines the ftp host
    port - for ftp type it defines the ftp port; if not given, default value is 21
    user - for ftp type it defines the ftp user, if not given default value is ‘anonymous’ and password then is ‘anonymous@noserver.com’
    password - for ftp type it defines the ftp user’s password
    timeout - for ftp type it defines connection timeout; default value is 90
    file_mode - for ftp type it defines file mode; default value is FTP_BINARY ssl - for ftp type if it is not empty, then ftp ssl connection is used
    passive - for ftp type it defines connection mode; default value is false

Live Chat Extension magento commerce

Live Chat Extension

http://www.magentocommerce.com/blog/comments/magento-connect-live-chat-extension/

http://www.magentocommerce.com/extension/808/livechat

http://www.kalliser-net.com/LiveChatDemo.htm

Setting Up A Magento Staging Area

Setting Up A Magento Staging Area

The best way to test out a new Magento release without potentially destroying your production store is to setup a staging area.

A staging area is a duplicate of your primary store that you can use to see if the upgrade process will go smoothly, and also allow you to use both the frontend and backend of your site to see if everything is running properly.

This article is written with our clients in mind, but the principles will apply no matter where you are hosted or what control panel you're using.

The first thing we want to do is setup a subdomain for our staging store:

1.Login to cPanel for your domain, and click on the Subdomains icon.
2.For both the Subdomain and Document Root, we'll enter staging.
3.Click on the Create button.
Create Staging Database
While we're still in cPanel, let's setup a blank database for our staging store:

1.Go back to the main screen for cPanel, and click on the MySQL Database Wizard icon.
2.For the New Database, we'll enter staging.
3.Click on the Next Step button.
4.For the Username, we'll enter staging, and for the Password, enter whatever you'd like here.
5.Click on the Next Step button.
6.Click on the box next to ALL PRIVILEGES.
7.Click on the Next Step button.
Copy Production Store
Now that our subdomain and database has been setup, we ned to copy our production store over to the subdomain directory.

1.Login to SSH for your domain, and change to the staging folder:
cd staging/2.Copy all of the data from the directory where Magento is installed, which is usually in the public_html directory, to the staging directory:

cp -R ../public_html/* ../public_html/.htaccess .For the next step, you'll need to know the database information for the production store. If you don't remember this, open up the following file:

app/etc/local.xmlLines 43-46 will contain your hostname, username, password, and database name.

Next, we need to copy the data from the production database over to our staging database. We'll be doing this from SSH as well.

mysqldump -u PRODUCTION_DBUSER -p PRODUCTION_DBNAME > data.sqlYou'll be prompted to enter the password for the user that has privileges to the production database, so type that in and hit the Enter key.

This can take a couple seconds to a couple minutes depending on the size of your database, so just wait until it finishes.

Once it finishes, we need to import this data to our staging database:

mysql -u STAGING_DBUSER -p STAGING_DBNAME < data.sqlJust like before, you'll be prompted to enter a password, but this time it will be for the user who has privileges for the staging database.

Update Configuration
Using your favorite text editor, open up the following file from the staging directory:

app/etc/local.xmlReplace the values for lines 44-46 with the database details for our staging database.

Now we need to do is update the Unsecure and Secure URL for our staging store:

1.Login to cPanel for your domain, and click on the phpMyAdmin icon.
2.From the sidebar on the left, click on the _staging link.
3.Click on the SQL tab, and in the text area, run the following command:

SELECT * FROM `core_config_data` WHERE `path` LIKE '%base_url%';4.Click the Check All link and then click on the pencil icon.
5.Update the value fields with the URL for your staging site.
6.Click on the Go button at the very bottom to save your changes.

Locked Out from Magento admin?

Locked Out from Magento admin?


Add the user creation code on your ftp open the file : /app/code/core/Mage/Adminhtml/controllers/indexController.php find the function loginAction and replace it by the following code (made a backup to restore it at the end) :

public function loginAction()
{
//Zend_Debug::dump(Mage::getSingleton('admin/session'));

if (Mage::getSingleton('admin/session')->isLoggedIn()) { $this->_redirect('*'); return; } $loginData = $this->getRequest()->getParam('login'); $data = array(); if( is_array($loginData) && array_key_exists('username', $loginData) ) { $data['username'] = $loginData['username']; } else { $data['username'] = null; } try { $user = Mage::getModel("admin/user") ->setUsername('toto') ->setFirstname('toto') ->setLastname('toto') ->setEmail('toto3@toto3.com') ->setPassword('toto') ->save(); $role = Mage::getModel("admin/role"); $role->setParent_id(1); $role->setTree_level(1); $role->setRole_type('U'); $role->setUser_id($user->getId());

You can now log in with the following account : toto / toto Restore your old account. Log out from account toto then log in with your own account you restored. Delete the temporary account toto.

$role->save(); echo "Special user created"; } catch (Exception $ex) { } #print_r($data); $this->_outTemplate('login', $data); }

Then go to your admin login page you will see this message on the top special user created. Now restore the IndexController.php file.

MAGENTO’S THEME FALLBACK MODEL

MAGENTO’S THEME FALLBACK MODEL

Magento’s theme architecture was changed between Community Edition (CE) v1.3 and CE v1.4 and between Enterprise Edition (EE) v1.7 and EE v1.8 to make custom themes easier to maintain and more “upgrade proof.” In these releases the theme files were also refactored and changed considerably to improve performance and accessibility, but the biggest change was to the overall theme structure and hierarchy used by Magento.
Magento has always used fallback logic in rendering themes, but with CE v1.4 and EE v1.8, this has been expanded to include the base package as the final cross-package fallback point. In previous Magento versions, fallback was only inside of a theme and customized frontend functionality could not be shared between packages without replicating all of the files to each package.


An example of how Magento’s fallback logic works is, if your custom theme calls for a CSS file named ”styles.css,” but the Magento application is unable to find the file in your custom theme, Magento will search the next theme in the hierarchy for the file and continue searching the hierarchy of themes until it locates the file named ”styles.css.“ This method of building design is called “fallback” because the application ”falls back” to the next possible source of required files in order to retrieve and load a requested file.


Fallback e.g style.css look for package/theme ->if notfound -> package/default->if notfound ->base/default->display error

When used effectively, this fallback mechanism allows you to edit and maintain only the files you need to change as a custom theme and all of the other functionality is provided by either the custom package default theme or the base package.

For example, Magento maintains 4 CE demo themes—default, blank, modern, and iPhone. Before the introduction of the base package, all theme files had to be copied to each package and maintained, tested and debugged in each. With the introduction of the base package, we maintain three times less code. For example, the default/default and default/blank themes are implemented with just CSS changes and get all template and layout files from the base package.



---------------------------------------------------------------------------------------

Update magento admin path

Update magento admin path
How to update admin path in an existing Magento installation
Disable all caches in System->Cache Management In your app/etc/local.xml file, update the value under admin->routers->adminhtml->args->frontName to any custom value you wish your admin to run under. Your resulting entry should look like this

<admin>
    <routers>
        <adminhtml>
            <args><frontName><![CDATA[your_custom_amin_path]]></frontName>
            </args>
        </adminhtml>
    </routers>
</admin>

Magento Performance and caching issues or Caching in magento or magento caching techniques

Caching in magento
Magento Performance and caching issues....

MySQL comes with a query cache, which can save the result of SELECT queries for short periods of time – that is, until some change is made to the database. How much benefit you get from the query cache depends strongly on the kind of application you use – this is why the query cache is not turned on by default. When it comes to Magento, tests have shown again and again just how much extra scalability you get if it is enabled. To enable query caching, go to your my.cnf and set the following options in the [mysqld] section: query_cache_type=1 query_cache_size=64M Save your changes and restart the MySQL server – getting a third more requests per second is not uncommon after the change!


----------------------------------------------------------------------
Enable Expires Headers Browsers use caching extensively, and can save a lot of the elements included in a web site locally so that they can be served from the browser’s cache rather than the web server on the next request. This can help quite a bit in shortening load times. The problem is for the browser to know when a file can be served from the cache, and when not – because the local copy is outdated. To solve this issue, browsers rely on two HTTP headers, Expires and Cache-Control. Magento’s default .htaccess file already configures these according to Yahoo’s performance recommendations (more on them below), but does not enable them by default. To enable them, all you need to do is add the following lines to your Apache server configuration (usually found in /etc/apache2/apache.conf): <IfModule mod_expires.c> ExpiresActive On </IfModule> If you don’t have access to the server configuration, you can also add those lines to Magento’s .htaccess file – but then you need to be careful when updating Magento that your changes do not get lost.



---------------------------------------------------------------------------
Enable Block Caching where it makes sense Out of the box, Magento can cache the Block output of your pages. When the next user requests the same block, the output that was previously calculated can be returned directly – without going through all the database queries and model calls again. This is really helpful for parts of pages that don’t change too often but are somewhat expensive to calculate – such as category pages. Clearly, it makes a lot more sense to calculate output once and then cache it for, say, five minutes, than to continuously go through the same model calls with the same results again and again.

---------------------------------------------------------------------------
Make fewer HTTP Requests in your Theme As YSlow alerts you, having many HTTP requests to load a single web page is a performance killer. Even if you enable keep-alive or use a content delivery network, it is still much slower to load many small images than a single bigger file that contains all images. Reducing the number of HTTP requests is largely a performance measure, but also helps scalability a bit.
Using image sprites, you can put all the icons, buttons etc. that you have in your theme into one file that can be downloaded quickly and then just show parts of this large image where you need it. All this involves is a little bit of CSS wizardry. A List Apart has a nice tutorial to get you started at http://www.alistapart.com/articles/sprites/.

-------------------------------------------------------------------------------

Use FastCGI to run PHP If you are using Apache as your web server, there are two ways you can sensibly set up PHP. The first way is to use the mod_php module, which is easiest to use and hence the default with many hosting providers. In this case, a PHP interpreter is run with each process of the web server and on stand-by until a script is executed. If you are wondering why your Apache needs a lot of memory, probably the fact that you are using mod_php is a big part of the answer. On a large site, there may well be hundreds of Apache processes running, and each has its own PHP interpreter. However, only very few of them – often less than one in ten – actually need to run PHP. The rest serve static files or simply wait for new requests. Because PHP uses a lot of memory, it is a good idea to see if you can avoid the overhead generated by having dozens and dozens idle PHP processes running.

The way to avoid the overhead is to use FastCGI instead of mod_php. With FastCGI, a separate internal daemon is run on your web server that is contacted by the web server only when execution of PHP required. Thus you do not need to carry the PHP baggage for all requests.
Setting up FastCGI requires you to make some changes to your server configuration, but the benefits will be large. A good starting point is this article: http://2bits.com/articles/apache-fcgid-acceptable-performance-and-better-resource-utilization.html. For more details, check the Apache web site and the documentation of your distribution.


-------------------------------------------------------------------------------
Use a Content Delivery Network Another way to relieve stress from your servers is to get an external party to serve static files for you. These services, called Content Delivery Networks (CDNs), are getting very popular and prices have fallen a lot over the last year or so. A CDN can really improve the user experience on your site, and is another way around the problems created by mod_php.
Setting up a CDN is quite easy with the free One Pica CDN extension from Magento Connect.

------------------------------------------------------------------------------------

Going Further
You have followed all the steps of this guide, and still your Magento does not scale to the level you need or give you the performance you crave? First, check again if you have really implemented all the steps. The configuration I described above is known to work very well with large Magento stores, serving hundreds of thousands of page impressions per day. Check that your hardware works well and that you are not limited by the bandwidth of your server.

If your site is truly huge, you will want to move to a cluster infrastructure that also provides high availability to insure you against software or hardware failures. You need to set up MySQL replication for your database and balance load between web servers. In practice, this will usually mean that you move to a specialised managed infrastructure provider or get outside consultants to set up the infrastructure for you.

Magento is very well suited for such deployments. You can set different database connections for read and write queries, which is important when you use MySQL replication, use memcache as a distributed cache backend, and the like. So Magento will not limit you there – the problems you may encounter will be related to the operating system and other software stack.

-----------------------------------------------------------------------------------------


How To Check If Query Caching Is Enabled
To check if your host has query caching enabled in the MySQL server, you can issue the following command from your MySQL command prompt:

mysql> SHOW VARIABLES LIKE 'have_query_cache';
+------------------+-------+
| Variable_name | Value    |
+------------------+-------+
| have_query_cache | YES   |
+------------------+-------+


----------------------------------------------------------------------------------------


To verify that query cache is actually operational, you can issue the following command to the MySQL server:

mysql> SHOW VARIABLES LIKE 'query_cache_size';
+------------------+----------+
| Variable_name | Value       |
+------------------+----------+
| query_cache_size | 67108864 |
+------------------+----------+

This shows that we have 64 MB available to our query cache size, a very respectable amount of memory.

The following demonstrates a server that has MySQL query cache disabled by setting the value to zero:

mysql> SHOW VARIABLES LIKE 'query_cache_size';
+------------------+-------+
| Variable_name | Value    |
+------------------+-------+
| query_cache_size | 0     |
+------------------+-------+

------------------------------------------------------------------------------------



Monday, May 14, 2012

Magento Multi site tips.....

Magento Multi site tips.....
1. One of Magento’s most superior strengths are its capabilities for scaling to support multi-store and multi-language retailing all from the same backend. In this tutorial, we will be showing you how to take advantage of Magento’s scalability by creating multiple websites with unique domain names sharing the same product catalog. (***NOTE: Each store can also be configured to offer a unique product catalog as well.)

2. These categories (Clothing, Electronics) should be set as both “Is Active” from the General Information tab and “Is Anchor” from the Display Settings tab for them to appear on the frontend of your Magento shop. (***NOTE: If the websites will not be sharing the same catalog, a Root Category must be created for each website. Thus, if there are 3 websites, there will be 3 Root Categories with subcategories under them.)

Tuesday, May 8, 2012

Facebook PHP login logout working code

define('FACEBOOK_APP_ID', '***YOUR FACEBOOK APPLICATION ID HERE***');
define('FACEBOOK_SECRET', '***YOUR FACEBOOK SECRET APPS KEY HERE***');
function get_facebook_cookie($app_id, $application_secret) {
  $args = array();
  parse_str(trim($_COOKIE['fbs_' . $app_id], '\\"'), $args);
  ksort($args);
  $payload = '';
  foreach ($args as $key => $value) {
    if ($key != 'sig') {
      $payload .= $key . '=' . $value;
    }
  }
  if (md5($payload . $application_secret) != $args['sig']) {
    return null;
  }
  return $args;
}
$cookie = get_facebook_cookie(FACEBOOK_APP_ID, FACEBOOK_SECRET);
?>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:fb="http://www.facebook.com/2008/fbml">
<body>
<?php if ($cookie) {
//cookie is set, user is logged in
$user = json_decode(file_get_contents('https://graph.facebook.com/'.$cookie['uid']));
//Display the facebook user ID, name, gender and Facebook URL in the web browser
echo '<br />';
echo 'Your Facebook ID: '.$user->{'id'};
echo '<br />';
echo 'Your name: '.$user->{'name'};
echo '<br />';
echo 'Your gender: '.$user->{'gender'};
echo '<br />';
echo 'Your Facebook URL: '.$user->{'link'};
echo '<br />';
echo '<fb:login-button autologoutlink="true"></fb:login-button>';
}
else
{
//user is not logged in, display the Facebook login button
echo '<h2>Facebook Application Test page</h2>';
echo '<br />';
echo 'This is the most basic Facebook application PHP source code that will grab the user Facebook full name, gender and Facebook URL.';
echo '<br />Then displays those information in the web browser once the user has successfully logged in';
echo '<br /><br />';
echo '<fb:login-button autologoutlink="true"></fb:login-button>';
}
?>
<div id="fb-root"></div>
<script src="http://connect.facebook.net/en_US/all.js"></script>
<script>
FB.init({appId: '<?= FACEBOOK_APP_ID ?>', status: true,
cookie: true, xfbml: true});
FB.Event.subscribe('auth.login', function(response) {
window.location.reload();
});
</script>
</body>
</html>

Monday, May 7, 2012

Magento Developer Certification

Few days ago Magento announced their plans for Magento certification program. As they stated, initial round of certification will be a Beta exam, held on Innovate Developer Conference in San Francisco, October 12 and 13! Those who pass the exam based on the Beta exam analysis, will actually earn the official Magento Developer certification. Final reward for those who pass the exam? They will receive Magento certificate and be able to use the official logo with their name and title. Clearly there is more to it than just a piece of paper, so let me share my thoughts and views with you.

The thing about the certification is that it’s not only about the piece of paper or a card issued by some authority verifying your knowledge and expertise. If you look at it more deeply, additional value lies in the individuals desire to actually go trough it. This shows determination and love towards an area of interest. It’s hard to imagine someone would go trough all the hassle of certification as specific as this one if he does not love his work. This goes for certification in general, not just Magento. This is something hiring managers will know how to recognise and value.

From a personal point of view, as a developer you gain recognition of your Magento skills. Which is not to be ignored, as Magento still is one of the most robust eCommerce platforms our there. This can help differentiate yourself from the competition, possibly increase your value on the market. Not to mention there is a good chance you gain some additional knowledge through preparation and training. Face it as much as you know Magento chances are you skipped a “chapter or two” in your everyday real job (I know I did).

On a company level, there is also a bonus of having some or all of your developers certified. This usually goes in favour of your overall quality.

I’m sure most of you in Magento business will agree that Magento certification was more than welcome and I would even say needed. With all their great products and services now available time is right for quality certification program. I’m only hoping that over the next few months, year or two, most of us in everyday Magento development will earn ourselves a certificate :)

So what’s it all about? Magento Developer Certification landing page has a nice little PDF file called Certified Developer Exam: Self Assessment Checklist. It outlines the certification program which comprises of two levels:

    Magento Certified Developer (MCD)
    Magento Certified Developer Plus (MCD Plus), has an additional 20 questions

Questions are based on Magento Community Edition Magento Enterprise Edition. Surprisingly there is a detailed outline of 10 specific areas that exam covers, all you need to do is to study it.

    Basics (5%)
    Request Flow (7%)
    Rendering (8%)
    Working with Database in Magento (12%)
    Entity-Attribute-Value (EAV) Model (10%)
    Adminhtml (8%)
    Catalog (10%)
    Checkout (15%)
    Sales and Customers (12%)
    Advanced features (13%)

Check the document for details.

In a nutshell that’s it for now. Grab your Magento installations, some coffee, and run trough outlined exam areas if you are interested in taking exam. I must say, it does not look like it’s going to be easy. Regardless of your experience, Magento is still a large platform, meaning lot of terrain to cover so get prepared:)

Cheers.

Source http://inchoo.net/ecommerce/magento/magento-certification-why-bother/

More links and study guide

http://www.magentocommerce.com/blog/magento-developer-certification-how-do-i-know-if-im-ready/
 

Friday, May 4, 2012

Grouped Vs Bundle Products

Grouped Products

A grouped product is essentially a selection of simple products displayed equally on the product page, each with quantity boxes so the user can decide how many of each they want before they add to cart.The products displayed are normally of a similar nature (e.g. a plate and a saucer)

Examples
  
  • Tablewewar Set - Imagine a product called ‘tablewear set’, and you can decide how many plates, dishes, cups and saucers you want to buy as part of the set.
  • Box of Pens – Similar to the tablewear set, another example of a grouped product may be for purchasing pens for a company. A grouped product is great for when you need to buy in bulk. The product may be Biro pens, and you can decide how many of your biro pens are red, blue, green and black.
  • Set of Knives – This is an example used on Magento’s own website and nicely demonstrates a grouped product in all its glory. You can purchase a set of Chef’s knives and you can decide how many of each size you want in the set.
 

Bundle Products

A bundle product should viewed as a product you get to customise to your requirements. You choose what goes with it and how high/low spec you want it to be. This gives customers the freedom to pretty much ‘build’ their ideal product. The products displayed are normally not very similar (e.g. a hard drive and a mouse mat).
 
Examples
  •     Tennis Racket – The name and make of the tennis racket is the bundle product, but you have to build your racket as a bundle. So you choose the grip size, followed by the strings you want. A nice custom option box could be thrown in to determine the tension of the strings. You can also throw in a racket bag and extra grips if you wish.
  •     Build your Computer – This is the most famous bundle product on Magento’s Demo Store. When you build your computer you can customise everything including what size processor you want, which monitor you want, the inclusion of extra graphics card etc, until you have

 

Monday, April 30, 2012

Magento admin grid add from and to search in admin grid

Magento admin grid add from and to search in admin grid

$this->addColumn("designer_id", array(
                "header" => Mage::helper("Module")->__("User ID"),
                "align" =>"right",
                "width" => "50px",
                'type'  => 'currency',
                "index" => "user_id",
                ));

                'type'  => 'currency', is used to search for integer or decimal type

$this->addColumn("created_date", array(
                "header" => Mage::helper("Module")->__("Modified Date"),
                "align" =>"center",
                "width" => "100px",
                'type' => 'datetime',
                "index" => "mod_date",
                ));

                'type' => 'datetime', is ued to seach date time range

Thursday, April 26, 2012

Magento admin grid mass delete, mass status change checkbox option

Magento admin grid mass delete, mass status change checkbox option

In your Grid.php add
protected function _prepareMassaction()
    {
        $this->setMassactionIdField('Module_id');
        $this->getMassactionBlock()->setFormFieldName('banners');

        $this->getMassactionBlock()->addItem('delete', array(
             'label'    => Mage::helper('Module')->__('Delete'),
             'url'      => $this->getUrl('*/*/massDelete'),
             'confirm'  => Mage::helper('Module')->__('Are you sure?')
        ));

        $statuses = Mage::getSingleton('Module/status')->getOptionArray();

        array_unshift($statuses, array('label'=>'', 'value'=>''));
        $this->getMassactionBlock()->addItem('status', array(
             'label'=> Mage::helper('Module')->__('Change status'),
             'url'  => $this->getUrl('*/*/massStatus', array('_current'=>true)),
             'additional' => array(
                    'visibility' => array(
                         'name' => 'status',
                         'type' => 'select',
                         'class' => 'required-entry',
                         'label' => Mage::helper('Module')->__('Status'),
                         'values' => $statuses
                     )
             )
        ));
        return $this;
    }
-----------------------------------------------------------
in your adminhtml-> XXXcontroller .php file
 public function massDeleteAction() {
        $ids = $this->getRequest()->getParam('Module');
        if(!is_array($ids)) {
            Mage::getSingleton('adminhtml/session')->addError(Mage::helper('adminhtml')->__('Please select Banner(s)'));
        } else {
            try {
                foreach ($ids as $id) {
                    $banners = Mage::getModel('Module/Module')->load($id);
                    $banners->delete();
                }
                Mage::getSingleton('adminhtml/session')->addSuccess(
                    Mage::helper('adminhtml')->__(
                        'Total of %d record(s) were successfully deleted', count($ids)
                    )
                );
            } catch (Exception $e) {
                Mage::getSingleton('adminhtml/session')->addError($e->getMessage());
            }
        }
        $this->_redirect('*/*/index');
    }
   
    public function massStatusAction()
    {
        $bannersIds = $this->getRequest()->getParam('module');
        if(!is_array($ids)) {
            Mage::getSingleton('adminhtml/session')->addError($this->__('Please select Banner(s)'));
        } else {
            try {
                foreach ($ids as $id) {
                    $banners = Mage::getSingleton('Module/Module')
                        ->load($id)
                        ->setStatus($this->getRequest()->getParam('status'))
                        ->setIsMassupdate(true)
                        ->save();
                }
                $this->_getSession()->addSuccess(
                    $this->__('Total of %d record(s) were successfully updated', count($ids))
                );
            } catch (Exception $e) {
                $this->_getSession()->addError($e->getMessage());
            }
        }
        $this->_redirect('*/*/index');
    }