Forums / All Other Contributions/Addons / How can I use Ultimate Fade-in slideshow v2.1 ?

How can I use Ultimate Fade-in slideshow v2.1 ?

Locked

Views: 3,424

Results 1 to 9 of 9
This thread is locked. New replies are disabled.
3 Feb 2010, 9:51 PM
#1
crunch avatar

crunch

Zen Follower

Join Date:
Mar 2009
Posts:
227
Plugin Contributions:
0

How can I use Ultimate Fade-in slideshow v2.1 ?

Anyone using v2.1 of Ultimate Fade-in slideshow with Zen Cart?
http://www.dynamicdrive.com/dynamicindex14/fadeinslideshow.htm

I am having an issue with errors when navigating away from the page that has the slideshow and I think it has to do with me placing the <head> script code in the wrong file. I am only going to have the slideshow on the main page.

Here is what I've done so far

  1. I've downloaded and renamed the fadeslideshow.js to jscript_fadeslideshow and placed it into my store root (it wouldn't work when placed in /templates/custom_template/jscript/ folder)

  2. They state to place the script code in the <head> section of the page. I assume "the page" is the page you want the slideshow on, so I initially placed the code into /includes/languages/english/html_includes/custom_template/define_main_page.php, but that didn't work - nothing happened - no slideshow.

  3. I then placed the <head> script code into /includes/templates/custom_template/common/html_header.php and this worked. The slideshow shows up on the main page as expected, **BUT **as soon as I navigate to another page I receive an error stating:
    Error: DIV with ID "fadeshow1" not found on page.

That is because the script is looking for <div id="fadeshow1"></div> on every page as the script is in the html_header.php file and gets called on every page.

I did find a few forum threads from 2007 on folks using an older version 1.5, but it seems that things have changed a bit with the new version as the images are called from a script placed in your <head> section and not the .js file you download from dynamic drive.

I am a bit perplexed now on how to really setup this version with Zen Cart.

3 Feb 2010, 10:26 PM
#2
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: How can I use Ultimate Fade-in slideshow v2.1 ?

An idea

Custom tpl_main & html_header can be used in override folders named for the page
i.e.
login
checkout
checkout_success
etc

The is a folder name for the home page
I think it is home but might be index???
Try it and see what results

Zen-Venom Get Bitten

3 Feb 2010, 11:11 PM
#3
crunch avatar

crunch

Zen Follower

Join Date:
Mar 2009
Posts:
227
Plugin Contributions:
0

Re: How can I use Ultimate Fade-in slideshow v2.1 ?

Do you mean the folders in /includes/modules/pages ? I see an /index folder in there.

What file should I put in there? I moved the edited html_header.php file that I had at /includes/templates/custom_template/common/html_header.php into the /includes/modules/pages/index folder. The slideshow disappeared from the main page.

Maybe I should be putting the <head> code in a different file ?

4 Feb 2010, 1:39 AM
#5
crunch avatar

crunch

Zen Follower

Join Date:
Mar 2009
Posts:
227
Plugin Contributions:
0

Re: How can I use Ultimate Fade-in slideshow v2.1 ?

Thanks for the clarification as I was going off track.

Is the main home page known as index?

I created a /index folder so now I have:
/includes/templates/my_template/index/

I moved html_header.php into that folder so now I have:
/includes/templates/my_template/index/html_header.php

The slideshow works again, BUT it's doing the same thing as in my original post. As soon as I navigate to any other page away from the homepage, the error pops up (Error: DIV with ID "fadeshow1" not found on page.).

So, that code in html_header.php is somehow being carried across site-wide.

Unless, the main page is not known as index?

NOTE:
Further clarification is that I have the slideshow being called from the define_main_page.php file. That is where I have placed, <div id="fadeshow1"></div> as it seemed like the best file to use to call the slideshow to display on only the home page.

4 Feb 2010, 1:46 AM
#6
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: How can I use Ultimate Fade-in slideshow v2.1 ?

The home page and all the category listing and product listing pages are named index. As far as I know, there is not a distinct name for the home page folder (though for per-page stylesheets, index_home.css does work, and the CSS body id for the home page is #indexHomeBody vs. #indexBody for other index pages).

You may be able to wrap a PHP test around the script call in the head, like

<?php if($this_is_home_page){ ?>

the script code

<?php } ?>

This would only let the script be invoked on the homepage.

4 Feb 2010, 2:06 AM
#7
crunch avatar

crunch

Zen Follower

Join Date:
Mar 2009
Posts:
227
Plugin Contributions:
0

Re: How can I use Ultimate Fade-in slideshow v2.1 ?

Glenn, your awesome!!! That wrapper did the trick! The slideshow works on the home page and there are no errors when navigating to other pages on the site. Thank you for providing this solution. Kobra, thanks as well - I had just misunderstood your suggestion.

4 Feb 2010, 2:14 AM
#8
crunch avatar

crunch

Zen Follower

Join Date:
Mar 2009
Posts:
227
Plugin Contributions:
0

Re: How can I use Ultimate Fade-in slideshow v2.1 ?

Bah, one one thing... any idea why the jscript_fadeslideshow.js only works in the store root and not when it's in the /templates/custom_template/jscript/ folder?

I have no problem with it in the root, but my understanding is .js should be run from the jscript folder.

4 Feb 2010, 2:21 AM
#9
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: How can I use Ultimate Fade-in slideshow v2.1 ?

I don't know, but maybe the script is not built to understand the path to the images unless it is in the root.