Skip to content

Commit

Permalink
Merge pull request #46 from FosterCommerce/stephen/flip-old-price-order
Browse files Browse the repository at this point in the history
Flip order of old price/new price in cart
  • Loading branch information
sjcallender authored Nov 1, 2024
2 parents 2859d78 + ad543e6 commit 33da7c4
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions src/templates/_components/app/line-item-cart.twig
Original file line number Diff line number Diff line change
Expand Up @@ -62,10 +62,10 @@
{% if lineItem.purchasable.onPromotion %}
<p class="mt-3 text-sm uppercase text-gray-500">
<del
class="line-through">{{ lineItem.purchasable.priceAsCurrency }}</del> {{ lineItem.purchasable.salePriceAsCurrency }}
class="line-through">{{ lineItem.purchasable.priceAsCurrency }}</del> {{ lineItem.purchasable.salePriceAsCurrency }} each
</p>
{% else %}
<p class="mt-3 text-sm uppercase text-gray-500">{{ lineItem.purchasable.priceAsCurrency }}</p>
<p class="mt-3 text-sm uppercase text-gray-500">{{ lineItem.purchasable.priceAsCurrency }} each</p>
{% endif %}
</div>

Expand Down Expand Up @@ -162,12 +162,13 @@

<div class="mt-3 md:mt-0">
{% if lineItem.onPromotion or lineItem.discount or lineItem.purchasable.onPromotion %}
<h4 class="font-semibold">{{ (lineItem.subtotal + lineItem.adjustmentsTotal)|commerceCurrency(cart.paymentCurrency) }}</h4>
<h5 class="mt-1 text-sm text-gray-600 line-through"><span
v-text="lineSubtotal">{{ lineItem.subtotalAsCurrency() }}</span></h5>
<p class="mt-1 text-sm text-gray-600 line-through"><span
v-text="lineSubtotal">{{ lineItem.subtotalAsCurrency() }}</span></p>
<p class="font-semibold">{{ (lineItem.subtotal + lineItem.adjustmentsTotal)|commerceCurrency(cart.paymentCurrency) }}</p>

{% else %}
<h4 class="font-semibold"><span v-text="lineSubtotal">{{ lineItem.subtotalAsCurrency() }}</span>
</h4>
<p class="font-semibold"><span v-text="lineSubtotal">{{ lineItem.subtotalAsCurrency() }}</span>
</p>
{% endif %}
</div>

Expand Down

0 comments on commit 33da7c4

Please sign in to comment.