Powered By Blogger

Tuesday 3 September 2013

How to add slideshow on magento homepage


How to add slideshow on magento homepage

==========================================================
How to add slideshow on magento homepage

Step 1: Login magento admin panel goto pages under CMS
          Click on content and enter below code


<!--Image Slider Start-->
<div id="slide" align="center">
<script type="text/javascript">// <![CDATA[
var image1=new Image()
image1.src="{{skin url=images/media/slideshow/1.jpg}}"
var image2=new Image()
image2.src="{{skin url=images/media/slideshow/2.jpg}}"
var image3=new Image()
image3.src="{{skin url=images/media/slideshow/3.jpg}}"
var image4=new Image()
image4.src="{{skin url=images/media/slideshow/4.jpg}}"
var image5=new Image()
image5.src="{{skin url=images/media/slideshow/5.jpg}}"
// ]]></script>
<a href="http://www.myhomendeco.com/index.php/bed-rooms.html"> <img src="{{skin url=images/1.jpg}}" alt="" name="slide" width="900" height="277" border="2" /></a>
<script type="text/javascript">// <![CDATA[
//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()",5000)
}
slideit()
// ]]></script>
</div>
<!--Image Slider End-->



Step 2: Go to below folder
skin/frontend/default/Your_theme/images/media/
create a folder(name:slideshow)
put 5 image files(give name 1.jpg,2.jpg,3.jpg,4.jpg,5.jpg)
and reload

meanwhile refresh and flush you magento cache

enjoy it
if u have further doubts mail me (vijay.sahil07@gmail.com)
 Thanks & regards

No comments:

Post a Comment