X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Changing design (https://forum.x-cart.com/forumdisplay.php?f=51)
-   -   Rotating the Main Image based on categories (https://forum.x-cart.com/showthread.php?t=14157)

ARW VISIONS 01-06-2009 09:07 AM

Re: Rotating the Main Image based on categories
 
replace $categoryid with $cat

ChristineP 01-06-2009 09:10 AM

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?


ARW VISIONS 01-06-2009 09:14 AM

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.

ARW VISIONS 01-06-2009 09:18 AM

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.

ARW VISIONS 01-06-2009 09:21 AM

Re: Rotating the Main Image based on categories
 
I tested this on my server. I replaced the images with simple text and it worked.

ChristineP 01-06-2009 10:57 AM

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

ARW VISIONS 01-06-2009 10:59 AM

Re: Rotating the Main Image based on categories
 
whew! that was a tough one :) glad its working.

ChristineP 01-06-2009 11:05 AM

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.


Vetrivel 01-06-2009 07:22 PM

Re: Rotating the Main Image based on categories
 
thats great.and finally you got it..:lol::lol::lol::lol:
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.



All times are GMT -8. The time now is 08:20 PM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.