Sao23
April 7, 2024, 11:47pm
1
Hi ,im using on aiciavem.ro ,the shella theme.. The point is that I have selected for products cards the option “ trim title to one line “ .I wanna trim to 2 lines insted of only one.Can you tell me please where I need to edit the code?
@Sao23
please update the below css into your theme file called, custom.css
Online Store > Edit Code > Assets folder > custom.css file paste below code at the end.
.product-collection__title a {
white-space: unset !important;
overflow: auto !important;
text-overflow: unset !important;
}
Result:
Thanks
Sao23
April 9, 2024, 8:05am
3
Bi sir,this is not what I ask for
.product-collection__title a {
overflow: hidden;
height: 35px;
text-overflow: unset;
}
result:
Sao23
April 9, 2024, 8:43am
5
Mate..this is still not what i was looking for..The point it that you can see I have an option “trim to one line” ..when I use this option (because is not with this css) when the number of characters is reached you can see at final “ … “ at you I can t see anymore because you ve put an css..I judt wanna please help me modify the number of characters in code
send me the code of this template file
Sao23
April 9, 2024, 9:20am
7
{% include ‘global-variables’ %}
{%- assign main_object = collection | default: search -%}
{%- assign terms = search.terms | escape -%}
{%- assign sort_by = main_object.sort_by | default: main_object.default_sort_by -%}
{% comment %}View grid{% endcomment %}
{%- assign breakpoints = ‘xs|sm|md|lg|xl’ | split: ‘|’ -%}
{% capture grid_values %}{{ section.settings.default_view_grid_xs }}|{{ section.settings.default_view_grid_sm }}|{{ section.settings.default_view_grid_md }}|{{ section.settings.default_view_grid_lg }}|{{ section.settings.default_view_grid_xl }}{% endcapture %}
{%- assign grid_values = grid_values | split: ‘|’ -%}
{%- for bp in breakpoints -%}
{%- assign grid_value = grid_values[forloop.index0] -%}
{%- assign grid_set = 12 -%}
{%- if grid_value == ‘list’ -%}
{% capture list_breakpoints %}{{ list_breakpoints }}{% if list_breakpoints != blank %}|{% endif %}{{ bp }}{% endcapture %}
{%- else -%}
{%- assign grid_set = grid_set | divided_by: grid_value -%}
{%- if grid_value == ‘1’ -%}
{% capture centered_breakpoints %}{{ centered_breakpoints }}{% if centered_breakpoints != blank %}|{% endif %}{{ bp }}{% endcapture %}
{%- endif -%}
{%- endif -%}
{% capture grid_classes %}{% if grid_classes %}{{ grid_classes }} {% endif %}col{% if bp != ‘xs’ %}-{{ bp }}{% endif %}-{{ grid_set }}{% endcapture %}
{%- endfor -%}
{%- assign centered_breakpoints = centered_breakpoints | split: ‘|’ -%}
{%- for bp in centered_breakpoints -%}
{% capture centered_classes %}{{ centered_classes }} collection-grid-centered-{{ bp }}{% endcapture %}
{%- endfor -%}
{%- assign list_breakpoints = list_breakpoints | split: ‘|’ -%}
{% capture list_wrapper_classes %} {%- if section.settings.view_grid_list_design == ‘1’ -%}collection-grid-list–v1{%- elsif section.settings.view_grid_list_design == ‘2’ -%}collection-grid-list–v2{% endif %}{% endcapture %}
{%- for bp in list_breakpoints -%}
{% capture list_wrapper_classes %}{{ list_wrapper_classes }} collection-grid-list-{{ bp }}{% endcapture %}
{%- endfor -%}
{%- assign info_visibility = section.settings.info_visibility | default: ‘hide’ -%}
{%- if collection != blank -%}
{% include 'breadcrumbs' %}
{%- endif -%}
{%- if settings.collection_show_sidebar != 'hide' -%}
{%- if settings.collection_sidebar_position == 'dropdown' -%}
{% include 'collection-sidebar' %}
{%- elsif settings.collection_sidebar_position == 'left' or settings.collection_sidebar_position == 'right' -%}
{%- if settings.collection_enable_sticky -%}
{%- endif -%}
{% include 'collection-sidebar' %}
{%- if settings.collection_enable_sticky -%}
{%- endif -%}
{%- endif -%}
{%- else -%}
{% include 'collection-sidebar' %}
{%- endif -%}
{%- if collection != blank -%}
{%- endif -%}
{%- if section.settings.view_grid_visibility != 'hide' -%}
{%- for bp in breakpoints -%}
{% capture grid_attrs %}{{ grid_attrs }} data-value-{{ bp }}="{{ grid_values[forloop.index0] }}"{% endcapture %}
{%- endfor -%}
{%- endif -%}
{%- if section.settings.sort_by_visibility != 'hide' or info_visibility != 'hide' or section.settings.view_grid_visibility != 'hide' -%}
{%- capture sort_by_html -%}
{%- if section.settings.sort_by_visibility != 'hide' -%}
{%- assign sort_by = main_object.sort_by | default: main_object.default_sort_by -%}
{{ 'collection_template.sort_by_label' | t }}:
{%- for option in main_object.sort_options -%}
{{ option.name | escape }}
{%- capture dropdown_options -%}
{{ dropdown_options }}
{{ option.name | escape }}
{%- endcapture -%}
{%- endfor -%}
{% render 'icon-theme-229' %}
{{ 'collection_template.sort_button' | t }}
{%- endif -%}
{%- endcapture -%}
{%- if settings.collection_show_sidebar != 'hide' and settings.collection_sidebar_position == 'dropdown' -%}
{%- assign desktop_need_button = true -%}
{%- endif -%}
{%- if settings.collection_show_sidebar == 'desktop_and_mobile' -%}
{%- assign mobile_need_button = true -%}
{%- endif -%}
{% capture control_grid %}col{% if mobile_need_button %}-8{% else %}-0{% endif %} col-lg{% if desktop_need_button %}-4{% endif %}{% if mobile_need_button != true %} d-none{% else %} d-flex{% endif %}|col-lg{% if desktop_need_button %}-3{% endif %}|col{% if mobile_need_button %}-4{% else %}-12{% endif %} col-lg{% if desktop_need_button %}-5{% endif %}{% endcapture %}
{%- assign control_grid = control_grid | split: '|' -%}
{%- if settings.collection_show_sidebar != 'hide' -%}
{% render 'icon-theme-084' %}
{{ 'collection_template.filter_button' | t }}
{% if main_object.products_count > 0 %}({{ main_object.products_count }}){% endif %}
{%- endif -%}
{%- if desktop_need_button != true -%}
{{ sort_by_html }}
{%- assign added_sort_by_html = true -%}
{%- endif -%}
{%- if info_visibility != 'hide' -%}
{%- if collection != blank -%}
{%- if collection.products_count == 0 -%}
{{ 'collection_template.product_count_empty' | t }}
{%- elsif collection.products_count == collection.all_products_count -%}
{{ 'collection_template.product_count_simple' | t: count: collection.products_count }}
{%- else -%}
{{ 'collection_template.product_count' | t: product_count: collection.products_count, count: collection.all_products_count }}
{%- endif -%}
{%- endif -%}
{%- endif -%}
{%- if settings.collection_sidebar_position == 'dropdown' or settings.collection_sidebar_position == 'top' -%}
{%- unless added_sort_by_html-%}
{{ sort_by_html }}
{%- endunless-%}
{%- endif -%}
{%- if section.settings.view_grid_visibility != 'hide' -%}
{%- assign view_grid_handles = '1|2|3|4|6|list' | split: '|' -%}
{%- assign view_grid_visible_classes = ' d-md-none|| d-none d-sm-block| d-none d-md-block| d-none d-lg-block| d-none d-lg-block' | split: '|' -%}
{% capture view_grid_icons %}{% render 'icon-theme-304' %}|
{% render 'icon-theme-185' %} {% render 'icon-theme-323' %} |
{% render 'icon-theme-186' %} {% render 'icon-theme-324' %} |
{% render 'icon-theme-305' %} {% render 'icon-theme-325' %} |
{% render 'icon-theme-305' %} {% render 'icon-theme-326' %} |
{% render 'icon-theme-187' %} {% render 'icon-theme-327' %} {% endcapture %}
{%- assign view_grid_icons = view_grid_icons | split: '|' -%}
{%- for handle in view_grid_handles -%}
{%- assign visible_prop = 'show_view_grid_' | append: handle -%}
{%- if section.settings[visible_prop] == false -%}
{%- continue -%}
{%- endif -%}
{%- assign active_attrs = null -%}
{%- for value in grid_values -%}
{%- if value == handle -%}
{% capture attr %} data-active-{{ breakpoints[forloop.index0] }}{% endcapture %}
{% assign active_attrs = active_attrs | append: attr %}
{%- endif -%}
{%- endfor -%}
{{ view_grid_icons[forloop.index0] }}
{%- endfor -%}
{%- endif -%}
{%- if section.settings.sort_by_visibility == 'desktop_n_mobile' -%}
{%- if section.settings.sort_by_visibility == 'desktop_n_mobile' -%}
{%- elsif info_visibility == 'desktop_n_mobile' -%}
{%- endif -%}
{%- endif -%}
{%- if info_visibility == 'desktop_n_mobile' and section.settings.sort_by_visibility == 'desktop_n_mobile' -%}
{%- endif -%}
{%- if settings.collection_sidebar_position == 'top' and settings.collection_show_sidebar != 'hide' -%}
{% include 'collection-sidebar' %}
{%- endif -%}
{%- if section.settings.current_filters_visibility != 'hide' or settings.collection_sidebar_position == 'top' -%}
{% capture current_filters_html %}
{% include 'collection-current-filters', type: '2' %}
{% endcapture %}
{{ current_filters_html }}
{%- endif -%}
{%- endif -%}
{%- if collection != blank -%}
{%- paginate collection.products by section.settings.products_per_page -%}
{%- if collection.products.size == 0 -%}
{%- else -%}
{%- for product in collection.products -%}
{% include 'product-collection' product_margin_bottom: offset_collection_page_product_margin_bottom_d %}
{%- endfor -%}
{%- endif -%}
{%- if paginate.pages > 1 -%}
{% render 'pagination', paginate: paginate, anchor: '', type: settings.layout_pagination_type %}
{%- endif -%}
{%- endpaginate -%}
{%- else -%}
{%- paginate search.results by section.settings.products_per_page -%}
{%- if search.performed -%}
{%- if search.results.size == 0 -%}
{%- else -%}
{%- for item in search.results -%}
{%- if item.object_type == 'product' -%}
{% include 'product-collection' product: item, product_margin_bottom: offset_collection_page_product_margin_bottom_d, show_first_product_image: true %}
{%- elsif section.settings.search_show_only_products != true -%}
{%- endif -%}
{%- endfor -%}
{%- endif -%}
{%- endif -%}
{%- if paginate.pages > 1 -%}
{% render 'pagination', paginate: paginate, anchor: '', type: settings.layout_pagination_type %}
{%- endif -%}
{%- endpaginate -%}
{%- endif -%}
{%- if collection != blank -%}
{%- endif -%}
{%- if collection != blank -%}
{%- endif -%}
{%- if settings.collection_sidebar_position == ‘top’ and settings.collection_show_sidebar != ‘hide’ -%}
{%- endif -%}
{%- if section.settings.view_grid_visibility != ‘hide’ -%}
{%- endif -%}
{%- if settings.collection_enable_sticky -%}
{%- endif -%}
Sao23
April 9, 2024, 9:24am
8
I ve put you first the file im 85% it is ,and a secound file where maybe should be..Thanks a lot for your help!