[`Virtual stock must include at least one real stock.`]
{sprintf('[`Virtual stock is a group of real stocks. The order of real stocks defines the priority for product stock update when order is placed. This is handy for grouping real stocks and points of sale which are located within the same geographical region, and defining rules for automated product stock updates. Help `]', '[`https://www.shop-script.com/help/12062/stocks/`]')}
{/if}
{/function}
[`Stocks`]
{*
* Stock rules form
*}
{*
* Helper to draw condition editor for rules
*}
{function rule_condition_editor_form conditions=null}
{if $conditions}
{foreach $conditions as $rule}
{str_replace(['%%RULE_ID%%', '%%RULE_TYPE%%', '%%RULE_DATA%%'], [
$rule.id,
$rule.rule_type,
$rule.rule_data
], $smarty.capture.new_condition)}
{/foreach}
{/if}
{/function}
{*
* HTML for new rule condition (before plugins have chance to alter its form)
*}
{capture "new_condition"}