Lonnie Knows Everything

Shopping cart made from Joomla, K2, Simple Caddy and a CSV import

by Lonnie on Sep.22, 2009, under Joomla, Programming

One of my clients had recently came to me looking for a clean shopping cart that could be ran mostly via CSV… they had a “product matrix” in excel that had categories, sub categories, item name, skew and price…

I evaluated VirtueMart which I decided was just too bulky and buggy to work with .. then I checked out dozens of others, but none were suited to our needs..  I’ve run into this issue before and decided to roll my own cart using existing tools.. I opted to use K2 (since Joomla can’t do subcategories), Simplecaddy (k2 is not a cart) and some custom tweaks..

Read on for more info!

1. K2 is an amazing content organization system (link) that offers a far more flexible way to manage your categories/sub categories…  it’s not a shopping cart, but it makes a very effective catalog .. it’s capable of acting as a blog, an event calendar, a catalog (with no ecom functionality) and many other things… built in content voting, comments and social sharing options.. it can be everything, or it can be minimal depending on what you turn on and off.

2. Simple Caddy (link) is a basic cart system, but it lacks a catalog … it’s designed for you to be able to build your own product pages within Joomla and slap on “add to cart” button and then it provides a method to check out via paypal (only paypal is supported).

3. My own code to import a CSV into the system.. it’s job is to create the category hierarchy, add the products to simplecaddy, create the items in K2 and apply the simplecaddy tag for “add to cart” .. this CSV also adds to another database with additional information that is used to create a product selector, or I guess a better word would be a drill down search.

In addition to the three main ingredients above, I made a series of tweeks to both components to suit my needs.. some of the things I’ve done.

1. I gutted the K2 item image system, I wanted to keep it automated and simple so I have K2 looking for category images by category name and product images by product ID… this gives easy ability to just properly name some files and bulk upload them.. this was done entirely in K2 templates.

2. I added an option in Simplecaddy to disable ecom, which simply means it doesn’t appear even with the tag in place.. the reason being is that for phase one, we’re just building the catalog and leaving the cart disabled.. if the tag is in place and the simplecaddy plugin is disabled, the tag shows.. we wanted to be able to enable ecom without needing to import again, just a flip of a switch.

3. An additional payment option for simplecaddy (authorized.net)

The result is a fully functioning shopping cart solution powered off of a simple CSV file

5 Comments for this entry

  • Paul

    Hi, this sounds wonderful but how could the little people like ourselves get a copy?

    Would really appreciate it if you could point me in the right direction!.

    Thanks

    Paul

  • Joey

    Found your post on K2 which led me here. I am in the EXACT same position you were in.

    I have been working on a solution for a client and using VirtueMart and agree with you in it’s size and features. Just too much. I have been looking to build a custom solution, but new to PHP and Joomla, came from a Python background. Time is a factor and so complete customization is tough for this first client.

    I would like to chat with you about your project and potentially help if needed, as I will most likely be doing the same thing.

  • Lonnie

    Well it’s completed but I can’t demonstrate it until the client site launches! so stick around and I’ll showcase it .. it’s a pretty elegant looking solution… it uses heavy K2 html overrides and integration with simplecaddy.. the cart will initially be disabled though because the client doesn’t want to launch with ecom capability, but I made that a simple switch in the admin.

  • Lonnie

    As for packaging the solution, not likely .. but I can give pointers on how I acomplished it .. The thing I wrote for the client is an excel import, they didn’t want to have to deal with an admin interface, they wanted to keep a product spreadsheet and click a button.. when they do .. it clears out K2 and simplecaddy then rebuilds the datase .. they have about 2,000 products and it’s done in about 3-4 seconds.. it can be managed entirely in joomla though.. the nice thing about my import is that it automatically adds the simplecaddy tags in the content for “add to cart”

  • Rikki

    Hello Lonnie

    Can I hire you to setup the cart functionality for my K2 site? I only need to take orders, not payments.

    If not, can I donate you money and get your code?

    Thanks

Leave a Reply



Looking for something?

Use the form below to search the site:

Still not finding what you're looking for? Drop a comment on a post or contact us so we can take care of it!

Visit our friends!

A few highly recommended friends...