Zen Cart Logo

Template Fluorspar

Views: 135,977

Results 41 to 60 of 298
16 Aug 2020, 11:26 PM
#41
swguy avatar

swguy

Administrator

Join Date:
Feb 2006
Location:
Tampa Bay, Florida
Posts:
10,687
Plugin Contributions:
56

Template Fluorspar

hookedondecals:

How do you change the 3 x images on the home page (the women)?
I replaced them with 3 of my own (named the same and saved the same file type), placed in the same spots and still nothing is changing.

Remember that when you do this, your browser may show you the cached images. Two options:

a) Use new filenames

b) Learn to clear cache quickly in your browser.

If you don't know how to do (b), a web search for "How to clear cache in name-of-my-browser" should yield some suggestions.

18 Aug 2020, 11:36 AM
#42
peejay avatar

peejay

New Zenner

Join Date:
Aug 2018
Location:
Cardiff
Posts:
23
Plugin Contributions:
0

Re: Template Fluorspar

Seems that when modules Gift Certificates and Discount Coupons are uninstalled definitions MODULE_ORDER_TOTAL_GV_STATUS and MODULE_ORDER_TOTAL_COUPON_STATUS no longer exist. Have tried ZC 1.5.7 and problem still persists. These values are used in the mega menu and mobile menu to decide whether to display the links or not.

18 Aug 2020, 11:59 AM
#43
swguy avatar

swguy

Administrator

Join Date:
Feb 2006
Location:
Tampa Bay, Florida
Posts:
10,687
Plugin Contributions:
56

Re: Template Fluorspar

peejay:

Seems that when modules Gift Certificates and Discount Coupons are uninstalled definitions MODULE_ORDER_TOTAL_GV_STATUS and MODULE_ORDER_TOTAL_COUPON_STATUS no longer exist.

This is correct. You should always check

