scriptygoddess

06 Jul, 2007

Working with CubeCart

Posted by: Jennifer In: cubecart

As I wrote in the comments on this post, I have a new project that needed a shopping cart again. I tried Zen Cart again, and again I quickly remembered why I hated it so much. If I ever even so much as think of trying that package, just hand me the spork to remind me how I wanted to spork my eyes out everytime I use it.* Last time I really liked working with Cube Cart but ran into a problem with shipping and then went on a long hunt for something that did what I needed with shipping, was easy to modify templates, etc. etc. Since this time I didn't have the same kind of shipping restriction, I figured I'd give Cube Cart another go. So far so good. Customizing has been a breeze. Very intuitive. I'll be updating this post over the next few days with things I find useful as I work on the project (due next week! Wish me luck! heh)

From the Cube Cart forums, a list of tutorials:
Skining, Templates and Layout Modification, Skining Tricks, Tips and more advanced

This has a small explanation on how to add PHP code to your template. For example – adding a date generated by PHP

And this one is really ironic. /cry
This mod (for a reasonable fee) would have solved my problem that I had with shipping last time I tried Cube Cart.

From the same people that made the shipping mod mentioned above:
This free mod will redirect the user to the shopping cart basket after they add a product.

Here's a mod to make CubeCart more SEO friendly (Haven't tried it, but thinking about it…)

If you're allowing users to ship product to addresses other than the address on file, you'll get a step where it wants you to specify the shipping address. If the user is NOT going to take advantage of this, it's kind of annoying – and I think probably you'll more likely want those users that want a different shipping address to take the step of clicking a line to change the shipping addres… this mod will skip that annoying step:
Do Not Force Step 3

*****************************************
I'll list below any mods I made myself:
**PLEASE NOTE – I strongly recommend you either make a backup copy of any file you edit and/or indicate in the file you're making changes where your change begins and ends using PHP comments.

If there is no text for a product – do not show just the "…" on the category page.
Open up viewCat.inc.php (found in the YOURSTORE/includes/content/ directory) and find this line:
$view_cat->assign("TXT_DESC",substr(strip_tags($productResults[$i]['description']),0,$config['productPrecis'])."…");
Replace with this:
if ($productResults[$i]['description'] == "") {
$view_cat->assign("TXT_DESC","");
} else {
$view_cat->assign("TXT_DESC",substr(strip_tags($productResults[$i]['description']),0,$config['productPrecis'])."…");
}

If there is no text for a product – do not show the "Product Information" header on the view product page
Open up viewProd.inc.php (found in the YOURSTORE/includes/content directory) and find this line:
$view_prod->assign("LANG_PRODINFO",$lang['front']['viewProd']['product_info']);
Replace with this:
if ($prodArray[0]['description'] == "" || $prodArray[0]['description'] == " ") {
$view_prod->assign("LANG_PRODINFO","");
} else {
$view_prod->assign("LANG_PRODINFO",$lang['front']['viewProd']['product_info']);
}

Make it so that you can pull in feature product descriptions on the home page
Open up index.inc.php (fround in the YOURSTORE/includes/content directory) and find this line:
$latestProducts = $db->select("SELECT productId, image, price, name, sale_price FROM ".$glob['dbprefix']."CubeCart_inventory WHERE `showFeatured` = 1 ORDER BY productId DESC LIMIT ".$config['noLatestProds']);
Replace with this:
$latestProducts = $db->select("SELECT productId, image, price, name, sale_price, description FROM ".$glob['dbprefix']."CubeCart_inventory WHERE `showFeatured` = 1 ORDER BY productId DESC LIMIT ".$config['noLatestProds']);
Then, locate this line:
$index->assign("VAL_PRODUCT_NAME",validHTML($latestProducts[$i]['name']));
and add this line below it:
$index->assign("TXT_DESC",strip_tags($latestProducts[$i]['description']));
Now you can use the {TXT_DESC} tag in your index.tpl template file (found in the YOURSTORE/skins/YOURSKIN/global/ directory)

