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

inventory images

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 07-29-2010, 04:46 PM
  techker's Avatar 
techker techker is offline
 

Senior Member
  
Join Date: Feb 2009
Posts: 155
 

Default inventory images

hey guy i dont want to show the QTY of my inventory.can i do a mod that shows a check when in stock or x when out of stock?
__________________
X-Cart version 4.4.3
Reply With Quote
  #2  
Old 07-29-2010, 06:53 PM
  cflsystems's Avatar 
cflsystems cflsystems is offline
 

Veteran
  
Join Date: Apr 2007
Posts: 14,201
 

Default Re: inventory images

just replace the quantity in product.tpl, products_xxx.tpl with an if statement to get what you want to show
__________________
Steve Stoyanov
CFLSystems.com
Web Development
Reply With Quote
  #3  
Old 07-30-2010, 04:11 AM
  techker's Avatar 
techker techker is offline
 

Senior Member
  
Join Date: Feb 2009
Posts: 155
 

Default Re: inventory images

before i play arround with the code would this be good?only thing i can think of..

echo (empty($row[avail].Visible = 0)? "<img src="../x.jpg" />": "<img src="/check.jpg" />");

or


{
if (row[0] ==0 "")
{
<img src="../x.jpg" />;
}
else
{
<img src="../check.jpg" />
}
}

by the way where are these files?i think i found one in skin1_original/main/products.tpl
__________________
X-Cart version 4.4.3
Reply With Quote
  #4  
Old 07-30-2010, 08:37 AM
  cflsystems's Avatar 
cflsystems cflsystems is offline
 

Veteran
  
Join Date: Apr 2007
Posts: 14,201
 

Default Re: inventory images

{if $product.avail gt 0}
<img src="image for IN stock" width="xx' height="xx" alt="xx" />
{else}
<img src="image for OUT of stock" width="xx' height="xx" alt="xx" />
{/if}

This goes in template files not php files
__________________
Steve Stoyanov
CFLSystems.com
Web Development
Reply With Quote
  #5  
Old 07-30-2010, 10:14 AM
  techker's Avatar 
techker techker is offline
 

Senior Member
  
Join Date: Feb 2009
Posts: 155
 

Default Re: inventory images

cool thx.thats in products.tpl?
__________________
X-Cart version 4.4.3
Reply With Quote
  #6  
Old 07-30-2010, 11:26 AM
  cflsystems's Avatar 
cflsystems cflsystems is offline
 

Veteran
  
Join Date: Apr 2007
Posts: 14,201
 

Default Re: inventory images

..and product.tpl
__________________
Steve Stoyanov
CFLSystems.com
Web Development
Reply With Quote
  #7  
Old 07-30-2010, 12:50 PM
  techker's Avatar 
techker techker is offline
 

Senior Member
  
Join Date: Feb 2009
Posts: 155
 

Default Re: inventory images

i editied both product and products.tpl and nothing changed?do i need to modify the php file?
__________________
X-Cart version 4.4.3
Reply With Quote
  #8  
Old 07-30-2010, 01:42 PM
  cflsystems's Avatar 
cflsystems cflsystems is offline
 

Veteran
  
Join Date: Apr 2007
Posts: 14,201
 

Default Re: inventory images

No, you don't need to modify php files. You may need to clear xcart cache. Execute in your browser - www.yourdomain.com/cleanup.php
__________________
Steve Stoyanov
CFLSystems.com
Web Development
Reply With Quote
  #9  
Old 07-30-2010, 01:45 PM
  techker's Avatar 
techker techker is offline
 

Senior Member
  
Join Date: Feb 2009
Posts: 155
 

Default Re: inventory images

could the files be

skin1/main/

or skin1/customers
__________________
X-Cart version 4.4.3
Reply With Quote
  #10  
Old 07-30-2010, 01:50 PM
  cflsystems's Avatar 
cflsystems cflsystems is offline
 

Veteran
  
Join Date: Apr 2007
Posts: 14,201
 

Default Re: inventory images

skin1/customer/main/product.tpl
skin1/customer/main/products_t.tpl OR
skin1/customer/main/products_list.tpl
__________________
Steve Stoyanov
CFLSystems.com
Web Development
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design



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 06:07 AM.

   

 
X-Cart forums © 2001-2020