Hello, just a small question. Doing some styling on the template pages can't find these icons pictures of home and login buttons in /* Navigation main */ to replace. The cart icons in images folder though. Where should I look into? Thanks.
Hello, just a small question. Doing some styling on the template pages can't find these icons pictures of home and login buttons in /* Navigation main */ to replace. The cart icons in images folder though. Where should I look into? Thanks.
The template uses Font Awesome icons (Ver 5), not images. These are located in file:-
includes/templates/fluorspar/common/tpl_header.php
<i class="fas fa-home fa-sm" title="Home"></i>
<i class="fas fa-user fa-sm" title="Account"></i>
you will need to replace these lines with something like this:-
<img src="<?php echo $template->get_template_dir('',DIR_WS_TEMPLATE,
$current_page_base,'images').HEADER_ICON_HOME ?>" alt="home icon" class="home-icon" title="Home" />
<img src="<?php echo $template->get_template_dir('',DIR_WS_TEMPLATE,
$current_page_base,'images').HEADER_ICON_LOGIN ?>" alt="login icon" class="login-icon" title="Account" />
Then open file :-
includes/languages/english/fluorspar/header.php
and define your images
// definiitions for header icons
define('HEADER_ICON_HOME', 'Your_file_name.png');
define('HEADER_ICON_LOGIN', 'Your_file_name.png');
Then place your images in :-
includes/templates/fluorspar/images/
Regards, Peejay
https://zenofobe.com
Thank you very much. Got it. Was not even aware the Font Awesome exists. I am not going to replace it for images now though. Looks great and the colors could be changed.
Hi! How can I alter the product page layout? I'd like the left side boxes such as categories and whatever else status is ON not to be shown on product pages, shopping cart, basically anywhere where the categories for instance are not necessary and space can be used more efficiently.
Open file :-
includes/templates/fluorspar/common/tpl_main_page.php
Find this line :-
// the following IF statement can be duplicated/modified as needed to set additional flags
Insert this code below and modify the array to suit your requirements :-
I have modified my demo site as an example. http://www.zenofobe.com/demos/?skin=fluorsparCode:if (in_array($current_page_base,explode(",",'shopping_cart,login,product_info,checkout_shipping,checkout_payment,checkout_confirmation')) ) { $flag_disable_left = true; } if ($this_is_home_page) { $flag_disable_left = true; }
Regards,
Peejay
https://zenofobe.com
Changing core files can be a problem during future upgrades if not meticulously documented. There are so many other options that don't require the modification of a core file.
The first that comes to mind in this instance is the use of a stylesheet to do a display:none where you do not want them to appear. Conversely, when needed again, simply change the stylesheet.
There are specific methods to do this and they are laid out in the CSS_read_me.txt of either the template_default or responsive_classic CSS folder.
Remember that, often what is important for the customer to have, is not considered by the developer/owner. For example, as a customer, I would find it VERY helpful to be able to see other categories I might be interested in shopping for while in the shopping cart.
Last edited by dbltoe; 3 Dec 2019 at 06:21 PM.
A little help with colors.
myZenCartHost.com - Zen Cart Certified, PCI Compatible Hosting by JEANDRET
Free SSL & Domain with semi-annual and longer hosting. Updating 1.5.2 and Up.
dbltoe your comments are always appreciated however your attitude to 'display:none' seems to be a bit fickle, earlier on in this thread you were decrying it's usage and now you are advocating it. https://www.zen-cart.com/showthread....ne#post1359475
Your suggested method of using CSS does require the creation of more CSS files, this has an impact on page rendering (albeit small) and should be avoided.
I do not regard the file 'includes/templates/fluorspar/common/tpl_main_page.php' as a core file as it is part of the Fluorspar template and is therefore an 'override' file.
Modifying these files is part of the 'override system' and is the esscence of the Zen Cart open source project. It would be impossible to design a new template if you were unable to change these files.
Zen Cart v1.5.6c file :- includes/templates/template_default/common/tpl_main_page.php
contains this code :-
This must endorse my method as being acceptable and probably better than creating more CSS files.Code:// the following IF statement can be duplicated/modified as needed to set additional flags if (in_array($current_page_base,explode(",",'list_pages_to_skip_all_right_sideboxes_on_here,separated_by_commas,and_no_spaces')) ) { $flag_disable_right = true; }
Beautiful! I have just changed home page for "false". Exactly what I needed. Thank you.