Zen Cart Logo
Forums / Templates, Stylesheets, Page Layout / Adding text to the shopping cart bar

Adding text to the shopping cart bar

Views: 677

Results 1 to 4 of 4
11 Aug 2011, 7:15 PM
#1
tamuren avatar

tamuren

New Zenner

Join Date:
Apr 2011
Posts:
95
Plugin Contributions:
0

Adding text to the shopping cart bar

https://www.on-grade.ca

Hello all,

Currently using v1.3.9b here. My boss has requested that I add text to the gray bar in the header that contains the shopping cart info. I'd like to add some simple text with a link to an easy page I'm creating. Could someone point me to the file I would have to edit? Alternatively, if you've seen this kind of thing before and know exactly how to do it, please share? :smile:

Currently:

[IMG]http://img846.imageshack.us/img846/1299/beforen.png[/IMG]

The Proposed Change:

[IMG]http://img814.imageshack.us/img814/6806/afterq.png[/IMG]

11 Aug 2011, 7:30 PM
#2
stevesh avatar

stevesh

Black Belt

Join Date:
Feb 2005
Location:
Lansing, Michigan USA
Posts:
19,793
Plugin Contributions:
2

Re: Adding text to the shopping cart bar

Unfortunately, our friends at Template Monster have made this more difficult than it needs to be.

You'll need to use Admin - Tools - Developers Tool Kit to search for cart-bg to see what template file they used to style that area. You can add your text link to the proper place in that template file.

11 Aug 2011, 7:46 PM
#3
tamuren avatar

tamuren

New Zenner

Join Date:
Apr 2011
Posts:
95
Plugin Contributions:
0

Re: Adding text to the shopping cart bar

stevesh:

Unfortunately, our friends at Template Monster have made this more difficult than it needs to be.

You'll need to use Admin - Tools - Developers Tool Kit to search for cart-bg to see what template file they used to style that area. You can add your text link to the proper place in that template file.

Thanks, I guess the hunt is on lol

12 Aug 2011, 5:05 PM
#4
tamuren avatar

tamuren

New Zenner

Join Date:
Apr 2011
Posts:
95
Plugin Contributions:
0

Re: Adding text to the shopping cart bar

I found the file that controls that shopping cart bar. It's called tlp_header.php and I found it in /includes/templates/theme376/common. The part that references the shopping cart is:

<!-- ========== SHOPPING CART ========== -->
				<?php 

					if ($_SESSION['cart']->count_contents() == 0) {

						$cart_text = 'now in your cart: <a href="' . zen_href_link(FILENAME_SHOPPING_CART, '', 'NONSSL') . '">' . $_SESSION['cart']->count_contents() . ' items</a>';

					} elseif ($_SESSION['cart']->count_contents() == 1) {

						$cart_text = 'now in your cart: <a href="' . zen_href_link(FILENAME_SHOPPING_CART, '', 'NONSSL') . '">' . $_SESSION['cart']->count_contents() . ' item</a>';

					} else {

						$cart_text = 'now in your cart: <a href="' . zen_href_link(FILENAME_SHOPPING_CART, '', 'NONSSL') . '">' . $_SESSION['cart']->count_contents() . ' items</a>';

					}

				?>

				<span><a href="<?php echo zen_href_link(FILENAME_SHOPPING_CART, '', 'NONSSL'); ?>"><?php echo BOX_HEADING_SHOPPING_CART;?></a>:</span> <?php echo $cart_text ?> 

			<!-- =================================== -->

I have no idea what to enter here.:frusty: