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

SmoothlyClear
Excursionist
16 0 1

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 -%}
<cart-drawer-recommendations section-id="{{ section.id }}" product-id="{{ cart.items.first.product_id }}" class="mini-cart__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 -%}
<div class="mini-cart__recommendations-inner">
{%- if section.settings.recommendations_title != blank -%}
<p class="mini-cart__recommendations-heading heading heading--small hidden-pocket">{{ section.settings.recommendations_title | escape }}</p>
<p class="mini-cart__recommendations-heading heading heading--xsmall text--subdued hidden-lap-and-up">{{ section.settings.recommendations_title | escape }}</p>
{%- endif -%}

<div class="scroller">
<div class="scroller__inner">
<div class="mini-cart__recommendations-list">
{%- 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 -%}
</div>
</div>
</div>
</div>
{%- endif -%}
{%- else -%}
<div class="mini-cart__recommendations-inner">
<div class="spinner">
{%- render 'icon' with 'spinner', stroke_width: 3, width: 40, height: 40 -%}
</div>
</div>
{%- endif -%}
</cart-drawer-recommendations>
{%- endif -%}

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

Any help on this is highly appreciated!

Replies 3 (3)
KetanKumar
Shopify Partner
36719 3634 11911

@SmoothlyClear 

can you please share store url 

If helpful then please Like and Accept Solution.
Want to modify or custom changes on store Hire me.
- Feel free to contact me on bamaniyaketan.sky@gmail.com regarding any help
Shopify Partner | Skype : bamaniya.sky
PSD to Shopify | Shopify Design Changes | Shopify Custom Theme Development and Desing | Custom Modifications In to Shopify Theme | SEO & Digital Marketing
SmoothlyClear
Excursionist
16 0 1

Sent store link as dm 

JohnBoye
Tourist
10 0 4

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