Forums / Templates, Stylesheets, Page Layout / How do I add buttons to the left column?

How do I add buttons to the left column?

Locked

Views: 963

Results 1 to 12 of 12
This thread is locked. New replies are disabled.
2 Oct 2009, 2:37 AM
#1
bparker avatar

bparker

Zen Follower

Join Date:
Oct 2008
Location:
Rochester, NY
Posts:
232
Plugin Contributions:
0

How do I add buttons to the left column?

How can I add buttons to the left column? I know I need to create images and upload them, but where do I put the code to make them show up?

What if I want a button to show up ONLY if the user has something in the shopping cart? How would I do that?

Thanks,
BP

2 Oct 2009, 3:55 AM
#2
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: How do I add buttons to the left column?

What does the button do? Or do you just want to sew it on ... :cool:

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

2 Oct 2009, 5:15 AM
#3
bparker avatar

bparker

Zen Follower

Join Date:
Oct 2008
Location:
Rochester, NY
Posts:
232
Plugin Contributions:
0

Re: How do I add buttons to the left column?

I'm just gonna 'sew' it on. :)

Basically I want to put a link (like to the Checkout page) on the left if the person has one or more items in the shopping cart. I would also like to make buttons to other pages on the site which are always present.

2 Oct 2009, 5:38 AM
#4
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: How do I add buttons to the left column?

This mod includes a checkout button: Cart Sidebox with Free Shipping Qualifier and Checkout Button Free Shipping Qualifier

Or you could use this code adapted from it, which includes a switch to only show if there is something in the cart:```php

<?php if ($_SESSION['cart']->count_contents() > 0) { echo '<div id="cartCheckout"><a href="' . zen_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL') . '">' . zen_image_button(BUTTON_IMAGE_CHECKOUT, BUTTON_CHECKOUT_ALT) . '</a></div>'; } ?>
2 Oct 2009, 8:46 PM
#5
bparker avatar

bparker

Zen Follower

Join Date:
Oct 2008
Location:
Rochester, NY
Posts:
232
Plugin Contributions:
0

Re: How do I add buttons to the left column?

Gotta love SESSIONS. Thanks, I'll give it a try!

So... where do I put this code so it shows up in my sidebar...
I'll find it.

Thanks!

2 Oct 2009, 8:52 PM
#6
bparker avatar

bparker

Zen Follower

Join Date:
Oct 2008
Location:
Rochester, NY
Posts:
232
Plugin Contributions:
0

Re: How do I add buttons to the left column?

I want to add code to my sidebars. Which file do I change to do this?

Thanks.

2 Oct 2009, 8:55 PM
#7
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: How do I add buttons to the left column?

bparker:

I want to add code to my sidebars. Which file do I change to do this?

Thanks.
There are several sidebox addons in the Free Software Addons area that can serve as examples of which files are involved in adding/editing sideboxes.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

3 Oct 2009, 4:46 AM
#8
bparker avatar

bparker

Zen Follower

Join Date:
Oct 2008
Location:
Rochester, NY
Posts:
232
Plugin Contributions:
0

Re: How do I add buttons to the left column?

I don't really need to add a box, just a link. Which PHP file do I modify?

3 Oct 2009, 5:52 AM
#10
bparker avatar

bparker

Zen Follower

Join Date:
Oct 2008
Location:
Rochester, NY
Posts:
232
Plugin Contributions:
0

Re: How do I add buttons to the left column?

Ok, I think I see the confusion. I do not wish to put this in a box, but outside the boxes. I want to have a picture or link between boxes.

Thanks.

3 Oct 2009, 12:45 PM
#11
rstevenson avatar

rstevenson

Totally Zenned

Join Date:
Nov 2006
Location:
Dartmouth, NS Canada
Posts:
2,400
Plugin Contributions:
0

Re: How do I add buttons to the left column?

Boxes don't have to be boxes, if you see what I mean. That is, you can style a particular box so it has no visible borders.

I'd second the idea of looking in the Free Software Add Ons (link top-left) to see what other boxes are already available, under the theory that re-inventing wheels is not a good thing. One of those boxes is actually an empty box, so you can add whatever you want in it. (And then style it so its borders disappear.)

You're actually receiving good advice in this thread. Don't fight it. :laugh:

Rob

Breakfast: the most important donut of the day.

3 Oct 2009, 1:07 PM
#12
schoolboy avatar

schoolboy

Totally Zenned

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

Re: How do I add buttons to the left column?

It's better to stick within the conventions of "boxes" being the content containers in the side columns. Take the advice of people posting stuff here... We all have considerable experience. (Not showing off... just letting you know that what we are saying makes sense.)

If you hard code stuff into the column's code, how are you going to position it in relation to the boxes that are already there? How are you going to put it (for example) two-thirds of the way down - between the "Specials" box and the "More Info" box?

As Rob says, you can always style the box to not have borders etc.

I use the shopping cart sidebox (configured to appear only when there is something in the cart, and I have "Edit Cart" and "Checkout" buttons in this sidebox - put there by a simple edit to the sidebox's code.

See it in action here (add some products to the cart, see how it works...)

(elsewhere in this forum I explained how to add these buttons to the cart sidebox, but I can't remember where that post is... If I find it I'll come back to this thread.)

20 years a Zencart User