Friday, October 26, 2012

Development: Add breadcrumbs on a page via XML layout

The following article may be useful for front-end developers, it describes how to add breadcrumbs on the page (where it is not supposed to be by default) using layout XML and minimal PHP programming. It describes adding of 2-levels breadcrumbs (i.e. “Home / Some page”) which is needed in most cases.
In this article we will add breadcrumbs to Contact us page. There is no breadcrumbs by default.

Step 1
Modify corresponding XML file, in our case it is contacts.xml. You need to add the following code:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
<contacts_index_index translate="label">
....
            <reference name="breadcrumbs">
                    <action method="addCrumb">
                            <name>home</name>
                            <params helper="arrowhitech_mod/getHomeUrl" />
                    </action>
                    <action method="addCrumb">
                            <name>contact</name>
                            <params>
                                    <label>Contact Us</label>
                                    <title>Contact Us</title>
                                    <link/>
                            </params>
                    </action>
            </reference>
</contacts_index_index>
As you see we operating with breadcrumbs block via XML. We added 2 breadcrumbs:
- One for homepage (with a link to homepage).
- One for the current page.
The interesting point here is the assigning of the link to first breadcrumb:
1
2
3
4
<action method="addCrumb">
    <name>home</name>
    <params helper="arrowhitech_mod/getHomeUrl" />
</action>
As you see, we call method getHomeUrl() from helper arrowhitech_mod which insert the link to homepage into breadcrumb. This is our custom helper, lets create it in “Step 2″.

Step 2
First of all, we need to create our own module (Note: If you don’t know how to create your own module in Magento don’t read further).
In below example the module is located in app/code/community/Arrowhitech/Mod/, but you can use any other location you like.
In the /etc/config.xml file of the module we need to define our helper:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
<?xml version="1.0"?>
<config>

    <modules>
        <Arrowhitech_Mod>
            <version>0.0.1</version>
        </Arrowhitech_Mod>
    </modules>
    <global>
        <helpers>
            <arrowhitech_mod>
                <class>Arrowhitech_Mod_Helper</class>
            </arrowhitech_mod>
        </helpers>
    </global>
</config>
Finally, we need to create a helper file app/code/community/Arrowhitech/Mod/Helper/Data.php:
1
2
3
4
5
6
7
8
9
10
11
12
<?php
class Arrowhitech_Mod_Helper_Data extends Mage_Core_Helper_Abstract {
    public function getHomeUrl() {
        return array(
            "label" => $this->__('Home'),
            "title" => $this->__('Home Page'),
            "link" => Mage::getUrl('')
        );
    }
}

?>

That’s all. If you did everything right you will see the breadcrumbs on the Contact us page.

Thursday, October 25, 2012

When Should You Override Magento Core Files In app/code/local/Mage?


The short answer is: NEVER!
The longer answer is somewhat less absolute and requires some explanation.


