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)