Page 2 of 2 FirstFirst 12
Results 11 to 16 of 16
  1. #11
    Join Date
    May 2008
    Location
    Amarillo, TX
    Posts
    40
    Plugin Contributions
    0

    Default Re: How to show slideshow on home page only

    Think this may be what you are looking for, but what do I do with it?

    [27-Mar-2017 23:17:49 Europe/London] PHP Fatal error: Cannot use 'String' as class name as it is reserved in C:\UniServerZ\vhosts\AMAS\includes\classes\class.String.php on line 57

  2. #12
    Join Date
    May 2008
    Location
    Amarillo, TX
    Posts
    40
    Plugin Contributions
    0

    Default Re: How to show slideshow on home page only

    This is the error I am getting but I can't make heads or tails of what is causing it!

    [27-Mar-2017 23:20:10 Europe/London] PHP Fatal error: Cannot use 'String' as class name as it is reserved in C:\UniServerZ\vhosts\AMAS\includes\classes\class.String.php on line 57

  3. #13
    Join Date
    Nov 2005
    Location
    los angeles
    Posts
    2,684
    Plugin Contributions
    9

    Default Re: How to show slideshow on home page only

    Quote Originally Posted by ehswift View Post
    This is the error I am getting but I can't make heads or tails of what is causing it!

    [27-Mar-2017 23:20:10 Europe/London] PHP Fatal error: Cannot use 'String' as class name as it is reserved in C:\UniServerZ\vhosts\AMAS\includes\classes\class.String.php on line 57
    given that this is the error, i think its safe to say that your homepage was not working....

    are you using CEON URI Mapping? also please confirm your development environment is now running PHP 7.

    PHP 7 prevents the use of the term 'String' as a class name. if you switch your development server to php 5.6, i have a feeling things may start working again.

    you can read about the problems and solution with CEON URI Mapping here:

    https://www.zen-cart.com/showthread....g-v4-x/page209

    if you are not using that plugin, you should post the contents of the script:

    includes\classes\class.String.php

    as that script is NOT part of the base ZC install. someone would need to update that plugin to conform to the new standards in php 7.

    good luck.
    author of square Webpay.
    mxWorks has premium plugins. donations: venmo or paypal accepted.
    premium consistent excellent support. available for hire.

  4. #14
    Join Date
    May 2008
    Location
    Amarillo, TX
    Posts
    40
    Plugin Contributions
    0

    Default Re: How to show slideshow on home page only

    The issue is happening on both my Zen Cart versions 1.5.5d and now 1.5.5e. In both versions the homepage loads fine, but it is every other page that shows as blank. Yes, my development web server is running PHP 7.1 and I am using CEON URI Mapping v4.5.2 although version number shown in admin shows to be v4.5.1. This was a fresh install and not an upgrade for any of the software. I will try switching back to PHP 5.6 to see if that solves the issue for now.

  5. #15
    Join Date
    May 2008
    Location
    Amarillo, TX
    Posts
    40
    Plugin Contributions
    0

    Default Re: How to show slideshow on home page only

    Quote Originally Posted by ehswift View Post
    The issue is happening on both my Zen Cart versions 1.5.5d and now 1.5.5e. In both versions the homepage loads fine, but it is every other page that shows as blank. Yes, my development web server is running PHP 7.1 and I am using CEON URI Mapping v4.5.2 although version number shown in admin shows to be v4.5.1. This was a fresh install and not an upgrade for any of the software. I will try switching back to PHP 5.6 to see if that solves the issue for now.
    I want to provide an update as to what is going on now. I am using Uniserver 13_3_2_ZeroXIII for my development web server. I just reinstalled Uniserver to make sure there are no bugs with it. I am using Apache 2.4.25 and PHP 7.1. I installed Zen Cart v1.5.5e. I have only installed one plugin at this point and that is the MySQL backup plugin and it is working fine. Here is where everything goes buggy. I re-added the slideshow back to the homepage and it is working fine, but if I add Drbytes code around the div element where the slideshow goes, and try to visit any other page than the homepage, I get a blank page. Here is that code:

    <?php if ($this_is_home_page) { ?>
    <div id="fadeshow4"></div>
    <?php } ?>

    If I remove the php code around the div then the other pages show up just fine. The funny thing is that this actually used to work, so what in the world would make it stop? I checked the logs folder and there are no error logs.

  6. #16
    Join Date
    May 2008
    Location
    Amarillo, TX
    Posts
    40
    Plugin Contributions
    0

    Default Re: How to show slideshow on home page only

    Quote Originally Posted by ehswift View Post
    I want to provide an update as to what is going on now. I am using Uniserver 13_3_2_ZeroXIII for my development web server. I just reinstalled Uniserver to make sure there are no bugs with it. I am using Apache 2.4.25 and PHP 7.1. I installed Zen Cart v1.5.5e. I have only installed one plugin at this point and that is the MySQL backup plugin and it is working fine. Here is where everything goes buggy. I re-added the slideshow back to the homepage and it is working fine, but if I add Drbytes code around the div element where the slideshow goes, and try to visit any other page than the homepage, I get a blank page. Here is that code:

    <?php if ($this_is_home_page) { ?>
    <div id="fadeshow4"></div>
    <?php } ?>

    If I remove the php code around the div then the other pages show up just fine. The funny thing is that this actually used to work, so what in the world would make it stop? I checked the logs folder and there are no error logs.
    I believe I have isolated the problem. I remember now that I commented out some code in the javascript file to keep it from executing and it was working great until recently. but when I visit any other page than the homepage I get an error warning that says: Error: DIV with ID "fadeshow4" not found on page. I located this code in the javascript file and commented it out again, but when I visit any other page now I get a blank page, so how can I keep the script from checking for this error? Here is the java script code below.

    ]
    if (setting.$wrapperdiv.length==0){ //if no wrapper DIV found
    alert("Error: DIV with ID \""+setting.wrapperid+"\" not found on page.")
    return
    }

 

 
Page 2 of 2 FirstFirst 12

Similar Threads

  1. How do I show only Featured Products on home page?
    By peterpan2004 in forum Templates, Stylesheets, Page Layout
    Replies: 3
    Last Post: 24 Mar 2010, 04:53 AM
  2. How to show a custom sidebox only on my home page?
    By SandraSD in forum Templates, Stylesheets, Page Layout
    Replies: 3
    Last Post: 16 Dec 2009, 08:43 AM
  3. how to insert a slideshow in flash on home page?
    By giuly in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 4 Nov 2009, 03:09 AM
  4. how to make it to show up on Home page only.
    By bumergroup in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 26 Aug 2008, 12:42 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR