If this is your first visit, check our documentation. To post, register or login.
Forums / Community Contributed Add-Ons / Addon Templates / Foundation Theme for ZenCart

Foundation Theme for ZenCart

Started by ultimate_zc on 12 Dec 2017, 12:29 AM · Views: 25,153

Results 21 to 37 of 37
7 Jan 2018, 3:18 AM
#21
michaelpattisr avatar

michaelpattisr

New Zenner

Join Date:
Aug 2008
Location:
MEDFORD OREGON
Posts:
17
Plugin Contributions:
0

Foundation Theme for ZenCart

**Hello:
Thanks for the reply. But that did not work.. Changed that and it's still the same.

Also on the Logo on the top of the page, it's showing up as a thumbnail image instead of the full size image?

www.realestatesignstore.com

<img class="large-logo" src="mthumb.php?src=includes/templates/FZCF7211/images/logo.png&zc=2&w=192px&h=64px">

these are the only problems I am having so far... LOL... Still like the theme, but need to get these things fixed A.S.A.P.

Thanks again in Advance for Your Help.....

Michael Patti**

:(

7 Jan 2018, 5:44 AM
#22
carlwhat avatar

carlwhat

zennedOut

Join Date:
Nov 2005
Location:
los angeles
Posts:
2,974
Plugin Contributions:
8

Re: Foundation Theme for ZenCart

i would double check your work with regards to text_description. i did not write the theme, but i have looked it over, and that answer no doubt looks correct.

with regards to your image situation, you can try replacing code as:

//from
                <?php echo '<a href="' . HTTP_SERVER . DIR_WS_CATALOG . '">' . '<img class="large-logo" src="mthumb.php?src=' . DIR_WS_TEMPLATE . 'images/' . HEADER_LOGO_IMAGE . '&zc=2&w=' . HEADER_LOGO_WIDTH . '&h=' . HEADER_LOGO_HEIGHT . '"/>' . '</a>'; ?>

//to
<?php echo '<a  class="large-logo" 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,,' ' ,' ' ,'class="large-logo"') . '</a>'; ?>

i would also look into changing the footer.

best

author of square Webpay, now with Apple Pay and Google Pay.
mXworks
donations: venmo or paypal accepted.
premium consistent excellent support. available for hire.

7 Jan 2018, 7:26 PM
#23
michaelpattisr avatar

michaelpattisr

New Zenner

Join Date:
Aug 2008
Location:
MEDFORD OREGON
Posts:
17
Plugin Contributions:
0

Re: Foundation Theme for ZenCart

Ya, The Footer is next..

But the code you gave me for the image did not work.

if I use the code you gave me the pages do not show at all. ???

Thanks in advance if you can help....

here is the code that I have, my default tpl_header:

<?php /** * Common Template - tpl_header.php * * this file can be copied to /templates/your_template_dir/pagename<br /> * example: to override the privacy page<br /> * make a directory /templates/my_template/privacy<br /> * copy /templates/templates_defaults/common/tpl_footer.php to /templates/my_template/privacy/tpl_header.php<br /> * to override the global settings and turn off the footer un-comment the following line:<br /> * <br /> * $flag_disable_header = true;<br /> * * @package templateSystem * @copyright Copyright 2003-2016 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: Author: DrByte Sat Oct 17 22:01:06 2015 -0400 Modified in v1.5.5 $ */ ?> <?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 zen_output_string_protected(urldecode($_GET['error_message'])); } if (isset($_GET['info_message']) && zen_not_null($_GET['info_message'])) { echo zen_output_string_protected($_GET['info_message']); } ?>
<!--bof-header logo and navigation display-->
<?php if (!isset($flag_disable_header) || !$flag_disable_header) { ?> <header> <div class="title-bar hide-for-large"> <div class="title-bar-left"> <button class="menu-icon" type="button" data-toggle="offCanvas"></button> </div> <?php echo '<a href="' . HTTP_SERVER . DIR_WS_CATALOG . '">' . '<img class="small-logo" src="mthumb.php?src=' . DIR_WS_TEMPLATE . 'images/' . HEADER_LOGO_IMAGE . '&zc=2&w=' . HEADER_SMALL_LOGO_WIDTH . '&h=' . HEADER_SMALL_LOGO_HEIGHT . '"/>' . '</a>'; ?>
<div class="title-bar-right">
    <?php if ($_SESSION['cart']->count_contents() != 0) { ?>
        <a href="<?php echo zen_href_link(FILENAME_SHOPPING_CART, '', 'NONSSL'); ?>"><i class="fi-shopping-cart medium"></i></a>
    <?php } ?>

</div>

</div>

<div class="grid-container">
    <div class="grid-x grid-padding-x">
        <div class="large-6 cell show-for-large"><?php echo '<a href="' . HTTP_SERVER . DIR_WS_CATALOG . '">' . '<img class="large-logo" src="mthumb.php?src=' . DIR_WS_TEMPLATE . 'images/' . HEADER_LOGO_IMAGE . '&zc=2&w=' . HEADER_LOGO_WIDTH . '&h=' . HEADER_LOGO_HEIGHT . '"/>' . '</a>'; ?></div>
        <div class="small-12 medium-10 medium-offset-1 large-4 large-offset-2 cell "><?php require(DIR_WS_MODULES . 'sideboxes/search_header.php'); ?></div>
        <div class="large-12 cell show-for-large">
            <ul class="dropdown menu" data-dropdown-menu>
                <li class="has-submenu is-down-arrow top-list">
                    <a href="#"><?php echo TEXT_NAVBAR_CATEGORIES; ?></a>
                    <?php require($template->get_template_dir('tpl_modules_categories_tabs.php', DIR_WS_TEMPLATE, $current_page_base, 'templates') . '/tpl_modules_categories_tabs.php'); ?>
                </li>
                <?php if ($_SESSION['customer_id']) { ?>
                    <li class="top-list">
                        <a href="<?php echo zen_href_link(FILENAME_LOGOFF, '', 'SSL'); ?>"><?php echo HEADER_TITLE_LOGOFF; ?></a>
                    </li>
                    <li class="top-list">
                        <a href="<?php echo zen_href_link(FILENAME_ACCOUNT, '', 'SSL'); ?>"><?php echo HEADER_TITLE_MY_ACCOUNT; ?></a>
                    </li>
                    <?php
                } else {
                    if (STORE_STATUS == '0') {
                        ?>
                        <li class="top-list">
                            <a href="<?php echo zen_href_link(FILENAME_LOGIN, '', 'SSL'); ?>"><?php echo HEADER_TITLE_LOGIN; ?></a>
                        </li>
                    <?php }
                } ?>

                <?php if ($_SESSION['cart']->count_contents() != 0) { ?>
                    <li class="top-list">
                        <a href="<?php echo zen_href_link(FILENAME_SHOPPING_CART, '', 'NONSSL'); ?>"><?php echo HEADER_TITLE_CART_CONTENTS; ?></a>
                    </li>
                    <li class="top-list">
                        <a href="<?php echo zen_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL'); ?>"><?php echo HEADER_TITLE_CHECKOUT; ?></a>
                    </li>
                <?php } ?>
            </ul>
        </div>
    </div>
</div>
</header> <?php } ?>
7 Jan 2018, 7:28 PM
#24
michaelpattisr avatar

