MagmaMags Magazine Subscriptions relaunch: Oscommerce -> Ubercart

Posts: 49
Joined: 08/17/2007
Getting busy with the Ubercode.Spreading the word - Ubercart for president.

Over this past weekend I re-launched MagmaMags Magazine Subscriptions using Drupal + Ubercart at:

http://www.magmaweb.com

For the past six years the site has been running OSCommerce and I about six months ago I discovered Drupal while working on a different web project. I decided that Magmaweb.com needed a refresh on both design and on system.

I had grown weary of waiting for OSCommerce to upgrade and found it increasingly difficult to implement the various hacks to add additional features to OSCommerce. In fact when OSCommerce did have security updates to its core, I could not longer even figure out how to upgrade because of all the many hacks I had done to the core files to add these many features.

I also had been experimenting with Joomla and I like it but found it to be somewhat unfriendly for implementing design features and member options. I also did not like their e-commerce modules. I then found out about Drupal this past spring and begin working on a website (http://www.swala.org) for creating a social network among Global Health professionals. I then discovered Ubercart, started playing around with it and really liked it so I made the decision to use it for the redesign of Magmaweb.com.

I chose Drupal + Ubercart over simply redesigning the site and keeping OSCommerce because I particularly liked the simple, seo-friendly urls, modular system, extensive library of modules, developer community and constant updates and ability to have a fairly flexible and controllable layout. Plus...I don't think OSCommerce, despite its large community, has a great core group of developers willing to push the system forward constantly like Drupal and Ubercart has at the moment.

The design began with a very basic css-based layout and I built from there. I'm a big fan of designs that are about 95% width with some space on the sides and I went the what appears to be a currently "hot" feature of having the footer graphics look like a reflection in water – aka microsoft.com’s homepage. I kept the menus fairly simple and created my own customized menu categories on the left side. I wanted to make sure the search was highly visible and have it centered in the header. The search is all based on the views_fastsearch module which I have decided is superior to Drupal's built-in search for this site because I can have it search by a single node type and/or within magazine subscription categories.

I wanted to implement a number of additional features besides the stock that come with Ubercart. These additional features are built on current modules and include:

1) Wishlist: I used the Views Bookmarks module to allow users to create a wishlist of products. The only catch I have had with it is that anonymous users cannot use it so I had to use a php if statement to tell anonymous visitors to create an account first before they create a wishlist. I bit of a bummer but its the best I can use for now.

2) User Reviews: I used the userreview module to allow users to review products. I decided on this one rather than the fivestar module because I wanted to allow users to both give a number rating plus text review.

3) Newsletter: Simplenews module allows me to create a newsletter list for customers; Customers can signup when they open up an account.

4) Fash searching within products via keyword or category: Views_Fastsearch module; also allows me to customize the searching on the site

5) View products by letter: Especially useful for my site since its just magazine subscriptions. I used the views_alpha_pager module

6) Gift Cards: I originally was going to use the postcard module but decided against it because it was not as extensible as I had wanted; for example I wanted the list of all products to show up when a user was creating a postcard so they could choose which product they were buying for a friend ideally I wanted postcard to combine with the CCK module. But, alas, it doesn't work. So, I instead used the Send module and created a new node type called giftcard. This node type has a number of CCK fields added to it including references to the product list. So the customer can create a giftcard with a customized message, then send it to a friend via email on the site.

7) Customized product-page layout: Used the contemplate module

Cool Cross-selling products: I choose the similiarterms module to allow me to cross-sell products i.e. have second product the customer may be interested in appear on the first product's page. To set it up I installed this module then created a new category called cross-selling terms. I allowed free-tagging for the category and assigned it to the product node-type. Now when I edit a product, the "cross-selling term" textbox appears and I type in my term I will use between both products, for instance for the Atlantic Monthly subscription, I called my term "crossatlantic". I then went Mother Jones subscription and put in this same term. Using contemplate, I reference the "similiarterms" block and the two products will show up on each other's pages. I still need to theme the look though...so for now there are just text links listed there.
You can see an example on this page:
http://www.magmaweb.com/i/magazine-subscription/atlantic-monthly

