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

Stock icons

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 09-19-2009, 02:50 AM
  Warwick's Avatar 
Warwick Warwick is offline
 

X-Adept
  
Join Date: Mar 2003
Location: Somewhere on the web through European connection
Posts: 868
 

Question Stock icons

Is there a mod outthere that makes it possible to show low/medium/normal stock icons depending on the amount in stock?

Or something simular:
stock: low / in stock

Or something like that?
__________________
Installs: X-Cart 4.1.x - 4.4.x ∙∙ MySQL version: 5.0.45 ∙∙ Apache version: 2.2.8 (Unix) ∙∙ PHP version: 5.25
X-Cart add-ons: all ∙∙ Mods: A lot; too many ∙∙ Skin templates: Many
∙∙ Experience: Somewhere beyond newbie
-----------------------------------
------------------------------------------------------------------------------------------------------
Looking for the best dutch language pack? 4.1.x - 4.6.x compatibel, native speaker translation! More info
Reply With Quote
  #2  
Old 09-19-2009, 03:14 AM
  amy2203's Avatar 
amy2203 amy2203 is offline
 

X-Wizard
  
Join Date: Jul 2004
Location: Watford, UK
Posts: 1,509
 

Default Re: Stock icons

it probably depends on how you want to define low/med/normal etc,

basically, where your template currently displays the number in stock, you need to change it to an if statement along the lines of if the qty is less than x, do this etc

depending on your product range, the levels(s) that trigger the different icons etc might be the same for all, or you might need to define the levels for each product. You could do that with extra fields in your product, and then test against those extra fields.

It probably wouldn't be a big mod,

hth
__________________
X-Cart version 5 (Previously 3.5-4)

Previous Versions included
BCSE Reward Points Mod
Altered Cart On Sale Mod
Wordpress Plugin

Please don't PM me for support. I help where I can on the forum and your question will more likely be answered there.

Shout me a Coffee!
Reply With Quote
  #3  
Old 09-19-2009, 03:17 AM
  Warwick's Avatar 
Warwick Warwick is offline
 

X-Adept
  
Join Date: Mar 2003
Location: Somewhere on the web through European connection
Posts: 868
 

Default Re: Stock icons

Quote:
Originally Posted by amy2203
It probably wouldn't be a big mod

Wouldn't think so too, must be around in some form I hope
__________________
Installs: X-Cart 4.1.x - 4.4.x ∙∙ MySQL version: 5.0.45 ∙∙ Apache version: 2.2.8 (Unix) ∙∙ PHP version: 5.25
X-Cart add-ons: all ∙∙ Mods: A lot; too many ∙∙ Skin templates: Many
∙∙ Experience: Somewhere beyond newbie
-----------------------------------
------------------------------------------------------------------------------------------------------
Looking for the best dutch language pack? 4.1.x - 4.6.x compatibel, native speaker translation! More info
Reply With Quote
  #4  
Old 09-20-2009, 05:04 AM
 
candc candc is offline
 

eXpert
  
Join Date: Jul 2009
Location: UK
Posts: 292
 

Default Re: Stock icons

We would also like such a mod if available
__________________
Ver 4.4.4 Gold
Ability
BCSE Pre Order
BCSE Global Product Options
BCSE Stock Notify
CDSEO Pro
MM OPC - Gave up with it
Altered Cart OPC
XMobile
Powered by EWD

Ver 4.4.4 Gold
Ability
BCSE Pre Order
BCSE Global Product Options
BCSE Stock Notify
CDSEO Pro
Altered Cart OPC
XMobile
Powered by EWD
Reply With Quote
  #5  
Old 09-20-2009, 09:50 AM
 
PhilJ PhilJ is offline
 

X-Guru
  
Join Date: Nov 2002
Posts: 4,094
 

Default Re: Stock icons

skin1/customer/main/product.tpl
Code:
{if $product.avail eq "0"} <img src="{$ImagesDir}/out_of_stock.jpg" /> {elseif $product.avail gt "0" && lt "10"} <img src="{$ImagesDir}/low_stock.jpg" /> {elseif $product.avail gte "10"} <img src="{$ImagesDir}/in_stock.jpg" /> {/if}
__________________
xcartmods.co.uk
Reply With Quote

The following user thanks PhilJ for this useful post:
am2003 (11-20-2010)
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:13 AM.

   

 
X-Cart forums © 2001-2020