All things Shopify and commerce
On the product page, by default, the description part is on focus (visible) and reviews etc are hidden tabs or not visible until clicked. I want to make the reviews visible when the page is viewed and the description can be hidden until clicked.
Solved! Go to the solution
This is an accepted solution.
Try using the below code you can put this code at the very end of main-product.liquid
<script>
document.addEventListener('DOMContentLoaded', function () {
document.querySelector("#shopify-section-gl-product-page-description .reviews_tab a").click()
});
</script>
Hope it will help...
We are using the theme below, if you see the product page, you will see that description is in focus and only when you click the reviews, can you see the reviews. we want the reviews to be in focus when the page opens and description should be on click.
https://new-basel.myshopify.com/collections/shoes/products/ytristique-adipiscing
Yes
This is an accepted solution.
Try using the below code you can put this code at the very end of main-product.liquid
<script>
document.addEventListener('DOMContentLoaded', function () {
document.querySelector("#shopify-section-gl-product-page-description .reviews_tab a").click()
});
</script>
Hope it will help...
Thanks, it worked!
Thanks to everyone who participated in our AMA with 2H Media: Marketing Your Shopify St...
By Jacqui Sep 6, 2024The Hydrogen Visual Editor is now available to merchants in Shopify Editions | Summer '...
By JasonH Sep 2, 2024Note: Customizing your CSS requires some familiarity with CSS and HTML. Before you cust...
By JasonH Aug 12, 2024