Sha256: 71d9f01c85c71b7b9973bb01aac723cfa08d2894d6b5ba2831484c7b73e3428c

Contents?: true

Size: 1.44 KB

Versions: 140

Compression:

Stored size: 1.44 KB

Contents

<div class="field">
  <%= fields_for "#{prefix}[calculator_attributes]", calculator do |f| %>
    <%= f.label :preferred_amount %>
    <%= render "spree/admin/shared/number_with_currency", f: f, amount_attr: :preferred_amount, currency_attr: :preferred_currency %>
  <% end %>
</div>

<div class="field">
  <p>
    <%= admin_hint(
      calculator.model_name.human,
      """
        <p>
          This amount will be distributed to line items weighted relative to
          their price. More expensive line items will receive a greater share
          of the adjustment.
        </p>

        <p>
          For example, with three line items and a preferred amount of $15 we
          would end up with the following distribution:
        </p>

        <table>
          <thead>
            <tr>
              <th></th>
              <th>Price</th>
              <th>Weighted Adj.</th>
            </tr>
          </thead>
          <tbody>
            <tr>
              <td>Socks</td>
              <td>$5</td>
              <td>-$1.5</td>
            </tr>
            <tr>
              <td>Shoes</td>
              <td>$30</td>
              <td>-$9</td>
            </tr>
            <tr>
              <td>Slippers</td>
              <td>$15</td>
              <td>-$4.5</td>
            </tr>
          </tbody>
        </table>
      """
    ) %>

    This amount will be the <strong>total</strong> discount spread amongst all
    of the line items.
  </p>
</div>

Version data entries

140 entries across 140 versions & 4 rubygems

Version Path
solidus_legacy_promotions-4.4.1 lib/views/backend/spree/admin/promotions/calculators/distributed_amount/_fields.html.erb
solidus_legacy_promotions-4.4.0 lib/views/backend/spree/admin/promotions/calculators/distributed_amount/_fields.html.erb
solidus_backend-4.3.4 app/views/spree/admin/promotions/calculators/distributed_amount/_fields.html.erb
solidus_backend-4.2.4 app/views/spree/admin/promotions/calculators/distributed_amount/_fields.html.erb
solidus_backend-4.1.5 app/views/spree/admin/promotions/calculators/distributed_amount/_fields.html.erb
solidus_backend-4.3.3 app/views/spree/admin/promotions/calculators/distributed_amount/_fields.html.erb
solidus_backend-4.3.2 app/views/spree/admin/promotions/calculators/distributed_amount/_fields.html.erb
solidus_backend-4.1.4 app/views/spree/admin/promotions/calculators/distributed_amount/_fields.html.erb
solidus_backend-4.3.1 app/views/spree/admin/promotions/calculators/distributed_amount/_fields.html.erb
solidus_backend-4.3.0 app/views/spree/admin/promotions/calculators/distributed_amount/_fields.html.erb
solidus_friendly_promotions-1.0.0.rc.2 app/views/solidus_friendly_promotions/admin/promotion_actions/calculators/distributed_amount/_fields.html.erb
solidus_friendly_promotions-1.0.0.rc.1 app/views/solidus_friendly_promotions/admin/promotion_actions/calculators/distributed_amount/_fields.html.erb
solidus_friendly_promotions-1.0.0.pre app/views/solidus_friendly_promotions/admin/promotion_actions/calculators/distributed_amount/_fields.html.erb
solidus_backend-4.2.3 app/views/spree/admin/promotions/calculators/distributed_amount/_fields.html.erb
solidus_backend-4.1.3 app/views/spree/admin/promotions/calculators/distributed_amount/_fields.html.erb
solidus_backend-4.0.4 app/views/spree/admin/promotions/calculators/distributed_amount/_fields.html.erb
solidus_backend-3.4.6 app/views/spree/admin/promotions/calculators/distributed_amount/_fields.html.erb
solidus_backend-4.0.3 app/views/spree/admin/promotions/calculators/distributed_amount/_fields.html.erb
solidus_backend-4.1.2 app/views/spree/admin/promotions/calculators/distributed_amount/_fields.html.erb
solidus_backend-4.2.2 app/views/spree/admin/promotions/calculators/distributed_amount/_fields.html.erb