Difference between revisions of "Template:Adafruit item row"

From MidsouthMakers - Memphis Area Hackerpace
Jump to navigation Jump to search
 
(11 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
<noinclude>{{adafruit item top}}
 
<noinclude>{{adafruit item top}}
 
</noinclude>|-
 
</noinclude>|-
| {{#ifeq: {{{out_of_stock|{{{oos|no}}}}}} | yes | <s> }} {{#if: {{{name|{{{url|<noinclude>x</noinclude>}}}}}} | [{{{url}}} {{{name}}}] | ''N/A''}} {{#ifeq: {{{out_of_stock|{{{oos|no}}}}}} | yes | </s> }}
+
| {{#ifeq: {{{out_of_stock|{{{oos|no}}}}}} | yes | <s> }} {{#if: {{{name|{{{url|<noinclude>x</noinclude>}}}}}} | [{{{url}}} {{{name}}}] | ''N/A''}} {{#ifeq: {{{out_of_stock|{{{oos|no}}}}}} | yes | </s> ''OUT OF STOCK'' }}
 
| {{{quantity|{{{qty|1}}}}}}
 
| {{{quantity|{{{qty|1}}}}}}
| ${{#expr: {{{quantity|{{{qty|1}}}}}} * {{{cost|{{{price|0}}}}}} - {{{discount|0.1}}} * {{{cost|{{{price|0}}}}}} }}
+
| ${{format price| {{{cost|{{{price|0}}}}}}}}
 +
| ${{format price| {{#ifeq: {{{out_of_stock|{{{oos|no}}}}}} | yes | 0 | {{#expr: {{{quantity|{{{qty|1}}}}}} * {{{cost|{{{price|0}}}}}}}}}}}}
 +
| ${{format price| {{#expr: {{{cost|{{{price|0}}}}}} * ( 1 - {{{discount| {{#ifexpr: {{{quantity|{{{qty|1}}}}}} <= 9 | 0.1 | {{#ifexpr: {{{quantity|{{{qty|1}}}}}} >= 10 and {{{quantity|{{{qty|1}}}}}} <= 24 | 0.2 | {{#ifexpr: {{{quantity|{{{qty|1}}}}}} >= 25 and {{{quantity|{{{qty|1}}}}}} <= 49 | 0.3 | {{#ifexpr: {{{quantity|{{{qty|1}}}}}} >= 50 | 0.4 }}}}}}}}}}} ) }} }}
 +
| ${{format price| {{#ifeq: {{{out_of_stock|{{{oos|no}}}}}} | yes | 0 | {{#expr: {{{quantity|{{{qty|1}}}}}} * {{{cost|{{{price|0}}}}}} * ( 1 - {{{discount| {{#ifexpr: {{{quantity|{{{qty|1}}}}}} <= 9 | 0.1 | {{#ifexpr: {{{quantity|{{{qty|1}}}}}} >= 10 and {{{quantity|{{{qty|1}}}}}} <= 24 | 0.2 | {{#ifexpr: {{{quantity|{{{qty|1}}}}}} >= 25 and {{{quantity|{{{qty|1}}}}}} <= 49 | 0.3 | {{#ifexpr: {{{quantity|{{{qty|1}}}}}} >= 50 | 0.4 }}}}}}}}}}} ) }} }}}}
 
<noinclude>{{adafruit item bottom}}
 
<noinclude>{{adafruit item bottom}}
  
 
{{documentation}}
 
{{documentation}}
 
</noinclude>
 
</noinclude>

Latest revision as of 04:42, 25 October 2010

Item Qty Cost/Item Cost Discounted Cost/Item Discounted Cost
[{{{url}}} {{{name}}}] 1 $0.00 $0.00 $0.00 $0.00
[edit] [purge] Template documentation

Usage

{{adafruit item row
|name = 
|url = 
|quantity = 
|out_of_stock = 
|price = 
|discount = 
}}