Skip to content

Commit

Permalink
Merge branch '1.8'
Browse files Browse the repository at this point in the history
* 1.8:
  [Core] Decouple cart collector from shop
  • Loading branch information
GSadee committed Oct 23, 2020
2 parents a9ac8bd + 9e586eb commit fcd69c0
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

{% block toolbar %}
{% if collector.hasCart %}
{% import "@SyliusShop/Common/Macro/money.html.twig" as money %}
{% import "@SyliusCore/Common/Macro/money.html.twig" as money %}

{% set icon %}
{{ include('@SyliusCore/Collector/Icon/cart.svg') }}
Expand Down Expand Up @@ -49,7 +49,7 @@

{% block panel %}
{% if collector.hasCart %}
{% import "@SyliusShop/Common/Macro/money.html.twig" as money %}
{% import "@SyliusCore/Common/Macro/money.html.twig" as money %}

<h2>Cart</h2>
<table>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{%- macro format(amount, currency_code) -%}
{{ amount|sylius_format_money(currency_code, sylius.localeCode) }}
{%- endmacro -%}

{%- macro convertAndFormat(amount) -%}
{% from _self import format %}

{{- format(amount|sylius_convert_money(sylius.channel.baseCurrency.code, sylius.currencyCode), sylius.currencyCode) }}
{%- endmacro -%}

0 comments on commit fcd69c0

Please sign in to comment.