Skip to Content

classification attributes: numeric values in storefront

Hi

I have a question concerning the display of numeric classification attribute values at the product detail page (b2bcommerce).

Unfortunately at the storefront there is always the english version (e.g. 1.5 kg, , url consists of ../de/EUR/..), whereas in backoffice the display depends on selected locale (e.g. 1,5 kg for german)

The data model of FeatureValueData only consist of one field: value and I cannot see any point of filling it depending on locale.

Is this a gap or did I oversee anything?

Thanks for help Heiko

Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • Posted on Aug 24, 2017 at 12:49 PM

    In the meanwhile I found some bad code: In commercefacades -> FeaturePopulator there is a simple 1:1 move from FeatureValue-> value to FeatureValueData-> value (String.valueOf(value))

    I see 2 ways to solve it:

    1. change the bevaiour of the populator. ask for the type of the assignment. in case of numeric, use the actual locale in order to format the value.

    2. Enhance the FeatureValueData type:
      • Type

      • Value (as Object)

        So, the rendering template can do the formatting job.

    Way 2 would be the more clear way, in my opinion.

    Best regards Heiko

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.