Hi, there's no VIEW CART link in my store when I add something to cart, how do i make it appear next to Checkout
or link '2 item(s) in cart' or something like that? thank you!
Hi, there's no VIEW CART link in my store when I add something to cart, how do i make it appear next to Checkout
or link '2 item(s) in cart' or something like that? thank you!
If the customer is logged in, a link to the cart does appear in the header. You might also add this:
http://www.zen-cart.com/downloads.php?do=file&id=336
It doesn't appear in the header, thats my issue
We'll need a link to the site, then.
here you go
http://www.josephfilippiwinery.com/store/
thank you!
where can I link where it says
2 item(s) in cart - 9.99?
either that or View Cart, But i think it would be better to link it.
That display is unique to your custom template.
The original Zen Cart template simply outputs a link to the Shopping Cart page, saying "Shopping Cart", which links to YOUR_SITE.com/index.php?main_page=shopping_cart
You can find the original code in the original tpl_header.php file. You'll need to put similar code into your custom tpl_header.php file
.
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.
Here's my custom header file. I don't know where to put the code, i have little php knowdlege.
PHP Code:
<?php
/**
* Template designed by 12leaves.com
* 12leaves.com - Free ecommerce templates and design services
*
* Common Template
*
* @package languageDefines
* @copyright Copyright 2009-2010 12leaves.com
* @copyright Copyright 2003-2006 Zen Cart Development Team
* @copyright Portions Copyright 2003 osCommerce
* @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
* @version $Id: tpl_header.php 4813 2006-10-23 02:13:53Z drbyte $
*/
function fn_print_r()
{
static $count = 0;
$args = func_get_args();
if (!empty($args)) {
echo "<div align='left' style='font-family: Courier; font-size: 13px;'><pre>";
foreach($args as $k => $v){
echo "<b>Debug [$k/$count]:</b>";
@ob_start();
print_r($v);
$bdata = @ob_get_contents()."\n";
@ob_end_clean();
echo htmlspecialchars($bdata);
}
echo "</pre></div>";
}
$count++;
}
?>
<?php
// Display all header alerts via messageStack:
if ($messageStack->size('header') > 0) {
echo $messageStack->output('header');
}
if (isset($_GET['error_message']) && zen_not_null($_GET['error_message'])) {
echo htmlspecialchars(urldecode($_GET['error_message']));
}
if (isset($_GET['info_message']) && zen_not_null($_GET['info_message'])) {
echo htmlspecialchars($_GET['info_message']);
} else {
}
// test if box should display
$show_languages= true;
if ($show_languages == true) {
if (!isset($lng) || (isset($lng) && !is_object($lng))) {
$lng = new language;
}
reset($lng->catalog_languages);
$languages_array = array();
$current_language = '';
while (list($key, $value) = each($lng->catalog_languages)) {
$languages_array_popup[$key] = $value['name'];
}
foreach ($languages_array_popup as $k => $v){
if ($k == $_SESSION['languages_code']) {
$current_language = $v;
}
}
}
?>
<!--bof-header logo and navigation display-->
<?php
if (!isset($flag_disable_header) || !$flag_disable_header) {
?>
<div id="headerWrapper">
<div class="center-upper-bg centered-wrapper"></div>
<div class="body-bg">
<div class="header_wrapper">
<div class="header-tools">
<!--bof-branding display-->
<div id="logoWrapper"><div id="logo"><?php echo '<a href="' . HTTP_SERVER . DIR_WS_CATALOG . '">' . zen_image($template->get_template_dir(HEADER_LOGO_IMAGE, DIR_WS_TEMPLATE, $current_page_base,'images'). '/' . HEADER_LOGO_IMAGE, HEADER_ALT_TEXT) . '</a>';?></div>
</div>
<div class="float-right">
<!--bof-header ezpage links-->
<div class="topper-menu float-right">
<?php if (EZPAGES_STATUS_HEADER == '1' or (EZPAGES_STATUS_HEADER == '2' and (strstr(EXCLUDE_ADMIN_IP_FOR_MAINTENANCE, $_SERVER['REMOTE_ADDR'])))) { ?>
<?php require($template->get_template_dir('tpl_ezpages_bar_header.php',DIR_WS_TEMPLATE, $current_page_base,'templates'). '/tpl_ezpages_bar_header.php'); ?>
<?php } ?>
</div>
<!--eof-header ezpage links-->
<div class="clearBoth"></div>
<div id="login_logout_section" class="float-right">
<!--login-->
<?php if ($_SESSION['customer_id']) { ?>
<?php echo(TOP_MENU_HELLO);?><a href="<?php echo zen_href_link(FILENAME_ACCOUNT, '', 'SSL'); ?>"><?php echo ($_SESSION['customer_first_name'].' '.$_SESSION['customer_last_name']);?></a>
<span> | </span>
<a href="<?php echo zen_href_link(FILENAME_LOGOFF, '', 'SSL'); ?>"><?php echo HEADER_TITLE_LOGOFF; ?></a>
<?php
} else {
if (STORE_STATUS == '0') {
?>
<?php echo LOGIN_WELCOME; ?>
<a href="<?php echo zen_href_link(FILENAME_LOGIN, '', 'SSL'); ?>"><?php echo HEADER_TITLE_LOGIN; ?></a>
<span> or </span>
<?php echo REGISTER_WELCOME; ?>
<span><a href="<?php echo zen_href_link(FILENAME_CREATE_ACCOUNT, '', 'SSL'); ?>"><?php echo HEADER_TITLE_REGISTER; ?></a></span>
<?php } } ?>
<!--/login-->
</div>
<div align="right" class="cart-header-wrapper">
<!-- header cart section -->
<table align="right" class="align-center cart-header">
<tr>
<td>
<div class="hidden cart-dropdown-wrapper">
<div class="cart-tab-wrapper"><img src="<?php echo $template->get_template_dir('', DIR_WS_TEMPLATE, $current_page_base,'images')?>/spacer.gif" width="1" height="1" alt="" /></div>
</div>
</td>
<td>
<?php require($template->get_template_dir('tpl_shopping_cart_header.php',DIR_WS_TEMPLATE, $current_page_base,'templates'). '/tpl_shopping_cart_header.php');
echo $content;?>
</td>
</tr>
</table>
</div>
</div>
<div class="clearBoth"></div>
<div class="main_menu_panel">
<?php require($template->get_template_dir('tpl_top_nav.php',DIR_WS_TEMPLATE, $current_page_base,'templates'). '/tpl_top_nav.php'); ?>
<!--search-->
<div class="search-header">
<?php require($template->get_template_dir('tpl_search_header.php',DIR_WS_TEMPLATE, $current_page_base,'templates'). '/tpl_search_header.php');?>
<!-- <div class="advanced_search float-left">
<a href="index.php?main_page=advanced_search"><?php/* echo HEADER_ADVANCED_SEARCH;*/ ?></a>
</div>-->
</div>
<!--/search-->
</div>
<!--eof-branding display-->
</div>
<!--bof-optional categories tabs navigation display-->
<?php
if (CATEGORIES_TABS_STATUS == '1') {
require($template->get_template_dir('tpl_modules_categories_tabs.php',DIR_WS_TEMPLATE, $current_page_base,'templates'). '/tpl_modules_categories_tabs.php');
} ?>
<!--eof-optional categories tabs navigation display-->
<!--bof-banner #1 display -->
<?php
if ($this_is_home_page) {
if (SHOW_BANNERS_GROUP_SET1 != '' && $banner = zen_banner_exists('dynamic', SHOW_BANNERS_GROUP_SET1)) {
if ($banner->RecordCount() > 0) {
?>
<div id="bannerOne" class="banners"><?php echo zen_display_banner('static', $banner); ?></div>
<?php
}
}
}
?>
<!--eof-banner #1 display -->
</div>
</div>
</div>
<?php } ?>
<!--eof-header logo and navigation display-->
no one?
Usually when someone gets no reply to a post it means that others have either not understood the question because there's not enough information presented and they just ignored it and moved on (because who wants to always be posting saying "I don't understand you"?), or the poster is just expecting everyone else to give the answers so they don't have to do any work themselves, or the overall topic is too complex to be interesting and worth others' investment of time ... or could be a number of other factors.
So, to combat some of those possible scenarios, the forum-posting-guidelines give a number of suggestions on how to get better responses ... by posting better questions.
And when it comes to the point where you feel you need to "bump" your post, as you just did, the guidelines also encourage you to actually give some information about what you've tried since you last posted, in addition to adding more clarifying information.
So, here's my take on the problem you've presented, and the thinking process I would follow to get to a solution, which I also present below:
a) you want to turn some custom code into something else
b) you're not sure where to do it
c) but you've been given a bit of guidance and at least have the right starting point, ie: your template's tpl_header.php
d) You said you want to change the "shopping cart" text in the header to make it a clickable link
e) So, since it's "shopping cart" text that needs changing, I would start by searching that header file for "shopping cart" or some form of it, like "shopping_cart" or just "cart"
f) A very simple visual scan of the text in the tpl_header.php file you quoted quickly draws my eye to this section of code:g) Looking at it in more detail, I see that there's a PHP reference to tpl_shopping_cart_header.php, followed by an echo $content; statement. And all of that is stuffed inside a table cell.Code:<!-- header cart section --> <table align="right" class="align-center cart-header"> <tr> <td> <div class="hidden cart-dropdown-wrapper"> <div class="cart-tab-wrapper"><img src="<?php echo $template->get_template_dir('', DIR_WS_TEMPLATE, $current_page_base,'images')?>/spacer.gif" width="1" height="1" alt="" /></div> </div> </td> <td> <?php require($template->get_template_dir('tpl_shopping_cart_header.php',DIR_WS_TEMPLATE, $current_page_base,'templates'). '/tpl_shopping_cart_header.php'); echo $content;?> </td> </tr> </table>
h) Now, there are three possibilities here:
-- 1. You might follow the code and go look at tpl_shopping_cart_header.php and change its code to output an <A HREF....> tag as part of its $content output.
-- 2. You might stay in the tpl_header.php file and try to wrap an <a href> around the echo statement inside the PHP code.
-- 3. or, the best option, you could keep it VERY simple and simply touch up the HTML that's going on right there in this same section of tpl_header.php, by wrapping the A HREF tag around the output like this:
Hopefully the simple walkthru of the thinking process is helpful.Code:<td><a href="index.php?main_page=shopping_cart"> <?php require($template->get_template_dir('tpl_shopping_cart_header.php',DIR_WS_TEMPLATE, $current_page_base,'templates'). '/tpl_shopping_cart_header.php'); echo $content;?></a> </td>
.
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.
Bookmarks