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

Rotating the Main Image based on categories

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #21  
Old 01-06-2009, 09:07 AM
  ARW VISIONS's Avatar 
ARW VISIONS ARW VISIONS is offline
 

X-Man
  
Join Date: Jan 2007
Location: Pensacola, FL
Posts: 2,536
 

Default Re: Rotating the Main Image based on categories

replace $categoryid with $cat
__________________
xcart 5.1.2
Reply With Quote
  #22  
Old 01-06-2009, 09:10 AM
 
ChristineP ChristineP is offline
 

eXpert
  
Join Date: Jul 2008
Posts: 310
 

Default Re: Rotating the Main Image based on categories

Here's our url: www.clintonelectronics.com/store

I'm still in the customizing stage so it's unfinished, and in some areas purposely ugly for me to get back to when other areas are complete.

Quote:
Originally Posted by Ashley
can you post a URL?
__________________
______________
version 4.1.9 Gold
Reply With Quote
  #23  
Old 01-06-2009, 09:14 AM
  ARW VISIONS's Avatar 
ARW VISIONS ARW VISIONS is offline
 

X-Man
  
Join Date: Jan 2007
Location: Pensacola, FL
Posts: 2,536
 

Default Re: Rotating the Main Image based on categories

{if $main and $cat eq "249" }
1
{elseif $main and $cat eq "250"}
2
{elseif $main and $cat eq "252"}
3
{else}
4
{/if}

this works on my server. the smarty is correct. make sure the categorey number are correct.
__________________
xcart 5.1.2
Reply With Quote
  #24  
Old 01-06-2009, 09:18 AM
  ARW VISIONS's Avatar 
ARW VISIONS ARW VISIONS is offline
 

X-Man
  
Join Date: Jan 2007
Location: Pensacola, FL
Posts: 2,536
 

Default Re: Rotating the Main Image based on categories

where did you get you category numbers from? I don;t see 110, 120, 130 in your store? those look like sort numbers to me. the $cat number can be found in the URL when you click on the category.
__________________
xcart 5.1.2
Reply With Quote
  #25  
Old 01-06-2009, 09:21 AM
  ARW VISIONS's Avatar 
ARW VISIONS ARW VISIONS is offline
 

X-Man
  
Join Date: Jan 2007
Location: Pensacola, FL
Posts: 2,536
 

Default Re: Rotating the Main Image based on categories

I tested this on my server. I replaced the images with simple text and it worked.
__________________
xcart 5.1.2
Reply With Quote
  #26  
Old 01-06-2009, 10:57 AM
 
ChristineP ChristineP is offline
 

eXpert
  
Join Date: Jul 2008
Posts: 310
 

Default Re: Rotating the Main Image based on categories

AWESOME.... Thank you Ashley and Vetrivel! I have this working now on my computer. You were right Ashley, I was using the order_by number and not the parentid from my cpanel.

For those interested the code is as follows:
<div class="HeadLine" style="text-align: left; height: 153px; width: 100%; margin: 10px 0px 0px 0px">
{if $main and $cat eq "68" }
<img src="{$ImagesDir}/IR_HdrImg.jpg" />
{elseif $main and $cat "15"}
<img src="{$ImagesDir}/textbanner.jpg"/>
{elseif $main and $cat eq "16"}
<img src="{$ImagesDir}/textbanner.jpg" />
{elseif $main and $cat eq "14"}
<img src="{$ImagesDir}/textbanner.jpg" />
{else}
<img src="{$ImagesDir}/IR_HdrImg.jpg"/>
{/if}
</div>

Also works for subcategory as:
{elseif $cat "70"}
<img src="{$ImagesDir}/textbanner.jpg"/>


Thanks again,
Christine
__________________
______________
version 4.1.9 Gold
Reply With Quote
  #27  
Old 01-06-2009, 10:59 AM
  ARW VISIONS's Avatar 
ARW VISIONS ARW VISIONS is offline
 

X-Man
  
Join Date: Jan 2007
Location: Pensacola, FL
Posts: 2,536
 

Default Re: Rotating the Main Image based on categories

whew! that was a tough one glad its working.
__________________
xcart 5.1.2
Reply With Quote
  #28  
Old 01-06-2009, 11:05 AM
 
ChristineP ChristineP is offline
 

eXpert
  
Join Date: Jul 2008
Posts: 310
 

Default Re: Rotating the Main Image based on categories

Me too! Thank you for sticking with me. I've been able to find the "how to" for most of my customizing wants with the posts from the experts on these forums. This is why I try to post my final results when I get something working properly.

Thanks again.

Quote:
Originally Posted by Ashley
whew! that was a tough one glad its working.
__________________
______________
version 4.1.9 Gold
Reply With Quote
  #29  
Old 01-06-2009, 07:22 PM
  Vetrivel's Avatar 
Vetrivel Vetrivel is offline
 

eXpert
  
Join Date: Apr 2008
Posts: 398
 

Default Re: Rotating the Main Image based on categories

thats great.and finally you got it..
Quote:
Originally Posted by ChristineP
Me too! Thank you for sticking with me. I've been able to find the "how to" for most of my customizing wants with the posts from the experts on these forums. This is why I try to post my final results when I get something working properly.

Thanks again.
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 01:13 AM.

   

 
X-Cart forums © 2001-2020