Skip to content

Commit 61576cf

Browse files
cdxkerskeptrunedev
authored andcommitted
feature: add ability to hide product descriptions and prices in
component
1 parent db1d81f commit 61576cf

2 files changed

Lines changed: 16 additions & 0 deletions

File tree

clients/trieve-shopify-extension/extensions/global-search/blocks/global_component.liquid

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,8 @@
104104
showFloatingSearchIcon: toBool(getValue("{{ block.settings.show_floating_search_icon }}", true)),
105105
floatingSearchIconPosition: getValue("{{ block.settings.floating_icon_pos }}", "left"),
106106
allowSwitchingModes: false,
107+
hidePrice: !toBool(getValue("{{ block.settings.display_price }}", true)),
108+
hideChunkHtml: !toBool(getValue("{{ block.settings.display_description }}", true)),
107109
});
108110
}
109111
</script>
@@ -180,6 +182,18 @@
180182
],
181183
"default": "left"
182184
},
185+
{
186+
"type": "checkbox",
187+
"id": "display_price",
188+
"label": "Display Product Price",
189+
"default": true
190+
},
191+
{
192+
"type": "checkbox",
193+
"id": "display_description",
194+
"label": "Display Product Description",
195+
"default": true
196+
},
183197
{
184198
"id": "custom_css",
185199
"type": "textarea",

clients/trieve-shopify-extension/extensions/global-search/blocks/inline_component.liquid

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,8 @@
9292
querySelector: appMetafieldTrieve.checkout_selector,
9393
},
9494
},
95+
hidePrice: false,
96+
hideChunkHtml: false
9597
});
9698
}
9799
</script>

0 commit comments

Comments
 (0)