Often you will see Magento tutorials or forum posts that implement a feature or functionality change that is different from what the core does which requires changing something in the core of Magento. Someone may then advise that, instead of hacking core files it is better to copy them into theapp/code/local/Mage location and perform the modifications there, so that, upon upgrade, the modifications are not lost. This process is called overriding Magento core functionality and is based on the fact that Magento sets its PHP include paths to first look in app/code/local/ thenapp/code/community/ and finally in app/code/core/. This has the effect that any files of the same name placed under the local or community name space will take precedence in loading, hence, we can override almost any core file in this way. To learn about how exactly Magento sets up its system, read the excellent series on the Magento Configuration by Alan Storm.
This is one, sometimes recommended, way of overriding core functionality without hacking the core but why is it, as you may conclude from my initial statement, so bad?
First, let’s see what scenarios would be compelling us to override core files:
1. We want to change a piece of functionality in a core method so we copy the php file containing the code and modify one or more methods.
2. We want to add a new method to a core block class, so it’s available for use in the phtml template so we copy the relevant core Block php file and add our method to it.
3. We may have several modifications consisting of core functionality changes and additions over several files.
So, what are we actually doing here, when we override core files?
For one thing, we must override the complete core file because we can’t trim out the stuff that we don’t want changed since we would lose all that functionality and most likely break Magento. Once the overridden file is in place, this will be the file and code Magento will be using from now onwards. Given that most core classes contain several and many times a large number of methods it means that we are effectively overriding all those methods in our file.
Now, remember when we were advised to use this override approach so we can make sure that our customizations are going to be preserved after a Magento version upgrade? Well that, indeed, will be true, but, what if the new Magento version has changes in the very files we have previously overridden? What if they have newly implemented methods or bug fixes in existing methods? Since our override will always take precedence, these new features and fixes will never be operational as our override runs all the old code. If you’re lucky, you may get an error report because a new change falls over due to missing methods but what if you don’t get error reports and instead, somehow, some inexplicable and erratic behavior starts expressing itself on your site?
You can see the problem now, right? After each upgrade, you will have to go and check all yourapp/code/local/Mage/ overrides and compare them to the new core files and port any core changes to your local override in order to maintain your site’s integrity. If you have lots of such overrides, this will be tedious. Also, if you are a developer who gets passed on an existing site with these kinds of overrides, you will not be happy. Often you won’t even know what the purpose of the override was and you’d need to laboriously go from diff to diff and decipher the meaning of any changes. It gets worse if the previous developer already performed some Magento upgrades.
By now, I guess, you have a good idea about the dangers of applying this kind of override, so, let’s get back to our original question, when, if at all, should you use this approach?
There are a few cases when this approach may be justified, in my opinion, these are the cases:
If you want to quickly try a core modification to see if it will solve your task as a proof of concept, but don’t want to create an extension just yet. When you are satisfied, you remove your override and implement a proper Magento extension with rewrites.
If you are implementing a temporary override of some core functionality that you will remove after your task is complete. A prime example of this is overriding the Magento dataflow classes for importing, when you want to change the way the importer handles certain things in an initial customer or product import.
The key concept here is: temporarychanges/experiments. You are not planning on leaving your overrides.
Note: There are some other scenarios where local Mage overrides are the only way to customize parts of Magento’s core functionality. I’d like to encourage a discussion in the comments to see what others think about this.
Conclusion

The take-away from this article is, never use the app/code/local/Mage/ approach to permanently override core functionality! If you must, then only use if for temporary changes that you will remove afterwards.
As for the question that now presents itself: how, then, should you implement core overrides? The answer is by creating a custom Magento module and using the available class rewrite mechanisms, or better yet, using event observers if possible.



Complexity of online trading


Its own online store and maintain, optimize simultaneously advertise and although at least in social networks, via email marketing and SEO. The legal requirements, besides the actual unwinding of transactions, purchase, sale and delivery of goods will be served. Especially for online merchants are the many challenges, all of which have an impact on business success. Very few online retailers, however, have the necessary know-how in all areas simultaneously. The knowledge required to gain is primarily in the legal field and in the areas of marketing such as SEO, is a difficult and time-consuming task. Since one wishes that a button would suffice to ensure, for example, the legal security of the shop.
Every other online retailers were warned 2011
Which formulations are in the Terms and Conditions ? What must always be mentioned in the imprint? Should I use a revocation or rather the return policy at the store? With these and many other questions will have to online retailers deal almost daily. That the dealers lurking in the process many cases, evidenced by the fact that in 2011 an average of every other online retailer was warned at least once.
Many online retailers give the creation of the legal texts now to lawyers who specialize in Internet law. The achieved time savings is by no means to be despised. However, the time is now shifted to the setting of legally secure texts in the online shop. If the dealer is not the lyrics to the correct location, it may be cautioned by the way also.
Carefree with the TNC interface
One step further in terms of legal certainty now is the trader's league. Its application allows TNC interface ensures that the texts are always loaded at the designated place of the shop and the click of a button. So that the texts are not only quite safe but also to keep abreast of the unique pre-established position in the online shop. For many systems, the T-Shop interface is already available. But what happens when changes in the law? Finally, online retailers will no longer deal with the degree of legal certainty of their shops. "The online retailers are under the Terms and update services by informing us about changing the law. The retailer now has to load the revised texts for the shop. This again just press a button and all the texts are already included updated and therefore quite safe". The answer from Andreas Arlt, chairman of the Dealers Association , on demand.

