Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TH-13: All themes > No option to change the CTA button's text in the Product Column section #39

Merged
merged 7 commits into from
Aug 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
110 changes: 67 additions & 43 deletions themes/aura/sections/product-column.liquid
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@

.product_customization-{{ id }} .yc-btn {
color: {{ section.settings.button_text_color.hex }} !important;
background-color: {{ section.settings.button_bg_color.hex }} !important;
border-radius: {{ section.settings.button_border_radius }}px !important;
}
{%- endstyle -%}

Expand Down Expand Up @@ -46,6 +48,34 @@
"label": "Show compare at price",
"default": false
},
{
"type": "text",
"id": "button_text",
"label": "Button text",
"default": "إتمام الشراء"
},
{
"type": "color",
"id": "button_text_color",
"label": "Button text color",
"default": "#FFFFFF"
},
{
"type": "color",
"id": "button_bg_color",
"label": "Button background color",
"default": "#F33520"
},
{
"type": "range",
"id": "button_border_radius",
"label": "Button border radius",
"min": 0,
"max": 30,
"step": 1,
"unit": "px",
"default": 0
},
{
"type": "color",
"id": "background_color",
Expand All @@ -72,53 +102,47 @@
"unit": "px",
"default": 50
},
{
"type": "text",
"id": "tag_text",
"label": "Banner text"
},
{
"type": "color",
"id": "button_text_color",
"label": "Button text color",
"default": "#FFFFFF"
"id": "tag_color",
"label": "Banner background color",
"default": "#000000"
},
{
"type": "color",
"id": "tag_text_color",
"label": "Banner text color",
"default": "#ffffff"
},
{
"type": "text",
"id": "tag_text",
"label": "Banner text"
},
{
"type": "color",
"id": "tag_color",
"label": "Banner background color",
"default": "#000000"
},
{
"type": "color",
"id": "tag_text_color",
"label": "Banner text color",
"default": "#ffffff"
},
{
"type": "select",
"id": "tag_position",
"label": "Banner position",
"options": [
{
"label": "Top right",
"value": "top_right"
},
{
"label": "Top left",
"value": "top_left"
},
{
"label": "Bottom right",
"value": "bottom_right"
},
{
"label": "Bottom left",
"value": "bottom_left"
}
],
"default": "top_right"
}
"type": "select",
"id": "tag_position",
"label": "Banner position",
"options": [
{
"label": "Top right",
"value": "top_right"
},
{
"label": "Top left",
"value": "top_left"
},
{
"label": "Bottom right",
"value": "bottom_right"
},
{
"label": "Bottom left",
"value": "bottom_left"
}
],
"default": "top_right"
}
],
"blocks": [
{
Expand Down
4 changes: 3 additions & 1 deletion themes/aura/snippets/product-home.liquid
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,9 @@
{%- endcase -%}
{%- endfor -%}
<p class='product-description'>{{ section.settings.product_description }}</p>
<a href='{{ product.url }}' class='yc-btn buy-btn'>إتمام الشراء</a>
<a href='{{ product.url }}' class='yc-btn buy-btn'>
{{ section.settings.button_text }}
</a>
</div>
</div>
</div>
Expand Down
37 changes: 30 additions & 7 deletions themes/harmony/sections/product-column.liquid
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@

#product-column-{{ id }} .yc-btn-secondary--large {
color: {{ section.settings.button_text_color.hex }};
background-color: {{ section.settings.button_bg_color.hex }} !important;
border-radius: {{ section.settings.button_border_radius }}px !important;
}
{%- endstyle -%}

Expand Down Expand Up @@ -48,6 +50,34 @@
"label": "Show compare at price",
"default": false
},
{
"type": "text",
"id": "button_text",
"label": "Button text",
"default": "إتمام الشراء"
},
{
"type": "color",
"id": "button_text_color",
"label": "Button text color",
"default": "#FFFFFF"
},
{
"type": "color",
"id": "button_bg_color",
"label": "Button background color",
"default": "#3C415FFF"
},
{
"type": "range",
"id": "button_border_radius",
"label": "Button border radius",
"min": 0,
"max": 30,
"step": 1,
"unit": "px",
"default": 0
},
{
"type": "color",
"id": "background_color",
Expand All @@ -62,7 +92,6 @@
"step": 1,
"unit": "px",
"default": 50

},
{
"type": "range",
Expand All @@ -74,12 +103,6 @@
"unit": "px",
"default": 50
},
{
"type": "color",
"id": "button_text_color",
"label": "Button text color",
"default": "#3C415F"
},
{
"type": "text",
"id": "tag_text",
Expand Down
4 changes: 3 additions & 1 deletion themes/harmony/snippets/product-home.liquid
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,9 @@
<div class='product-description'>
{{ section.settings.product_description }}
</div>
<a href='{{ product.url }}' class='yc-btn-secondary--large'>إتمام الشراء</a>
<a href='{{ product.url }}' class='yc-btn-secondary--large'>
{{ section.settings.button_text }}
</a>
</div>
</div>
</div>
Expand Down
115 changes: 69 additions & 46 deletions themes/meraki/sections/product-column.liquid
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@

{%- style -%}
.product_customization-{{ id }} {
padding-top: {{ section.settings.space_top}}px;
padding-bottom: {{ section.settings.space_bottom}}px;
padding-top: {{ section.settings.space_top }}px;
padding-bottom: {{ section.settings.space_bottom }}px;
}

.product_customization-{{ id }} {
Expand All @@ -14,6 +14,8 @@

.product_customization-{{ id }} .yc-btn {
color: {{ section.settings.button_text_color.hex }} !important;
background-color: {{ section.settings.button_bg_color.hex }} !important;
border-radius: {{ section.settings.button_border_radius }}px !important;
}
{%- endstyle -%}

Expand Down Expand Up @@ -48,6 +50,34 @@
"label": "Show compare at price",
"default": false
},
{
"type": "text",
"id": "button_text",
"label": "Button text",
"default": "إتمام الشراء"
},
{
"type": "color",
"id": "button_text_color",
"label": "Button text color",
"default": "#FFFFFF"
},
{
"type": "color",
"id": "button_bg_color",
"label": "Button background color",
"default": "#F33520"
},
{
"type": "range",
"id": "button_border_radius",
"label": "Button border radius",
"min": 0,
"max": 30,
"step": 1,
"unit": "px",
"default": 0
},
{
"type": "color",
"id": "background_color",
Expand All @@ -62,7 +92,6 @@
"step": 1,
"unit": "px",
"default": 50

},
{
"type": "range",
Expand All @@ -74,53 +103,47 @@
"unit": "px",
"default": 50
},
{
"type": "text",
"id": "tag_text",
"label": "Banner text"
},
{
"type": "color",
"id": "button_text_color",
"label": "Button text color",
"default": "#FFFFFF"
"id": "tag_color",
"label": "Banner background color",
"default": "#000000"
},
{
"type": "color",
"id": "tag_text_color",
"label": "Banner text color",
"default": "#ffffff"
},
{
"type": "text",
"id": "tag_text",
"label": "Banner text"
},
{
"type": "color",
"id": "tag_color",
"label": "Banner background color",
"default": "#000000"
},
{
"type": "color",
"id": "tag_text_color",
"label": "Banner text color",
"default": "#ffffff"
},
{
"type": "select",
"id": "tag_position",
"label": "Banner position",
"options": [
{
"label": "Top right",
"value": "top_right"
},
{
"label": "Top left",
"value": "top_left"
},
{
"label": "Bottom right",
"value": "bottom_right"
},
{
"label": "Bottom left",
"value": "bottom_left"
}
],
"default": "top_right"
}
"type": "select",
"id": "tag_position",
"label": "Banner position",
"options": [
{
"label": "Top right",
"value": "top_right"
},
{
"label": "Top left",
"value": "top_left"
},
{
"label": "Bottom right",
"value": "bottom_right"
},
{
"label": "Bottom left",
"value": "bottom_left"
}
],
"default": "top_right"
}
],
"blocks": [
{
Expand Down
4 changes: 3 additions & 1 deletion themes/meraki/snippets/product-home.liquid
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,9 @@
{%- endcase -%}
{%- endfor -%}
<p class='product-description'>{{ section.settings.product_description }}</p>
<a href='{{ product.url }}' class='yc-btn buy-btn'>إتمام الشراء</a>
<a href='{{ product.url }}' class='yc-btn buy-btn'>
{{ section.settings.button_text }}
</a>
</div>
</div>
</div>