Magento Blog


Video: Creating Multiple Online Storefronts (Part 2)

In a blog post from earlier this week, we covered how to create a completely separate website to be managed from one Magento installation.  In this video we focus on the creation of multiple stores within the same website.  The actions performed in this second video can be carried out completely within the Magento admin, without the need to create folders or modify any physical files.  A second store is added to the main website sharing the catalog structure.  A third store is added to the main website with a different category structure.  We show how to add or modify store views, as well as changing the logo.

These steps were carried out and recorded on the 0.9.17740 version of Magento:

  • Step 1:  Creating a new store in the Magento store manager
  • Step 2:  Setting the root category of the new store
  • Step 3:  Creating store views for this new store
  • Step 4:  Updating the logo

We also show you the category structure, and product relationships between the stores sharing a root category, and the third store (which has a separate root category).  Enjoy!

image

Magento wins ‘Audience Favorite’ in Under the Radar sessio

The Under the Radar Conference took place yesterday and Magento took home a prize, winning ‘Audience Favorite’ in the Manage Up session. Although no red carpets were rolled out, it was great to see Magento on the map. The product was well received and sparked a lot of interest from the crowd.

The full presentations slides are embedded below as well as photos from the event.

image

image

image

image

Thanks to Debbie Landa, Shay Nowick, and Giselle Umland from Dealmaker Media for hosting us in this wonderful event.

Performance is Key! - Notes on Magento’s Performance

Magento's performance is key.

Over the past few months, we've dedicated significant resources to diagnose and optimize Magento's performance. Now that Magento's 1.0 feature set is mostly complete, we are glad to share some of our work and the effort that has gone towards the goal of making Magento fast and furious. We are extremely happy with the results of our testing and benchmarks.

With such extensive features, functionality and flexibility performance may sometimes take a hit, and Magento is no exception to this rule. But there are performance gains in every incremental improvement, and we're starting to see significant results in the latest release. Below are a few of the performance improvements that appear in Magento's latest release.

  • Top menu join queries rewritten, top menu block is cached now on per store view level for every active category
  • Added catalog indexes for layered navigation and search
  • Added dynamic merge and whitespace remove during JavaScript load
  • Footer block is cached
  • Implemented <remove name=""> directive in layout xml to avoid instantiating of unwanted block objects, skipped left/right column blocks generation for pages with 1-column template</remove>
  • Most of sales order attributes became static and were moved to one raw table
  • Quote, quote address and quote items entities are stored separately
  • Greatly improved popular tags block generation time
  • Quote optimization for using in top links block and in the sidebar
  • Implemented caching API for using in Mage_Core_Model_Abstract descendant models
  • Removed unnecessary queries from catalog pages and homepage (e.g. reduced total number of database queries from 700 to 60 for homepage, and from 500 to 100 on product listing page on a database of 1000 products and 300 categories).

From our performance and load tests we have found that the latest Magento release outperforms version 0.8.17240 by almost double. Below we show a graph of one of the load tests we ran using Apache Benchmark (ab) comparing the two Magento versions. We experienced similar results throughout our tests and comparisons of the two versions.

image

DYI (Do it Yourself) Performance Enhancements

While we continue to improve Magento's core performance, there are additional improvements that Magento users can implement to yield performance gains in a single-server environment:

  • Install a PHP opcode cache such as APC or XCache. These can deliver significant improvements to PHP's responsiveness by caching PHP code in an intermediate bytecode format, which saves the interpreter from recompiling the PHP code for each and every request.
  • Make sure your Apache configuration has KeepAlives enabled. KeepAlives are a trick where multiple HTTP requests can be funneled through a single TCP connection. Since the setup of each TCP connection incurs additional time, this can significantly reduce the time it takes to download all the files (HTML, JavaScript, images) for a website.
  • Use a memory-based filesystem for Magento's var directory. Magento makes extensive use of file-based storage for caching and session storage. The slowest component in a server is the hard drive, so if you use a memory-based filesystem such as tmpfs, you can save all those extra disk IO cycles by storing these temporary files in memory instead of storing them on your slow hard drive.
  • Modify the configuration for your MySQL server to take better advantage of your server's RAM. Most Linux distributions provide a conservative MySQL package out of the box to ensure it will run on a wide array of hardware configurations. If you have ample RAM (eg, 1gb or more), then you may want to try tweaking the configuration. An example my.cnf is below, though you will want to consult the MySQL documentation for a complete list of configuration directives and recommended settings.

Example my.cnf:

image

Time to Cluster?

As any successful online retailer knows, a growing business means growing pains. If your store is a huge success, then you'll undoubtedly require more horsepower to keep your customers happy. This means leaving the world of single-server websites and moving to a clustered environment with two or more servers.

There are varying ways to accomplish this, but a typical first step is to add more web servers and place them all behind a load balancer, which will distribute the load fairly among all web servers. This method is popular because (a) web servers are cheaper than database servers; and (b) there's really no limit to the amount of web servers you can add.

