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

Modified product.tpl shows qty in stock with options

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 04-22-2006, 02:32 PM
 
donavichi donavichi is offline
 

X-Adept
  
Join Date: Apr 2004
Location: United Kingdom
Posts: 697
 

Default Modified product.tpl shows qty in stock with options

Strange one this...

I have made modifications to product.tpl in order to show an 'in stock' icon if qty greater than 10 and a 'special order item' if below this.
It works great and primarily was developed to reduce the number of potential missed updates as stock comes in and out, therefore less p***ed off clients.

The mods themselves are seperate templates with a simple {if} {else} setup to control their display.

Problem is, if i try to apply options to the product, the modification disappears and is replaced by the quantity in stock in unformatted text!

Any idea what this might be?
__________________
Best regards,

Donavichi.
- - -

Website Copywriting || Web Design || FAQs || Home & Garden Blog
Reply With Quote
  #2  
Old 04-22-2006, 05:44 PM
 
balinor balinor is offline
 

Veteran
  
Join Date: Oct 2003
Location: Connecticut, USA
Posts: 30,253
 

Default

Are your if statements inside any of the if statements related to product options?
__________________
Padraic Ryan
Ryan Design Studio
Professional E-Commerce Development
Reply With Quote
  #3  
Old 04-22-2006, 11:29 PM
 
donavichi donavichi is offline
 

X-Adept
  
Join Date: Apr 2004
Location: United Kingdom
Posts: 697
 

Default

PM sent containing product.tpl
__________________
Best regards,

Donavichi.
- - -

Website Copywriting || Web Design || FAQs || Home & Garden Blog
Reply With Quote
  #4  
Old 04-23-2006, 03:54 AM
 
balinor balinor is offline
 

Veteran
  
Join Date: Oct 2003
Location: Connecticut, USA
Posts: 30,253
 

Default

Please keep the discussion to the thread itself. Thanks
__________________
Padraic Ryan
Ryan Design Studio
Professional E-Commerce Development
Reply With Quote
  #5  
Old 06-21-2006, 02:37 AM
 
dazybabes dazybabes is offline
 

Advanced Member
  
Join Date: Mar 2005
Posts: 70
 

Default

Did you get anywhere with this mod??

Im wanting something like this that rather than actually showing stock levels to customers shows "In Stock" or "Back Order" if its not in stock.
__________________
X-Cart Version 4.0.3
Reply With Quote
  #6  
Old 06-21-2006, 02:53 AM
 
donavichi donavichi is offline
 

X-Adept
  
Join Date: Apr 2004
Location: United Kingdom
Posts: 697
 

Default

that's what i've done, just doesn't work if product has options
__________________
Best regards,

Donavichi.
- - -

Website Copywriting || Web Design || FAQs || Home & Garden Blog
Reply With Quote
  #7  
Old 06-23-2006, 03:37 AM
 
dazybabes dazybabes is offline
 

Advanced Member
  
Join Date: Mar 2005
Posts: 70
 

Default

So it only works if it has variants??

could you send me the product.tpl for me to have a gander at?
__________________
X-Cart Version 4.0.3
Reply With Quote
  #8  
Old 06-23-2006, 03:49 AM
 
donavichi donavichi is offline
 

X-Adept
  
Join Date: Apr 2004
Location: United Kingdom
Posts: 697
 

Default

no, it only works if product has NO variants.

Simply add this code:
Code:
{if $product.avail gt 10}Stock Item - this item usually ships within 24 hours{else}Special Order Item - this item is supplied 'to order' and carries a lead time of 7 - 10 days, for more information contact us{/if}

This is a simplified version of what I have in place[/code]
__________________
Best regards,

Donavichi.
- - -

Website Copywriting || Web Design || FAQs || Home & Garden Blog
Reply With Quote
  #9  
Old 06-23-2006, 03:53 AM
 
dazybabes dazybabes is offline
 

Advanced Member
  
Join Date: Mar 2005
Posts: 70
 

Default

Thanks for that, but hey guess what I do have variants and just cant seem to get anywhere with it.

Thought it would be simple to do seen as if you have more than one then display IN STOCK and if you have less than 1 OUT OF STOCK but whatever i try i just cant seem to get anywhere with it.
__________________
X-Cart Version 4.0.3
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 05:34 AM.

   

 
X-Cart forums © 2001-2020