Tag Archive for: Magento

The Story Behind the eSellerPro & Magento Integration

I’d like to share with you the story behind the connector that integrates eSellerPro and Magento together, where it came from and where it is today.

It’s been quite a journey and it’s not 100% complete, the fact is it will never be and after throwing countless hours at it, but what is available today is pretty darn fast and as for configurable, well we’ll see how configurable it is as we dig in.

 

Looking Back

Looking back to the first time around to integrating Magento to eSellerPro it was a nightmare and dog-slow.

Working with the Magento core is relatively straight-forward once you’ve worked out where to look and have spend countless hours digging around what was created worked, but it was slow, maybe taking 17-20 seconds to build a configurable product, this time around we’re talking seconds to create a new or update product record (well 2.6 seconds on average).

The Reason Why

The reason why the connector was built in the first place was because one of the businesses I work with wanted Magento for their website, well even that has a story attached to it. I believed OpenCart was the better approach for them and the owner wanted Magento, so we had a duel of functionality & features, Magento won hands down for them and integrating it was the last challenge.

Keeping eSellerPro as the back-end tool for managing product data, categories, stock levels, reordering and order management was a complete no-brainer. We’re not looking to replace it, what the core of eSellerPro does is amazing (remember I worked there for 3 years, we built way-way-beyond cool stuff and the competing products don’t stand a chance for at least another year while the gain ground), we just wanted the best website technology possible and Magento fits that bill very well.

Matt, just integrate it properly

After us both getting frustrated after being told that Magento was “being” integrated fully into eSellerPro and no time-frame and with version Magento version 1.5 is already supported, but it not support inventory creation, I was just told “Matt, just integrate it properly“, so that’s what I’ve done.

Version 1.5?

Since then I’m working with 3 businesses that are using Magento 1.5 (as recommended to by eSellerPro), the thing is, it wasn’t until version 1.5.1.4 where PayPal Website Payments Pro was properly integrated into Magento, it had it as an option but that only worked if you were in the USA and prior to this version it just didn’t work.

We’re at version 1.7.0.2 today and while the majority of the features are the same or similar, Magento has been through two huge updates since 1.5 which was released almost 2 years ago (it’s so old it’s not even mentioned in their release notes). We’ve had version 1.6 released that had several structural updates made to it in August 2011 and the most recent version 1.7 which was with the 1.7 community edition being released in April 2012 and two minor updates since to bring us up to where we are today.

Note: If you’re looking for a reason on why you should upgrade from 1.5, take a look at this page which is the release notes for Magento version 1.7 and start scrolling. Yes that is 10 feet of page scrolling for fixes in version 1.7 alone!

Anyway, back to being told “Matt, just integrate it properly“, out came the weapon of choice, Notepad++ a text editor. I don’t think of myself as a developer or a coder, I just want to solve the challenges that the people I work with and if that means I have to get in and get dirty with coding, I will do. Since last October,I’ve not stopped working on the integration to Magento in one form or another.

The First Version

The first cut worked, we had orders being collected, orders being marked as shipped or being cancelled, stock and price updates coming through and the first revision of inventory loading working and I even had configurable products working too (that’s “variations” if you’ve not heard the term “configurable products” before).

I’ve done it” I said,
a pause of a few seconds went by…
done what exactly Matt?“,
integrated Magento for you, would you like to see it working?

It wasn’t pretty, but it worked and we could do everything that eSellerPro said they could do in 1.5, but crucially we could create products and update them too. We started to talk more and it turned out what I had written in the first version was perfectly adequate for one part of his business, “that’s amazing Matt, but my business partner who also sells out of our account too, he changes his eBay item specifics all the time, how does it cope with that?

Well, I had skirted around a couple of areas to get this working in under 3 weeks and one of those areas was around attributes or custom fields as you’ll know them by if you’re a user of eSellerPro. They had to be pre-created in Magento for them to be added to from custom fields or other fields from the product data feed from eSellerPro.

Leave it with me, I know what needs to be done. Is two weeks ok?” I said, it was agreed and I dug in.

The Second Version

During those two weeks, Christmas came & went and while taking two days off, the rest was spent on working on the connector. I had also considered that other businesses may want to use it as well, so a good chunk of this time was spent on making it versatile for it to be able to used by multiple businesses with multiple Magento sites.

It actually took me another 3 weeks to get it to the stage where it was intelligent to work out what the state of play was with the data and Magento site it’s connected too and it was able to work out what needed to be done and what had already been done (I’m being a little vague with this to ensure that I have some form of competitive advantage by the time you finish reading this).

Also during this time, I had one of those “Matt’s strange days”, it was a Friday and by the end of the day I had spoken to two other business owners on unrelated topics and they both had pretty much demanded that I also integrate their sites as well. My work over Christmas had paid off as I knew that I could do anything they threw at me and the connector with another 100 hours thrown at it would work amazingly for them.

So where are we today with the Magento connector?

I originally started with 4 user settings, right now as I skim down the config file a rough count is 320 separate options and that’s not including the arrays that are used to tackle the bespoke options that have come along and I’ve made versatile so that they can be used on other installations.

To give you some idea of what these settings do, here is an insight to a handful of them:

  • Decide if categories should be created and if so what statuses they should have as well, whether they should be included in the menu, active when created or set as an anchor category
  • What to do if there are no categories sent with a product
  • How and when to handle product variations
  • Whether we should be generating meta descriptions, keywords and titles and whether these should account for the data not coming from the standard fields in eSellerPro, but from custom fields or outside sources
  • How and when to create attributes and what to do in special circumstances
  • Whether related, upsell or cross-sell products should be created as part of the process
  • To include image labels (alt tags) with images or not and what to use as their labels
  • How to handle custom URL’s for products
  • What to do with tiered and grouped pricing
  • How to manage different variation types and what to do with them while being loaded to Magento
  • Which of the yes/no options for products in eSellerPro and where these options should be mapped to

And we’re not even scratching the surface. I’ve built in extensible arrays that can handle almost anything we throw at it and in short, it’s now at the stage where I can do almost anything we want.

Several key Magento extensions have been catered for now through the connector, my personal favourite is one that allows us to make images swap on colour choices on product detail pages which I’ll be documenting later this week (choose a colour on this item, neat eh?), data feed extensions for feeding out product data to Google Product ads, affiliate networks and also to provide stock & price control updates for external 3rd party just-in-time customers.

Flexible

There have been a couple of delays in the sites going live. Yes we’ve had bugs to iron out and bucket load of features that have been added in along with bespoke requests to handle, but what I’ve found is that while what I’ve written is perfectly capable handling the complexities of the data for getting data in and out of Magento quickly, the servers sat behind the sites have not been. If we combine in the learning curve for the business owners too with Magento and bringing their data up to scratch so that they can handle the functionality and features they really want, it’s been a little too long, hence why I’m working to a questionnaire I’ve put together that covers 41 topics to make them easier each time.

I had no illusions that this was going to be an easy task, multiple Magento versions and the thing is that no one server is like the other. We’ve burnt through 3 hosting providers already with the existing users of the connector, Magento really is a beast and unless we’re throwing quad cores and a minimum of 6Gb of ram at it, then it’s not going to be fast.

both myself and the connector have needed to be flexible

Thankfully I’ve managed moderately high traffic sites before, my UNIX skills are pretty good and the understanding of what needs to be done, can sometimes surpass the businesses own developers. I’m a curious person, it’s just the way I’m wired and I always ask.  This has been a life safer more than once and it’s always nice to be just told & trusted with “Matt here’s the root access details, just make it work” and crucially being able to make it work without screwing up everything in sight.

We ground one server to the floor loading 40,000 products in, we knew it was going to happen it was only a shared server. We didn’t expect the issues we had with running PHP has Fast CGI on the new dedicated server though, that took 5 hours to track down and solve, the last time I checked, the 40,000 products had been re-loaded and an extra 10,000 had be loaded on top.

