Shopify themes, liquid, logos, and UX
Hi! We use Dawn (7.0.1). For a bit of custom code I'm writing, I need to detect the ID of the <form id=""> currently active, or detect whether the cart in question is the drawer or the page (or the popup!)
Essentially, I need a way to get the current form ID - but I can get this either directly (via some kind of {% current form %}?) or indirectly by knowing which kind of cart is currently in use.
Thanks
Solved! Go to the solution
This is an accepted solution.
Hello @nagumi
Here is the Liquid code to get cart type in dawn theme. settings.cart_type
HTML/Liquid code to check if it’s drawer
{%- if settings.cart_type == "drawer" -%}
// drawer code
{% endif %}
If you find our reply helpful, please hit Like and Mark it as a Solution.
An award-winning North American Shopify Development Agency That Delivers Powerful Results, Innovation, and Secure Digital Transformation.
Thank You,
WebDesk Solution Support Team
Get a Free Quote | Email | Shopify Partner | Shopify Development Agency | Call Us 877.536.3789
Location: 150 King St. W. Toronto, ON M5H 1J9
This is an accepted solution.
Hello @nagumi
Here is the Liquid code to get cart type in dawn theme. settings.cart_type
HTML/Liquid code to check if it’s drawer
{%- if settings.cart_type == "drawer" -%}
// drawer code
{% endif %}
If you find our reply helpful, please hit Like and Mark it as a Solution.
An award-winning North American Shopify Development Agency That Delivers Powerful Results, Innovation, and Secure Digital Transformation.
Thank You,
WebDesk Solution Support Team
Get a Free Quote | Email | Shopify Partner | Shopify Development Agency | Call Us 877.536.3789
Location: 150 King St. W. Toronto, ON M5H 1J9
Hi there, where can I read more about the "settings" object? I'm struggling to find out information about this object and what data is there.
Thanks
Starting a B2B store is a big undertaking that requires careful planning and execution. W...
By JasonH Sep 23, 2024By investing 30 minutes of your time, you can unlock the potential for increased sales,...
By Jacqui Sep 11, 2024We appreciate the diverse ways you participate in and engage with the Shopify Communi...
By JasonH Sep 9, 2024