9) "Combine and Save on multiple products": I wanted to allow users to combine the current product they were viewing with another product at a discount. Ubercart provides the product_kit module which allows one to have a package of two or more products be sold together. I first setup this module with a few kits then I went back to the product node-type and using CCK, I setup a node reference to the product_kit node type. So when I edit a product, one of the options is to select one of the product_kits. I then used the contemplate module to customize how the product_kit shows up on the product's page. I used an if-then statement to only show this referenced product_kit if one has been chosen.
You can see an example here under the "Combine and Save" text:
http://www.magmaweb.com/i/magazine-subscription/pc-magazine

10) Frequently Asked Questions: I used the faq module to create a section of frequently asked questions from customers.

11) Custom Page Title in Header: I wanted to change the default page title so that it also showed the price of the product as well as the name of the product - I wanted this so that I could customize what page title shows up in the search engines. So I used the auto_nodetitle module to customize it.

12) VirtualMerchant Payment Gateway: I rewrote the Viaklix module so that it works with the new VirtualMerchant gateway which is now used by NOVA Systems / Costco merchants. I will release shortly to Ubercart community.

13) Other modules which make life easier: fasttoggle (quickly unpublish a product), gsitemap (creates an xml sitemap for the search engines), google_analytics (can use the google analytics), securepages, views.

Experiences on transferring data from OSCommerce to Drupal: I decided to do this manually and it took me about two days to get all the data moved over. The only hitch I ran into was OScommerce's encrypted passwords. Due to the unique way it encrypts passwords its virtually impossible to get them transferred over to Drupal. So I had customers get sent a new password on the drupal-based site.

Thats it and many, many thanks to the Ubercart team and community for all your hard work, contributions and feedback! There’s still lots to do on the site so there will be much more to come and I hope that I can continue to contribute quite a bit to both Drupal and the Ubercart project.

-Aaron

Posts: 3959
Joined: 08/07/2007
AdministratorHead Code Monkey - I eat bugs.

All I've got to say is... wow! Jawdropping!

This looks like it was a monumental task, and I really appreciate you posting up all the different modules you used. The User Review module sounds interesting enough for me to use on our sites when we get to it.

Your product pages and the way you implemented features like recommendations, kits, and search are all very cool. Cool

I think in some places the math is getting calculated wrong. For example, on the Game Developer page it says: "Our price: $49.95 ($0.22 per issue) 11 issues per year" I haven't had math in a while, but if that's just a 1 year subscription, I'm pretty sure the stats are a little wrong. Maybe good for sales, though... Eye-wink

Also, several subscriptions were up there for $555, like Computer Gaming World. I'm not sure if these values just got imported wrong or something and you're still trying to iron out the kinks, but I thought I'd post it up just in case.

Probably fairly important... on the user reviews section, I can post content using the Full HTML input format as a guest. It's probably best not to let any users use that, b/c it's my understanding that would let me post some malicious JS to product pages that could harm other viewers.

Anyways, thanks a lot for the long write-up. I'm sure a lot of other Ubercart users will be looking for these features, and I now have a place to point them.

Thanks for your compliments on Drupal.org, too. Smiling

Posts: 49
Joined: 08/17/2007
Getting busy with the Ubercode.Spreading the word - Ubercart for president.

Hey Ryan - thanks for the feedback and the note on the user reviews section - got that fixed! Yeah a couple of subscriptions are listed there at $555; they actually need to be unpublished we don't make a profit on the regular price for them from our suppliers but for the time being I just upped the price to an unreasonable point so no-one would buy Sticking out tongue

Yes - the CCK Computing module is what i use for those fields; its got some odd stuff going with it and I had originally calculated all the discounts then put it directly into the sql tables but drupal won't pick it up until I edit the product and re-submit it....somewhat tedious if you 1200 products but i'm trying to troubleshoot it.

thanks again for all the hard work on ubercart!

Posts: 1920
Joined: 08/07/2007
AdministratoreLiTe!

For the computed fields, try emptying the cache and cache_content tables. If you had loaded any of the products before putting those values in, the cache will be out of date and needs flushing.

