Show the product catalog in cart when empty

Contrib type: 
Theme/Template
Status: 
Initial upload

Downloads

Compatibility: 
Ubercart 1.x

I was looking for something to tie the users in a bit more than .... "the cart is empty".

This is a very simple submission.

You will have to modify the theme function to match your them.

Instructions:

1) in the theme folder for the theme that you are using (i.e. /themes/iron_picket_red/) create a file called template.php.

2) open file and paste these contents in.

3) find "iron_pickets_red" and replace with your actual theme name.

<?php
// $Id: template.php,v 1.4.2.1 2007/04/18 03:38:59 drumm Exp $

function iron_pickets_red_uc_empty_cart ()
{
  return    '<p>'. t('There are no products in your shopping cart.') . '</p>' .
   '<br /><p>At <strong>IronPickets.Com</strong> we appreciate the opportunity to help you with your home improvement needs.  If you are having trouble getting started, check out our catalog below:</p>'
    . theme_uc_catalog_browse ();
}

Now you will have a catalog displayed on the cart page when it is empty.

Check it out: http://www.ironpickets.com/cart

PreviewAttachmentSize
template.php_.txt570 bytes
Ryan's picture
Offline
Joined: 08/07/2007
Juice: 15459
Re: Show the product catalog in cart when empty

Great idea and contribution. Thanks for posting. Smiling

deepakg83's picture
Offline
Joined: 07/24/2009
Juice: 187
Re: Show the product catalog in cart when empty

This really is good. Tried it for Uber 2.x ??
Think can get it done for the same, worth to have a feature like this when not many like just Cart is Empty.

Deepak Gupta

BigMike's picture
Offline
Joined: 10/20/2008
Juice: 1117
Re: Show the product catalog in cart when empty

How about a block that only appears on the cart page when the cart is empty?