michaelpattisr

New Zenner

Join Date:
Aug 2008
Location:
MEDFORD OREGON
Posts:
17
Plugin Contributions:
0

Re: Foundation Theme for ZenCart

michaelpattisr:

Ya, The Footer is next..

But the code you gave me for the image did not work.

if I use the code you gave me the pages do not show at all. ???

Thanks in advance if you can help....

here is the code that I have, my default tpl_header:

<?php /** * Common Template - tpl_header.php * * this file can be copied to /templates/your_template_dir/pagename<br /> * example: to override the privacy page<br /> * make a directory /templates/my_template/privacy<br /> * copy /templates/templates_defaults/common/tpl_footer.php to /templates/my_template/privacy/tpl_header.php<br /> * to override the global settings and turn off the footer un-comment the following line:<br /> * <br /> * $flag_disable_header = true;<br /> * * @package templateSystem * @copyright Copyright 2003-2016 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: Author: DrByte Sat Oct 17 22:01:06 2015 -0400 Modified in v1.5.5 $ */ ?> <?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 zen_output_string_protected(urldecode($_GET['error_message'])); } if (isset($_GET['info_message']) && zen_not_null($_GET['info_message'])) { echo zen_output_string_protected($_GET['info_message']); } ?>
<!--bof-header logo and navigation display-->
<?php if (!isset($flag_disable_header) || !$flag_disable_header) { ?> <header> <div class="title-bar hide-for-large"> <div class="title-bar-left"> <button class="menu-icon" type="button" data-toggle="offCanvas"></button> </div> <?php echo '<a href="' . HTTP_SERVER . DIR_WS_CATALOG . '">' . '<img class="small-logo" src="mthumb.php?src=' . DIR_WS_TEMPLATE . 'images/' . HEADER_LOGO_IMAGE . '&zc=2&w=' . HEADER_SMALL_LOGO_WIDTH . '&h=' . HEADER_SMALL_LOGO_HEIGHT . '"/>' . '</a>'; ?>
<div class="title-bar-right">
    <?php if ($_SESSION['cart']->count_contents() != 0) { ?>
        <a href="<?php echo zen_href_link(FILENAME_SHOPPING_CART, '', 'NONSSL'); ?>"><i class="fi-shopping-cart medium"></i></a>
    <?php } ?>

</div>

</div>

<div class="grid-container">
    <div class="grid-x grid-padding-x">
        <div class="large-6 cell show-for-large"><?php echo '<a href="' . HTTP_SERVER . DIR_WS_CATALOG . '">' . '<img class="large-logo" src="mthumb.php?src=' . DIR_WS_TEMPLATE . 'images/' . HEADER_LOGO_IMAGE . '&zc=2&w=' . HEADER_LOGO_WIDTH . '&h=' . HEADER_LOGO_HEIGHT . '"/>' . '</a>'; ?></div>
        <div class="small-12 medium-10 medium-offset-1 large-4 large-offset-2 cell "><?php require(DIR_WS_MODULES . 'sideboxes/search_header.php'); ?></div>
        <div class="large-12 cell show-for-large">
            <ul class="dropdown menu" data-dropdown-menu>
                <li class="has-submenu is-down-arrow top-list">
                    <a href="#"><?php echo TEXT_NAVBAR_CATEGORIES; ?></a>
                    <?php require($template->get_template_dir('tpl_modules_categories_tabs.php', DIR_WS_TEMPLATE, $current_page_base, 'templates') . '/tpl_modules_categories_tabs.php'); ?>
                </li>
                <?php if ($_SESSION['customer_id']) { ?>
                    <li class="top-list">
                        <a href="<?php echo zen_href_link(FILENAME_LOGOFF, '', 'SSL'); ?>"><?php echo HEADER_TITLE_LOGOFF; ?></a>
                    </li>
                    <li class="top-list">
                        <a href="<?php echo zen_href_link(FILENAME_ACCOUNT, '', 'SSL'); ?>"><?php echo HEADER_TITLE_MY_ACCOUNT; ?></a>
                    </li>
                    <?php
                } else {
                    if (STORE_STATUS == '0') {
                        ?>
                        <li class="top-list">
                            <a href="<?php echo zen_href_link(FILENAME_LOGIN, '', 'SSL'); ?>"><?php echo HEADER_TITLE_LOGIN; ?></a>
                        </li>
                    <?php }
                } ?>

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

I left header file up with the code you gave me in-case you wanted to look...

7 Jan 2018, 7:43 PM
#25
michaelpattisr avatar

michaelpattisr

New Zenner

Join Date:
Aug 2008
Location:
MEDFORD OREGON
Posts:
17
Plugin Contributions:
0

Re: Foundation Theme for ZenCart

michaelpattisr:

i left header file up with the code you gave me in-case you wanted to look...

thanks again

7 Jan 2018, 8:02 PM
#26
carlwhat avatar

carlwhat

zennedOut

Join Date:
Nov 2005
Location:
los angeles
Posts:
2,974
Plugin Contributions:
8

Re: Foundation Theme for ZenCart

you are now getting a blank page... which most likely indicates a problem with the code....

review:

https://www.zen-cart.com/content.php?124-blank-page

most importantly, look for the log files.... log files are your friend and will indicate what the problems may be...

post the contents of any log files.

best.

author of square Webpay, now with Apple Pay and Google Pay.
mXworks
donations: venmo or paypal accepted.
premium consistent excellent support. available for hire.

7 Jan 2018, 8:31 PM
#27
michaelpattisr avatar

michaelpattisr

New Zenner

Join Date:
Aug 2008
Location:
MEDFORD OREGON
Posts:
17
Plugin Contributions:
0

Re: Foundation Theme for ZenCart

here is the two log errors.

I don't see the ',' in the code..???

[07-Jan-2018 15:16:13 America/Detroit] PHP Parse error: syntax error, unexpected ',' in /home/realsign/public_html/includes/templates/FZCF7211/common/tpl_header.php on line 41

PHP Parse error: syntax error, unexpected ',' in /home/realsign/public_html/includes/templates/FZCF7211/common/tpl_header.php on line 41

7 Jan 2018, 8:56 PM
#28
carlwhat avatar

carlwhat

zennedOut

Join Date:
Nov 2005
Location:
los angeles
Posts:
2,974
Plugin Contributions:
8

Re: Foundation Theme for ZenCart

michael,
it looks like a small mistake in my code. i'm trying to the class into the zen_image function and i have an extra comma after HEADER_ALT_TEXT.

in my post above:

https://www.zen-cart.com/showthread.php?223242-Foundation-Theme-for-ZenCart&p=1340068#post1340068

the line should be:

<?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, ' ', ' ', 'class="large-logo"') . '</a>'; ?>

