Getting RemovedDueToInvalidPrice error

Vote:
 

While adding cart to cart service, I have validation from OrderValidationService.ValidateOrder and I am getting RemovedDueToInvalidPrice  error (Item has been removed due to invalid price.). I have set AUD100 to variant price.

#204860
Edited, Jun 20, 2019 8:36
Vote:
 

Please check what is your current market and have you added price for your current market? (see Market column in below image)

#204885
Jun 20, 2019 13:16
Vote:
 

It's the default one.

#205391
Jul 09, 2019 15:07
Vote:
 

Can you also verify few more things,

Quantity is set (more than 0), for example

Product is not expired

In addition, I want to know your default curreny set in CommerceManager -> Administration -> Common Settings (see below image)

#205397
Jul 09, 2019 15:39
Vote:
 

The default currency is US Dollar. Product is not expired and min and max quantity in inventory tab are 1 and 4 repectively. BTW I have min and max quantity in pricing tab of catalog management in Commerce Manager as well, what the difference between them?

#205428
Jul 10, 2019 7:07
Vote:
 

Hi Muller

The RemovedDueToInvalidPrice validation issue is returned because no suitable price value was found. Or they were found, but filtered away because:

  1. the line item quantity is outside of the range on the price value,
  2. the price applies to a specific customer or customer group and your cart does not belong to that, or
  3. the price value is not yet valid (valid in the future) or is not valid anymore (expired).

I assume that the cart currency is AUD (since you are testing with a price of AUD 100), the cart market is DEFAULT and that the price value is for "All Customers". Is that correct?

#205443
Jul 10, 2019 11:55
Vote:
 

Price is applied to all customer and not expired.How to check if price is in the range? Where is the price range defined? Currency is matching with Currency in administration, I have also tried with different currencies though. Cart market is Default and price value is for "All Customers".

#205550
Jul 16, 2019 11:49
Vote:
 

The range I mentioned is about quantity, not price.

When you have mininum quantity of 1 and maximum quantity of 4, what is the quantity on the line item you are testing with?

#205555
Jul 16, 2019 12:03
Vote:
 

Yes, quantity on the line item is 1 which lies within the range

#205558
Jul 16, 2019 12:33
Vote:
 
priceService.GetPrices(
                marketId,
                DateTime.Now,
                new CatalogKey(code),
                new PriceFilter { Currencies = new[] { currency } })
                .OrderBy(x => x.UnitPrice.Amount).FirstOrDefault();
is giving null for some variants. This is causing issue. No idea why getprices gives null.
#205559
Jul 16, 2019 14:08
Vote:
 

Do you want to get all market prices? If yes, then pass new PriceFilter() as empty and if no then it will return prices for the currencies that you are passing into PriceFilter()

And, are you trying to get the currency as?

var currency = SiteContext.Current.Currency;
#205560
Edited, Jul 16, 2019 14:30
Vote:
 

Price issue is fixed. But I'm still getting RemovedDueToInvalidPrice error.

#205577
Jul 17, 2019 6:06
Vote:
 

Can you describe the full story scene? Like: Number of items in cart, their quantity in cart and their inventory and pricing details in commerce. Are you adding more items than max quantity (of item) in cart? When does your validation is called? Your complete test scenario. 

#205579
Jul 17, 2019 9:26
Vote:
 

Removing sales code fixed the issue. No idea why sales code is giving Invalid price validation error.

#205596
Jul 17, 2019 12:46
Vote:
 

You means promotion code?

#205598
Jul 17, 2019 13:04
Vote:
 

Is that percentage based or amount based? If it was amount based and did you try with amount in your (default) currency. For example USD in my case (US Dollar)?

#205600
Jul 17, 2019 13:11
Vote:
 

No, not promotion code. It's SALE CODE in pricing tab of variant (you can see this in pricing tab of the second screenshot you posted). All the price and quantity were proper and there is no discount.

#205627
Jul 17, 2019 15:19
Vote:
 

Hi Muller,

Episerver out of the box code ignores a pricing record when "All Customers" price/sales type is applied with a sales code for a valid reason. Sales code is used in various ways and it is always dependent on what type of price/sales type you are using it for. E.g. When we use "Customer Price Group" as sales type, it tries to match contact's customer price group, and assigns a matching price record applicable for the user. In case of the system does not find a matching record, then it falls back to All Customers price (with empty sales code), which is usually used for MSRP price. There is "User Name" sales or price type, which can also be another way to assign specific price to specific customers.

On top of out of the box price/sales type, you can also add additional price/sales type to your application and customize the pricing scenarios to your business need. Once we added a new sales type as "Minimum Advertised Price" which is also called MAP in B2B market, to display MAP price to the customer. Episerver Pricing system is expandable based on various need.

~ Sujit

#205723
Edited, Jul 22, 2019 2:39
Vote:
 

Though sale code fixed the issue. I've got the issue again in another variant. Currently, it has minimum quantity 2, if I change it to 1, the issue is fixed. I am really wondering why I am getting this issue in different different scenarios.

#206060
Aug 01, 2019 15:13
Vote:
 

Hi Muller,

I would suggest you to read more carefully about the uses of the pricing and inventory. If the cart validation doesn't fit into the criteria of pricing and inventory to the items in the cart you will face these errors. That's obvious. So, here is the link to documentation. I hope this will help you.

https://webhelp.episerver.com/latest/en/commerce/catalog-management/catalog-entry-properties.htm

Thanks

#206062
Aug 01, 2019 15:37
* 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.