Zen Cart Logo
Forums / Templates, Stylesheets, Page Layout / add view cart and checkout links

add view cart and checkout links

Locked

Views: 1,453

Results 1 to 8 of 8
This thread is locked. New replies are disabled.
19 Mar 2008, 12:52 AM
#1
gsdcypher avatar

gsdcypher

Totally Zenned

Join Date:
Feb 2007
Posts:
816
Plugin Contributions:
0

add view cart and checkout links

Hi All,

Does anyone know how to add VIEW CART and CHECKOUT NOW links or buttons to the header but only have them appear if there is an item in the cart???

Thanks.

19 Mar 2008, 1:03 AM
#2
steven300 avatar

steven300

Totally Zenned

Join Date:
Jan 2008
Posts:
1,564
Plugin Contributions:
1

Re: add view cart and checkout links

The links "Shopping Cart" and "Checkout" should appear in the header as standard whenever the cart is full. You could easily modify these links to say "View Cart" and "Checkout Now" if you wanted to?

19 Mar 2008, 1:10 AM
#3
gsdcypher avatar

gsdcypher

Totally Zenned

Join Date:
Feb 2007
Posts:
816
Plugin Contributions:
0

Re: add view cart and checkout links

I have a contributed template installed (cherry zen) which may be why those links don't show up when an item is added to cart.

Which files control the links "Shopping Cart" and "Checkout"? Maybe I can add them back in???

Thanks.

19 Mar 2008, 1:15 AM
#4
steven300 avatar

steven300

Totally Zenned

Join Date:
Jan 2008
Posts:
1,564
Plugin Contributions:
1

Re: add view cart and checkout links

gsdcypher:

I have a contributed template installed (cherry zen) which may be why those links don't show up when an item is added to cart.

Which files control the links "Shopping Cart" and "Checkout"? Maybe I can add them back in???

Thanks.

That would be..

includes\templates\template_default\common\tpl_header.php

Make sure to use the overide system if editing it.

If you have any problems with this, I would suggest posting in the Cherry Zen Support Thread.

Good luck.

19 Mar 2008, 4:44 AM
#5
gsdcypher avatar

gsdcypher

Totally Zenned

Join Date:
Feb 2007
Posts:
816
Plugin Contributions:
0

Re: add view cart and checkout links

Is this the code that adds the links if there is something in the cart?

 
<?php if ($_SESSION['cart']->count_contents() != 0) { ?>
    <li><a href="<?php echo zen_href_link(FILENAME_SHOPPING_CART, '', 'NONSSL'); ?>"><?php echo HEADER_TITLE_CART_CONTENTS; ?></a></li>
    <li><a href="<?php echo zen_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL'); ?>"><?php echo HEADER_TITLE_CHECKOUT; ?></a></li>
<?php }?>

Could I just insert that into my where I want it to appear override file?

Thanks

19 Mar 2008, 6:11 PM
#6
gsdcypher avatar

gsdcypher

Totally Zenned

Join Date:
Feb 2007
Posts:
816
Plugin Contributions:
0

Re: add view cart and checkout links

I have been editing the tpl_ezpages_bar_header.

Where do I change the text for the links "Shopping Cart" and "Checkout" that appear in the header?

Thanks.

19 Mar 2008, 6:48 PM
#7
steven300 avatar

steven300

Totally Zenned

Join Date:
Jan 2008
Posts:
1,564
Plugin Contributions:
1

Re: add view cart and checkout links

gsdcypher:

I have been editing the tpl_ezpages_bar_header.

Where do I change the text for the links "Shopping Cart" and "Checkout" that appear in the header?

Thanks.

Probably..

includes/languages/english/header.php

19 Mar 2008, 7:25 PM
#8
gsdcypher avatar

gsdcypher

Totally Zenned

Join Date:
Feb 2007
Posts:
816
Plugin Contributions:
0

Re: add view cart and checkout links

Brilliant!!! :clap:

Thanks!