Note: One current limitation in Magento is that there is no official method to propagate catalog images to each web node. If you're not comfortable setting up some sort of facility to do this, then you may want to hire a professional or try a different method of scaling.

A second method involves a performance tactic called “database replication.” When using replication, you will have two or more database servers in your cluster. One will be the “master” and the rest will be called “slaves.” The master is the only database server that accepts any sort of write-based queries. These write queries are then replicated by each of the slaves in real-time (or very close to it). The advantage of this setup is that Magento can issue read queries to any of the slave servers, saving all the write queries for the master database. A database is traditionally a difficult component to scale horizontally, so replication is a happy compromise.

The initial setup and configuration for MySQL replication is out of the scope of this document, but we can refer you to the experts. Here is a tutorial that explains all the details.

Once you have MySQL replication functioning, configuring Magento to use multiple database servers is a relatively simple task. The only file you will have to edit is app/etc/local.xml. An example is shown below. As you can see, there are two database connections configured, one called default_setup and one called default_read. The default_setup connection will be used for all write-based queries, and the default_read connection will be used for all read-based queries.

Example app/etc/local.xml:

image

This article has only covered a few of the well-known tactics for improving site performance. However, every website's scenario is slightly different, so it's often worth hiring a professional to appraise the needs of your site and provide you with possible upgrade options. But if you're comfortable with Linux and confident when working with configuration files, try out a few of our suggestions above. You may be pleasantly surprised.

Have any ideas of your own? We'd love to hear your thoughts. Leave a comment or join the Magento Performance and Optimization Group.

Video: Creating Multiple Online Storefronts (Part 1)

In this video we showcase one of the more powerful Magento features, the ability to manage multiple Online storefronts from a single administration panel. This functionality allows an online merchant to centrally manage all facets of a business from one location, while selling through multiple online stores.

The first video goes through the basics of creating a completely separate website within the Magento installation, to be controlled from the same admin.  Below are the necessary steps to do this, carried out and recorded on the 0.9.17740 version of Magento:

  • Step 1:  Creating a new folder for second website, copying index.php and .htaccess, necessary change of code to index.php
  • Step 2:  Creating a new root category for the second website
  • Step 3:  Creating the website in the admin, along with a store and store view
  • Step 4:  Configuring the URL structure of the new site
  • Step 5:  Adding categories and products
  • Step 6:  Associating products with the new website

At the end of the video, the logo of the new website is updated and the homepage is set to a different admin-created CMS page.

Please note:  This demonstration uses example.com and some symlinks to make the URLs more readable.  You may notice the url of the second website switching between http://www.example.com/magento/mainstore/shoestore and http://www.example.com/magento/shoestore - this is why.  In a live environment each site will most likely have its own IP, so different domain names could be configured accordingly.

This is Part 1 of 2 videos showing Multiple Websites/Stores.  Part 2 will go into more detail about store views and multiple stores under the same website.

image

Magento 0.9.17740 Available for Download

We are happy to announce the availability for download of Magento Preview version 0.9.17740.

Magento's production feature set is now mostly complete with a few minor adjustments expected with the production version release. A full list of Magento's features can be viewed here.

New Functionality and Major Highlights

  • Added one more method of creating simple products while adding/editing configurable products
  • CMS pages and block now can be assigned to multiple store views
  • Credit card information is no longer saved in Magento (except saved credit card payment method, which is the only exception, in that case all info is encrypted) neither in sessions nor in the database
  • Performance optimizations (db schema and queries, blocks generation and caching):
    1. Top menu join queries rewritten, top menu block is cached now on per store view level for every active category
    2. Added catalog indexes for layered navigation and search
    3. Added dynamic merge and whitespace remove during JavaScript load
    4. Footer block is cached
    5. Implemented directive in layout xml to avoid instantiating of unwanted block objects, skipped left/right column blocks generation for pages with 1-column template
    6. Most of sales order attributes became static and were moved to one raw table
    7. Quote, quote address and quote items entities are stored separately
    8. Greatly improved popular tags block generation time
    9. Quote optimization for using in top links block and in the sidebar
    10. Implemented caching API for using in Mage_Core_Model_Abstract descendant models
    11. Removed unnecessary queries from catalog pages and homepage (e.g. reduced total number of database queries from 700 to 60 for homepage, and from 500 to 100 on product listing page on a database of 1000 products and 300 categories).

Enhancements and Bugfixes

  • Fixed configurable products editing
  • Fixed applying coupons
  • Fixed catalog price rules
  • Fixed French locale installation issues
  • Fixed GoogleCheckout shipping taxes
  • Fixed random app cache cleaning
  • Few minor shipping and payment modules fixes
  • Improved admin grids navigation
  • Converted short open tags in templates to full ones
  • Removed drop tables statements in DB install scripts
  • Admin dashboard and reports fixes
  • Fixed import/export tax template fields
  • Added extra validation for requested store in URL
  • Fixed admin access denied right after login
  • Fixed styles and javascripts for Safari

