4 replies [Last post]
alien73's picture
Offline
Bug Finder
Joined: 11/10/2007
Juice: 450
Was this information Helpful?

I'm starting this topic so we can post the little simple things that customers expect to see in a shopping cart. Like if the cart is empty add a "Go Shopping Link" and how to configure things that will make your customers shopping experience a peace of cake.

Hopefully some of these posts will make it into a Core Ubercart release.

I will start with the easiest.

1.) In uc_cart at line # 1177

You will see

// Returns the text displayed for an empty shopping cart.
function theme_uc_empty_cart() {
  return '<p>'. t('There are no products in your shopping cart.') .'</p>';
}

Change to:

// Returns the text displayed for an empty shopping cart.
function theme_uc_empty_cart() {
return '<p>'. t('There are no products in your shopping cart. <a href="catalog"> <u>Go Shopping</u></a>') .'</p>';
}
Andy's picture
Offline
Administrator
Joined: 08/07/2007
Juice: 1076
How about: Change to: //

How about:

Change to:

// Returns the text displayed for an empty shopping cart.
function theme_uc_empty_cart() {
return '<p>'. t('There are no products in your shopping cart. <a href="catalog"> <u>Continue Shopping</u></a>') .'</p>';
}

It is a little change, but we are talking about little things Smiling
Peace,
Andy

Ryan's picture
Offline
Joined: 08/07/2007
Juice: 15438
Good idea. I'll also

I'll also mention that b/c that's a theme function, you can override it in your theme's template.php so you don't have to hack the core module.

alien73's picture
Offline
Bug Finder
Joined: 11/10/2007
Juice: 450
Re: Good idea. I'll also

Thanks guys, I was looking into that same function after I posted.. I'm used to hard coding... I guess I need to get out of that habit and use the available functions ehhh.

To Ryan: The reason I started this Topic was in hopes that the simple obvious things could be added into Core with the overides.

Give and you will receive, you will be given much. Pressed Down, Shaken together, Running Over, it will spill into your lap.

alien73's picture
Offline
Bug Finder
Joined: 11/10/2007
Juice: 450
Re: Re: Good idea. I'll also

Ok Folks here is the correct way to do it without modding the Core. Put this code in your current themes template file

function phptemplate_uc_empty_cart() {
return '<p>'. t('There are no products in your shopping cart. <a href="catalog"> <u>Continue Shopping</u></a>') .'</p>';
}

Give and you will receive, you will be given much. Pressed Down, Shaken together, Running Over, it will spill into your lap.