Sort products on category page by product ID # (this ID is only shown in the Admin – this is NOT the same as the product code)
Open up viewcat.inc.php (found in YOURSTORE/includes/content directory) and find this line:
$productListQuery = "SELECT ".$glob['dbprefix']."CubeCart_cats_idx.cat_id, ".$glob['dbprefix']."CubeCart_cats_idx.productId, productCode, quantity, description, image, price, name, popularity, sale_price, stock_level, useStockLevel FROM ".$glob['dbprefix']."CubeCart_cats_idx INNER JOIN ".$glob['dbprefix']."CubeCart_inventory ON ".$glob['dbprefix']."CubeCart_cats_idx.productId = ".$glob['dbprefix']."CubeCart_inventory.productId WHERE ".$glob['dbprefix']."CubeCart_cats_idx.cat_id = ".$db->mySQLSafe($_GET['catId']);
Change it to this:
$productListQuery = "SELECT ".$glob['dbprefix']."CubeCart_cats_idx.cat_id, ".$glob['dbprefix']."CubeCart_cats_idx.productId, productCode, quantity, description, image, price, name, popularity, sale_price, stock_level, useStockLevel FROM ".$glob['dbprefix']."CubeCart_cats_idx INNER JOIN ".$glob['dbprefix']."CubeCart_inventory ON ".$glob['dbprefix']."CubeCart_cats_idx.productId = ".$glob['dbprefix']."CubeCart_inventory.productId WHERE ".$glob['dbprefix']."CubeCart_cats_idx.cat_id = ".$db->mySQLSafe($_GET['catId'])." ORDER BY ".$glob['dbprefix']."CubeCart_cats_idx.productId ASC";

**THIS POST IS A WORK IN PROGRESS – I WILL BE MAKING UPDATES OVER THE NEXT FEW DAYS – I'LL UPDATE THIS LINE WHEN I"M DONE** (See latest update below)

Disclaimers:
* I know there's a bunch of people that use Zen Cart and love it – more power to you. This is nothing against you personally – it just doesn't do it for me. It was pretty easy to install, but customizing the templates was a real pain in the ass for me and I personally never want to look at another Zen Cart template again. LOL