Known Issues

  • Tax after discount in Google Checkout - only available if merchant calculation callback was reached
  • After upgrade existing products should be resaved in order to get their attributes to be used in layered navigation
  • We will add title to tax rule to be able to identify it in the reports
  • Admin is not able to unsubscribe customer from products alerts
  • Configuration fields that are not available in current scope will be displayed in disable state instead of hiding them
  • Google Chart API image on the admin dashboard gives warning for non-secure items in IE6
  • There is a problem to checkout if store owner enabled fraud detection in online payment gateways with support for fraud settings
  • We have limitation on imported date in current implementation of dataflow. Using 128MB: for customers the maximum is 406 items, for products the maximum is 12927 items from our tests
  • When adding new address in multiple shipping address checkout current address selection is lost
  • Price display options (incl. tax, etc) affect only catalog pages now
  • Configurable products stay in shopping carts even after they were deleted in admin
  • Floating action buttons in admin do not work in IE6
  • Google checkout subscribe to newsletter is not implemented
  • Store view switcher will not work if '#' symbol is present in the url
  • Upgrading using the Magento PEAR Channel, it is highly recommend to use upgrade-all and not to upgrade each package individually
  • Direct refunds for online payment gateways will be implemented in the next release
  • Adding tracking information from invoice along with created shipment is coming
  • After upgrade, need to logout and login to admin to see the changes
  • Paypal Express Checkout for Paypal Payments Pro can't auto capture from the admin manage orders module
  • XAMPP/WAMP Users - While testing upgrades from the PEAR channel, issues were discovered. At this time we do not recommend PEAR channel upgrades in these environments
  • If you installed the latest version not using the PEAR installer, you can still use the PEAR channel upgrade (make sure all directories are writable for web server user) by going to Remote Extensions (admin) and clicking on Interface_Adminhtml_Default, Action tab and click install. Repeat same procedure for Interface_Frontend_Default and Interface_Install_Default
  • After upgrading, please logout to refresh the current installation
  • There is no payment method information available when using Paypal Express checkout
  • There's no form fields validation when creating an order in admin
  • System fields values are not translated when exporting data
  • Multi-store and multiple values support in batch export/import tool is missing, right now we have only per store import/export
  • There is no xml validation for batch export/import advanced profiles
  • Configurable product price doesn't use locale format to display
  • Security warnings when submitting forms from secure to non-secure pages
  • We have no ability to filter who’s online grid in Customer Firstname, Lastname or email columns
  • We have no ability right now to estimate shipping to Puerto-Rico via UPS or USPS when customer chooses country US and state Puerto Rico
  • drag and drop categories does not work with URL rewrites
  • After editing an existing DataFlow profile the profile will no longer execute. We are looking into this one right away and hope to have a fix for it in the next few days

Sample Data

The sample data archive file is available in .zip (38 MB), .tar.gz (37 MB), and .tar.bz2 (36MB) formats to download (the files contain exactly the same content inside and are provided in different formats just for your convenience). Each archive contains a SQL script that should be applied on a clean database with your database management tool (phpMyAdmin or whatever you use), and ‘media’ folder with sample product images that you should copy to your Magento media folder. You should then run the regular installation process as for a complete package. Please make sure that you have exactly the same version of Magento that the sample data is provided for – 0.9.17740. Please also backup all your data and keep separately any custom changes on the files you did, because they may not be compatible with the sample data provided.

Off Topic: New Zend Framework Site Design by Varien

image

Zend released a new design today for the Zend Framework site. Varien redesigned the site to match the occasion of the release of version 1.5 of the Zend Framework, while still keeping the navigation and layout of the site as people were used to. Varien also produced the HTML coding for the redesign.

And if you haven’t already, you can read a case study on Varien’s use of the Zend Framework for the development of Magento.

Reminder: Meet us at Under The Radar Conference - March 20th

image

As previously announced, Magento has been selected to present in Under the Radar: The Business of WebApps Conference, taking place on March 20th in Mountain View, CA.

Under the Radar will uncover 32 startups, that have launched within the year, showcasing the newest web apps created by developers with a quest for innovation and a tendency towards disruption. Having launched numerous companies into startup stardom, acquisition and beyond, Under the Radar is the most discerning and reliable platform today for discovering tomorrow’s leading technology companies ... Out of the hundreds of nominations and startups we found in our own research - we’ve looked at them all - these startups are the best of the best. We’re looking for game-changers, innovators and, most of all, startups that have a real shot at success.

We’re excited to take part in this prestigious event. Past companies include Zimbra, Writely, Flickr, Userplane, and more.

We’ve included a couple of slides from the upcoming presentation below:

image

image

10,000 Magento Community Members

image

Magento’s community continues to grow with (over) 10,000 registered community members now taking part. Reaching this milestone took 197 days (6.5 months).

We can’t wait to see what’s in store for the next 6 months!

RSS: All Blog Posts

Get New Posts by Email


Delivered by FeedBurner