Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls
 

Need help, Interesting Slide show !!

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 10-16-2008, 03:13 AM
  Rajdeep's Avatar 
Rajdeep Rajdeep is offline
 

Senior Member
  
Join Date: May 2007
Posts: 115
 

Unhappy Need help, Interesting Slide show !!

Hi all,

I am attempting to setup slide show with some preselected products. When tested it is running fine on my local host.

When I am uploading it to X-cart in the home page (using e.g.: slide_show.tpl) a blank image box shows up where there is flickers but the actual images don't show up....

I have pasted the codes I tried below. Can someone suggest the error. It would be useful for lot many other users too.

Thanks in advance...

Codes:
-------------------------------------------------
<html>
<head>
<script type="text/javascript">
<!--
var image1=new Image()
image1. src="{$ImagesDir}/scroller images/offer-01.jpg"
var image2=new Image()
image2. src="{$ImagesDir}/scroller images/offer-02.jpg"
var image3=new Image()
image3. src="{$ImagesDir}/scroller images/offer-03.jpg"
//-->
</script>
</head>
<body>
<img src="{$ImagesDir}/scroller images/100048.jpg" name="slide" border="0" width="115" height="56" />
<script>
<!--
//variable that will increment through the images
var step=1
function slideit(){
//if browser does not support the image object, exit.
if (!document.images)
return
document.images.slide.src=eval("image"+step+".src" )
if (step<3)
step++
else
step=1
//call function "slideit()" every 2.5 seconds
setTimeout("slideit()",2500)
}
slideit()
//-->
</script>
</body>
</html>
---------------------------------------

Balinor, may I request you for help please...
__________________
X-Cart Pro 4.1.9
[Migrated from Gold 4.1.8 to Pro 4.1.9 - Feb 2008]
Add Ons: X-FancyCategories, X-Magnifier, X-FeatureComparison, X-SpecialOffers
Reply With Quote
  #2  
Old 10-16-2008, 03:17 AM
 
balinor balinor is offline
 

Veteran
  
Join Date: Oct 2003
Location: Connecticut, USA
Posts: 30,253
 

Default Re: Need help, Interesting Slide show !!

You need to surround the javascript with {literal} tags:

{literal}Javascript here {/literal}
__________________
Padraic Ryan
Ryan Design Studio
Professional E-Commerce Development
Reply With Quote
  #3  
Old 10-16-2008, 06:19 AM
  Rajdeep's Avatar 
Rajdeep Rajdeep is offline
 

Senior Member
  
Join Date: May 2007
Posts: 115
 

Default Re: Need help, Interesting Slide show !!

Thanks Balinor for your prompt response as always...

Unfortunately the codes are still not working (reason of my delayed response). Was trying with some variations here & there...

Is there any other error in the codes below which I might have overlooked? Your inputs would be of immense help.

Thank you once again,

Regards,
__________________
X-Cart Pro 4.1.9
[Migrated from Gold 4.1.8 to Pro 4.1.9 - Feb 2008]
Add Ons: X-FancyCategories, X-Magnifier, X-FeatureComparison, X-SpecialOffers
Reply With Quote
  #4  
Old 10-16-2008, 06:22 AM
 
balinor balinor is offline
 

Veteran
  
Join Date: Oct 2003
Location: Connecticut, USA
Posts: 30,253
 

Default Re: Need help, Interesting Slide show !!

Well you can't use Smarty in there, so instead of {$ImagesDir} use skin1/images/
__________________
Padraic Ryan
Ryan Design Studio
Professional E-Commerce Development
Reply With Quote
  #5  
Old 10-16-2008, 07:38 AM
  Rajdeep's Avatar 
Rajdeep Rajdeep is offline
 

Senior Member
  
Join Date: May 2007
Posts: 115
 

Unhappy Re: Need help, Interesting Slide show !!

Balinor thanks again !

Weird it still shows no result in home page (customer/home.tpl) where I called this file just below the help.tpl

The file slide_show.tpl has these set of codes based on your inputs
-------------
<html>
<head>
{literal}
<script type="text/javascript">
<!--
var image1=new Image()
image1. src="skin1/images/scroller images/offer-01.jpg"
var image2=new Image()
image2. src="skin1/images/scroller images/offer-02.jpg"
var image3=new Image()
image3. src="skin1/mages/scroller images/offer-03.jpg"
//-->
</script>
{/literal}
</head>
<body>
<img src="skin1/images/scroller images/100048.jpg" name="slide" border="0" width="115" height="56" />
{literal}
<script>
<!--
//variable that will increment through the images
var step=1
function slideit(){
//if browser does not support the image object, exit.
if (!document.images)
return
document.images.slide.src=eval("image"+step+".src" )
if (step<3)
step++
else
step=1
//call function "slideit()" every 2.5 seconds
setTimeout("slideit()",2500)
}
slideit()
//-->
</script>
{/literal}
</body>
</html>

