From 285365adde68f000ecf50a7df2f0670bb5cb8514 Mon Sep 17 00:00:00 2001 From: adildev101 Date: Tue, 25 Apr 2023 12:10:20 +0100 Subject: [PATCH 1/2] init --- assets/product-column.css | 4 ++-- sections/product-column.liquid | 22 +++++----------------- snippets/product-home.liquid | 7 +++---- styles/product-column.scss | 4 ++-- 4 files changed, 12 insertions(+), 25 deletions(-) diff --git a/assets/product-column.css b/assets/product-column.css index 647f3a5c..36b02e26 100644 --- a/assets/product-column.css +++ b/assets/product-column.css @@ -37,7 +37,7 @@ } @media screen and (max-width: 768px) { .product-home-container .product-block .product-name { - font-size: 24px; + font-size: 25px; } } .product-home-container .product-block .product-price { @@ -48,7 +48,7 @@ .product-home-container .product-block .product-compare-price { color: #8D8D8D; font-weight: 400; - font-size: 17px; + font-size: 19px; line-height: 23px; } .product-home-container .product-block .product-description { diff --git a/sections/product-column.liquid b/sections/product-column.liquid index ceaf6055..cd06f2b5 100644 --- a/sections/product-column.liquid +++ b/sections/product-column.liquid @@ -11,12 +11,6 @@ .product_customization-{{ id }} { background-color: {{ section.settings.background_color.hex }}; } - - @media screen and (max-width: 768px) { - .product_customization-{{ id }} { - display: {% if section.settings.show_product %}block{% else %}none{% endif %}; - } - } {%- endstyle -%}
@@ -40,6 +34,11 @@ "id": "product", "type": "product" }, + { + "label": "Product description", + "id": "product_description", + "type": "richtext" + }, { "type": "checkbox", "id": "show_compare_at_price", @@ -51,12 +50,6 @@ "id": "background_color", "label": "Background color" }, - { - "type": "checkbox", - "id": "show_product", - "label": "Show product on mobile", - "default": true - }, { "type": "range", "id": "padding_top", @@ -131,11 +124,6 @@ "label": "Price", "limit": 1, "type": "product_price" - }, - { - "label": "Description", - "limit": 1, - "type": "product_description" } ] } diff --git a/snippets/product-home.liquid b/snippets/product-home.liquid index 2fd7fda1..a066bd3c 100644 --- a/snippets/product-home.liquid +++ b/snippets/product-home.liquid @@ -39,10 +39,9 @@ {% endif %} - {%- when 'product_description' -%} -
{{ product.description }}
- {%- endcase -%} - {%- endfor -%} + {%- endcase -%} + {%- endfor -%} +

{{ section.settings.product_description }}

إتمام الشراء diff --git a/styles/product-column.scss b/styles/product-column.scss index 1f0b413e..9631dfcc 100644 --- a/styles/product-column.scss +++ b/styles/product-column.scss @@ -36,7 +36,7 @@ line-height: 36px; @media screen and (max-width: 768px) { - font-size: 24px; + font-size: 25px; } } @@ -49,7 +49,7 @@ .product-compare-price { color: #8D8D8D; font-weight: 400; - font-size: 17px; + font-size: 19px; line-height: 23px; } From c4891445576ef9c1856d6967ce45ef18ecb46c47 Mon Sep 17 00:00:00 2001 From: adildev101 Date: Tue, 25 Apr 2023 12:11:42 +0100 Subject: [PATCH 2/2] fix product page --- sections/product-column.liquid | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/sections/product-column.liquid b/sections/product-column.liquid index cd06f2b5..505aff4f 100644 --- a/sections/product-column.liquid +++ b/sections/product-column.liquid @@ -13,17 +13,13 @@ } {%- endstyle -%} -
- {%- assign selected_product = section.settings.product %} +{%- assign selected_product = section.settings.product %} - {%- if product %} - {%- assign selected_product = product %} - {%- endif %} - - {%- if selected_product %} +{%- if selected_product %} +
{%- render 'product-home', product_id: selected_product.id, product: selected_product, block_settings: section.settings-%} - {%- endif %} -
+
+{%- endif %} {%- schema -%} {