Flexible is most apt word here, both myself and the connector have needed to be “flexible”. Flexible with the tech that the Magento site is being hosted on, the extensions that are being used and to dig in deep and solve the challenges that have had seasoned professionals stumped. Being an “all-rounder” and knowing eSellerPro inside out has helped to no end, oh and throwing as many hours as it has needed has really helped break the back of the most difficult of challenges.

Sites Going Live

I’m looking forward to sharing some of the stories with you on the move to Magento from the site owners themselves. Most have been through more than one site previously and are looking forward to moving to a super flexible platform, but keeping their sanity by using eSellerPro for all the back-office tasks.

The first site went live over a week ago, we’re already working on their second site and that will be replacing another eSellerPro website with Magento as the front end, but crucially keeping eSellerPro as product data store, stock control and order management tool. I’m expecting at least 3 more to go live in the next two weeks as well.

I have a 3 custom requests that I’m working on currently, but the one that I know you’re label as “oh my god that’s cool” if you’ve got any SEO background.

I’m working on an image renaming option. So that the less-than-SEO-friendly image names that are loaded into eSellerPro are renamed and processed to have delicious naming conventions that make it easy for Google to recognise and also easier for customers too. Cool eh?

In Summary

I didn’t expect for the integration to have gone so deep from the first conversation and being asked to “just integrate it properly“.  Wherever possible features and functionality are tied deeply back into eSellerPro, it’s the right approach as you can handle all the inventory data with ease, stock control & pricing and processing orders are far better off being processed in eSellerPro, but for the website side, Magento just rocks.

Recently I covered both Why You Should Not Use Magento and also Why You Should Use Magento and I can sum these up into one line, if you give it the resources it needs and you want the flexibility of an external website where you can do anything you want, then Magento is worth looking at as an additional or replacement site.

Now that the connector is robust enough, you can have it linked back to eSellerPro and have the best of both worlds. Would you like to know more?

Matt

Why You Should Not Use Magento

Following on from my earlier post on ‘Why You Should Use Magento‘, now for Magento’s negative side.

This is part 2 of a two part series on Magento, in this first part we look at why you should not use Magento for your eCommerce website platform.

Magento is a beast, if its not the depth of the user interface, its hundreds of settings to get used to or just the sheer scale of it. To give you some idea there are 28,000 files for the default installation of Magento (compared to just ~2527  in OpenCart 1.5.5) and that’s not including any media or theme files that you’ll be adding to it as well.

I’ll be completely honest with you, two years ago it took me two or three attempts to get to grips with it, that’s slightly concerning as I would like to think I pick up things fast, very fast. I finally gave in when a client demanded that they needed me to know it, several hours later and many pints of coffee, I felt quite at home.

There is a lot of hype around Magento, for the large part of it, its worthy, but Magento has several other aspects that you need to be aware of:

Development & Design Costs

Because Magento has taken off, developers & designers are charging a premium for the development of custom extensions & themes.

You need to be really careful of this if you need design or coding alterations. I would strongly suggest you document any changes you wish to be made before approaching anyone and get at least three quotes from reputable companies. This will stop you looking inexperienced and open yourself to be over charged.

Expect to pay up to 40% more for the same functionality when compared to platforms.

There has been a very mixed feedback with freelancers, I personally suggest you look at the most downloaded extensions in Magento Connect for each of the categories and locate a company that has completed a similar extension and approach them directly with the specifications.

Magento is quite easy to extend against, but generally it requires a lot more work than other website platforms and expect to pay up to 40% more for the same functionality when compared to platforms.

Update for 2014:
Over the past year I’ve seen quotes from £500 to £20,000 for Magento website designs. The differences are wild and what you get for your money is also wildly different.

If you’re on a budget or would rather spend your website build budget on marketing (which will make you money instead of having to spend it before you can earn it), take a look at the Ultimo Magento website theme, it’s been downloaded over 6,000 times and any bugs in it were ironed out yonks ago. It might not be exactly what you’re looking for, but the disparity between $95 and even the lowest of quotes £500 is huge!

Export/Importing Abilities

This was a shocker, the import and export abilities are astonishing poor. And I mean REALLLLLLLY bad.

I’m used to software products that are highly configurable when it comes to data exports and Magento lacks in every department.

I recently had to hack the core code to get some images in via CSV, it felt soooo bad and its just wrong. There are no category exports and inventory exports are primitive to say the least. There are several import tools for Magento, they vary in their flexibility and cost.

If you’re migrating from another platform, spend a serious amount of time seeing if you can port your data across. This could make or break your decision to use Magento, so trawl the extensions directory Magento calls “Magento Connect” for extensions to migrate from another platform, most of the common platforms have special importers available for them, several examples can be found here for OSCommerce.

Update for 2014:
I got around to documenting and creating the video guides for Magmi as part of the UnderstandingE project, you can find all the video guides here.

Magmi is like the swiss army knife of import tools for Magento, you can pretty do much anything you need to and there are a wealth of plugins available. Those dirty core hacks of Magento are no longer needed, oh and it’s free too.

Indexing in Multiple Website/Store Setups

This is an issue if you are SEF rewrites enabled. Magento wants to have ALL the SEF URL’s (Search Engine Friendly) in a table for each store view for each website for each product for each category.

For single or a small number of stores with a low inventory count this isn’t a big problem. But for big sites of several thousand records (or more) with multiple store views/sites then this becomes a processing issue.

If this is you, then you’ll need to take a look at look at the recommendations on the kit to run Magento and optimisation suggestions; Plus you’l need to take a look at this blog post on a method on how to run the different indexing processes separately because they’ll just never complete on their own.

To give you some idea, one of the sites I recently worked last year, took a minimum of 2 hours and 5 minutes to index. The processes are run in the early hours of the morning, but it does mean new products do not show until they have been ‘indexed’.

Update for 2014:
The quality of web hosting has got better over the past few years and you can get inexpensive, decent Magento focused shared web hosting for £16-30 a month see here (aff link and I use them myself).

While this won’t suit super big sites, you don’t have to overpay or suffer if you’re a smaller business and have lots of inventory. Also SSD disks have come down rapidly in price and seeing as they’re ~10 times faster than traditional disks, there is no real reason for you not to be on SSD disks, especially if MySQL is running off the same server too.

No Bulk Update Tool

This was another shocker, there is no ‘bulk update’ tool. These are taken for granted in other software products I have come across and feel this is a big hole in the Magento platform.

Such tools allow a user to update one or more attributes on many inventory records. The save untold amounts of time, effort, oh and frustration.I did find a plugin that was mildly helpful its called “Related Products Manager” which I covered a few days ago and also its free which helps, but is no substitute.

Server Requirements

Magneto is far from ‘light’ in resource demands. This I hinted at with the indexing requirements I mentioned above. You’ll be lucky to run this on a shared hosting account, it almost demands an entire server to itself and for bigger installations, several with a load balancer to boot.

Expect to be paying good money for the hosting side for Magento, if you skimp here then it’ll bite you in the bum very quickly.

If this does not put you off, then renting or collocating a dedicated server is absolutely suggested for your site. Collocation starts at about £40 + VAT and you supply the kit or a rented dedicated server can be found for around the £85 + VAT mark that should last you a while.

There are also dedicated Magento hosting providers out there, I am unable to comment on them all, one company that suggested that their VPS was “Magento Ready”, when we loaded 14,000 products to it, it was far from capable and moved to a dedicated server with 16Gb of ram and 8 cores instead. Slight overkill, but never had a problem after that “upgrade” :)

TCO – Total Cost of Ownership.

