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

If product has wholesale prices show this, else..

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 03-28-2010, 07:01 PM
 
Christofer Christofer is offline
 

eXpert
  
Join Date: Apr 2009
Location: Thessaloniki, Greece
Posts: 202
 

Default 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
__________________
X-Cart Gold : 4.2.1 (on linux parallels plesk / mysql)
Php v5.2.9 (Zend: 2.2.0) - MySql v5.0.79 - LiteSpeed server
Modules : X-Offer & X-Aom & One page checkout
Product tabs & Product downloads & many more
Reply With Quote
  #2  
Old 03-29-2010, 09:24 AM
 
Christofer Christofer is offline
 

eXpert
  
Join Date: Apr 2009
Location: Thessaloniki, Greece
Posts: 202
 

Default Re: If product has wholesale prices show this, else..

hmm, noone? i thought that this i asked was easy:/
__________________
X-Cart Gold : 4.2.1 (on linux parallels plesk / mysql)
Php v5.2.9 (Zend: 2.2.0) - MySql v5.0.79 - LiteSpeed server
Modules : X-Offer & X-Aom & One page checkout
Product tabs & Product downloads & many more
Reply With Quote
  #3  
Old 03-29-2010, 10:11 AM
  cflsystems's Avatar 
cflsystems cflsystems is offline
 

Veteran
  
Join Date: Apr 2007
Posts: 14,201
 

Default 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
__________________
Steve Stoyanov
CFLSystems.com
Web Development
Reply With Quote
  #4  
Old 03-29-2010, 02:41 PM
 
Christofer Christofer is offline
 

eXpert
  
Join Date: Apr 2009
Location: Thessaloniki, Greece
Posts: 202
 

Default 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?
__________________
X-Cart Gold : 4.2.1 (on linux parallels plesk / mysql)
Php v5.2.9 (Zend: 2.2.0) - MySql v5.0.79 - LiteSpeed server
Modules : X-Offer & X-Aom & One page checkout
Product tabs & Product downloads & many more
Reply With Quote
  #5  
Old 03-29-2010, 03:53 PM
 
Christofer Christofer is offline
 

eXpert
  
Join Date: Apr 2009
Location: Thessaloniki, Greece
Posts: 202
 

Default 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?
__________________
X-Cart Gold : 4.2.1 (on linux parallels plesk / mysql)
Php v5.2.9 (Zend: 2.2.0) - MySql v5.0.79 - LiteSpeed server
Modules : X-Offer & X-Aom & One page checkout
Product tabs & Product downloads & many more
Reply With Quote
  #6  
Old 03-29-2010, 04:53 PM
  cflsystems's Avatar 
cflsystems cflsystems is offline
 

Veteran
  
Join Date: Apr 2007
Posts: 14,201
 

Default Re: If product has wholesale prices show this, else..

No, no trouble. It will just assign first or second class to the table cell
__________________
Steve Stoyanov
CFLSystems.com
Web Development
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 12:11 PM.

   

 
X-Cart forums © 2001-2020