LineItem DisplayName is always the DisplayName of the standard language

Hi,

after running the basket pipeline the DisplayName of every lineitem is always the DisplayName of the standard language for the catalog.

--> this.basketHelper.RunBasketPipeline();

I expected that the basket pipeline should deliver the display name according to the language of the user.

Is there any option to activate this

Thanks in advance.

Christian Hecht



Answer this question

LineItem DisplayName is always the DisplayName of the standard language

  • j_l_brooks

    Hi, for every Product exists in two languages an display text. The displayName of the LineItem only will change if the default language of the catalog was changed.

    Chris


  • SouthernPost

    Hi, have you made sure that the Name and Display Name for each product is populated (for each language) This sounds very similar to the problem I had a while back (I had blank names in the line items).

    Paul


  • Stéphane Beauchemin

    Hi Sudha,

    thank you for your reply. According to your post I used the following code and now it works.

    PipelineInfo pipelineInfo = new PipelineInfo(pipelineName, type);

    pipelineInfo["catalog_language"] = System.Globalization.CultureInfo.CurrentCulture.Name;

    return base.Basket.RunPipeline(pipelineInfo);

    I am not sure if there is further code necessary for exception handling or to set other properties on the pipelineInfo object that it works poperly in all cases.

    Chris


  • Yasir Imran

    Chris,

    One thing to be aware of - the product catalog system doesn't provide the same sort of resource fallback system that the .NET Framework does (in other words if en-US isn't defined it won't find the next closest match). You're best to actually write a routine to check the catalog languages to see if it is available and provide a default in the case where it isn't.

    Cheers,
    Colin



  • Tom25

    Hi Chris

    You would need to add the update the orderContext's "Catalog_language" key to the user's language to get the product display names in that language.

    For example:

    pipelineInfo["catalog_language"] = "en-US";

    Thanks

    Sudha


  • LineItem DisplayName is always the DisplayName of the standard language