Zen Cart Logo
Forums / Templates, Stylesheets, Page Layout / Checkout Button in Shopping cart sidebox?

Checkout Button in Shopping cart sidebox?

Locked

Views: 7,565

Results 1 to 10 of 10
This thread is locked. New replies are disabled.
12 Jul 2006, 9:36 AM
#1
zoreli avatar

zoreli

New Zenner

Join Date:
May 2005
Posts:
49
Plugin Contributions:
0

Checkout Button in Shopping cart sidebox?

Hi

I would like to add checkout button in my shopping cart sidebox, so if they continue shopping they can go on checkout page any time, without first to click on shopping cart link.

This mean one click less for potential customers. Can this be done?

Regards, Zoreli

12 Jul 2006, 4:23 PM
#2
dbltoe avatar

dbltoe

Totally Zenned

Join Date:
Jan 2004
Location:
N of San Antonio TX
Posts:
9,791
Plugin Contributions:
14

Re: Checkout Button in Shopping cart sidebox?

Have you removed the upper navigation bar that automatically adds a "Checkout" link if there is anything in the cart?

12 Jul 2006, 8:58 PM
#3
zoreli avatar

zoreli

New Zenner

Join Date:
May 2005
Posts:
49
Plugin Contributions:
0

Re: Checkout Button in Shopping cart sidebox?

Yep, I delete it.

However I would like to have the checkout button below of the items in the sidebox if possible.

Regards, Zoreli

13 Jul 2006, 4:33 AM
#4
dbltoe avatar

dbltoe

Totally Zenned

Join Date:
Jan 2004
Location:
N of San Antonio TX
Posts:
9,791
Plugin Contributions:
14

Re: Checkout Button in Shopping cart sidebox?

Then I think you would find the code you removed and add it where you want it to be.

I would need to see your site to see for sure what you are talking about.

13 Jul 2006, 8:26 AM
#5
zoreli avatar

zoreli

New Zenner

Join Date:
May 2005
Posts:
49
Plugin Contributions:
0

Re: Checkout Button in Shopping cart sidebox?

I make it. For those who may be interested, here is the solution:

Open the file:
includes/templates/my_custom_template/templates/tpl_shopping cart_default.php

where my_custom_template is the name of your custom template (if you use any)

Copy this line: (in my file is line 133)

<div class="buttonRow forward"><?php echo '<a href="' . zen_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL') . '">' . zen_image_button(BUTTON_IMAGE_CHECKOUT, BUTTON_CHECKOUT_ALT) . '</a>'; ?></div>

Then open the file:

includes/templates/my_custom_template/sideboxes//tpl_shopping_cart.php

modify the following part: (in my file this code start at line 45)

if ($_SESSION['cart']->count_contents() > 0) {
$content .= '<hr />';
$content .= '<div class="cartBoxTotal">' . $currencies->format($_SESSION['cart']->show_total()) . '</div>';
$content .= '<br class="clearBoth" />';
}

like this:

if ($_SESSION['cart']->count_contents() > 0) {
$content .= '<hr />';
$content .= '<div class="cartBoxTotal">' . $currencies->format($_SESSION['cart']->show_total()) . '</div>';
$content .= '<div class="buttonRow forward"><a href="' . zen_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL') . '">' . zen_image_button(BUTTON_IMAGE_CHECKOUT, BUTTON_CHECKOUT_ALT) . '</a></div>';
$content .= '<br class="clearBoth" />';
}

Clarification:

I modify the line:

<div class="buttonRow forward"><?php echo '<a href="' . zen_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL') . '">' . zen_image_button(BUTTON_IMAGE_CHECKOUT, BUTTON_CHECKOUT_ALT) . '</a>'; ?></div>

Like this:

$content .= '<div class="buttonRow forward"><a href="' . zen_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL') . '">' . zen_image_button(BUTTON_IMAGE_CHECKOUT, BUTTON_CHECKOUT_ALT) . '</a></div>';

Note: Checkout button is not shown when cart is empty. I set up my shopping cart to be shown always, even when is empty. So now the checkout button is shown only when there is item in the cart, and customer can go at checkout page at any time with one click less. It works like a charm.

Thanks for the help dbltoe

Regards, Zoreli

13 Jul 2006, 3:49 PM
#6
dbltoe avatar

dbltoe

Totally Zenned

Join Date:
Jan 2004
Location:
N of San Antonio TX
Posts:
9,791
Plugin Contributions:
14

Re: Checkout Button in Shopping cart sidebox?

For others out there.....

Please remember that ZenCart does have this in the upper navigation and it is not there till the customer has something in their cart.

Most developers of e-commerce and consultants will tell you that navigation placement should be standardized just as ZenCart has done.

Before everybody jumps, I agree that there are times when we must go against the norm. Base your decision on your customers.

"If it ain't broke, don't fix it!"

14 Jul 2006, 1:48 PM
#7
zoreli avatar

zoreli

New Zenner

Join Date:
May 2005
Posts:
49
Plugin Contributions:
0

Re: Checkout Button in Shopping cart sidebox?

I absolulty agree. However, you can't argue with the customer...to do these things like this, is a part of the job.

I post the solution just in case that someone else must do the same thing, so he can do it faster.

Regards, Zoreli

14 Jul 2006, 3:27 PM
#8
kuroi avatar

kuroi

Totally Zenned

Join Date:
Apr 2006
Location:
London, UK
Posts:
10,475
Plugin Contributions:
11

Re: Checkout Button in Shopping cart sidebox?

Thanks zoreli

I am upgrading a site next week that already has this feature so although I knew in principle how I was going to do it, you've helpfully filled in the details, hopefully saving me a litlle time and my client a little money.

11 Mar 2009, 2:06 AM
#9
nicknicknick avatar

nicknicknick

New Zenner

Join Date:
Oct 2006
Location:
Toronto, Canada
Posts:
3
Plugin Contributions:
0

Re: Checkout Button in Shopping cart sidebox?

Thanks for this zoreli. It really helped me out a lot today.

30 Jul 2010, 5:03 PM
#10
magiana avatar

magiana

New Zenner

Join Date:
Jul 2010
Posts:
11
Plugin Contributions:
0

Re: Checkout Button in Shopping cart sidebox?

I tried this and followed Zorelis instructions exactly, but when I added a product to the cart, nothing happened. :dontgetit

I really believe there should be links or images to the shopping cart and check out in other places than in the top and the shopping cart box headline.

It took me a long time before I even discovered the links in the top. It was not a place I expected to find anything useful so I didn´t look there. I don´t want it to be like that for my customers.

The link to the shopping cart in the headline in the shopping cart box is also confusing. Usually I click on links or images, not headlines.

It would be better to have links or images to the shopping cart and checkout, at the bottom of the product listing. That´s where I expect to find them.

If anyone has a solution to this, please speak out...