Aptly after the server requirements point, unless you have a technical member of staff or development team, you’ll be better off outsourcing this to a 3rd party and when it comes down to total cost, you may ultimately be better off choosing a hosted solution for Magento or another platform less “resource hungry”.

Update for 2014:
If you’re having to keep to the realms of shared web hosting, then this does come with several benefits, such as regular backups.

Always check with your web hosting provider how often they are made and whether they are off site (desirable) or on site. Trust me there is nothing like the cold sweat of not having a backup to hand and while not to be completely relied upon, this can come in very handy.

It’s Too Good.

Yep this is a negative!

Magento is to deep and offers too much customisation.

Sometimes its better off to get someone else to do a task for you and unless you’re a web designer or a PHP/MySQL developer, you’re better off giving it to someone else.

Stick with the basic functionality and you can’t go wrong.

Working with Magento

Rather than rubbing up against Magento (or anything else for that matter), working with it is always a easier route and here are some suggested resources to read the white paper includes some really good base optimisations for Apache, MySQL & PHP:

  1. Magento for developers (this is an 8 part series by Magento)
  2. A 60 page Designers guide for Magento (provided by Magento)
  3. A 290 page guide for users (also provided by Magento, need to enter some basic details)
  4. System Requirements
  5. White Paper: Methods and Best Practices for High Performance eCommerce with the Magento Enterprise Edition
  6. Book: Mastering Magento (steep at £30, but was helpful as it was similar to the user guide, but easier to understand)
  7. Update for 2014: And UnderstandingE.com, this site has over 100 video guides in Plain English, written & published by myself.

I don’t want to knock Magento, I really, really like Magento, but at times its has been extremely frustrating working with it.

The forums are not the most active places (they suffer from a lot of spam too) and some bugs I have found (well, some, ok most caused) have been a nightmare to resolve to no one really knows what on earth is going on. If I had not been technically competent with a good understanding of PHP/MySQL and what should be happening, then I would have given up on it ages ago.

In Summary

If you’re looking for a simple shopping cart that looks pretty, works well and supports multiple sites (yes other products can do this besides Magento), you may want to look at a personal favourite of mine, OpenCart, but be fully aware that’s not without it’s limitations, especially around multi-variations and stock keeping and no one platform is “perfect”, they never are.

Magento is a beast and from personally experience two years ago, I naively thought it would be quick to learn, how wrong was I… But chuck the resources it needs at it, along with time and you can do wonderful things with Magento.

Why You Should Use Magento

Magento has really taken off in the past few years, especially now eBay own it. But behind the buzz there are some things that really grind my gears and others that make me flutter with excitement.

I wanted to begin by highlighting the pro’s and con’s of Magento, but they were too numerous to list together and in tomorrow’s post I’ll be looking at “Why you should not use Magento” to give this article a more rounded feel to it.

For anyone who has not looked at Magento yet, I think you should do.

It’s a very feature rich platform and sets the standards for others to follow extremely high. Magento can be extended beyond its wide feature set. I’ll be adding a post soon on my top 10 must-have-extensions.

Below is a summary of why I think that Magneto could be the right choice for you:

Multiple Website & Store Support.

This means you can promote your inventory across different domains (this is known as a ‘Website’), then using ‘stores’ create stores that could be differing versions, designs or even languages. When it comes to inventory, you can disable items on different stores, but generally it is assumed that the majority of your inventory base will be used on all the store views.

Widgets & Static Blocks

When you get into playing with Magento, I just love how easily it can be configured, when it comes to widgets, there are some really useful options included by default and you can control these at many levels, product, category etc levels.

Static blocks come in really handy. An example of this is shipping details that are used on a product detail page, within a few lines of code you can add your own static block to your template and then control the content remotely through the Magento CMS section (CMS stands for content management system).

Magento is a configuration-based MVC system.

I have seen people moan about this, but Magento code alignment is in an easy to follow structure called Model View Controller. This in lay-mans terms means it’s really easy to extend or override/adapt Magento’s functions.

A Wide Assortment of Extensions.

Extending Magento is very easily done using the MVC system noted above. The Magento team have an online directory called ‘Magento Connect’ that contains hundreds of extensions, both free and paid for.

Take a look at the extensions directory that Magento call “Magento Connect“, there are hundreds of them, each extending the existing functionality further with some of the best extensions, such as the Fishpig extension to seamlessly integrate WordPress into Magento which is free, bonus!

Loads of Features & Functions Included from the Box

Magento is a feature packed and makes other platforms blush.

Here are a few neat features in absolutely no order:

  • Order reports dashboard,
  • Multi level user control,
  • API Access with configurable levels,
  • Extensible attributes,
  • Several different product types, including variations and digital downloads,
  • A very slick one page checkout process (or several if set),
  • All major payment gateways supported,
  • Multiple image support including a zoom slider,
  • A decent front end for users,
  • Newsletters,
  • Polls,
  • Product tagging,
  • Customer reviews,
    Multiple currencies (with a link for these to be updated via a cron job),
  • Out and in of stock notices,
  • RSS feeds for almost everything, including order status and updates, completely configurable down to website to store view and so on.
  • I’m stopping here, you really need to see the demo or install it yourself.

I did find a decent Magento features list if you’re after a full breakdown of the features and functionality in Magento and I’m sure more has been added since that article was written.

Semi-Decent Content Management System.

The CMS in Magento is pretty good, you’ll go far before needing any extras for this. The variables  button is handy. The only negative is that I do not like the editor, but in true Magento fashion, you can turn this off in the system settings and it also doesn’t trash complex HTML like WordPress does.

Order Process

The order process was a bit weird to get used to, to begin with, but it does make sense and you can process orders in-mass. Documents can be customised and outgoing emails can be altered as desired for each store. There is something like 37 emails that can be edited, but there are just 16 core ones that you would want to edit.

Almost Everything has a ‘Setting’.

No joke, there is a system setting for pretty much everything in Magento.

You can control at a global level and set defaults, then override at a website or even store level.

Note: This is what allows you to change themes & languages between stores/websites and still keep your sanity.

Scalability.

Magento has been designed so that it can be when needed to be run over many servers. This bit can go way over one’s head, but see here for more info.

Stable  & Updated.

Since PayPal was finally sorted out in one of the earlier versions (1.4.1.0 to be precise), today we’re at version 1.7. You’ll be hard-pressed to find any bugs and it’s being developed, so as new features, fixes and functions are added, they are released.

Free ‘Community Edition’.

Yep that’s right there is a fully feature FREE version.

However beware it’s not the easiest of systems to install and its requirements are not light. The Magento platform will not run particularly well on a shared host, it needs its own resources. TCO (Total Cost of Ownership) does need to be looked at if you are seriously considering Magento.

Plenty of Themes.

Unlike bespoke systems, Magento is open source and there are many sites that offer themes for Magento, similarly there are plenty of companies that can give you a bespoke look and feel.

Admin Panel

Within a few minutes of browsing the front and back-end admin section of Magento, you’ll understand the scale.

It is quite a lot to take in, it took me several nights to get through everything from end to end, I take things in fast, it’s been noted many times that it takes a decent amount of time to get used to the system and the knowledge base can be 50/50 at being helpful, but it has got better over the past 2 years or so.

YouTube was a superb resource when learning the back-end of Magento

There are many videos on all aspects of the system. See here on Youtube for a start in the right direction.

That’s enough of me typing, go check-out Magento yourself. Here are links to the Community edition back and front ends: http://www.magentocommerce.com/demo (the Community Edition is at the bottom right).

 

In Summary

Magento sets the feature and stability bar extremely high, very few products can even try to compare to what you can get for free out of the box with Magento.

Its not without its faults and the learning curve is steep.

I’ll be covering some of Magento’s negative points tomorrow in an article called “Why you should not use Magento” (but even then I’ll be sharing some extremely helpful resources with you, so you can master Magento).

