How can I add custom add-ons to my cart drawer on Shopify?

Hi there,

I’m new to Shopify so would appreciate if I can get some direction on how to add custom add-ons to cart drawer.

Specifically I want to add to cart-drawer.liquid this piece, but since there is no product in cart-drawer, I’m having issues.

{%- for tag in product.tags -%}
{%- if tag contains '__with' -%}
{%- assign product_handle = tag | split: '__with:' | last -%}
{%- assign associated_product = all_products[product_handle] -%}

{%- if associated_product != empty -%}

{% render 'product-item', product: associated_product, use_horizontal: true, show_labels: false, show_product_info: true, show_vendor: false, show_price_on_hover: false %}

{%- break -%}
{%- endif -%}
{%- endif -%}
{%- endfor -%}

1 Like

@nonila
Welcome to Shopify Community,
It’s Depends on your Theme Because every theme have a different file structure,

So you have to understand your file structure or Hire a developer to fix out your issues,
Let me, know if you need any more help,

Thank you.

1 Like

I use Prestige theme. Files are pretty standard, cart has its on file in the snippets - cart-drawer.liquid.

Can anyone give some directions on how to do this?