Friday, October 19, 2012

Magento SEO -- Things you need to know

Magento SEO -- Things you need to know
Search Engine Optimization (SEO) is crucial for most of the Magento websites, as search engine brings them a lot of traffic, let’s say, 50%+. However, SEO is still a mystery for many of the Magento store owners, as they don’t know what exactly they need to do when they set up a website. Some of them spend a lot of effort and money on it, but it is not working as they expected. Actually, SEO is not that mysterious. In this article, we’ll brief you the basic concept of SEO and show you how to go with it. It is super helpful for those store owners who don’t know SEO much. For those who had experiences with SEO, this article may still helpful for you.

What is SEO and how search engine works?

SEO is the process of improving the ranking of a website or a web page in search engine results which involves a wide variety of optimization techniques. It doesn’t involve the paid ads from Google Adwords. To know how to do SEO, you should first know how does search engine work.
Mainly, the search engine will do the following jobs:
  • crawl & build web pages indexes
  • provide answers to a search query based on the indexed
So if you want to have a good ranking from search engine, what will you do?
Firstly, you’ll need to be indexed. Not only to be indexed, but to be indexed well. There’re a lot of techniques that can be discussed here, in following section, we’ll brief you some of them.
Secondly, you’ll need to know what the “flavors” a search engine likes. Basically, the mission of a search engine is to provide the best result to the users when they make a query. So they try to get the most relevant and high quality content to the users. That’s the basic mechanism of a search engine, which means, you’ll need to try to provide the best contents to your visitors.

How to do SEO?

There are two main categories for how to SEO: on-site SEO and off-site SEO.
on-site SEO: refers to everything that you can do with your own website to improve SEO. This involves the strategic placement of keywords in your website content, including page title, meta description, URL structures, headers, etc, building of well organized website structures and internal links, providing high quality content relevant to the topic of the website and so on.
off-site SEO: refers to everything that happens on the internet other than your website and links back to your one. The backlinks can be from either websites or blogs. Each backlinks will contribute for the “impact” of your website on search engine. The strategy here is to get as much relevant back links as possible to your website.
In following content, we’ll focus on specific technical aspects of on-site SEO for your Magento store as this is what we can control directly.

SEO friendly design & development for a Magento website

Search engines are built on top of computer algorithms and therefore, a web page doesn’t always look the same to you and me as to search engines. In this section, we’ll focus on how to design & develop web pages so they’re structured for both human and computer.
Build up indexable content.
Computers don’t read/understand images well at the current stage, so as audios, videos, Flash, Java applets, and other non-text content. In order to be visible to search engines, the easiest way is to make sure all your wordings or phases are written in HTML text on a web page. There’re a lot to discussions for how to organize the content of a web page so as to be better indexed by search engines. The principle is, providing what your audiences really need on the website with well formatted HTML codings. For HTML codings, you can check it out from W3C school.
Be careful for your page title tag
Page title is meant to be an accurate and concise description of a page’s content and search engines treat it as a very important part. Therefore, in order to optimize the page title tag for SEO of your Magento site, you can follow the recommendation below which covers the most critical parts.
  • Length of the title tag: Search engines normally display only 65-75 characters of the title tag in their searching result so it is recommended the length of the title tag should not exceed this.
  • Leverage branding: To create better branding impression for customers, you can end your title tag with you brand name.
  • Hierarchy for the title tag: The starting keywords of the title tag count more for search engines, therefore, you should put the important keywords closer to the beginning of the title tag.