on line 41, the class="small-logo"

(please copy the code all as one line!)

my apologies.

author of square Webpay, now with Apple Pay and Google Pay.
mXworks
donations: venmo or paypal accepted.
premium consistent excellent support. available for hire.

16 Jan 2018, 12:31 AM
#29
cheddars avatar

cheddars

New Zenner

Join Date:
May 2006
Posts:
39
Plugin Contributions:
0

Re: Foundation Theme for ZenCart

Hi Rick
Did you resolve the categories button problem?
For the categories menu to work on larger screens you need the 'categories tabs menu on/off' option set to 1 in the admin layout settings menu (near the bottom).
Worked for me anyway
Trev

16 Jan 2018, 3:01 PM
#30
rixstix avatar

rixstix

Totally Zenned

Join Date:
Aug 2009
Location:
North Idaho, USA
Posts:
2,015
Plugin Contributions:
0

Re: Foundation Theme for ZenCart

cheddars:

Hi Rick
Did you resolve the categories button problem?
For the categories menu to work on larger screens you need the 'categories tabs menu on/off' option set to 1 in the admin layout settings menu (near the bottom).
Worked for me anyway
Trev

No, I did not but since I am not a coder, I know better than to start mucking around in the code where I have no business.

Rick
RixStix (dot) com
aka: ChainWeavers (dot) com