if (defined('MODULE_ORDER_TOTAL_GV_STATUS')) { ...

if (defined('MODULE_ORDER_TOTAL_COUPON_STATUS')) { ...

before using these values.

In PHP 5.6, it was ok to skip checking them, but not with PHP 7+! You will see the core code in Zen Cart 1.5.7 always checks these values before using them.

26 Aug 2020, 11:23 AM
#44
pixelpadre avatar

pixelpadre

Suspended

Join Date:
Jun 2007
Location:
Eustis, Florida, USA, EARTH
Posts:
868
Plugin Contributions:
0

Re: Template Fluorspar

PHP Warning: sizeof(): Parameter must be an array or an object that implements Countable in /home/scanmyid/public_html/352processserver.com/includes/templates/fluorspar/common/tpl_mega_menu.php on line 110

27 Aug 2020, 11:18 AM
#45
peejay avatar

peejay

New Zenner

Join Date:
Aug 2018
Location:
Cardiff
Posts:
23
Plugin Contributions:
0

Re: Template Fluorspar

pixelpadre:

PHP Warning: sizeof(): Parameter must be an array or an object that implements Countable in /home/scanmyid/public_html/352processserver.com/includes/templates/fluorspar/common/tpl_mega_menu.php on line 110

This warning occurs if you don't have any manufacturers on your database or you don't have a product associated with a manufacturer.

This is a fix, open file :- includes/templates/fluorspar/common/tpl_mega_menu.php

Delete these lines from 59 to 123

<li class="manufacturers-li"><a class="drop" href="#"><?php echo HEADER_TITLE_MANUFACTURERS; ?></a><!--bof shop by brand   -->
<div class="dropdown_1column">
<div class="col_1 firstcolumn">
<ul >
<?php

$show_manufacturers= true;
// for large lists of manufacturers uncomment this section
/*
  if (($_GET['main_page']==FILENAME_DEFAULT and ($_GET['cPath'] == '' or $_GET['cPath'] == 0)) or  ($request_type == 'SSL')) {
    $show_manufacturers= false;
  } else {
    $show_manufacturers= true;
  }
*/
// Set to true to display manufacturers images in place of names
define('DISPLAY_MANUFACTURERS_IMAGES',true);
if ($show_manufacturers) {
// only check products if requested - this may slow down the processing of the manufacturers sidebox
  if (PRODUCTS_MANUFACTURERS_STATUS == '1') {
    $manufacturer_sidebox_query = "select distinct m.manufacturers_id, m.manufacturers_name, m.manufacturers_image
                            from " . TABLE_MANUFACTURERS . " m
                            left join " . TABLE_PRODUCTS . " p on m.manufacturers_id = p.manufacturers_id
                            where m.manufacturers_id = p.manufacturers_id and p.products_status= 1
                            order by manufacturers_name";
  } else {
    $manufacturer_sidebox_query = "select m.manufacturers_id, m.manufacturers_name, m.manufacturers_image
                            from " . TABLE_MANUFACTURERS . " m
                            order by manufacturers_name";
  }
  $manufacturer_sidebox = $db->Execute($manufacturer_sidebox_query);
  if ($manufacturer_sidebox->RecordCount()>0) {
    $number_of_rows = $manufacturer_sidebox->RecordCount()+1;
// Display a list
    $manufacturer_sidebox_array = array();
//  kuroi: commented out to avoid starting list with text scrolling list entries such as "reset" and "please select"
//    if (!isset($_GET['manufacturers_id']) || $_GET['manufacturers_id'] == '' ) {
//      $manufacturer_sidebox_array[] = array('id' => '', 'text' => PULL_DOWN_ALL);
//    } else {
//      $manufacturer_sidebox_array[] = array('id' => '', 'text' => PULL_DOWN_MANUFACTURERS);
//    }
    while (!$manufacturer_sidebox->EOF) {
      $manufacturer_sidebox_name = ((strlen($manufacturer_sidebox->fields['manufacturers_name']) > MAX_DISPLAY_MANUFACTURER_NAME_LEN) ? substr($manufacturer_sidebox->fields['manufacturers_name'], 0, MAX_DISPLAY_MANUFACTURER_NAME_LEN) . '..' : $manufacturer_sidebox->fields['manufacturers_name']);
   $manufacturer_sidebox_image = $manufacturer_sidebox->fields['manufacturers_image'];
      $manufacturer_sidebox_array[] =
  array('id' => $manufacturer_sidebox->fields['manufacturers_id'],
     'text' => DISPLAY_MANUFACTURERS_IMAGES ?
    zen_image(DIR_WS_IMAGES . $manufacturer_sidebox_image, $manufacturer_sidebox_name) :
    $manufacturer_sidebox_name);
      $manufacturer_sidebox->MoveNext();
    }
  }
} // $show_manufacturers
    for ($i=0;$i<sizeof($manufacturer_sidebox_array);$i++) {
      $content = '';
   $content .= '<li ><a class="hide" href="' . zen_href_link(FILENAME_DEFAULT, 'manufacturers_id=' . $manufacturer_sidebox_array[$i]['id']) . '">';
      $content .= $manufacturer_sidebox_array[$i]['text'];
      $content .= '</a></li>' . "\n";
      echo $content;
 }
?>
      </ul>
  </div>
            </div>
        </li><!-- eof shop by brand    -->

And replace with this code :-

<?php
 $manufacturer_sidebox_query = "select m.manufacturers_id 
                            from " . TABLE_MANUFACTURERS . " m
                            order by manufacturers_name";
   $manufacturer_sidebox = $db->Execute($manufacturer_sidebox_query);
  if ($manufacturer_sidebox->RecordCount()>0) {
?>
<li class="manufacturers-li"><a class="drop" href="#"><?php echo HEADER_TITLE_MANUFACTURERS; ?></a><!--bof shop by brand   -->
<div class="dropdown_1column">
<div class="col_1 firstcolumn">
<ul >
<?php

$show_manufacturers= true;
// for large lists of manufacturers uncomment this section
/*
  if (($_GET['main_page']==FILENAME_DEFAULT and ($_GET['cPath'] == '' or $_GET['cPath'] == 0)) or  ($request_type == 'SSL')) {
    $show_manufacturers= false;
  } else {
    $show_manufacturers= true;
  }
*/
// Set to true to display manufacturers images in place of names
define('DISPLAY_MANUFACTURERS_IMAGES',true);
if ($show_manufacturers) {
// only check products if requested - this may slow down the processing of the manufacturers sidebox
  if (PRODUCTS_MANUFACTURERS_STATUS == '1') {
    $manufacturer_sidebox_query = "select distinct m.manufacturers_id, m.manufacturers_name, m.manufacturers_image
                            from " . TABLE_MANUFACTURERS . " m
                            left join " . TABLE_PRODUCTS . " p on m.manufacturers_id = p.manufacturers_id
                            where m.manufacturers_id = p.manufacturers_id and p.products_status= 1
                            order by manufacturers_name";
  } else {
    $manufacturer_sidebox_query = "select m.manufacturers_id, m.manufacturers_name, m.manufacturers_image
                            from " . TABLE_MANUFACTURERS . " m
                            order by manufacturers_name";
  }
  $manufacturer_sidebox = $db->Execute($manufacturer_sidebox_query);
  if ($manufacturer_sidebox->RecordCount()>0) {
    $number_of_rows = $manufacturer_sidebox->RecordCount()+1;
// Display a list
    $manufacturer_sidebox_array = array();
//  kuroi: commented out to avoid starting list with text scrolling list entries such as "reset" and "please select"
//    if (!isset($_GET['manufacturers_id']) || $_GET['manufacturers_id'] == '' ) {
//      $manufacturer_sidebox_array[] = array('id' => '', 'text' => PULL_DOWN_ALL);
//    } else {
//      $manufacturer_sidebox_array[] = array('id' => '', 'text' => PULL_DOWN_MANUFACTURERS);
//    }
    while (!$manufacturer_sidebox->EOF) {
      $manufacturer_sidebox_name = ((strlen($manufacturer_sidebox->fields['manufacturers_name']) > MAX_DISPLAY_MANUFACTURER_NAME_LEN) ? substr($manufacturer_sidebox->fields['manufacturers_name'], 0, MAX_DISPLAY_MANUFACTURER_NAME_LEN) . '..' : $manufacturer_sidebox->fields['manufacturers_name']);
   $manufacturer_sidebox_image = $manufacturer_sidebox->fields['manufacturers_image'];
      $manufacturer_sidebox_array[] =
  array('id' => $manufacturer_sidebox->fields['manufacturers_id'],
     'text' => DISPLAY_MANUFACTURERS_IMAGES ?
    zen_image(DIR_WS_IMAGES . $manufacturer_sidebox_image, $manufacturer_sidebox_name) :
    $manufacturer_sidebox_name);
      $manufacturer_sidebox->MoveNext();
    }
  }
} // $show_manufacturers

  if(!empty($manufacturer_sidebox_array)) {
    for ($i=0;$i<sizeof($manufacturer_sidebox_array);$i++) {
      $content = '';
   $content .= '<li ><a class="hide" href="' . zen_href_link(FILENAME_DEFAULT, 'manufacturers_id=' . $manufacturer_sidebox_array[$i]['id']) . '">';
      $content .= $manufacturer_sidebox_array[$i]['text'];
      $content .= '</a></li>' . "\n";
      echo $content;
     }
 }
?>
      </ul>
  </div>
            </div>
        </li><!-- eof shop by brand    -->
<?php
 }
?>

Regards,

Peejay https://www.zenofobe.com

27 Aug 2020, 2:00 PM
#46
pixelpadre avatar

pixelpadre

Suspended

Join Date:
Jun 2007
Location:
Eustis, Florida, USA, EARTH
Posts:
868
Plugin Contributions:
0

Re: Template Fluorspar

Couple of things before I make those changes.

First: My file is different than yours..(and I might be the reason)

<!--<li class="manufacturers-li"><a class="drop" href="#"><?php echo HEADER_TITLE_MANUFACTURERS; ?></a><!--bof shop by brand --> <div class="dropdown_1column"> <div class="col_1 firstcolumn"> <ul >-->

Second: You added } to the last line when it wasnt there before.

27 Aug 2020, 4:13 PM
#47
peejay avatar

peejay

New Zenner

Join Date:
Aug 2018
Location:
Cardiff
Posts:
23
Plugin Contributions:
0

Re: Template Fluorspar

pixelpadre:

Couple of things before I make those changes.

First: My file is different than yours..(and I might be the reason)

<!--<li class="manufacturers-li"><a class="drop" href="#"><?php echo HEADER_TITLE_MANUFACTURERS; ?></a><!--bof shop by brand --> <div class="dropdown_1column"> <div class="col_1 firstcolumn"> <ul >-->

Second: You added } to the last line when it wasnt there before.