Well organize and structure your website content
Search engines start crawling your website from the index page. Imagine that it needs to crawl thousands of thousands of thousands web pages a day, if you hide your web pages deep inside, search engines will simply ignore them. So we recommend that for the main pages, there shouldn’t be more than 3 clicks for a customer to reach them from home page.
Search engine also like highly connected website, which means, there’re a lot of links in all the pages of the website from one page to another. This can be helpful for search engine to index your pages. Also, it is highly recommend to build up a sitemap HTML page to link to all the main pages of your website.
Design targeted keywords for your Contents
Search engines are designed from the science of information retrieval which are based on keywords. Keywords play a fundamental role for Search Engine as they’re the building blocks of the indexing system for search engines. Thus, in order for your web pages to be searched and rank well, you need to design your page keywords before creating content. For example, if you want people to find you by typing “furniture”, you should organized your content according to it and make it part of the indexable content of your page.
However, it doesn’t mean you should put as much keywords as possible on a page. The pages will be punished by search engine if it founds there are keywords abuse on the page.
Below are some tips for best-practice for design targeted keyword and creating content for your web page:
  • Put the keywords on Title Tag at least once, and keep the keywords as close to the beginning of the article as possible;
  • Design the keywords and organized the content according to the keywords;
  • The keywords should appear at least 2~3 times on the body of the text, depending on the length of it;
  • The keywords should appear at least once in the alt attribute of an image on the page. This not only help your web page to be searched, but also the images in the page;
  • Don’t put a specific keyword as the title of all your page.
Control Search Engine Spider By Meta Tags
The meta tags play an important role in SEO as they can be used to control search engine spider at a page level. The two worthy mentioned meta tags are meta robots and meta description.
Meta Robots, an example , the content attributes can be the followings:
  • index/noindex: this value tells the search engine whether to crawl the page and keep the index for this page for retrieval or not. The value of it is “index” by default.
  • follow/nofollow: this value tells whether the links within the page should be crawled.
  • noarchive: it is used to restrict search engines from saving a cache copy of the page.
Meta Description: an example
The meta description will be displayed in the search engine result, see below the image:
meta description of search results
The meta description tag is the advertising copy, drawing readers to your site from the search results, therefore, it is extremely important part of search marketing. Try to write a readable and compelling description using target keywords to draw higher click through rate of users to your page.

We’ve discussed a lot for on-site SEO in this article. Feel free to let us know if you had any questions. If you have any other SEO experiences, please share them as well.

How to Choose a Magento Developer

Say you've discovered that when you wear your bathrobe backwards, it makes a pretty neat blanket.

You decide to develop the product that you’ve cleverly named “The Snuglet," ... or something sorta like that, and after many days and nights of work, you’re ready to take your product to the first and final frontier: The Internet.

After the research dust has settled, you realize that Magento is the most brilliant, sexy, easy-to-use eCommerce CMS platform out there. (We would agree with you). And your Snuglet is bound for Magento glory.

But who’s going to develop your Magento site? When you do a Google search for “Magento developer,” you get (gasp!) 6 million results! Do you just pick the first technology company on the list? Do you get quotes from all of them and choose the cheapest? Do you call up the one with the most friends on Facebook? Your dad is good with computers. Maybe he could do it....

Choosing a Magento developer can be scarier than a Spanish cucumber, so we’ve put together a few tips for choosing a team to make your eCommerce site really sing and get your Snuglet – or whatever your product may be – on the internet map.

1.) Look for a Magento Partner

A good place to start your search should be the Magento Commerce website. They have a great database of companies that are both Silver and Gold-level partners, meaning they have access to Magento support, services, extensions, forums, and other real smart people who can help make your project go smoothly. 

We also have that sweet little logo on the bottom of every page of our site just screaming at you that we’re more than competent nerds, and we have some pretty sweet nerd connections. Make sure you’re seeing that somewhere on your developer’s site as well.

Keep in mind the scope of your project when choosing a developer. If you are a small business trying to market a Snuglet using the free Community version of Magento, you may not need a Gold-level partner. No need to kill a rabbit with a bazooka. However, if you have a large catalog, complex business rules or some integration with your back end systems and plan to use Magento Professional or Enterprise, you will most likely want a Silver or Gold-level Magento partner with the big guns necessary to knock out your project. 

Whats the difference between Silver and Gold partners?  In general it's the size of the organization and the service offering provided.  If you have a 5K budget, you probably don't want to call a Gold partner. However, some companies will take on small projects if you're willing to purchase a bucket of hours for development or maintenance.

2.) Check out Your Developer's Magento Portfolio

Once you've found a handful of Magento developers you're willing to work with, check out their portfolio. Some companies – like us – call it “Work,” some companies call it “Featured Websites,” some companies may call it “Our Clients.” The point is, a great Magento Developer will be proud of the stuff they’ve done and make it easy for you to find. 

Browse through some of the companies you find on Google and peruse their porfolio. Make sure you find examples of work that you would want for your own company.

3.) If at all Possible, Look them in the Face

Working through the internet is great because you can get things done without having to meet in person. Efficient, yes, but not always the best way to do business. So do your darndest to meet one-on-one with your developers and find out about their background and what they recommend for your project. You’ll get a better idea of how comfortable they are with the platform, how long they’ve been working with it, and what they know about Magento’s strengths and weaknesses.

Sitting down with your developers also gives you a better idea of whether or not you actually like your development team – which matters more than you may think. You’re going to be spending some quality time with these people during the development process. If your account manager is a little dodgy, or your designer is neurotic, it can turn that process into a nightmare in a hurry. But when you work with good people that you like, you’ll have a much better development experience, and you’ll probably get a better product in the end.

4.) Ask for References

So now that you’ve narrowed it down to a couple companies, ask for references from the company’s Magento clients. You probably wouldn’t hire an employee based solely on the resume they’ve submitted.
Sarah Palin: Rocket Scientist
"You betcha!"
Even Sarah Palin could apply for a job as a rocket scientist... Or president, for that matter. That doesn’t mean NASA should hire her to run mission control.

Companies understand this, and should have no problem providing references for you. The last thing you want is to be the test project for a company that has no idea how Magento works, or how to handle the intricacies of the program. We’ve helped several clients who have unfortunately had this experience with another developer, and it can get ugly. You want a company that has a wide range of experience developing Magento sites, and they’re not afraid to share those references with you.

5.) Make Sure to Explain Your Product and Current Business Practices

Whether you’re a new company or you’re rebuilding an existing eCommerce site with Magento, make sure your developer knows what you need, and more importantly, they’ve confirmed they can do what you want. Do you need to integrate with an ERP system? Do you need Search Engine Optimization services? Do you need custom extensions outside the scope of regular ol' Magento?

Chances are, even if you’re just selling a bathrobe that you’ve ingeniously disguised as a blanket, there are probably some unique functions you want on your site. Custom check-out features, changing product images, fancy color swatches... whatever it is, just make sure your developer knows what you’ve got in mind and they can deliver on those items that you can’t do without. Explaining how your business works on a day-to-day basis will help your developer come up with a plan, and give you some reassurance that you’ve chosen the right tech guys.

6.) Evaluate the Developer’s Website

You probably don’t want to choose a company whose website looks like it was built in 1997. Although those were legendary times in eCommerce history, you want a company that has a modern perspective and keeps up with current trends. You want to know that your site won’t look like this. If the developer’s site hasn’t been updated since Limp Bizkit was cool, you should definitely note the red flag.

7.) Price vs. Quality

When you're choosing your Magento developer, keep in mind: You get what you pay for. We know it's a cliche, but we've seen it a lot. Human<>Element has had several clients come to us with half-finished projects from other developers that just spun out of control because their previous developer didn’t understand what they were undertaking with Magento, underbid the project, and couldn’t complete it. Keep in mind that the cheapest developer is rarely the best, and sometimes you’ll end up spending a lot more to fix something than building it correctly in the first place for a little more.

That doesn’t mean you need to go with the most expensive developer to get a functioning Magento site, but it does mean you should look carefully at what each company is proposing in their quote. Make sure all the features you want are included in that proposal, and that you’ve spelled out functions that are essential to your business.

Whoever you end up choosing, be confident that your developer has the skills to meet the needs of your business, or you could end up with an internet mess bigger than Snooki.

Advantages of Magento over osCommerce


What is the need for analyzing the advantages of Magento over osCommerce? Will this be the reason for many promising and futuristic organizations switching their eCommerce needs to Magento from the traditional eCommerce portals?
Magento is the most renowned shopping cart development services provider and has gained high popularity in a shorter span. Being one of the oldest eCommerce platforms in the market, osCommerce has enjoyed the supremacy and with the advent of Magento and its user-affable approach, osCommerce has started to decline and lose the war to Magento. This is evident with the search engine listings that bring in Magento at the first place over any other eCommerce development portals.