6 Feb 2018, 3:37 PM
#31
cheddars avatar

cheddars

New Zenner

Join Date:
May 2006
Posts:
39
Plugin Contributions:
0

Re: Foundation Theme for ZenCart

Does this template work ok in PHP 7.1 now?
It's really good in in PHP 6

13 Apr 2018, 9:33 PM
#32
brian70809 avatar

brian70809

New Zenner

Join Date:
Jun 2011
Posts:
85
Plugin Contributions:
0

Re: Foundation Theme for ZenCart

Love the template.. I am using it for this site..

https://www.4horsementackle.com

The only problem I have is when I shrink the page in a responsive way.. the Logo ends up with a white background... I have searched all over the css.. used inspector... I cannot figure out the fix!

any help would be appreciated.

Brian

14 Apr 2018, 3:38 PM
#33
barco57 avatar

barco57

Totally Zenned

Join Date:
Apr 2006
Location:
West Salem, IL
Posts:
2,846
Plugin Contributions:
0

Re: Foundation Theme for ZenCart

it doesn't appear to be in the css.

http://4horsementackle.com/mthumb.php?src=includes/templates/FZCF7211/images/logo.png&zc=2&w=105px&h=35px

That is the link to logo when in the small viewport. So when the logo.png is processed by the mthumb.php it is the resulting image that ends up being produced that has white sides on it. How to resolve that I do not know as I haven't worked with this template, but that should get you pointed in the right direction.