It looks like you have already edited the file so that the manufacturers item does not display but you have left the rest of the code to execute.

All I am saying is to delete ALL THE CODE that refers to the manufacturers menu item.

Another way to explain is to delete everthing BETWEEN these two lines :-

</li><!-- eof quick links -->

[B]DELETE EVERTHING BETWEEN THESE TWO LINES !!!!!!!!!!!!!!![/B]

<li class="information-li fullwidth"><a class="drop" href="#"><?php echo HEADER_TITLE_INFORMATION; ?></a><!-- bof information -->

No need to replace it with the new code if you** NEVER** want to display manufacturers.

However if you do replace it with the new code, the manufacturers menu item will only display if you have at least one manufacturer on the database.

Lost the will to live!

Regards,
Peejay https://www.zenofobe.com

21 Sep 2020, 7:03 PM
#48
rescue_hog avatar

rescue_hog

New Zenner

Join Date:
Sep 2020
Location:
Poole, Dorset
Posts:
2
Plugin Contributions:
0

Re: Template Fluorspar

Hi, I am a noob to zen cart, in fact to e-commerce. I have set up a small store for a UK registered charity and have a few things I'd like to change on this template if possible.

I have zen v1.5.7.

I would like to know if it is possible to remove the 'Brands' tab from the Mega Menu display, and if so, how do I do it.