Update 7/8/07: After only a few days, the cart is running and the template is roughly 95% complete. I have some minor tweaks to do – but this took very little time overall. Now my 20/20 hindsight on CubeCart – it's GREAT for what I'm using it for – a few products, don't need a lot of features – and the cart is free (with the copyright on the bottom). If I was working on a larger store, I'd probably want something different that had more geek-knobs. (Of course, I'd still want them in a better admin-UI than Zen Cart had) There are quite a number of mods out there for Cube Cart – most of them seem to be pretty inexpensive, but I think some of the more expensive shopping carts still end up ahead in the feature-department.

Update 7/19/07: My CubeCart installation is all set now. There was one VERY large hack that I made that I still need to document and post here. The client wanted to accept donations through the store. There is no add on, or setting that I could find, that would make it so that the price field was "open" and user-determined. I did see two methods for taking donations: One was to set up "products" of specific donation amounts ($10, $20, $50, etc). The other was to set up a "$1" product, and ask users to enter the number of dollars of their donation in the "quantity" field. Both of these options, we felt, weren't terribly usable. So what I did was hack a number of pages to hide the fact that, for that particular (donation) "product", the quantity field was not in fact the quantity field, and made it look as if it was a "donation amount" field. It relied on the fact that there were no other "$1" products in the inventory – so if the product's price was $1 – it had to be the "donation" product. I also hacked the supporting pages, like the category page, cart page, to change how they looked as well to be consistent with how we were treating that product. It's A LOT of hacking. (Yes, I know this will make upgrades more difficult, but the client really really really wanted it this way)

15 Responses to "Working with CubeCart"

1 | DianeV

July 24th, 2007 at 2:58 am

Avatar

If I could ask, what is it that you like about CubeCart?

2 | Jennifer

July 24th, 2007 at 6:31 am

Avatar

For the price (free with copyright note at the bottom of the page) it is a good *basic* cart. As well, the template system was easy to understand, and it took hardly any time at all to create a custom theme. As well, once I started needing to hack it to have it do some things slightly different, even that was pretty easy to navigate through the code to figure out where I had to make my edits. There are a number of addons that can give you some additional features.

However, I will add that while it was good for the scenario I used it for, anything that requires more built-in features, you have to look elsewhere and need to expect to pay for the cart. One thing in particular that I didn't like is that there doesn't seem to be an option to have credit card information be entered on YOUR site. (at least not for the gateway they chose: Authorize.net) the ONLY option is to have the user forwarded to authorize.net to have their information entered there. I don't like the user experience this creates – I would worry that users don't feel they're giving their credit card information to the right person: one minute they're on your site, the next they're on someone else's. I haven't worked enough with authorize.net to know if this is just the way THEY work, and if other gateways through cubecart would work differently, but I suspect not.

3 | DianeV

July 24th, 2007 at 6:37 am

Avatar

Thanks; much appreciated.

We've used Authorize.net on a number of Sunshop installs; you generate an ID number at Authorize.net and, in Sunshop, select the Authorize.net module and enter the ID and other information there. Then all customer purchases are handled solely at the website (not at Authorize.net).

However, it's good to know that Cubecart handles transactions at Authorize.net (or, at least, Authorize.net transactions at Authorize.net); even if it may not be the greatest user experience, there may be instances in which it's the better choice.

Thanks again, Jennifer. Much appreciated.

4 | Matt

July 26th, 2007 at 10:06 am

Avatar

Thanks for that write up.

I'm in the process of setting up cubecart for a digital products site and its been a lot of work, but your links have been helpful.

5 | Adam Messinger

August 1st, 2007 at 11:08 am

Avatar

Thanks for the info on Cube Cart. I'd made a note of it as a potential "shopping cart that doesn't suck," but haven't had the opportunity to use it on a project yet. If I do, this write-up will come in very handy.

If you ever need something more full-featured, yet still free, you might take a look at Magento. It's an open source e-commerce platform from Varien, a Web development company that specializes in e-commerce. They're basically open sourcing their in-house tools. It's being released this month, and I'm looking forward to experimenting with it.

One drawback: because it's built on the Zend Framework, Magento requires PHP 5.

6 | Nancy

August 7th, 2007 at 4:12 pm

Avatar

Thank you so much for the script on how to put the products in a certain order on Cube Cart!!

7 | David G. Johnson

August 23rd, 2007 at 1:02 pm

Avatar

Okay…

I've followed your cart hunt for awhile from a distance. I ended up choosing CubeCart as well — for a variety of reasons.

But… I'm really fascinated by your donation mod. I have 2 business partners bugging me (okay, I'll be nice) asking me on a regular basis for this functionality in CubeCart stores we've set up.

I'm looking forward to your full documentation of that, although now that you've conveyed your approach conceptually, I'm ready to dive in and give it a shot! :)

Thanks for the great info!

8 | Dunc

October 15th, 2007 at 9:38 am

Avatar

RE: the point about not being able to enter credit card details on your site.

That's not true – you just need to get yourself an SSL certificate and set up CubeCart accordingly, and you will be able to have users enter their details on your site and these are then sent to Authorize.net

9 | Jennifer

October 15th, 2007 at 9:54 am

Avatar

