Display file upload details in the cart page
Displaying the file upload details in the cart page is a great way to assure your customers that they have uploaded the file correctly, and that you will receive it once they purchase the item. Follow the steps below to get started.
Locate your theme's cart file
1. Starting from your Shopify admin, click on Online Store, then click on Themes.
2. Find the theme you want to edit, click the Actions ▼ button, then click Edit code.
3. On the left side, under Templates, check to see if you have a cart.liquid file. If your theme's cart.liquid file doesn't contain much code, it may be pointing to a different file. In most cases, the code will be located in the cart-template.liquid file, within the Sections folder. Also, you can hover over the file's name and click on the right arrow ➡️ to view the different file.
If your theme does not have a cart.liquid file and if you see a cart.json file, locate a file called main-cart-items.liquid file in the Sections folder.
Edit your theme's cart file
1. If you have found a cart.liquid file or cart-template.liquid file in your theme, perform a search using keyboard shortcuts (Ctrl F or ⌘ F) for:
if p.last contains '/uploads/'
If you have found a main-cart-items.liquid file in your theme, perform a search using keyboard shortcuts (Ctrl F or ⌘ F) for:
{%- if property.last contains '/uploads/' -%}
2. For the cart.liquid or cart-template.liquid file, highlight over the full line you found and the next two lines. Then, delete those three lines.
For the main-cart-items.liquid file, highlight over the full line you found and the next five lines. Then, delete those five lines.
3. For the cart.liquid or cart-template.liquid file, copy and paste the following code snippet right where you just removed those three lines of code, as seen below:
{% if p.last contains '//uploadery.s3' %} <a href="{{ p.last }}">Link to your file</a> {% else %}
For the main-cart-items.liquid file, copy and paste the following code snippet right where you just removed those three lines of code, as seen below:
{% if property.last contains '//uploadery.s3' %} <a href="{{ property.last }}" class="link" target="_blank"> Link to your file </a> {%- else -%}
3. Save your changes.
If you need help getting this set up, feel free to contact our support team. We'd be happy to help out!