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)
-   -   If product has wholesale prices show this, else.. (https://forum.x-cart.com/showthread.php?t=53039)

Christofer 03-28-2010 07:01 PM

If product has wholesale prices show this, else..
 
Hello there. I think that i want i simple but i don't know why it doesn't work. I am trying to do that change on product.tpl

The code i try to use is this:

{if $product.forsale ne "B"}
<td colspan="3">
{else}
<td colspan="3" class="product-subtitle">
{/if}

So with other words, i want if the product has wholesale prices to use on some place the code "<td colspan="3">" and if not, to use this "<td colspan="3" class="product-subtitle">". The problem is that it always use the first, no matter if it has wholeslae prices or not. Any idea? Thank you guys

Christofer 03-29-2010 09:24 AM

Re: If product has wholesale prices show this, else..
 
hmm, noone? i thought that this i asked was easy:/

cflsystems 03-29-2010 10:11 AM

Re: If product has wholesale prices show this, else..
 
"B" means bundle as far as I know so that code will always return first condition if your product is not bundled

Christofer 03-29-2010 02:41 PM

Re: If product has wholesale prices show this, else..
 
hm.. So what code should i use if it has wholesale prices? is there any code i can use?

Christofer 03-29-2010 03:53 PM

Re: If product has wholesale prices show this, else..
 
hm, i think i found it. I used this at last:
{if $product_wholesale ne ''}
<td colspan="3" class="product-subtitle-wholesale">
{else}
<td colspan="3" class="product-subtitle">
{/if}

This seems to work fine, you think i will make me any troubles?

cflsystems 03-29-2010 04:53 PM

Re: If product has wholesale prices show this, else..
 
No, no trouble. It will just assign first or second class to the table cell


All times are GMT -8. The time now is 07:14 AM.

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