How can I restore the trash icon in the Craft theme cart page?

I was trying to remove the quantity selector in the cart page, but mistakingly I delete the trash icon also. how can I return back the trash icon? I am using Craft theme.

To restore the trash icon in the cart page of your Craft theme, you can follow these steps:

  1. Log in to your Shopify admin.
  2. From the left-hand sidebar, click on “Online Store” and then select “Themes.”
  3. In the “Themes” section, you’ll see your currently active theme. Click on the “Actions” button next to it and select “Edit code” from the dropdown menu.
  4. In the code editor, locate the file named “cart-template.liquid” or “cart.liquid.” This file is responsible for rendering the cart page.
  5. Look for the code that generates the trash icon. It might look something like this:
<a href="{{ item.url }}" class="cart__remove" title="{{ 'cart.general.remove' | t }}">
<svg aria-hidden="true" focusable="false" role="presentation" class="icon icon-cross" viewBox="0 0 64 64">
<!-- SVG icon code here -->
</svg>
</a>
  1. If you accidentally deleted this code or modified it, you can copy and paste the code above back into the appropriate location within the file. Make sure to place it where you want the trash icon to appear.
  2. Save the changes to the file.
  3. Preview your cart page to see if the trash icon has been restored. If it looks good, publish the changes to make them live on your website.

That should bring back the trash icon in your cart page. If you encounter any issues or need further assistance, feel free to ask for help.

How can I close this topic? I’ve already posted on another section and it is answered now!

I have edited my answer to be more appropriate, please see if it can help you

FMike no answer appears!

Hi [email removed]CreativeMind202,

You can try this code by following these steps:

Step 1: Go to Online Store->Theme->Edit code.

Step 2: Search file theme.liquid

Step 3: Paste the below code at the bottom of the file → Save

cart-items .cart-item__quantity-wrapper {
     display: flex !important;
}
cart-items .cart-item__quantity-wrapper quantity-input.quantity.cart-quantity {
    display: none !important;
}
cart-items cart-remove-button .icon-remove {
    display: block !important;
}

Hope my solution works perfectly for you.

Cheers!

Oliver | PageFly

To restore the trash icon in the cart page of your Craft theme, you can follow these steps:

  1. Log in to your Shopify admin.
  2. From the left-hand sidebar, click on “Online Store” and then select “Themes.”
  3. In the “Themes” section, you’ll see your currently active theme. Click on the “Actions” button next to it and select “Edit code” from the dropdown menu.
  4. In the code editor, locate the file named “cart-template.liquid” or “cart.liquid.” This file is responsible for rendering the cart page.
  5. Look for the code that generates the trash icon. It might look something like this:
<a href="{{ item.url }}" class="cart__remove" title="{{ 'cart.general.remove' | t }}">
<svg aria-hidden="true" focusable="false" role="presentation" class="icon icon-cross" viewBox="0 0 64 64">
<!-- SVG icon code here -->
</svg>
</a>
  1. If you accidentally deleted this code or modified it, you can copy and paste the code above back into the appropriate location within the file. Make sure to place it where you want the trash icon to appear.
  2. Save the changes to the file.
  3. Preview your cart page to see if the trash icon has been restored. If it looks good, publish the changes to make them live on your website.

That should bring back the trash icon in your cart page.