Regular updates:

Regular updates

Magento is superior to osCommerce in a number of ways and the most prominent among them is the potential to enrich and surprise its users with regular updates. This promising eCommerce solution is enhanced on a regular basis and the Magento store owners and the Magento based web developers are informed about the persistent releases and code updates. The operating structure and the rate of recurrence of osCommerce are not up to the standard of Magento shopping cart development platform, and with its old-fashioned software, the expectancy for process enhancements has no scope.

Add-on modules:

Add-on modules
With all the features of osCommerce embedded in it, Magento deepens its relationship with its users with the extensive range of add-on modules. Store owners are credited with full freedom of owning multiple stores supporting multiple languages and the controlling of these stores is made possible from a single admin panel. The chaos and the worry of maintaining multiple stores at a time are washed away with the expertise of Magento. Few of the well-known add on modules of Magento include shopping estimator, product comparison module, Meta tags and URLs for search engine optimization, module for editing the orders and many more. The users of osCommerce are not endowed with any such advantageous add-on modules.

Default template:

Default template
The rigid graphic design template method and the inflexible template installer selection makes osCommerce very complicated for its users to think about new installation or customizing the existing templates. Magento is a user-affable and a mobile-friendly eCommerce portal that holds out numerous default themes and templates, facilitating the store owners to tailor them as per their specific requirements. These default templates and themes help in providing an improved and standardized look to the online stores powered by Magento. Maintaining Magento customization and promoting Magento installation have become much simpler with the aid of modular codes.

Cleaner Codes:

The massive codes of osCommerce and the collapsed back-end structure make it appear disgraceful. Magento with its spotless admin codes and well-structured backend system supports easy processing.

Engaging user interface:

Magento makes the users fit into place and involve themselves in its user-welcoming and flexible system. Magento’s community is amplifying everyday with the kind of classiness it offers to the web developers and store owners. The simple operating mechanism of Magento does not require any technical skills for operating and this encourages many to use this advanced eCommerce portal than its predecessor osCommerce that lacks user-engaging attributes.

Thursday, October 18, 2012

Magento LightSpeed Extension – Review


At our company, we  installed and configured Lightspeed extensions for magento website. It's really not easy to configure. However, after it's done website is very good with speed loading.
We think that we should recommend this extension to magento website. You can see extension at:http://www.magentocommerce.com/magento-connect/tinybrick/extension/3287/lightspeed.
http://www.famatools.com/ website is magento shopping cart site which we did and installed, configured Lightspeed for it.
----------------------------------------------------------------------------------------------
Ivan Lozancic is from inchoo.net also said that: In the last 7 years of my involvement with web development I have had an opportunity to open a great number of different “boxes“ when looking for web site improvement. After opening these “boxes” things often didn’t seem as it was specified – luckily this is not a case with Magento Lightspeed extension : )
Even though this time there was again a certain feeling of skepticism towards something which seems too good (I probably have been disappointed a lot before), this feeling quickly disappeared. In
this short article I would like to share my experience with Magento LightSpeed module, emphasize
its advantages and compare the results on the website in the creation phase – before and after installation. I don’t intend to go into technical details (such questions can be answered by the Tiny Brick team)
1. Installation
Following very extensive and precise instructions I finished with the basic installation and configuration in about 30 minutes (I have to emphasize here that I’m not a Magento back-end developer). Everything went on without delays.
2. Support
Being curious during the test period I had the need to get in touch with technical support in order to ask a few questions. I logged on live chat on their web site and immediately got an answer (although the status was offline : )) This deserves praise.
3. Results
Everything that had previously been promised for this extension was fulfilled in our test project. The difference in how fast a web site loaded was obvious, to test response time and content loading I used Firebug and YSlow, documenting the results before and after installation (this is just an example without additional configuration). As you can see, the results are far better.
4. Conclusion
- The product has fulfilled all expectations and requirements
- In e-commerce world any increase of speed is extremely important and can increase ROI
- If you are the owner of Magento e-commerce system, this extension can help you a lot, and
in case you are dissatisfied you can always refer to their 15-day guaranteehttp://www.mage-shop.com