Skip to content

Commit

Permalink
Modify cart variable
Browse files Browse the repository at this point in the history
  • Loading branch information
sjcallender authored Oct 11, 2024
1 parent 8ee1839 commit 0d796fa
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/templates/_layouts/default.twig
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,9 @@
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta http-equiv="X-UA-Compatible" content="ie=edge" />
<meta name="robots" content="noindex, nofollow" />
<meta name="robots" content="noindex, nofollow" />

{% if cart is not defined %}
{% set cart = craft.commerce.carts.cart %}
{% endif %}
{% set cart = cart is not defined ? craft.commerce.carts.cart : cart %}

{% if
(craft.app.request.getSegment(1) != craft.checkout.paths.cart and craft.app.request.getSegment(-1) != 'order' and cart.lineItems|length == 0)
Expand Down

0 comments on commit 0d796fa

Please sign in to comment.