Thanks in advance, Jim.

23 Sep 2020, 10:06 AM
#49
peejay avatar

peejay

New Zenner

Join Date:
Aug 2018
Location:
Cardiff
Posts:
23
Plugin Contributions:
0

Re: Template Fluorspar

Rescue Hog:

Hi, I am a noob to zen cart, in fact to e-commerce. I have set up a small store for a UK registered charity and have a few things I'd like to change on this template if possible.

I have zen v1.5.7.

I would like to know if it is possible to remove the 'Brands' tab from the Mega Menu display, and if so, how do I do it.

Thanks in advance, Jim.

Hi Jim,

if you scroll up you will see an explanation of how to remove the brands menu item from the mega menu.

Open file :- includes/templates/fluorspar/common/tpl_mega_menu.php

then remove the code that refers to manufacturers.

I have fixed this issue in Fluorspar version 1.5 so that it only displays this item when you have at least on manufacturer on the database.

I hope to submit version 1.5 soon.

Regards,
Peejay
http://www.zenofobe.com

23 Sep 2020, 12:27 PM
#50
rescue_hog avatar

rescue_hog

New Zenner

Join Date:
Sep 2020
Location:
Poole, Dorset
Posts:
2
Plugin Contributions:
0

Re: Template Fluorspar

Thanks @peejay I will have a look.

7 Nov 2020, 1:25 PM
#51
g2ktcf avatar

g2ktcf

Totally Zenned

Join Date:
Feb 2011
Location:
Lumberton, TX
Posts:
636
Plugin Contributions:
0

Re: Template Fluorspar

Good Morning! I am getting a warning in my log files for Fluorspar. PHP 7.4.11, ZC 15.7a, IH5.

[07-Nov-2020 13:15:25 UTC] Request URI: /WLC_Artistry_Design/index.php?main_page=product_info&cPath=22&products_id=34, IP address: 168.235.167.202
#1  header() called at [/home/radianv2/public_html/WLC_Artistry_Design/includes/templates/fluorspar/common/html_header.php:16]
#2  require(/home/radianv2/public_html/WLC_Artistry_Design/includes/templates/fluorspar/common/html_header.php) called at [/home/radianv2/public_html/WLC_Artistry_Design/index.php:42]
--> PHP Warning: Cannot modify header information - headers already sent by (output started at /home/radianv2/public_html/WLC_Artistry_Design/includes/languages/english/extra_definitions/fluorspar/extras.php:1) in /home/radianv2/public_html/WLC_Artistry_Design/includes/templates/fluorspar/common/html_header.php on line 16.
7 Nov 2020, 2:15 PM
#52
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,067
Plugin Contributions:
56

