Sha256: a569e8a07fe14e7838d037a04c062f97cda1756b1476bca290908f1ff8169af2

Contents?: true

Size: 1.39 KB

Versions: 1

Compression:

Stored size: 1.39 KB

Contents

<div class="cart-adjustments" id="cart_adjustments">
  <%= render(
    "spree/components/cart/cart_amount_row",
    type: t('spree.cart_subtotal', count: @order.line_items.sum(:quantity)),
    amount: @order.display_item_total
  ) %>

  <% if @order.line_item_adjustments.exists? %>
    <% @order.line_item_adjustments.promotion.eligible.group_by(&:label).each do |label, adjustments| %>
      <% if adjustments.sum(&:amount) != 0 %>
        <%= render(
          "spree/components/cart/cart_adjustment",
          type: t('spree.promotion'),
          label: label,
          adjustments: adjustments
        ) %>
      <% end %>
    <% end %>
  <% end %>

  <% @order.all_adjustments.tax.eligible.group_by(&:label).each do |label, adjustments| %>
    <%= render(
      "spree/components/cart/cart_adjustment",
      type: t('spree.tax'),
      label: label,
      adjustments: adjustments
    ) %>
  <% end %>

  <% @order.shipments.each do |shipment| %>
    <%= render(
      "spree/components/cart/cart_amount_row",
      type: t('spree.shipping'),
      label: shipment.shipping_method.name,
      amount: shipment.display_total_before_tax
    ) %>
  <% end %>

  <% @order.adjustments.eligible.group_by(&:label).each do |label, adjustments| %>
    <%= render(
      "spree/components/cart/cart_adjustment",
      type: t('spree.adjustment'),
      label: label,
      adjustments: adjustments
    ) %>
  <% end %>
</div>

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
solidus_starter_frontend-0.1.0 app/views/spree/components/cart/_cart_adjustments.html.erb