How to add featured collection to cart drawer? (Focal Theme)

Hey there!

I would like to use the cart drawer instead of the cart page, but in the Focal theme, it is currently not possible to display the featured collection in the cart drawer (only available on the cart page).

Currently, the cart drawer can only have recommended products section. Code for the recommended product section:

{%- if section.settings.show_recommendations -%}

{%- assign acceptable_recommendations_count = 0 -%}

{%- for product in recommendations.products -%}
{%- assign matching_product = cart.items | where: ‘product_id’, product.id | first -%}

{%- if matching_product == blank -%}
{%- assign acceptable_recommendations_count = acceptable_recommendations_count | plus: 1 -%}
{%- endif -%}
{%- endfor -%}

{%- if recommendations.performed -%}
{%- if acceptable_recommendations_count > 0 -%}

{%- if section.settings.recommendations_title != blank -%}

{{ section.settings.recommendations_title | escape }}

{{ section.settings.recommendations_title | escape }}

{%- endif -%}
{%- assign shown_products_count = 0 -%}

{%- for product in recommendations.products -%}
{%- if shown_products_count >= 6 -%}
{%- break -%}
{%- endif -%}

{%- assign matching_product = cart.items | where: ‘product_id’, product.id -%}

{%- if matching_product.size == 0 -%}
{%- assign shown_products_count = shown_products_count | plus: 1 -%}
{%- render ‘product-item’, product: product, reduced_content: true, reduced_font_size: true, hide_secondary_image: true, sizes_attribute: ‘(max-width: 740px) 65px, 92px’ -%}
{%- endif -%}
{%- endfor -%}

{%- endif -%} {%- else -%}
{%- render 'icon' with 'spinner', stroke_width: 3, width: 40, height: 40 -%}
{%- endif -%} {%- endif -%}

Would it be somehow possible to replace these recommended products with just a featured collection?

Any help on this is highly appreciated!

1 Like

@BTCPJL

can you please share store url

Sent store link as dm

Hi there - looking to do the same - did you find a solution to this?

Ciao,

interested in the same solution.
Can you help?

Pietro