Re: Template Fluorspar

g2ktcf:

Good Morning! I am getting a warning in my log files for Fluorspar. PHP 7.4.11, ZC 15.7a, IH5.

[07-Nov-2020 13:15:25 UTC] Request URI: /WLC_Artistry_Design/index.php?main_page=product_info&cPath=22&products_id=34, IP address: 168.235.167.202
#1 header() called at [/home/radianv2/public_html/WLC_Artistry_Design/includes/templates/fluorspar/common/html_header.php:16]
#2 require(/home/radianv2/public_html/WLC_Artistry_Design/includes/templates/fluorspar/common/html_header.php) called at [/home/radianv2/public_html/WLC_Artistry_Design/index.php:42]
--> PHP Warning: Cannot modify header information - headers already sent by (output started at /home/radianv2/public_html/WLC_Artistry_Design/includes/languages/english/extra_definitions/fluorspar/extras.php:1) in /home/radianv2/public_html/WLC_Artistry_Design/includes/templates/fluorspar/common/html_header.php on line 16.

Based on that log, check the file /includes/languages/english/extra_definitions/fluorspar/extras.php.  

I'm guessing that the file has a **?>** at the end, followed by a blank line.  If that's the case, just remove that **?>**, leaving the ending blank line.

Related: 
<https://docs.zen-cart.com/user/troubleshooting/warning_headers_already_sent/>
<https://docs.zen-cart.com/user/miscellaneous/missing_close_php/>
8 Nov 2020, 6:56 PM
#53
g2ktcf avatar

g2ktcf

Totally Zenned

Join Date:
Feb 2011
Location:
Lumberton, TX
Posts:
636
Plugin Contributions:
0

Re: Template Fluorspar

that's not it. :( There is a php line with a comment inside it at the end of the file. I went ahead and dropped the ?> but it made no difference.

8 Nov 2020, 9:29 PM
#54
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
177

Re: Template Fluorspar

No, you're misreading the error message.
It says the problem is on line 1 of the file.

g2ktcf:

PHP Warning: Cannot modify header information - headers already sent by (output started at .../includes/languages/english/extra_definitions/fluorspar/extras.php:1) ...

Perhaps your text editor has added a blank line at the top, or has set an invalid BOM (Byte Order Mark).

Might be easiest to just recreate the file. Not by a complete copy-paste of the original, but by recreating its contents.
You could even start by just deleting the file, although I'm sure it contains definitions that the template depends upon, so you will need to recreate what is needed.

10 Nov 2020, 4:28 PM
#55
g2ktcf avatar

g2ktcf

Totally Zenned

Join Date:
Feb 2011
Location:
Lumberton, TX
Posts:
636
Plugin Contributions:
0

Re: Template Fluorspar

DrByte:

No, you're misreading the error message.
It says the problem is on line 1 of the file.

g2ktcf:

PHP Warning: Cannot modify header information - headers already sent by (output started at .../includes/languages/english/extra_definitions/fluorspar/extras.php:1) ...

Perhaps your text editor has added a blank line at the top, or has set an invalid BOM (Byte Order Mark).

Might be easiest to just recreate the file. Not by a complete copy-paste of the original, but by recreating its contents.
You could even start by just deleting the file, although I'm sure it contains definitions that the template depends upon, so you will need to recreate what is needed.

Dr Byte, you comment about "recreating" may be a bit over my head. These are all standard ZC 1.5.7a files with the Flourspar template loaded. PHP 7.4.11. I have not created any of the subject files. Please forgive my ignorance.

To add to this, I have found another blank page issue...I happens at the end of creating an account, logging in or logging out. The actions do go through as I can refresh and the account was created, then I was logged in and back and forth. This sounds like the ?> issue but I am not sure what file it would be in.