Posts: 49
Joined: 08/17/2007
Getting busy with the Ubercode.Spreading the word - Ubercart for president.

thanks Lyle - will give it a shot.

Posts: 49
Joined: 08/17/2007
Getting busy with the Ubercode.Spreading the word - Ubercart for president.

One other thing I wanted to document here since it took me some time to figure it out. Since I didn't want to break my links in search engines to each of my products which were in OSCommerce, I put in redirects from my old oscommerce product pages to my new ubercart product pages into my .htaccess file. But it wasn't as straight forward as I though because the oscommerce product pages are written in the following way:

http://www.mysite.com/productinfo.php?products_id=1234

Using a simple redirect like this:

Redirect 301 /productinfo.php?products_id=1234 http://www.mysite.com/magazine/time

does not work because of the question mark/query in the original url. So the way I needed to do it to get it work was like this below:

RewriteEngine on
RewriteCond %{QUERY_STRING} products_id=1234
RewriteRule ^product_info\.php$ /magazine/time? [R=301,L]

Hope that helps for folks migrating from Oscommerce to Ubercart.

Posts: 15
Joined: 09/20/2007
Bug Finder

I am truly impressed! Your review of Ubercarts abilities is very informative.

Any chance on getting that VirtualMerchant gateway up this evening? I just found out today, a client who's deadline is at hand, doesn't use Authorize.net, instead they use Nova, and I can't move forward with out regressing to viaklix.

I like the tips you gave, very useful, I hope to put several into a project that is coming up.

Thanks in advance!

Posts: 49
Joined: 08/17/2007
Getting busy with the Ubercode.Spreading the word - Ubercart for president.

This should get you going....Attached is the virtualmerchant gateway package. I'll also put it into the contributions area.

AttachmentSize
uc_virtualmerchant.zip2.92 KB
Posts: 286
Joined: 08/28/2007
Early adopter... addicted to alphas.Not KulvikTheminator

Hi aswalla, I like your write up about the way you implemented your features. Thank you very much for taking the time to write it up. I will certainly be using it for reference on the development of my own sites. Cool

One small thing I noticed was that when I go to the My Wishlist page it shows nothing but the title.

Posts: 49
Joined: 08/17/2007
Getting busy with the Ubercode.Spreading the word - Ubercart for president.

Hi Rich,
thanks for the compliments and thanks for catching that wishlist issue - I'll take a look at what the problem might be...

cheers,
Aaron

Posts: 701
Joined: 11/05/2007
Bug FinderFAQ ModeratorGetting busy with the Ubercode.

So the way I needed to do it to get it work was like this below:

RewriteEngine on
RewriteCond %{QUERY_STRING} products_id=1234
RewriteRule ^product_info\.php$ /magazine/time? [R=301,L]
Hope that helps for folks migrating from Oscommerce to Ubercart.

I just saw this thread, after having implemented my own redirects to make sure all my old pages mapped to the new ones. My solution looks remarkably like yours. Two comments though:

1) You should really use a $ at the end of the RewriteCond, i.e. it should be

RewriteCond %{QUERY_STRING} products_id=1234$

otherwise this condition will match product ID=1234 but will also match products with ID=12345, ID=12346, ID=1234787878, etc.

2) Redirecting all products this way in the .htaccess adds a little overhead, since .htaccess is parsed for every page request. Redirecting hundreds of products slows down every page a little bit. Since 301 is a permanent redirect, I plan to closely monitor my web access logs to make sure search engines respect this and start indexing my new URLs, then I hope eventually to be able to remove the redirects entirely once requests for the old URLs have dropped off.

--

<tr>.

Posts: 49
Joined: 08/17/2007
Getting busy with the Ubercode.Spreading the word - Ubercart for president.

TR - Good call, thanks for comments. After about a month+ since the relaunch, my logs have been showing a pretty good dropoff for search engines going to old product pages. So once a bit more time passes, I'll cut down that .htaccess file which should help speed up a few things.

-Aaron

Posts: 65
Joined: 01/18/2008

You probably know this, but site has 404 errors.