Have you used Magento or are you using Magento for your website?

What do you make of it?

Let me know in the comments box below.

Matt

Showing Available Configurable Options on the List or Grid View in Magento

Do you sell sized products in Magento or have products with colour options and would like to show the available product options on the gallery or list views like the image above?

If so read on, I have some code for you.

 

Products with Options

The same as variations on eBay or Amazon, when you’ve got products that are the same, but come in different colours, sizes or both, then both eBay and Amazon allow you to make variation listings. You can do the same in Magento with configurable products, but unlike eBay and Amazon where you’re restricted on what you can do, but with your own website you can do whatever you like.

From a customer’s point of view there are probably only looking for a specific colour of dress or if I’m shopping for shoes, I’m a size 10, I don’t really care about any other sizes and for me as the customer having to trawl through umpteen products on a website is plain annoying.

So what can we do about this? Read on.

Showing customers available options in Magento

We can add some simple copy and paste code to our Magento website, that will show which options are available, so when your customer is looking at your category list pages, where you have multiple products being shown, you can clearly show them which sizes or colours are still in stock.

An example of what we’ll be doing is below:

show available sizes in Magento

As we can see from the image above, the available shoe sizes are being shown on each product. If we think back to me being a size 10, I can immediately rule out the products that are not available in my size and just click on the ones that are (not that Women’s shoes are my kind of thing I hasten to add!).

To do this, first I’m going to share the code snippet with you and then explain what it does and how you can extend it further or alter it to your needs.
[php]
<?php
$sizes = array();
$colours = array();
if($_product->isConfigurable()){
$allProducts = $_product->getTypeInstance(true)->getUsedProducts(null, $_product);
foreach ($allProducts as $subproduct) {
if ($subproduct->isSaleable() && floor($subproduct->getStockItem()->getQty()) > 0 ) {
$sizes[] = $subproduct->getAttributeText(‘config_sizes’);
$colours[] = $subproduct->getAttributeText(‘config_colours’);
}
}
if(count($sizes)>0) {
sort($sizes);
?>
<div class=”desc std config_sizes”>
Sizes: <? echo implode(“, “, $sizes); ?>
</div>
<?
}
if(count($colours)>0) {
sort($colours);
?>
<div class=”desc std config_colours”>
Colours: <? echo implode(“, “, $colours); ?>
</div>
<?
}
}
?>
[/php]
This code was originally posted on http://stackoverflow.com/, but lacked the option to show only the options that had stock on them. Adding “&& floor($subproduct->getStockItem()->getQty()) > 0” on line 7 filtered the items without stock on them out.

Code run down:

  • Lines 1 & 2 set up the arrays we’ll be using to show the available options
  • Line 4 makes sure we have a configurable product
  • Lines 5 & 6 grabs all the simple products and starts to go through each of them
  • Line 7 is the cool line, as that line only adds in products that should be added
  • Lines 8 & 9 add values for specific attributes to each array (more on these later)
  • Then lines 12 to 19 and 20 to 27 spill the options out to the website

Tip: If your website is only ever going to have sizes as options, then you can remove lines 3, 9 and 20 to 27 for the colour options or the opposite lines for the sizes if you’re only using colours on your site.

The two fields you must be aware of are in lines 8 & 9.

These are the attribute names for the configurable products. In this case, they are called “config_sizes” & “config_colours” and must match exactly to the attribute code names that are being used for you size and colour options in Magento.

You can find out what yours are called by going to the Magento admin section, Catalog > Attributes > Manage Attributes and then clicking into your configurable attribute(s) and the code name is in the first box.

Pretty cool so far right? Now let’s this to your site.

Adding this code to your site

In the code snippet above, we must update our configurable options on lines 8 & 9 otherwise this won’t work for us.

Also I’m going to assume that you have worked with Magento themes before and understand the structure of theming in Magento and that you should never, ever change the default theme and you’ll make a copy of the list.phtml file to your website theme directory if needed and also a backup of the current file just in case.

Note: If themes are new to you in Magento, then take a read of this article that explains how they work before continuing.

For the sake of example, I am going to assume that your Magento theme directory is called “my-theme”. What we’re looking for is the file called “list.phtml” located in:

app/design/frontend/default/my-theme/template/catalog/product/

If this file is not present, then copy this file from this directory to your theme folder:

app/design/frontend/base/default/template/catalog/product/

Once you have opened the “list.phtml” take note that this file has TWO views in it, both the grid view and the list view and we’ll need to pop this code in twice and then check both views (assuming you have both views enable on your Magento site)

What we’re looking for is the line that looks like this:

[php]
echo $_helper->productAttribute($_product, $_product->getName() , ‘name’);
[/php]

Being careful of other tags that need to be closed first, after this section, we can add in the code snippet above and press save.

Now nip back to your site and view one of your category list pages where you know you have products that have configurable options on them and see if it’s now displaying them. If you see the options and they look right, then you’re left with one more task for the other view and we’ll cover that next.

If the options did not display:
You may need to just empty the Magento cache for them to appear and if it’s still not appearing, then either we have the attribute name(s) we added above entered incorrectly, the page doesn’t have any configurable products with options that are available, we’re looking at a list view which we haven’t done yet (next section) or the theme may be just hiding this section, so check the pages source code to see if you can see the options there.

Now for the List view
Assuming the above went well for you (which it should do as I have tested this on Magento versions 1.7 & 1.6), we have only done half the job which was for the grid view which is at the top of the list.phtml file. If you scroll down this file and look for the section that reads like this:

[php]
<?php // Grid Mode ?>
[/php]

Now look again for the code:

[php]
echo $_helper->productAttribute($_product, $_product->getName() , ‘name’);
[/php]

And add the same snippet above where appropriate.

Styling:
I’ve included css classes on both the size and colour options called “config_sizes” and “config_colours”, you can of course change these to whatever you like, but do keep classes on them as it will make styling them a lot simpler.

In Conclusion

This code snippet allows you to show the available options on your site for both grid & list views.

Showing the available options on the grid or list pages in Magento is just good practice. I know from a personal point of view, I’m normally just looking for one size and from my Wife’s point of view, she just wants one colour and size is a secondary consideration.

show available sizes in Magento

Yes, with pages that have lots of products on this is going to add some extra processing time to the page to load and also you’ll need to style these new options too. If you’re really worried about speed on the grid/list pages, then cutting down the number of items being shown is the biggest win (and also good practice too) and if you’re still concerned, use PHP’s microtime() function to see how long this takes to execute and example 1 on this page will help you loads.

If you get stuck with the above guide, ask your web designer or if you are the web designer or just the store owner wanting to add this, pop a comment at the bottom and I’ll help out if I can.

Enjoy,

Matt

Migrating Magento From one Server to Another With SSH, RSYNC & Navicat

When it comes to moving your Magento site from one server to another, it can be an awkward job. Especially if you haven’t done anything like this before and as I’ve found moving Magento from one server to another is not as straight forwards as one would have hoped.

This guide will walk you through step by step in moving your Magento site from one Linux server to another.

I’m not going to pretend that this is easy or a quick job and it may not work for you, but this has worked for me numerous times and I sincerely it helps you on your way. If you know of a better way or would like to add to this, please improve this guide by adding your comments & suggestions in the comments section at the bottom of this page.

 

What we’ll be doing

We’ll be performing the following tasks:

  • Moving the site files from the “original server” to the “new server”
  • Copying the database from the “original server” to the “new server”
  • Updating Magento’s config files to use the “new servers” MySQL database
  • Changing the file permissions on the “new server” for the transferred files
  • Verifying that everything is right & Cleaning up

It should be also noted that you don’t need to use this entire article to move just one part of your site. For example if you’re just interested in moving your database from one server to another, just skip the file transfer part at the beginning.

