| ||||||||||
![]() |
Shopping cart software Solutions for online shops and malls | |||||||||
![]() |
![]() |
|
X-Cart Home | ![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
Changing the background color based on Category | ||||
![]() |
|
|
Thread Tools | Search this Thread |
#11
|
|||||||
|
|||||||
![]() Quote:
If you cant do something then you get paid? Sorry bud, but I'm firing you and taking your job ![]() |
|||||||
#12
|
|||||||||
|
|||||||||
![]() Lol!!!!!!!!!!!!!!!!!!!!!!:d/
__________________
xcart 5.1.2 |
|||||||||
#13
|
|||||||||
|
|||||||||
![]() If the code does not work for you - this probably why:
The css you provided is from a bestsellers list. The link you provided appears to be products on a category page. I believe the $cat variable is the main category for a product on the product page. It appears you might need a category being passed inside an array of products - a category for each product. To see if category variables exist for the products in a list (bestsellers, featured products, etc.) - Open webmaster mode and look for the array that holds all the products. You should be able to recognize it. I think the bestsellers array is called $bestsellers. On a category page, the products array is called $products. Inside those arrays, if you see a variable that you recognize as the main category for that product - then you use that variable in the array - something like $bestsellers.category. If it is not there - then you have to add a query to the php file to get the category and pass it to the template so it is available to you.
__________________
X-CART (4.1.9,12/4.2.2-3/4.3.1-2/4.4.1-5)-Gold (CDSEO, Altered-Cart On Sale, BCSE Preorder Backorder, QuickOrder, X-Payments, BCSE DPM Module) |
|||||||||
#14
|
|||||||
|
|||||||
![]() Tal LOL Typo...
Gb2world, yeah I think that's the problem as well I'm trying to do this mod to the Bestsellers list first. Tal, you suggestion did not work. The TPL treated it like now class had been assigned in the <ul> I removed the class="bestsellers-products-item" from the original tpl and got the same results. $bestsellers.cat didn't work either.
__________________
X-Cart 4.3 Joomla Among other things ![]() |
|||||||
#15
|
|||||||
|
|||||||
![]() I think the biggest problem is that Cat is not either established yet or I don't no with the call is for it.
Well I figured out that if I put in if $cat eq "Males" that it would change to blue, if the puppy is not a male, it doesn't go pink. I have no idea, grr x-cart!
__________________
X-Cart 4.3 Joomla Among other things ![]() |
|||||||
#16
|
|||||||
|
|||||||
![]() I think it needs to be setup in the <li> and not the <ul>
The <ul> is outside of the {foreach} so it's static.
__________________
X-Cart 4.3 Joomla Among other things ![]() |
|||||||
#17
|
|||||||||
|
|||||||||
![]() Quote:
Webmaster mode answers those questions. If you do not see it, you need to add a query to the php to retrieve it for the template. If you do see it - you know what it is called.
__________________
X-CART (4.1.9,12/4.2.2-3/4.3.1-2/4.4.1-5)-Gold (CDSEO, Altered-Cart On Sale, BCSE Preorder Backorder, QuickOrder, X-Payments, BCSE DPM Module) |
|||||||||
|
|||
X-Cart forums © 2001-2020
|