Dunc – if you could explain it in more detail that would be great – because we did get an SSL cert – I had it recognize the SSL cert in the cube cart control panel (going back a few months now so don't remember specifically where) but it would still switch over to authorize.net's site to have the user enter their cc details…

When I started looking around at other cube cart sites that were using authorize.net – they all did the same thing, too… If you can explain (or post a link that explains) how to make it work – I would greatly appreciate it!

10 | Scott Wilson

November 5th, 2007 at 11:45 pm

Avatar

Magento is one interesting looking entrant to the PHP cart space. Another product you might want to look at is StoreSuite:

http://www.interspire.com/storesuite/

I have blogged about both these carts.

good luck,
Scott

11 | BFE Classics

February 3rd, 2008 at 1:39 pm

Avatar

I am using LinkPoint for credit cards with CubeCart. Customer is directed to their site but the site looks/feels secure.

I am trying to customize or find a skin to help me get the look/feel for our site. We sell car parts so we have ALOT of sub catergories. For example, "Air & Fuel Deliveries" has about 6 sub catergories. Can anyone help me figure out how to show that without the customer having to click on the main catergory to see the sub catergories????

12 | Steve

February 25th, 2008 at 2:19 pm

Avatar

I run two successful ecommerce sites one powered by Zen Cart and the other by Ecommercetemplates. The first one was on Ecommercetemplates and I was complaining about how difficult it was to modify to get the desired result in terms of look, feel and an easy checkout. I now realize that I actually had it easy and would highly recommend the generic version of ecommerce templates to anyone building a small to medium sized heavily customized shop. FYI if you want a successful shop, it should look and feel like amazon.com, gap.com, etc. and not like the out-of-the box sites from cart code.

On the second site, I started with Cube Cart but the checkout process was on 6 pages! This was a year ago so I don't know if they've updated or not. It's very important from a usability standpoint to make the checkout as easy as possible otherwise you'll get lots of dropped carts. On of the most critical parts of making a successful store is to reduce abandoned carts.

After wasting 2 weeks with Cube Cart, I was impressed with the open source spirit of Zen Cart. The site took 10 times as long as it should have and updates are horrendously complicated.

I HATE ZEN CART! Small changes take hours! It's like having to take apart half of your entire car to do a tune up. The forums are helpful but also full of idiots who say things like "why would you want to have people NOT register before making a purchase?" BECAUSE THE CUSTOMER IS ALWAYS RIGHT AND DOESN'T GIVE A DAM ABOUT YOUR BLOATED HIPPYWARE CODE! The mods and hacks were painful.

Conclusion:

http://ecommercetemplates.com/ – it has its quirks but is fairly inexpensive and flexible. Updates are moderately easy (I have heavily modified sites) Support is outstanding.

Cubecart – as of a year ago it was garbage and judging from the above is probably still that way. It's appealing at first but not ready for prime time.

Zen Cart – There's nothing Zen about it. It's a gigantic mess of code. A small change usually requires 3 file changes. This bitch is high maintenance – avoid unless you like to be the submissive partner.

13 | mike

April 1st, 2008 at 9:56 pm

Avatar

anyone one have any thoughts on agora cart? I'm thinking of stick to a simple paypal based site.

14 | Tim Holt

August 20th, 2008 at 3:52 am

Avatar

Hi, I was reading some of your reviews and I saw where you have a hack or module for making donations in Cubecart. I am extremely interested in that. I'm very literate in php and html and follow instruction well.
I creating a non-profit store and need to accept donations.

If you can help, please contact me.
Tim

15 | John

September 19th, 2009 at 8:05 pm

Avatar

I dislike Zen Cart also, I can't understand the Mentallity of having to dig a hole under the Road so you can Cross. I saw CubeCart and it was very easy to Install and Mod but I hit a snag with the Postage, So I went on the hunt again then I found PrestaShop The best I have found so far it has 1 click Mod Installs

Featured Sponsors

Genesis Framework for WordPress

Advertise Here


  • Scott: Just moved changed the site URL as WP's installed in a subfolder. Cookie clearance worked for me. Thanks!
  • Stephen Lareau: Hi great blog thanks. Just thought I would add that it helps to put target = like this:1-800-555-1212 and
  • Cord Blomquist: Jennifer, you may want to check out tp2wp.com, a new service my company just launched that converts TypePad and Movable Type export files into WordPre

About


Advertisements