To be able to quickly and easily move your Magento site from one server to another, we’ll need some tools to help us:

  • A text editor such as Notepad++ (free)
  • SSH access to both servers
  • FTP access to the new server site files where your site is going to be hosted
  • Putty.exe for connecting via SSH (free)
  • Navicat for transferring the databases (free 30 day trial)
  • MySQL login details for the original and new servers
  • WinSCP for editing/checking on files (free)
  • Depending on the size of your database and site files, approximately 30-60 minutes

There is going to be a big pause later on in this guide while you’re transferring your files, pop the kettle on now, you’ll have some free time shortly and all the tools we’ll be using are either free or have free trials.

Assumptions

To be able to follow this guide, the following assumptions have been made:

  • You’ve used SSH before
  • The new site directory has been created already using plesk, cpanel, webmin or similar
  • You have FTP or SFTP access to the new site
  • You have made a full backup of your current site

Getting Started

To be able to migrate your site from one server to another, the easiest and quickest way is using SSH (secure shell) and a really neat command called “rysnch”.

Note: SSH access is a given on Linux dedicated, VPS and hybrid servers, if you’re using shared hosting such as from Vidahost or HeartInternet, you’ll need to ask for access.

To make things clear as we’re dealing with two servers, we are going to have the “original server” which is where you website is hosted right now and the “new server” which is where we are transferring our existing Magento site to.

Assuming we now have SSH access, use Putty to connect to your “original server” via SSH.

Tip: If you’d like a guide into setting up putty and SSH on your windows computer, see this video guide http://www.youtube.com/watch?v=ma6Ln30iP08

Finding the Directory Paths on the Original Server

Before we can transfer the sites files from one server to another, we need to find the full directory path to both the “original server” site files where your site is currently being served from and the full directory path on the “new server” where we are moving our website too.

There are two ways of doing this, the first option is more experienced users and the second is much faster for novices. I’ll take you through both of them now.

Option 1 – Using the pwd command

If you’re experienced with the Linux command line and know your server well, this will be the easiest & quickest way for you.

To do this, we just need one very simple command for the Linux command line, it’s called “pwd”. In your putty window, type in “pwd” and in the response we’ll be shown the full path to the folder that we’re in right now.

Now if you already know your configuration, use the “cd” command navigate to a path that is something like this:

cd /var/www/vhosts/<your site name>/httpdocs/

Obviously you’ll want to change “<your site name>” to your sites name.

If you’re not sure which folder your site is in, navigate down to the vhosts folder using “cd /var/www/vhosts/” and then type in “dir” and press enter. This will give you a list of folders, these are normally your hosting domain names and then use “cd yoursitename” to move into that folder. Again enter “dir”, hit enter and look for another folder called either “httpdocs” or “public_html” and use “cd” to move into this folder. If you now enter “dir” again, hit enter, you should be looking at all the files in your websites home directory.

Now that we’ve found the “original server” path, enter “pwd” in the console, hit enter and we now have the full path from which we’ll be transferring the files from.

Copy this down into your text editor as:

FROM PATH: /var/www/vhosts/<your site name>/httpdocs

Option 2 – Using FTP and cheating

This is the cheating method, I say “cheating”, but it just works.

Create a file called “pathchecker.php” in your sites home/root directory and enter the text below.

<?php
echo realpath(dirname(__FILE__)) . "\n";
echo $_SERVER['PHP_SELF'] . "\n";
?>

Tip: You can also download this file here to expedite the process.

Now navigate to http://yourwebsite.com/pathchecker.php

This will spill out the full path to your existing site in your webpage. Cheating eh?

Now copy this path down into your text editor removing the “/pathchecker.php” part at the end as:

FROM PATH: <your path here>

Finding the Directory Paths on the New Server

This is a little more tricky than the first as normally we’re unable to cheat as we’ve not moved the DNS settings around yet to point the outside internet at our new server. So instead out best option is to use the Linux command line and navigate to our home directory where our site is going to be hosted.

Again this is going to be something like “/var/www/vhosts/<your site name>/httpdocs”, just use the “cd” and “dir” commands to navigate and look around until you find the sites base directory.

Once you have located the “new server” home folder for our site where we’ll be transferring our existing site over to, jot this down in your text editor as:

NEW SITE: /var/www/vhosts/<your site name>/httpdocs

Transferring the Files using rsync

Most Linux systems come with a command called “rsync”. This allows us to transfer files from one server to another and in other cases allows us to only transfer the files that have changed too (which makes it brilliant for backups).

Before we go bashing in the rsync command in willy-nilly we need to have a quick 101 on how this command works and as an example I have put a very similar command to what we’ll be using in a few moments below. If you’d like to read the man page, you can find that here.

rsync -r -t -v --progress -c -l -z root@yourdomain:/home/yoursite/public_html /var/www/vhosts/newsite.co.uk/httpdocs

Looks scary right?

Well actually it’s dead simple and I’ve broken it down into bite sized chunks below:

  • rsync” –  The rsync command
  • -r” – This switch says “repeat recursively” or in Matt proof language, “transfer the lot”
  • -t” – This switch preserves the timestamps on the files
  • -v” – This switch makes the command “verbose” or in Matt proof language “you can see what is happening”
  • –progress” – This switch tell rsync to show us the progress during the transfer
  • -c” – This switch tells rsync to make comparisons using checksums, rather than time and size
  • -l” – This switch means that we also copy symlinks as well (this can save a massive headache!)
  • -z” – And this switch means that rsync will compress the files during transfer, thus making it faster
  • root@yourdomain:” – This is the SSH username that you log into your “original server” and the domain name or IP address of the server. Do pay special attention to the “:” character at the end as well
  • /home/yoursite/public_html” – This is the path which we worked out above and is our “FROM PATH” where we will be transferring the files from
  • ” ” – This is a space. Extremely important. If you don’t leave a space between the “FROM PATH” and the destination path that follows, this command just won’t work
  • /var/www/vhosts/newsite.co.uk/httpdocs” – And finally this is the path on the “new server” where we will be transferring the files from the “original server”

Saving your bacon

Now before we continue, there is one key combination that has saved my bacon lots of times, it’s the command to stop processes from running in the command line and if you press CTRL and C together, this will stop a process from running.

If it doesn’t look like it’s transferring the right files or you just want to stop the process at any time, hold down the CTRL key and press C on your keyboard. This will stop the rsync command from running and you can investigate if the files are being transferred to the right location or not.

And back to rsync…

Still with me?

Sweet! Because we’re at the cool stage.

Crucial step: Log into to your “new server” via SSH, that’s right the NEW server. We’ll be logging in remotely to your “original server” from the “new server” command line.

Now grab your text editor and copy this into it:

rsync -r -t -v --progress -c -l -z oldserver@yourdomain:FROMPATH NEWPATH

Now swap the following text around:

  • oldserver” to your “original servers” SSH user name
  • yourdomain” to your current domain name or IP address used to log into the “original server” with via SSH
  • Make sure you don’t edit out the “:” symbol
  • FROMPATH” to your text for the from path we found earlier
  • NEWPATH” to the path we just found out for where the site is going to be moved to

We should now have something like we had originally like this:

rsync -r -t -v --progress -c -l -z root@yourdomain:/home/yoursite/public_html /var/www/vhosts/newsite.co.uk/httpdocs

Copy and paste this into your “new server” SSH console.

Tip: CTRL+V does not work in putty, press SHIFT+INSERT or right click your mouse and it will paste the text into the command line for you. Cool tip right?

Drum roll….

Before you press enter, just check over what you’ve written 3 times, making sure it looks right, you have the “:” symbol after your original servers login hostname or IP and there is a space between the from path and the new path sections.

Now hit enter.

If all has gone well, you’ll be asked to accept a security key, type “yes” and then for a password. This is the SSH password for the “original server”.

Once accepted and password entered you’ll start to see lots of files wizzing down the screen, this is fantastic, your files are now being transferred from your “old server” to your “new server”. (see note in a moment if this does not happen)

To just double check that they’re being transferred OK, you can hit CTRL + C at any time and check the directory on the new server to see if the files have started to appear.

Note: If you’re using WinSCP or similar SCFTP programs, press F5 or right click and refresh so that you see the new files (I’ve panicked for no reason before as I had just not refreshed the folder I was looking at).

To restart the transfer, just press the up key on your keyboard and hit enter (or paste in the rsync command again).

Transferring Magento site files takes ages, there is something like 28,000 files in a standard Magento installation and if you have lots of products and lots of images, this can easily go to 100,000 files, even with 100Mbps connections between servers this is going to take some time. So make that cup of tea from earlier and read on into the next steps.

OMGWTFBBQ I have an error

If you receive errors when running the command, then something is not right in the command we built.

Double check everything!!!

  • Make sure your username is right,
  • The hostname/IP address to the original server is right,
  • Make sure you’ve not left out the colon “:” between the username/host and the from path
  • If your from or to paths have spaces in them, wrap quotes around the whole file paths eg “/home/yoursite/public_html”
  • Make sure you’re using forward slashes like this / and not backwards ones like this \
  • Make sure the paths are correct by going to each servers SSH/putty window and typing in “cd your/path/here/”
  • Oh and a daft one, make sure on your folder paths the last slash “/” is not there!!! (that caught me out a while ago)
  • If you get a warning that you’re not allowed to run the command, add “sudo ” at the beginning of the rsync command and you maybe promoted to enter your password. This can sometimes happen when you’re not using a fully loaded account such as “root”

If you’re still stuck, the best suggestion is to ask you new providers technical support to help you. Even if they charge you, this could save you hours of frustration and sometimes just paying to get stuff done is easier.

Correcting File Permissions

This one caught me out twice!

Using WinSCP to show the New File Owner and Group Names

Using WinSCP to show the New File Owner and Group Names

When transferring the files from the “original server” to the “new server” you were probably using root or another user that is not the web server user, so all the files we transferred now belong to root (or similar). That is not good and we need to correct this.

The easiest way of doing this is again by cheating and using a single file, then another cool Linux command called “chown”

I did say this was cheating, but working out what “group” and “owner” we need to be using for web files isn’t straight forwards especially if this is a new server you have moved to and are not 100% with it yet.

So the cheat is to upload a file (and I mean ANY file) using WinSCP or another FTP application using FTP details for the new server and then see which group and owner has been assigned to this file.

Upload a file, whether that be an image, text file it really doesn’t matter, you can delete it anyway in a moment or two once we have found out what permissions we need to set

In WinSCP you can see the group/owner names by right-clicking a file. I’ve included a screenshot of this to the right and in this example, we can see that the group is: “sacln” and the owner is “matthewogborne”.

Now that we know these, jot these down in your text editor.

Command Format:

chown -R OWNER:GROUP PATH*

Command Example:

chown -R matthewogborne:psacln /var/www/vhosts/somedomain.co.uk/httpdocs/*

Triple Check!

Now triple check that the path, group name and owner names are correct and that you have ended your path name with the characters “/*” so that it knows to do the sub folders.

Please do triple check this is correct, I once changed the file permissions on an enter Linux server for every file once and it meant we had to start from scratch, it was messy (that’s why we’re using the full path above).

Run the Command

Now jump back to the putty window that is logged into the “new server” enter in the command below, replacing your Group and Owner names and also the path to where the new site is hosted to and hit enter. This command won’t take too long to run and if you go back to your WinSCP or FTP application and hit refresh we should see that the file permissions have changed to what they should be.

Transferring the Database

This is by far the easy part using a program called Navicat. Navicat is a program for connecting to MySQl databases, viewing tables, running queries blah blah, but it also has one super cool feature called “Data Transfer”.

The Data Transfer feature allows us to copy one database to another very easily and for porting Magento from one server to another compared to what we did above, this is dead easy.

To start, we need to know the MySQL details for the “original server” and the “new server”, this will be the hostname (IP or URL), username and passwords.

Tip: If you don’t know what these are, you can find your current username/password from the file called “local.xml” in the “/app/etc/” directory and for the new server, you can add a database using plesk, cPanel or if you’re hardcore, using the command line and there are guides to do that here

Adding a Connection to Navicat

This is dead simple, just follow the steps below:

  1. Along the top press File > New Connection
  2. Name the connection “Original Server” or “New Server” depending which one it is
  3. Enter the hostname
  4. Enter the username
  5. Enter the password
  6. Press “test Connection” to confirm the details are correct
  7. Press OK
  8. Now do that for both of the databases, the original and new servers.

Easy eh?

Now two quick tips for you:

Tip 1: After adding both connections to Navicat, close and reopen it. This means we’ll be able to see both MySQL accounts in the next step.

Tip 2: If you are using cPanel, then the default is not to allow remote hosts to MySQL. This is good practice but will stop us from transferring the current database to the new database.

cPanel Allow Remote MySQL Connections

cPanel Allow Remote MySQL Connections

So on the main page, scroll down until you see the “Remote MySQL” as highlighted in the image above. Click on this and on the next page enter your current IP address and press “Add Host”. If you don’t know what it is go to this website and copy it.

Transferring the Databases

This is so simple you’re going to love it.

Just follow these steps:

  1. In the left panel of Navicat, double click both of the connections so that they’re connected
  2. Right click on the “Original Server” connection and from the right click menu select “Data Transfer”
  3. On the left hand side is where we are transferring data FROM (source), on the right hand-side is where we are transfer data TO (target)
  4. On the LEFT hand side, dropdown the database box and select your original Magento database
  5. On the RIGHT hand-side, tick “transfer directly to server”
  6. Now select the “New Server” connection
  7. From the database dropdown select the new database where you transfer the data to
  8. Now press “Start”

A screen shot of this is below:

Magento database transfer with navicat

Again this is going to take a while. Even a new installation can take a few minutes on a slow connection and massive databases, one took 45 minutes to transfer.

Is it time for another tea?

Errors? If it errors at any time, don’t worry, the default settings were to stop on errors. You can change these settings on the advanced tab, but I’ve not had Magento error on a transfer yet, other databases yes.

Tip: If you’re finding the transfer really slow, try delayed inserts or just be patient :) And if your site is super busy, you might want to be doing this at midnight with the site locked down in maintenance mode and also locking the database tables. It’s your call on that.

Post Database & File Transfer

So hopefully, the file transfers went OK and your a couple of cups of tea down. But we need to tell the transferred site to use the new database username and password, plus we need to make sure it’s operational too.

Changing the Database Credentials Over

As we’ve moved servers it’s highly likely that your MySQL username and password has changed for the new server, if this is the case follow these steps:

  1. Go to “/app/etc/” on the “new server” and open the file called “local.xml”
  2. Change the values as appropriate for:
  3. host
  4. username
  5. password
  6. dbname
  7. Save the file

Seeing the Transferred Site Live

Changing the DNS details over without checking that the site is operational is a little foolish

So instead to see if the new site is actually working or not, we just need to tinker without hosts file on our own computer.

This varies from operating system to operating system, but basically we’re by-passing the internet’s DNS servers and forcing our local machine to go straight to the IP address we set for one or more domain names.

To do this we need to know the “new servers” IP address and to add two new entries to your hosts file. If your new servers IP address is 192.192.192.192 and your websites name is “mydomain.co.uk” then you would add this to your hosts file and then clear the cache:

192.192.192.192 mydomain.co.uk
192.192.192.192 www.mydomain.co.uk

As this is way off topic, I’ve included 3 video’s below that cover windows XP, 7 and Mac OS’s and how to change the hosts file

Once you’ve modified the hosts file and cleared/flushed the DNS cache on your machine, open up a web browser and enter your website URL.

Ta da! Your site should be showing.

Give yourself a pat on the back, but also understand we may not be out of the woods yet.

Tip: Daft point, once testing is over and done with, change the hosts file back again and remove these entries.

Cleaning Up & Verifying

Now before you eagerly go changing the DNS details of the domain over to the new servers details, check everything. Check that you:

  • Clear the Magento cache
  • Reindex everything,
  • View products
  • Add products to the cart
  • Checkout with an order
  • That all backend AND frontend functions are working as expected

Payment Gateways

Payment gateways like SagePay work from specified IP addresses, when you move servers the IP address is going to change, make sure that you update the SagePay admin panel with the new IP address so customers can pay :)

Magento Admin 404 Error

This one has caught me out and I was really concerned when I saw it first time around, but actually the issue is easily solved.

After migrating from one server to another, the settings are going to be incorrect and the indexes can sometimes not be set correctly, this is where this extremely helpful suggestion has helped loads:

You have to delete the following file

app/etc/use_cache.ser

If you get an error after that like

Notice: Undefined index: 0 in /srv/www/vhosts/javra.com/htdocs/munchad2/app/code/core/Mage/Core/Model/Mysql4/Config.php on line 92

Then go to your Database Management.

  • Open PhpMyAdmin
  • Go to your database
  • Click SQL
  • Run the following SQL Query:
SET FOREIGN_KEY_CHECKS=0;
UPDATE `core_store` SET store_id = 0 WHERE code='admin';
UPDATE `core_store_group` SET group_id = 0 WHERE name='Default';
UPDATE `core_website` SET website_id = 0 WHERE code='admin';
UPDATE `customer_group` SET customer_group_id = 0 WHERE customer_group_code='NOT LOGGED IN';
SET FOREIGN_KEY_CHECKS=1;

If you received this error, it will also be worth checking the settings in the “core_settings” table as I was also caught out once with differing DNS details being set and a site that was previously working on http://storename.co.uk was set to only work from http://www.storename.co.uk and thus the Magento admin and several other parts of the site was not working.

That’s it, Magento Site Migrated!

Well, that was quite a straightforward task when we look at what we’ve just covered. The only tricky parts are around getting the file permissions right and then checking the site after the move. Once you’re 100% sure that everything is OK with the transferred site, update the DNS details and I wish you many happy sales.

If you found this article helpful, please leave me a comment below or perhaps tweet it to let others know and if you think you can help make it better, pop a comment/suggestion at the bottom.

Matt

Bulk Deleting Attributes in Magento with iMacros

Very quickly when testing with Magento you can end up with lots and lots attributes in Magento that you don’t need any more.

Deleting an attribute is easy, deleting lots is a pain and it can be so easily be scripted, because we all hate doing something more than once right?

So that’s what the video below shows you and the code snippet is just below the video for you.

 

Quickly & easily bulk delete attributes in Magento

The iMacro Code

To make this work for you, you’ll need the macro code below:

VERSION BUILD=7500718 RECORDER=FX
TAB T=1
TAG POS=1 TYPE=TD ATTR=TXT:No
ONDIALOG POS=1 BUTTON=OK CONTENT=
TAG POS=1 TYPE=BUTTON ATTR=CLASS:scalable<SP>delete

How to add this to your iMacro list

To add this to your iMacros follow these steps:

  1. In your iMacros side bar, click on the #Current.iim macro
  2. At the bottom panel press the “Edit” tab
  3. Press “Edit Macro”
  4. Paste the code in from above
  5. Press File > Save As and save it as “bulk delete attributes.iim”
  6. For this new macro to show in the list, on the same edit tab in the left panel, press “Refresh macro list”
  7. Use as you desire

If you don’t have FireFox you can download it for free here and the iMacros extension for Firefox is also free and you can download that here.

Daft point…

Use your common sense when deleting attributes or using any form of automated script.

Make sure you know what it’s doing, have faith in you have a restricted search made and watch it, just in case you delete system attributes (while sipping tea and with the feet on the desk).

Enjoy,

Matt

2nd Impressions of Magento & eSellerPro Connector Update

In this post I’ll be sharing with you some of my findings so far after working for the past 3-4 months with multiple Magento sites.

Approximately 18 months ago, I worked deep into Magento for a clients site and I came out of that experience with some distorted impressions, now that Magento has progressed, I must say the second time around a lot more enjoyable.

The past week has been excellent fun and it’s looking likely that we’ll have 3 completed Magento to eSellerPro connectors completed and one live in the next few days. But before they go live, I’d like to share a few of the challenges we’ve had along the way and hopefully you can learn from them too.

Resource Hogging

By far the biggest challenge we’ve had has not been with the connector between eSellerPro and Magento itself, but the servers that the Magento sites are being hosted on.

In short, Magento is a beast and it needs lots of resources.

magento resource hoggingAnd when I say lots, I mean lots. Even 2 dedicated Xeon cores and 4Gb ram is still struggling to cope with ~15,000 products.

Granted a lot of these are variations (footwear), but even still it was being sold as “Magento Ready” VPS (Virtual Private Server from Vidahost) and so far it’s not been performing as well as one would have hoped. On another we got to 29K products on a shared hosting package and it did rather well in comparison, the only troubles we ran into there was that it’s proving slow to load and the other 50K products will have to wait until it’s moved on to a full dedicated server in the next day or two.

I’m now doubling my suggestion “that if you’re not paying £50 a month hosting fees then it’s not enough” to £100.

That means you can have a decent dedicated server to power the beast with plenty of room to grow and don’t have to worry about the number of connections and the amount of time a process is taking to run.

Oh and if you’re reading this thinking oh my goodness £100 for web hosting alone for a website… Then your right, it is expensive, but when you need flexible options and have large amounts of inventory, then Magento makes sense.

Common & Cool Magento Extensions

A couple of extensions have come to my attention and I think you should be aware of them too.

Magento Shipping Extension

Magento has some basic shipping options and also matrix rates that you can import via CSV, however these are not that flexible if you have complex rules and one extension that is being used by 4 sites so far is the “Product Matrix shipping extension“.

This extension is sick and if you want to see how configurable it is, see their Google document here which has exactly 1 squllion well documented examples included.

Image Switching for Variations

magento image swapping for variationsI was surprised that this didn’t work out of the box with Magento, it’s got every other feature you’d want, but image swapping when a variation such as a colour is selected from the drop-down box, nope.

Hidden in the depths of Google I found a really old article that showed  you how to set up images to swap on Magento’s configurable products using a £45 extension called “Magic Zoom Plus“. This extension adds the zoom window that we see on eBay listings, but it also opens the main image up into a lightbox too so the customer can see the full sized image.

Anyway… the core reason for wanting this extension is because if you set the variation products up to have images too (which the connector from eSellerPro Magento now does), you can select a colour option and the main image changes.

If you’d like to see this in action, have a look at this demo product on my Magento testing site (change one of the colour options in the drop-down box).

SagePay

sagepay_logoOne of my old nightmares was with PayPal Website Payments Pro and Magento, back at something like version 1.5.1 PayPal was in there but not actually working for the UK version. Two minor updates later and multiple calls to PayPal it was finally working, so when it came to SagePay and Magento, I was kinda hoping for a more pleasant experience.

To integrate SagePay is a piece of pie. I’ve now set this up several times and we’ve had it running in an hour, the extension you want is this one, it makes it easy and the SagePay Tech support team are ace.

M2ePro – Listing to eBay & Amazon from Magento

This is a topic for a different article really, but it’s of worthy mention.  M2ePro has come on leaps and bounds from what it used to be (“cranky” was one word for it) and it’s exceptionally flexible now.

While not the most well documented product out there, their support is amazing! We’ve had 2 minute replies continuously for any questions we had and there are so many options to fill your boots with.

The setup wizards are OK, but some of the options are not well explained and we’ve found a few things that need to be setup just right for them to work. But it’s promising and I’m hoping to release a full step-by-step guide to getting up and running with M2ePro in the next few weeks, plus I’d like to get the business up and running on it first and can use that as a reference point.

eSellerPro to Magento Connector Updates

eSellerProWe’re so close to having our first Magento site that is powered by the connector I’ve built between eSellerPro live, literally 2-3 days and I can’t wait to share!

The data transformation needed has gone through multiple stages of development now and the process the data goes through has had major revisions. It’s running approximately 14.4 times faster than it was before (I time each transaction and log it) for small batches and for larger batches, the speed increase is almost exponential because of the way the data is now being handled. If I lost you with that lot, basically it runs fast when creating or updating products.

When the connector was first written I only hand a handful of settings, today there are 148 settings that completely change the way the connector works between eSellerPro and Magento for all parts of the integration, inventory creation, stock & price updates, order collection and of course updating orders back in Magento too, allowing for it to be completely customised to each installation and data sets that the business has.

To give you some idea of the flexibility the connector has, here is a glimpse of what the Magento to eSellerPro connector can do right now:

  • More Magento Versions Supported
    Supports Magento version 1.7.X and confirmed working with Magento 1.5.X as well
  • Category Creation
    Creates categories on-the-fly and with configurable options as well. Such as making the category active by default, including it in the menu or even setting it as an anchor category
  • Category Blocking
    Category blocking to block specific categories from being created, which is super handy when someone has old categories that they need to ignore or use elsewhere
  • Data Cleansing
    Category cleaning, so that moving from an existing website to Magento is much (much) easier and can mean that the category tree can stay the same temporarily while the product data is updated. There are a few amazingly sick things I’m not going to share around the categories, but they make the moving from one site to another a lot easier.
  • Up to 5 Variation Styles Supported
    Variations or configurable products are supported and now up to 5 different attribute sets can be catered for dynamically and they’re matched to the right visibility. Oh and if they’re all out of stock, guess what the master product is marked as inactive as well.
  • Dynamic Attribute Creation
    You’ll know these as custom fields from eSellerPro, but in Magento they’re called “Attributes” and these are created dynamically and with what-ever options you like by default too. Want to swap the type to another type such as a dropdown or text area, the connector now checks for attribute type changes so not to slow down the loading process.
  • Data Transformation
    The value of specific Custom fields can be transformed at the load time, for example one user has a full URL for a YouTube video that they wanted porting to a specific attribute in Magento, we had three options, update eSellerPro, hack the site’s template or just let the connector strip the URL part and load only the YouTube video ID.
  • Cross Selling in & Tested
    Related, upsell and cross-sell products are now fully supported from being set in eSellerPro in the “Related/Kits” tab and they’re loaded automatically and controlled back in eSellerPro where you can import and export all you like.
  • Tiered Pricing & Groups
    Customer pricing groups are in and tested and up to 10 groups are supported. These are handy for sites where you have B2C and B2B going on. Oh and tiered pricing (which is price breaks upon quantity) is also in and working.

 

Payment Processing WarningsPaypal Logo

During the setup process for these sites, I’ve noticed that that both PayPal and SagePay have been being set to AUTH and not SALE transactions.

Just in case one of these slips through to a live site environment or is changed at a later date, there are some massive warnings sent on orders to eSellerPro now that make it really clear that the site is set up as AUTH and not SALE (there is an option to block them from being sent and also turn the warning off as well).

If you’re wondering what the differences is, the SALE version means you get paid, the AUTH version means you only authorised the payment but haven’t taken it yet.

Spotted the problem yet? :)

Magento Theme Support

The differences between a well written and a botched theme are now becoming apparent.

Some themes look like they have been written by a blind baboon, but others are so well written they’re amazing.

Some themes look like they have been written by a blind baboon

I mentioned the use of the YouTube video integration earlier, this was dead simple with what one of the designer guys had done, literally pop it in and it worked and if you wanted the extra flexibility of sizing, you could set those via attributes or using a simple syntax for the attribute.

One of the connectors has been set up to manage custom containers and blocks as part of the loading & updating process for products, so that the actual product layout page can be set up and managed eSellerPro and the site changes accordingly, it’s soooo sick, I’m going to have to show you how this works in a later article too.

Anyway we digress.

Magento, second time around has been an enjoyable experience. Not without it’s frustrations though, the entire core of the product appears to be undocumented and not a wiff of a comment anywhere which makes extending it a real challenge at times, but what can be done with it is pretty darn cool.

Am a convert yet from OpenCart? Maybe… but as I dig in deeper, they’re chalk and cheese.

What do you think of Magento?

What’s your thoughts on Magento? Have you used it for your site are you thinking about it or maybe you’ve been looking at something else… Let me know in the comments box below, I’d love to hear from you.

Matt

How to Disable the Magento WYSIWYG Editor

Magento comes with a lot of features out of the box, one of those is a HTML editor to allow easy adding and editing of HTML in almost all content areas.

However for advanced users, it’s more of a nuisance and you can disable it if you prefer, in this video I show you how.

There it’s that easy and super handy for HTML editing in Magento for advanced users.

That’s Curious BrightPearl is Releasing a Magento & eBay Integration?

Brightpearl LogoBrightpearl, now that’s a curious one.

It appears they’re adding a Magento & eBay link to their arsenal (see their shhhh page here) and I’m super curious!

If we look at the different SaaS (Software as a Service) providers out there, they’ve all originated from different angles:

  • ChannelAdvisor came from the perspective of eBay
  • And so did MarketWorks too
  • eSellerPro came from an order processing perspective, for which the marketplaces & listing were added later.
  • 247 TopSeller has hefty Amazon slant to it
  • StoreFeeder came from a Fulfilment perspective
  • Linnworks came from an ERP and MRP satellite systems
  • ChannelGrabber from a need to combine eBay & Amazon together

Brightpearl, Where Did They Come From?

As we’ve seen above each of these providers have come unique points of view and Brightpearl isn’t exception. Brightpearl came from two entrepreneurs and co-founders Chris Tanner and Andrew Mulvenna, whom was frustrated with the likes of NetSuite & Sage and how everything from a website (osCommerce) & accounting perspective was not linked and hindrance to his business at the time called “Lush Longboards”.

A years coding bender in 2006/2007 led to the development of Brightpearl, two investments later from Eden Ventures & Notion Capital, Brightpearl have over 6000 customers, a solid product that combines the features of a inventory management system, full-blown accounting (including purchase orders, quotes & invoices), contacts & a CRM tool (which is excellent I hasten to add! They’ve extended the Rapportive extension that links with Gmail), a web-based EPOS system (this is very cool) and an eCommerce offering for integrated websites.

Recently Kate Gover from Lahloo Tea discussed how Brightpearl helps her business. The video is below:

When I met the team at Brightpearl last year (hola!), the irony was that the businesses using Brightpearl felt it so valuable to use Brightpearl for their online channels that they were manually importing sales orders from other sales channels like Magento, eBay & Amazon, so that they can leverage the functionality of Brightpearl to its full potential.

eBay can get deep very quickly and Magento API is pretty poor currently, especially if you want to do complex tasks. I don’t know how far they’ve gone with the integrations yet, but even if they’ve done the basics such as stock control and order aggregation, it could be pretty slick.

Now it’s looking like they are adding a Magento integration and an eBay integration…. From a different perspective, that of website & accounting, that’s why I’m curious.

You can find out more about Brightpearl on their website and Shhhhh page where I found this information is here http://www.Brightpearl.com/shhh.