Difference between revisions of "Template:Adafruit item row"

From MidsouthMakers - Memphis Area Hackerpace
Jump to navigation Jump to search
Line 5: Line 5:
 
| ${{format price| {{{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| {{#ifeq: {{{out_of_stock|{{{oos|no}}}}}} | yes | 0 | {{#expr: {{{quantity|{{{qty|1}}}}}} * {{{cost|{{{price|0}}}}}}}}}}}}
| ${{format price| {{{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| {{#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}}}}}} * {{#if: {{{discounted_cost|}}} | {{{discounted_cost}}} | {{{cost|{{{price|0}}}}}} - {{{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 }}}}}}}}}}} * {{{cost|{{{price|0}}}}}}}}}}}}}}
 
| ${{format price| {{#ifeq: {{{out_of_stock|{{{oos|no}}}}}} | yes | 0 | {{#expr: {{{quantity|{{{qty|1}}}}}} * {{#if: {{{discounted_cost|}}} | {{{discounted_cost}}} | {{{cost|{{{price|0}}}}}} - {{{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 }}}}}}}}}}} * {{{cost|{{{price|0}}}}}}}}}}}}}}
 
<noinclude>{{adafruit item bottom}}
 
<noinclude>{{adafruit item bottom}}

Revision as of 04:40, 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 = 
}}