Hi,
What does the "group customer number" do in the price matrix and how is it managed? I can't find info in the documentation
Hi,
What does the "group customer number" do in the price matrix and how is it managed? I can't find info in the documentation
Good question.
This is what it does
Use case
In user management, consider this group structure.
Since you can just use the group field instead, that would be the same - difference is that this might be easier to integrate since group customer number can hold any ID - where as the group field needs the group id.
This is the code:
private static bool CheckUserGroupCustomerNumbers(Price price, User user) { if (!string.IsNullOrWhiteSpace(price.CustomerGroupId)) { if (user is null) { return false; } foreach (var g in user.Groups) { if (string.Equals(price.CustomerGroupId, g.CustomerNumber, StringComparison.OrdinalIgnoreCase)) { return true; } } return false; } return true; }
Hi Nicolai,
Thank you for the clear answer.
Is it correct that the supplied code is only needed if I were to generate the price somewhere custom? By default DW will use this logic on product and category pages?
Hi Davy
Yes - Dynamiweb uses that code to find the price - it was just so you could see the actual logic (which of course only makes sense for developers :-))
BR Nicolai
You must be logged in to post in the forum