Forum

The forum is a free service supported by community members. Please consider opening a support ticket if you need timely help.

PrevPrev Go to previous topic
NextNext Go to next topic
Last Post 22 Jan 2021 12:43 AM by  Albert Frausto
How to change error message language
 7 Replies
Sort:
You are not authorized to post a reply.
Page 1 of 212 > >>
Author Messages


New Member


Posts:29
New Member


--
20 Jan 2021 06:55 PM

    Hello,

    We have set a min and max order quantity for all of our products but the message that displays when a user tries to add a product that they have already reached their max order quantity is a bit confusing. For example, in the shopping cart product pages, when you try to exceed the quantity restriction for a SKU by adding more to your cart than you are allowed, you are presented with an error that says “Product is not available. It's not clear if the product is out of stock or if the shopper has reached their quota. Is there a way to change this message to instead say something like  "You've reached the maximum quantity allowed for this product."

    Thanks

    0


    Veteran Member


    Posts:2957
    Veteran Member


    --
    21 Jan 2021 09:39 PM
    • Accepted Answer

    Hi Albert

    You can create a custom template for the Product Detail and find the line:

    @HttpUtility.JavaScriptStringEncode(Html.LocalizeString(Global.LocalizedStrings.Message_ProductNotAvailable, Global.FilePaths.LocalSharedResourceFile))"

    and replace with this to print the message returned:

    " + data.responseJSON.Message

    Then you can edit the static localization for the ValidationResult.resx file for the 3.Text entry.

    In the next release, we'll include the line changes available out of the box. 

    0


    New Member


    Posts:29
    New Member


    --
    21 Jan 2021 10:52 PM
    Hello Steve,

    Thank you for the solution.

    It appears that the forum editor has removed parts of the code from your post. Can you please repost the code again.

    Also, I searched the Product Detail template page for the line to be modified and there are appears to be two location. See screenshot, https://www.screencast.com/t/iIXbUwmyK6j. Are we suppose to update both lines?

    We appreciate your help with this.
    0


    Veteran Member


    Posts:2957
    Veteran Member


    --
    21 Jan 2021 11:03 PM
    Just look for the one contained inside the
    fail(function (data, textStatus, errorThrown) { ... }
    0


    Veteran Member


    Posts:2957
    Veteran Member


    --
    21 Jan 2021 11:04 PM
    The code did not cut off. It really is like the way I posted that you need to replace.
    0
    You are not authorized to post a reply.
    Page 1 of 212 > >>