Mike
AEIIA - Zen Cart Certified & PCI Compliant Hosting
The Zen Cart Forum...Better than a monitor covered with post-it notes!

15 Apr 2018, 2:36 PM
#34
carlwhat avatar

carlwhat

zennedOut

Join Date:
Nov 2005
Location:
los angeles
Posts:
2,974
Plugin Contributions:
8

Re: Foundation Theme for ZenCart

barco57:

it doesn't appear to be in the css.

http://4horsementackle.com/mthumb.php?src=includes/templates/FZCF7211/images/logo.png&zc=2&w=105px&h=35px

> 
> That is the link to logo when in the small viewport. So when the logo.png is processed by the mthumb.php it is the resulting image that ends up being produced that has white sides on it.  How to resolve that I do not know as I haven't worked with this template, but that should get you pointed in the right direction.

when i looked at this yesterday, i noticed that.  however it looked like the large viewport was using the same image.  today when i look at it, the large viewport uses a different image.  maybe yesterday, i did not have enough coffee!

so @barco57 is correct.  its is not the template that is causing the problem.  it is the image.  you can either modify the image to eliminate the white sides, or modify the template to use the same image as the large viewport, but resize it.

the large image is at:

http://4horsementackle.com/mthumb.php?src=includes/templates/FZCF7211/images/logo.png&zc=2&w=296px&h=150px


best.

author of square Webpay, now with Apple Pay and Google Pay.
mXworks
donations: venmo or paypal accepted.
premium consistent excellent support. available for hire.

16 Apr 2018, 10:56 PM
#35
brian70809 avatar

brian70809

New Zenner

Join Date:
Jun 2011
Posts:
85
Plugin Contributions:
0

Re: Foundation Theme for ZenCart

Hmm.. well it is using the same image because I only have one logo.png... It's getting resized by that php program.. so I will look into that and report back!

Brian

16 Apr 2018, 11:40 PM
#36
brian70809 avatar

brian70809

New Zenner

Join Date:
Jun 2011
Posts:
85
Plugin Contributions:
0

Re: Foundation Theme for ZenCart

Well.. You pointed me the right direction with the mthumb.php

This is an image resizing tool. and in there is a background color option or transparent pass thru. I just changed it from white to black and voila.. fixed.

It was FFFFF and I changed it to OaOaOa... I am not sure why it was not taking the background from the CSS file.. but it is what it is.

if (!defined('DEFAULT_CC')) {
	/**
	 * Default canvas colour. Allows override in mthumb-config.php
	 */
	define('DEFAULT_CC', '0a0a0a');
}

I did do the override in the config as it said.. I just cut and pasted it from what I was working on.

24 Oct 2018, 6:38 PM
#37
carlwhat avatar

carlwhat

zennedOut

Join Date:
Nov 2005
Location:
los angeles
Posts:
2,974
Plugin Contributions:
8

Re: Foundation Theme for ZenCart

@lat9 mentioned this somewhere above with regards to the functions; however the template:

tpl_login.php

is wrong.

                           <label for="login-email-address"><?php echo ENTRY_EMAIL_ADDRESS; ?>
                                <?php echo foundation_password_field('email_address', '', 'size="18" id="login-email-address" autofocus placeholder="' . ENTRY_EMAIL_ADDRESS . '"' . ((int)ENTRY_EMAIL_ADDRESS_MIN_LENGTH > 0 ? ' required' : ''), 'email'); ?>
                            </label>

//should be:

                          <label for="login-email-address"><?php echo ENTRY_EMAIL_ADDRESS; ?>
                                <?php echo foundation_email_field('email_address', '', 'size="18" id="login-email-address" autofocus placeholder="' . ENTRY_EMAIL_ADDRESS . '"' . ((int)ENTRY_EMAIL_ADDRESS_MIN_LENGTH > 0 ? ' required' : ''), 'email'); ?>
                            </label>

that's in 2 different places in the code.

author of square Webpay, now with Apple Pay and Google Pay.
mXworks
donations: venmo or paypal accepted.
premium consistent excellent support. available for hire.