10 Nov 2020, 5:18 PM
#56
g2ktcf avatar

g2ktcf

Totally Zenned

Join Date:
Feb 2011
Location:
Lumberton, TX
Posts:
636
Plugin Contributions:
0

Re: Template Fluorspar

:( the checkout button is going to a blank page as well. I did tweak a few text items in one file. I have restored those files to the original ones and the problems is still there.

10 Nov 2020, 5:23 PM
#57
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
177

Re: Template Fluorspar

By "recreate the file", I meant: read the original file with your eyes, and type its content (with your hands) into a new file of the same name, created afresh for this purpose. The idea being to attempt to eliminate a problem inside the original file by creating it clean as a new file. A simple text-editor is all one needs to do that.

Blank pages are a result of a server-side error. The details of the error are in the server's logs.
See https://docs.zen-cart.com/user/troubleshooting/blank_page/

10 Nov 2020, 6:36 PM
#58
g2ktcf avatar

g2ktcf

Totally Zenned

Join Date:
Feb 2011
Location:
Lumberton, TX
Posts:
636
Plugin Contributions:
0

Re: Template Fluorspar

Guys, I am going to start a new thread over in the Linux Installation Forum on my above issues/ I thought this was due to templates and changes. However a fresh install of everything says otherwise as I am still having issues.

Thanks
Chris

11 Nov 2020, 2:26 AM
#59
g2ktcf avatar

g2ktcf

Totally Zenned

Join Date:
Feb 2011
Location:
Lumberton, TX
Posts:
636
Plugin Contributions:
0

Re: Template Fluorspar

g2ktcf:

Guys, I am going to start a new thread over in the Linux Installation Forum on my above issues/ I thought this was due to templates and changes. However a fresh install of everything says otherwise as I am still having issues.

Thanks
Chris

Well, turns out it WAS A FILE IN THE FLUOSPAR TEMPLATE. I do not know the ins and outs of it but Dr Byte mentioned deleting the offending file that was giving me a PHP warning in the debug logs and I missed that advice. All I saw was "recreate the file." After deleting ...../includes/languages/english/extra_definitions/fluorspar/extras.php file, everything started working again. I cannot explain why.

After deleting it. ALL THE BLANK PAGES ARE GONE as well as the warnings. The contents of that file are four lines are

<?php

if (!defined('LARGE_IMAGE_WIDTH')) define('LARGE_IMAGE_WIDTH', '');

if (!defined('LARGE_IMAGE_HEIGHT')) define('LARGE_IMAGE_HEIGHT', '');

if (!defined('MODULE_ORDER_TOTAL_GV_STATUS')) define('MODULE_ORDER_TOTAL_GV_STATUS', '');

if (!defined('MODULE_ORDER_TOTAL_COUPON_STATUS')) define('MODULE_ORDER_TOTAL_COUPON_STATUS', '');]

These do not REDEFINE anything, they should check for a definition and then move on if the value is defined.

Should extras.php be removed from the template or is my install different in some manner?

Again, ZC 1.5.7a, OPC and Fluorspar on Centos 6 server, cPanel 86.0 (build 31), Apache 2.4.46, PHP 7.4.11, MySQL 10.1.48-MariaDB
Perl 5.30.0

Thanks
Chris

11 Nov 2020, 2:43 AM
#60
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
177

Re: Template Fluorspar

I'm pretty sure the file was saved incorrectly when it was created.
Language files need to be saved "Without BOM" ("Byte Order Mark").
Most text editors operate in "without BOM" mode, but sometimes when non-english-speaking people create files they have BOM mode enabled in their editors, and that sets a special character at the beginning of the file ... which PHP treats as text. Outputting that to the browser is treated as sending page-headers ... and when that happens too early in the execution process you get the symptoms you've been posting about: headers-already-sent-on-line-1.
Saving the file "without BOM" (or "not With BOM") usually solves the problem. But if you don't know how to change the "save mode", typing out the file's contents by hand into a new file will probably suffice, especially since you're in Texas, even if you do speak 'merican ... at least it's a derivative of English. :D