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)
-   -   Using Category to Display Image (https://forum.x-cart.com/showthread.php?t=61800)

minfinger 11-27-2011 01:08 PM

Using Category to Display Image
 
My client wants to have a "Sale banner" appear in the description. Originally he wanted to appear over top of the Dogs Picture, but I told him that would be a little tough.

So I'm settling on adding each Dog to a Category and then I'd like to put an {if} statement in the product_details.tpl However, I think the $current_category.category is the wrong way to check for this. I've tried to use the Category number 100, but that didn't work either.

What's the right coding?
Code:

      {if $current_category.category eq "Discount"}
        Test
      {/if}


Thanks,
Mike

minfinger 11-27-2011 03:57 PM

Re: Using Category to Display Image
 
So it would seem that I need to do this in 3 different places.
I need it on the Best Sellers List, the list that's displayed when clickign on the Category and the actually product_details.tpl too.

I figured out how to make it display on the product_details.tpl, but the cat$ only works for the current category. I need this display whether it's in the current category or not.
100 = Discount
28 = Puppies For Sale

All the dogs on the site are in the Puppies For Sale category, but only the ones that are going to be on sale will be put in the Additional Group of Discount. They're all also in other additional categories.

Code:

{if $cat eq '100'}
Test ing<br />
{/if}



All times are GMT -8. The time now is 10:30 AM.

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