Zen Cart Logo
Forums / Templates, Stylesheets, Page Layout / removing Go to Checkout Button on Shopping Cart page

removing Go to Checkout Button on Shopping Cart page

Locked

Views: 24,140

Results 1 to 13 of 13
This thread is locked. New replies are disabled.
3 Mar 2010, 1:19 PM
#1
robertg avatar

robertg

Zen Follower

Join Date:
Nov 2009
Posts:
341
Plugin Contributions:
0

removing Go to Checkout Button on Shopping Cart page

On my shopping Cart contents page I presently have the following Buttons: back to shopping, estimate shipping, go to checkout and check out with Paypal.

I would like to remove the go to checkout button and ideally put it under the shopping Cart summary on my right side sidebox. If this is not possible then I'd like to just remove it.

URL is: http://30408.vws.magma.ca/TTEZENCART

I'm in my final stages of preparation of this site, i'm working on cosmetic touchups of which this is one.
Thanks in advance for your help,
Bob

3 Mar 2010, 2:43 PM
#2
schoolboy avatar

schoolboy

Totally Zenned

Join Date:
Jun 2005
Location:
Cumbria, UK
Posts:
10,327
Plugin Contributions:
0

Re: removing Go to Checkout Button on Shopping Cart page

Why you would not want "go to checkout" on the shopping cart page is an utter mystery to me - especially since the whole purpose of an eCommerce site is to coerce customers into doing just that!

I have a solution for the sidebox and though it breaks a few rules (ie: it hard-codes into the PHP) it does the job.

FTP a COPY of the following file to your hard drive:

includes/templates/template_default/sideboxes/tpl_shopping_cart.php

Open it for editing using a PLAIN TEXT EDITOR, such as EMERALD EDITOR

Right at the bottom, find the following (last two lines)

  $content .= '</div>';
?>

Make the following edit

  $content .= '</div>';
  $content .= '<div id="checkoutButton"><center><a href="index.php?main_page=shopping_cart"><img src="includes/templates/template_default/buttons/english/button_edit_cart.gif" alt="Edit Cart" title=" Edit Cart " width="61" height="20" /></a> <a href="index.php?main_page=checkout_shipping"><img src="includes/templates/template_default/buttons/english/button_checkout_sm.gif" alt="Checkout" title=" Checkout " width="61" height="20" /></a></div>';
?>

As you can see, this also requires the creation of two small additional buttons that need to go into:

includes/templates/template_default/buttons/english

called:-
button_edit_cart.gif
button_checkout_sm.gif

In my example, the dimensions of these buttons is 61px X 20px . You decide how wide they need to be - a decision influenced by your side-column width.

NOTE: If you don't include the button images, you will just get the ALT text as the link

When you have made the edit, SAVE the file on your hard drive, then FTP it to your CUSTOM TEMPLATE folder for sideboxes:

includes/templates/YOUR_CUSTOM_TEMPLATE/sideboxes/

If there is no folder for sideboxes in your custom template, create one...

As I say, this method is bad protocol as it hard codes the php. Somewhere I do have the correct PHP version, but I haven't time to look for it right now.

You will also see I have given it a style ID

div id="checkoutButton"

.. allowing you to add some styles if needed.

3 Mar 2010, 2:55 PM
#3
schoolboy avatar

schoolboy

Totally Zenned

Join Date:
Jun 2005
Location:
Cumbria, UK
Posts:
10,327
Plugin Contributions:
0

Re: removing Go to Checkout Button on Shopping Cart page

You can "suspend" the appearance of the checkout button on the main page shopping cart by editing:

includes/templates/template_default/templates/tpl_shopping_cart.php

(Ftp a COPY to your hard drive, as you must also create an OVER-RIDE file in your own template later)

Find this 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>

Using HTML COMMENT TAGS, disable the line as follows:

<!-- <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>-->

DO NOT delete the line... comment it out as I have shown.

SAVE the file on your hard drive.

FTP it to:

includes/templates/YOUR_CUSTOM_TEMLATE/templates/

NOTE: This file - like the one in the sidebox - has the same name... tpl_shopping_cart.php

They are NOT THE SAME FILE (content wise) and must not be confused with each other...

3 Mar 2010, 7:13 PM
#4
robertg avatar

robertg

Zen Follower

Join Date:
Nov 2009
Posts:
341
Plugin Contributions:
0

Re: removing Go to Checkout Button on Shopping Cart page

Thanks for all the info, I'll work on it as soon as I have some additional time later this P.M.
The reason for removing the go to checkout is the Paypal button on that page it saves buyers from having to go to the register page since Paypal doesn't need that information in order to accept payment. Anyways that's what I was told by the site owner.
Again thanks for your help< i'll keep you apprised of my progress.

3 Mar 2010, 9:28 PM
#5
robertg avatar

robertg

Zen Follower

Join Date:
Nov 2009
Posts:
341
Plugin Contributions:
0

Re: removing Go to Checkout Button on Shopping Cart page

Hi again schoolboy,
Followed your instructions to a Tee, but nothing is happening or showing up, no image no text.
It's just as if nothing was altered??

Got any idea what it may be. The code change is obviously not affecting the site.
Thanks,
Bob

3 Mar 2010, 9:35 PM
#6
schoolboy avatar

schoolboy

Totally Zenned

Join Date:
Jun 2005
Location:
Cumbria, UK
Posts:
10,327
Plugin Contributions:
0

Re: removing Go to Checkout Button on Shopping Cart page

Doesn't look like you're using the core shopping cart sidebox... (or if you are, it's been modified quite a bit)

You'll have to determine where this sidebox is and what it's called, then try adding my line of code to its TPL file...

3 Mar 2010, 10:26 PM
#7
robertg avatar

robertg

Zen Follower

Join Date:
Nov 2009
Posts:
341
Plugin Contributions:
0

Re: removing Go to Checkout Button on Shopping Cart page

this is where its located:

<td id="navColumnTwo" class="columnRight" style="width: 150px"> <div id="navColumnTwoWrapper" style="width: 150px"><!--// bof: cartsummary //--> <div class="rightBoxContainer" id="cartsummary" style="width: 150px"> <h3 class="rightBoxHeading" id="cartsummaryHeading"><label><img src="http://30408.vws.magma.ca/TTEZENCART/images/whitecart.gif"> <font size="1"> Cart Contents:</font></label></h3> Items: 1<br />Amount: $299.00</div>. I kept something in the cart to show the details as well.

got this from Page Source.

4 Mar 2010, 4:04 PM
#8
robertg avatar

robertg

Zen Follower

Join Date:
Nov 2009
Posts:
341
Plugin Contributions:
0

Re: removing Go to Checkout Button on Shopping Cart page

schoolboy:

Doesn't look like you're using the core shopping cart sidebox... (or if you are, it's been modified quite a bit)

You'll have to determine where this sidebox is and what it's called, then try adding my line of code to its TPL file...

Any additonal information on my situation.

Much appreciated,
Bob

4 Mar 2010, 4:46 PM
#9
schoolboy avatar

schoolboy

Totally Zenned

Join Date:
Jun 2005
Location:
Cumbria, UK
Posts:
10,327
Plugin Contributions:
0

Re: removing Go to Checkout Button on Shopping Cart page

Go to admin >>> tools >>> Layout Boxes Controller

... and see what that sidebox is called.

or, look in your custom template /sideboxes folder for a sidebox name that resembles "shopping cart".

(It may be in template_default/sideboxes ... I don't know... look in both locations).

I think you have a custom sidebox there somehow.

Without being able to login to your hosting account, I can't be sure...

6 Mar 2010, 3:45 PM
#10
robertg avatar

robertg

Zen Follower

Join Date:
Nov 2009
Posts:
341
Plugin Contributions:
0

Re: removing Go to Checkout Button on Shopping Cart page

Hey Schoolboy,
What I did is entered the info in a sidebox banner as you can see if you go to my site.

The problems I'm having is that even though I have the sidebox with the edit button and the checkout button id as banner2, the sidebox of banner 10 when page is refreshed replaces or moves up to replace my new banner.
Both banners have different sort and location specified in banner manager. I really don't know why its doing this.

The ideal situation as well would be to remove the sidebox header of the edit & checkout buttons.

Again your help has been invaluable, and much appreciated.

6 Mar 2010, 3:51 PM
#11
schoolboy avatar

schoolboy

Totally Zenned

Join Date:
Jun 2005
Location:
Cumbria, UK
Posts:
10,327
Plugin Contributions:
0

Re: removing Go to Checkout Button on Shopping Cart page

Go HERE, and add the product to the cart.

... see what happens to my shopping cart sidebox.

I am using the Shopping Cart sidebox, standard within zencart.

6 Mar 2010, 4:35 PM
#12
robertg avatar

robertg

Zen Follower

Join Date:
Nov 2009
Posts:
341
Plugin Contributions:
0

Re: removing Go to Checkout Button on Shopping Cart page

That's excellent!!
and that's what I'm attempting to do.

Where these buttons would go is in the cart_summary.php. This file shows up under the shopping cart Image.

sidebox name is sideboxes/cart_summary.php.

Can I get that effect using this file.

6 Mar 2010, 4:49 PM
#13
schoolboy avatar

schoolboy

Totally Zenned

Join Date:
Jun 2005
Location:
Cumbria, UK
Posts:
10,327
Plugin Contributions:
0

Re: removing Go to Checkout Button on Shopping Cart page

RobertG:

That's excellent!!
and that's what I'm attempting to do.

Where these buttons would go is in the cart_summary.php. This file shows up under the shopping cart Image.

sidebox name is sideboxes/cart_summary.php.

Can I get that effect using this file.

cart_summary.php

is not a core zencart module, as I said earlier...

I use the STANDARD zencart shopping cart sidebox module.

You may be able to add this to

modules/sideboxes/cart_summary.php

... but as I do not know anything about that module, I cannot further advise.

You can TRY adding my code snippets to the bottom of that file and see what happens. (Make a backup file first).