Sha256: 61efa1199d32125a2c75960b022969c70afe865c6a377852c0381b9aa70f6855
Contents?: true
Size: 645 Bytes
Versions: 4
Compression:
Stored size: 645 Bytes
Contents
<% display_percent ||= false %> <% if product.price > 0 and product.master.volume_prices.present? %> <div id="bulk-discount"> <h6><%= Spree.t(:bulk_discount) %></h6> <table class="table"> <% product.master.volume_prices.each do |v| %> <%= content_tag(:tr) do %> <%= content_tag :td, (v.open_ended? ? v.range : "#{v.range.to_range.begin}–#{v.range.to_range.end}") %> <%= content_tag :td, Spree::Money.new(v.amount).to_s %> <%= content_tag(:td, '%i%' % ((1.0 - v.amount / product.master.price) * 100.0).round) if display_percent %> <% end %> <% end %> </table> </div> <% end %>
Version data entries
4 entries across 4 versions & 1 rubygems