Add image under AJAX Cart button

Ascend_Developm
Shopify Partner
3 0 0

Hello,

I'm trying to add an image under my cart button. The cart is using AJAX in Brooklyn theme.
I'm using liquid tags such as <img src="{{ 'image.png' | asset_url | img_tag }}"/> and trying to add it inside the ajax-cart-template.liquid. This is the section where I'm adding it.

<div class="ajaxcart__footer ajaxcart__footer--fixed">
        <div class="grid--full">
          <div class="grid__item two-thirds">
            <p class="ajaxcart__subtotal">{% endraw %}{{ 'cart.general.subtotal' | t }}{% raw %}</p>
          </div>
          <div class="grid__item one-third text-right">
            <p class="ajaxcart__subtotal">{{{totalPrice}}}</p>
             <img src="{{ 'image.png' | asset_url | img_tag }}"/>
          </div>
        </div>
        {{#if totalCartDiscount}}
          <p class="ajaxcart__savings text-center">{{{totalCartDiscount}}}</p>
        {{/if}}
        <p class="ajaxcart__note text-center">{% endraw %}{{ 'cart.general.shipping_at_checkout' | t }}{% raw %}</p>
        <button type="submit" class="btn--secondary btn--full cart__checkout" name="checkout">
          {% endraw %}{{ 'cart.general.checkout' | t }}{% raw %} <span class="icon icon-arrow-right" aria-hidden="true"></span>
        </button>
      </div>

When I do this the cart just keeps loading and hangs. The "add to cart" button from a product page doesn't work also.

Anyone knows?

 

Thanks!

0 Likes
Richard_
Shopify Expert
129 0 30

Would you mind providing me your store URL so I can take a closer look?

Richard Nguyen | PageFly CEO
0 Likes