Virtual Happy Hour this month, Jun 28, we'll be getting a sneak preview at our soon to launch SaaS CMS!

Try our conversational search powered by Generative AI!

CSV Import - Price Type

Vote:
 

Hey.

I'm having some issues with the CSV Import in Commerce (10.5) and the "Pricing" - and especially the Price Type field.
Right now our prices on Variant/SKU are just for "Sale Type": All Customers and Default Market.

However, I cannot find information as to what to write in the "Price Type (Name/Id)" mapping to get it to work.
I've tried "Null or Default Value" and I've tried "Dictionary value" but that leads to an empty "Custom Value" collection.

The thing I have gotten to work was to manually edit the mapping file and writing:

 
       
        System.String
        PriceTypeId
        ShortString
        Custom
        0
        True
   

However that seems rather problematic going forth.

Does anybody have some insight into this issue? Such as which CustomValue collection that PriceType reads from so I can create the dictionary values, or whether I should do something else entirely?


Thanks in advance.

#178452
May 11, 2017 9:56
Vote:
 

Hi Allan

I am not familiar with the CSV import and not at all sure this will help you but the PriceType is a system enum:

public enum PriceType
{
    /// <summary>
    /// Gets prices valid for all customers. PriceCode must be an empty string when AllCustomers is specified.
    /// </summary>
    AllCustomers,
    /// <summary>
    /// Gets prices valid for a specific customer. PriceCode must be the customer's username.
    /// </summary>
    UserName,
    /// <summary>
    /// Gets prices valid for a specific price group. PriceCode must be the price group identifier.
    /// </summary>
    PriceGroup
} 

Have you tried setting it to "All Customers", "AllCustomers" or just 0?
(It is also defined in [dbo].[PriceType] in sql.)

If it is PriceTypeId it asks for it should be '0'.

I hope it can give you a new idea. :)

#178491
May 11, 2017 17:33
Vote:
 

Hi.

Thanks, but the problem (well, one of them :) ) is that if I select Dictionary Value in the mapping file, the "Custom Values" drop down is empty and I cannot select from the Enum, because it's not a Dictionary Value and I cannot create the Dictionary.

#178589
May 15, 2017 13:01
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.