-------------

I am stuck there BOSS....
__________________
X-Cart Pro 4.1.9
[Migrated from Gold 4.1.8 to Pro 4.1.9 - Feb 2008]
Add Ons: X-FancyCategories, X-Magnifier, X-FeatureComparison, X-SpecialOffers
Reply With Quote
  #6  
Old 10-16-2008, 07:40 AM
 
balinor balinor is offline
 

Veteran
  
Join Date: Oct 2003
Location: Connecticut, USA
Posts: 30,253
 

Default Re: Need help, Interesting Slide show !!

Are you trying to just put that code in? Because it doesn't work that way - you need to add the script in the head to the actual head of the site, which is in customer/home.tpl. Then you need to add the second part where you want it to show in the templates. Follow me? You don't add body, head, or html tags - those can only be in one place - customer/home.tpl
__________________
Padraic Ryan
Ryan Design Studio
Professional E-Commerce Development
Reply With Quote
  #7  
Old 10-16-2008, 07:50 AM
  Rajdeep's Avatar 
Rajdeep Rajdeep is offline
 

Senior Member
  
Join Date: May 2007
Posts: 115
 

Unhappy Re: Need help, Interesting Slide show !!

Sorry Balinor if I sound dumb, though I understand what you mean but if I am not troubling you too much cud you let me know which part of the codes mentioned below I add in the home.tpl file & what of the balance codes I put in the said slide_show.tpl which has been called below help.tpl in the customer/home.tpl....

Please help me out of this silly thing....
__________________
X-Cart Pro 4.1.9
[Migrated from Gold 4.1.8 to Pro 4.1.9 - Feb 2008]
Add Ons: X-FancyCategories, X-Magnifier, X-FeatureComparison, X-SpecialOffers
Reply With Quote
  #8  
Old 10-16-2008, 07:52 AM
 
balinor balinor is offline
 

Veteran
  
Join Date: Oct 2003
Location: Connecticut, USA
Posts: 30,253
 

Default Re: Need help, Interesting Slide show !!

Ok, open up customer/home.tpl and place this right before the </head> tag:

{literal}
<script type="text/javascript">
<!--
var image1=new Image()
image1. src="skin1/images/scroller images/offer-01.jpg"
var image2=new Image()
image2. src="skin1/images/scroller images/offer-02.jpg"
var image3=new Image()
image3. src="skin1/mages/scroller images/offer-03.jpg"
//-->
</script>
{/literal}

then put this part wherever you want the slideshow to appear:

<img src="skin1/images/scroller images/100048.jpg" name="slide" border="0" width="115" height="56" />
{literal}
<script>
<!--
//variable that will increment through the images
var step=1
function slideit(){
//if browser does not support the image object, exit.
if (!document.images)
return
document.images.slide.src=eval("image"+step+".src" )
if (step<3)
step++
else
step=1
//call function "slideit()" every 2.5 seconds
setTimeout("slideit()",2500)
}
slideit()
//-->
</script>
{/literal}

Usually that would go on customer/main/welcome.tpl if you wanted it to appear on the home page.
__________________
Padraic Ryan
Ryan Design Studio
Professional E-Commerce Development
Reply With Quote

The following user thanks balinor for this useful post:
GBCom (03-19-2011)
  #9  
Old 10-16-2008, 07:58 AM
  Rajdeep's Avatar 
Rajdeep Rajdeep is offline
 

Senior Member
  
Join Date: May 2007
Posts: 115
 

Default Re: Need help, Interesting Slide show !!

Thanks Boss,

while I try the way suggested by you, let me specify what we are doing currently with welcome.tpl

We are using the welcome.tpl for a Offer announcement with an 360 px by 145 px rectangle with 4 product images inside; each linking to an offer. We wanted to use the empty space below help.tpl (in our home page) to display additional offers in a flash like app.

So what do I do .....
__________________
X-Cart Pro 4.1.9
[Migrated from Gold 4.1.8 to Pro 4.1.9 - Feb 2008]
Add Ons: X-FancyCategories, X-Magnifier, X-FeatureComparison, X-SpecialOffers
Reply With Quote
  #10  
Old 10-16-2008, 07:59 AM
 
balinor balinor is offline
 

Veteran
  
Join Date: Oct 2003
Location: Connecticut, USA
Posts: 30,253
 

Default Re: Need help, Interesting Slide show !!

Then put the second bit of code wherever help.tpl is - probably customer/home.tpl
__________________
Padraic Ryan
Ryan Design Studio
Professional E-Commerce Development
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 02:17 PM.

   

 
X-Cart forums © 2001-2020