| ||||||||||
| Shopping cart software Solutions for online shops and malls | ||||||||||
| 
 | 
||||||||||
| X-Cart Home | 
Rotating the Main Image based on categories | ||||
![]()  | 
	
	
		
			 | 	
	|||
| 
		 | 
	Thread Tools | Search this Thread | 
| 
		 
			 
			#11  
			
			
			
			
		 
		
		
	 | 
|||||||
		
		
  | 
|||||||
| 
	
	
		
        	 Thanks for your reply.  Still not working... I don't get an error, however the placement for the image(s) is blank for the height of 153. I've tried adding foreach, but that places all images in order all at once in the headline. 
		
	
		
		
		
		
			Quote: 
	
 
				__________________ 
		
		
		
		
	
		
		
		
	______________ version 4.1.9 Gold  | 
|||||||
| 
		 
			 
			#12  
			
			
			
			
		 
		
		
	 | 
|||||||
		
		
  | 
|||||||
| 
	
	
		
        	 Thanks for your reply, I copied from the original post here, and X-Cart caught that error when I refreshed my browser. 
		
	
		
		
		
		
			Quote: 
	
 
				__________________ 
		
		
		
		
	
		
		
		
	______________ version 4.1.9 Gold  | 
|||||||
| 
		 
			 
			#13  
			
			
			
			
		 
		
		
	 | 
|||||||||
		
		
  | 
|||||||||
| 
	
	
		
        	 did you try this? 
		
	
		
		
		
		
			<div class="HeadLine" style="text-align: left; height: 153px; width: 100%; margin: 10px 0px 0px 0px"> {if $main and $cat eq "110" } <img src="{$ImagesDir}/IR_HdrImg.jpg" /> {elseif $main and $cat eq "120"} <img src="{$ImagesDir}/textbanner.jpg" /> {elseif $main and $cat eq "130"} <img src="{$ImagesDir}/IR_HdrImg.jpg.jpg" /> {else} <img src="{$ImagesDir}/textbanner.jpg" /> {/if} </div> 
				__________________ 
		
		
		
		
	
		
		
		
	xcart 5.1.2  | 
|||||||||
| 
		 
			 
			#14  
			
			
			
			
		 
		
		
	 | 
|||||||
		
		
  | 
|||||||
| 
	
	
		
        	 Thanks for the update, still not working. I have my images in both the root Images folder and skin1/images/ folder on my server. 
		
	
		
		
		
		
			Along with the code you suggested, I also tried the below, but still nothing <div class="HeadLine" style="text-align: left; height: 153px; width: 100%; margin: 10px 0px 0px 0px"> {if $main and $categoryid eq "110" } <img src="{$ImagesDir}/IR_HdrImg.jpg" /> {elseif $main and $categoryid eq "120"} <img src="{$ImagesDir}/textbanner.jpg /> {elseif $main and $categoryid eq "130"} <img src="{$ImagesDir}/IR_HdrImg.jpg.jpg /> {else} <img src="{$ImagesDir}/textbanner.jpg /> {/if} </div> I know there's something I've missed, and I'll try any suggestions you have. Thanks again Quote: 
	
 
				__________________ 
		
		
		
		
	
		
		
		
	______________ version 4.1.9 Gold  | 
|||||||
| 
		 
			 
			#15  
			
			
			
			
		 
		
		
	 | 
|||||||||
		
		
  | 
|||||||||
| 
	
	
		
        	 look like there are some quotes mising in the code I posted.  it's corrected. 
		
	
		
		
		
		
			
				__________________ 
		
		
		
		
	
		
		
		
	xcart 5.1.2  | 
|||||||||
| 
		 
			 
			#16  
			
			
			
			
		 
		
		
	 | 
|||||||||
		
		
  | 
|||||||||
| 
	
	
		
        	 You didnt closed the double quotes of img src  
		
	
		
		
		
		
			try this: <div class="HeadLine" style="text-align: left; height: 153px; width: 100%; margin: 10px 0px 0px 0px"> {if $main and $categoryid eq "110" } <img src="{$ImagesDir}/IR_HdrImg.jpg" /> {elseif $main and $categoryid eq "120"} <img src="{$ImagesDir}/textbanner.jpg"/> {elseif $main and $categoryid eq "130"} <img src="{$ImagesDir}/IR_HdrImg.jpg" /> {else} <img src="{$ImagesDir}/textbanner.jpg"/> {/if} </div> Quote: 
	
 
				__________________ 
		
		
		
		
	
		
		
		
	MercuryMinds Technologies Development Team, Professional X-Cart Design, X-Cart Development, X-Cart Customization Services www.mercuryminds.com X-Cart Mailchimp Ecommerce 360 Plugin/integration module (Compatible with X-Cart 4.1.x, 4.2.x, 4.3.x) Smasher, a smart search engine for x-cart store (Compatible with X-Cart 4.1.x, 4.2.x, 4.3.x) One Page Checkout (OPC) - X-Cart module (Compatible with X-Cart 4.1.x, 4.2.x, 4.3.x)  | 
|||||||||
| 
		 
			 
			#17  
			
			
			
			
		 
		
		
	 | 
|||||||
		
		
  | 
|||||||
| 
	
	
		
        	 I have an image showing, and it captures to the last image though it doesn't "rotate/swap" out when I click on a new category. When I changed the image name for the last <img src="{$ImagesDir}/IR_HdrImg.jpg. /> that image showed, making sure that I typed in the correct image name for the required folder. 
		
	
		
		
		
		
			{else} <img src="{$ImagesDir}/textbanner.jpg" /> {/if} </div> Is there another place that I've missed for this to work? Quote: 
	
 
				__________________ 
		
		
		
		
	
		
		
		
	______________ version 4.1.9 Gold  | 
|||||||
| 
		 
			 
			#18  
			
			
			
			
		 
		
		
	 | 
|||||||||
		
		
  | 
|||||||||
| 
	
	
		
        	 please post the code you are using.  and a url is you can. 
		
	
		
		
		
		
			
				__________________ 
		
		
		
		
	
		
		
		
	xcart 5.1.2  | 
|||||||||
| 
		 
			 
			#19  
			
			
			
			
		 
		
		
	 | 
|||||||
		
		
  | 
|||||||
| 
	
	
		
        	 I tried this, and an image does show, but it captures only the last {else} image.  When I commented out the last image I still have a blank area for the image, but clicking on those categories listed doesn't show an image see attached. (I placed a temporary border around the area that I want the image to reside.) 
		
	
		
		
			Quote: 
	
 
				__________________ 
		
		
		
		
	
		
		
		
	______________ version 4.1.9 Gold  | 
|||||||
| 
		 
			 
			#20  
			
			
			
			
		 
		
		
	 | 
|||||||||
		
		
  | 
|||||||||
| 
	
	
		
        	 can you post a URL? 
		
	
		
		
		
		
			
				__________________ 
		
		
		
		
	
		
		
		
	xcart 5.1.2  | 
|||||||||
| 
 | 
|||
| 
 
X-Cart forums © 2001-2020
 
 | 
|||