COLLECTION TEMPLATE PRODUCT CARD GRID NO IMAGE CHANGE

COLLECTION  GIRD NO IMAGE CHANGE

-------------------------------------------------------------------------------------------------------------------
READ MORE:
-------------------------------------------------------------------------------------------------------------------
 -------------------------------------------------------------------------------------------------------------
FIND THIS LINE IN SECTION FOLDER FILE collection-template.liquid
{% include 'product-card-grid', max_height: max_height %}
AND ADD CODE
--------------------------------------------------------------------------------------------------------------
product-card-grid.liquid CODE
--------------------------------------------------------------------------------------------------------------
//REMOVE NO IMAGE BY CSS CODE
<style>
img#ProductCardImage-collection-template-6592305528925 {
display:none;
}
</style>

//CHANGE UNLESS LINE FOR WHEN PRODUCT FEATURE IMAGE EQUAL TO BLANK
{% unless product.featured_image != blank %}
<img  src="https://dummyimage.com/300x300/ccc/999"  style="position: absolute;"/>    
{% endunless %}
----------------------------------------------------------------------------------------------------------------------
METHOD :2
WE CAN CHANGE UNLESS CODE WITH BELOW CODE
----------------------------------------------------------------------------------------------------------------------
<style>
img#ProductCardImage-collection-template-6592305528925 {
display:none;
}
</style>
{% if product.featured_image == blank%}
<img src="https://dummyimage.com/300x300/ccc/999" />
{% endif %}
----------------------------------------------------------------------------------------------------------------------
WE NEED  TO CHANGE PADDING TOP % DECRESSE 100 TO0  LINE
<div style="padding-top:{% unless product.featured_image == blank %}
{{ 1 | divided_by: product.featured_image.aspect_ratio | times: 100}}%{% else %}0%{% endunless %};">
----------------------------------------------------------------------------------------------------------------------
WE PUT BLANK H4 TITLE UNDER IMAGE SRC AFTER ALT LINE
----------------------------------------------------------------------------------------------------------------------
alt="{{ product.featured_image.alt }}">
<div class="h4 grid-view-item__title product-card__title" 
aria-hidden="true">{{ product.title }}</div>
----------------------------------------------------------------------------------------------------------------------


Comments

Popular posts from this blog

ADD AUTOCOMPLETE SEARCH BOX IN SHOPIFY DEBUT THEME 5️⃣