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

Make use of product attribute's display_pattern on product view page #3038

Open
ecrocombe opened this issue Sep 2, 2023 · 2 comments · May be fixed by #3062
Open

Make use of product attribute's display_pattern on product view page #3038

ecrocombe opened this issue Sep 2, 2023 · 2 comments · May be fixed by #3062
Assignees
Labels

Comments

@ecrocombe
Copy link

ecrocombe commented Sep 2, 2023

Product attributes configured as a slider with a display_pattern display's correctly in layered navigation, but not on frontend product view page.

Without displaying the unit of measurement for the attribute, the information displayed is pretty useless, this could be grams, ounces, the customer viewing the product wouldn't know.

Also, could we scope display_pattern to store_view? Since it could include 'pieces' or 'куски'.

Sample image of layered navigation in category view on frontend displaying correctly.

image

Sample image of the same attribute on the product view on frontend:

image

Result of select * from eav_attribute as e join catalog_eav_attribute as c on c.attribute_id = e.attribute_id where attribute_code = 'ica_features_maximumweightcapacity';

+--------------+----------------+------------------------------------+-----------------+--------------------------------------------------------+--------------+---------------+----------------+----------------+-------------------------+-----------------+--------------+-------------+-----------------+---------------+-----------+------+--------------+-------------------------+-----------+------------+---------------+---------------+---------------+---------------------+--------------------------+-------------------------+-------------------------+-------------------------+------------------+----------+-------------------------------+----------+--------------------+-------------------------+----------------------------+-----------------+--------------------+-----------------------+---------------+------------------------+-----------------+------------------------------+-----------------------+-------------------------+----------------+------------------+---------------------+-----------------+-------------------+------------------------+-------------------------+-------------------------+---------------------------+--------------+----------------+------------------+
| attribute_id | entity_type_id | attribute_code                     | attribute_model | backend_model                                          | backend_type | backend_table | frontend_model | frontend_input | frontend_label          | frontend_class  | source_model | is_required | is_user_defined | default_value | is_unique | note | attribute_id | frontend_input_renderer | is_global | is_visible | is_searchable | is_filterable | is_comparable | is_visible_on_front | is_html_allowed_on_front | is_used_for_price_rules | is_filterable_in_search | used_in_product_listing | used_for_sort_by | apply_to | is_visible_in_advanced_search | position | is_wysiwyg_enabled | is_used_for_promo_rules | is_required_in_admin_store | is_used_in_grid | is_visible_in_grid | is_filterable_in_grid | search_weight | is_pagebuilder_enabled | additional_data | is_displayed_in_autocomplete | is_used_in_spellcheck | facet_min_coverage_rate | facet_max_size | facet_sort_order | facet_boolean_logic | display_pattern | display_precision | sort_order_asc_missing | sort_order_desc_missing | is_display_rel_nofollow | include_zero_false_values | is_spannable | norms_disabled | default_analyzer |
+--------------+----------------+------------------------------------+-----------------+--------------------------------------------------------+--------------+---------------+----------------+----------------+-------------------------+-----------------+--------------+-------------+-----------------+---------------+-----------+------+--------------+-------------------------+-----------+------------+---------------+---------------+---------------+---------------------+--------------------------+-------------------------+-------------------------+-------------------------+------------------+----------+-------------------------------+----------+--------------------+-------------------------+----------------------------+-----------------+--------------------+-----------------------+---------------+------------------------+-----------------+------------------------------+-----------------------+-------------------------+----------------+------------------+---------------------+-----------------+-------------------+------------------------+-------------------------+-------------------------+---------------------------+--------------+----------------+------------------+
|         1103 |              4 | ica_features_maximumweightcapacity | NULL            | Magento\Catalog\Model\Attribute\Backend\DefaultBackend | varchar      | NULL          | NULL           | text           | Maximum weight capacity | validate-number | NULL         |           0 |               1 | NULL          |         0 | NULL |         1103 | NULL                    |         1 |          1 |             1 |             1 |             1 |                   1 |                        1 |                       0 |                       0 |                       0 |                0 | NULL     |                             0 |        0 |                  0 |                       0 |                          0 |               0 |                  0 |                     0 |             1 |                      0 | NULL            |                            0 |                     1 |                       1 |             10 | _count           |                   0 | %s kg           |                 0 | _last                  | _first                  |                       0 |                         0 |            0 |              0 | standard         |
+--------------+----------------+------------------------------------+-----------------+--------------------------------------------------------+--------------+---------------+----------------+----------------+-------------------------+-----------------+--------------+-------------+-----------------+---------------+-----------+------+--------------+-------------------------+-----------+------------+---------------+---------------+---------------+---------------------+--------------------------+-------------------------+-------------------------+-------------------------+------------------+----------+-------------------------------+----------+--------------------+-------------------------+----------------------------+-----------------+--------------------+-----------------------+---------------+------------------------+-----------------+------------------------------+-----------------------+-------------------------+----------------+------------------+---------------------+-----------------+-------------------+------------------------+-------------------------+-------------------------+---------------------------+--------------+----------------+------------------+
@vahonc
Copy link
Collaborator

vahonc commented Sep 4, 2023

Hello @ecrocombe,

Thanks for your PR. I will discuss this issue with our team because your solution has changed the default behavior of Magento legacy. And we can't do it in order to our Support Policy. An alternative way is to use a translation mechanism.

Also, could we scope display_pattern to store_view? Since it could include 'pieces' or 'куски'.

As for this, is not possible cause the attribute property is not in the Scope configuration.

BR,
Vadym

@rbayet
Copy link
Collaborator

rbayet commented Sep 5, 2023

Hello @ecrocombe,

I guess if you wanted to allow a developer to change the display pattern according to language, you could probably try to call the translation system on the configured display_pattern string before replacing the value inside it.

Regards,

@rbayet rbayet linked a pull request Sep 5, 2023 that will close this issue
rbayet pushed a commit to rbayet/elasticsuite that referenced this issue Sep 12, 2023
rbayet pushed a commit to rbayet/elasticsuite that referenced this issue Sep 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants