Template:Adafruit item row: Difference between revisions
Appearance
added two new calculated fields |
No edit summary |
||
| 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 | | | ${{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| {{#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 | | | ${{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}} | ||
{{documentation}} | {{documentation}} | ||
</noinclude> | </noinclude> | ||
Revision as of 04:34, 25 October 2010
| Item | Qty | Cost/Item | Cost | Discounted Cost/Item | Discounted Cost |
|---|---|---|---|---|---|
| [{{{url}}} {{{name}}}] | 1 | $0.00 | $0.00 | $0.10 | $0.00 |
[edit] []
Template documentation
Usage
{{adafruit item row
|name =
|url =
|quantity =
|out_of_stock =
|price =
|discount =
}}
| The above documentation is transcluded from Template:Adafruit item row/doc. (edit | history) Editors can experiment in this template's sandbox (create) and testcases (create) pages. Please add categories and interwikis to the /doc subpage. Subpages of this template. |