Where should I place the Planet app snippet in the cart.liquid file?

Hi, on the new app it says to show that we use the app we add a snippet to the cart.liquid file where we want the badge to appear and it will display the Planet badge on the cart page.

  1. Paste the snippet in your templates/cart.liquid file where you want the badge to appear.

I have found the file (for some reason ours in in /sections/cart-template.liquid) but I don’t know where to put the snippet. Can I just add it at the end? I would like it to show under the “checkout” button.

Thanks for your help.

Lizzie

1 Like

Also wondering this

1 Like

Also having issues with this - do you have the actual code of the snippet/image that needs to be added?

Yes, when you click on add badge in the app it displays the code you need to copy.

  1. Copy the following code snippet to your clipboard.

    {%- assign CURRENT_DATE = "now" | date: "%Y-%m-%dT%H:%MZ" -%} {%- assign ACTIVE_UNTIL = shop.metafields.shopify-planet.active-until | date: "%Y-%m-%dT%H:%MZ" -%} {% if CURRENT_DATE < ACTIVE_UNTIL and shop.metafields.shopify-planet.experiment %} {% endif %} {% if CURRENT_DATE < ACTIVE_UNTIL or request.design_mode %}
    All deliveries are carbon neutral
    Powered by Shopify Planet
    {% endif %}
  2. Paste the snippet in your templates/cart.liquid file where you want the badge to appear.

  3. Verify the code snippet is working. Once you’ve inserted the snippet into your theme, you can check to make sure everything is working correctly.

Is there a way to translate the badge text, once it is installed on the front-end?

(This is for the official app release, not the beta)