November Happy Hour will be moved to Thursday December 5th.
November Happy Hour will be moved to Thursday December 5th.
Hi,
Make sure the price in current market is valid, for example, its StartDate and EndDate cover current time, and it has no customer group attached.
Regards.
/Q
Hi Quan
Thank you for reply
But I still not getting any prices, I dobble check the things you saw, but nothing helps.
I notice that I dont have any PriceValues in my Entry...
Does it something to do with it?
I tryed "StoreHelper.GetBasePrice(entry)" but it didnt help... any other idea?
/Juan
"I notice that I dont have any PriceValues in my Entry..."
So this is the problem. if you don't have any Optimized prices for the entry, you won't be able to get it. The easiest way to check is to go to Commerce Manager, tab Variation/Pricing. The price you expect to get must be shown here with matching market, minimum quantity, start date/end date ...
Regards.
/Q
Hi Q!
Check the picture below, I dont see anything wrong? or?
I am sending the "Rest of Europe" market...
And what du you mean with "if you don't have any Optimized prices for the entry" ...?
Hi,
Yes the prices in the picture are the "optimized prices" I mentioned. Are you sure you're using the correct market. What is the CurrentMarket?
.Q
I think this may be something to do with the Min Quantity and Max Quantity. Set the min quantity to 1 and Max quantity to 999 and see if that helps.
R
Hi
@Quan: Yes I have a valid market "ROE", i have use debug.
@Rob: I did that, but didnt help.
I am using StoreHelper.GetSalePrice(entry, quantity, currentMarket);
Next step is to get the variant and check manually the price with current market...
What is the "Entry" you are using? It's supposed to be the variation, not the product.
Try to use IPriceService (ServiceLocator.Current.GetInstance<IPriceService>()) directly to see if it works for you.
Regards.
/Q
IPriceDetailService is for "unoptimized" prices and should only be used for price editing. You should use IPriceService to check, because the two set of prices can be different.
Regards,
/Q
From your answer I recon that I should use the IPriceService instead of StoreHelper.GetSalePrice?
Regards,
Ardi
StoreHelper.GetSalePrice is a method which uses IPriceService internally. It will do some filter and promotion checking for you. The point of using IPriceService is to make sure that the prices are in good shape (available for current customer/current market/current time ... )
Regards,
/Q
Hi
For a strange reason my StoreHelper.GetSalePrice is returning null.
Here is the method...
public Mediachase.Commerce.Catalog.Objects.Price GetSalePrice(Entry entry, decimal quantity)
{
var currentMarket = _currentMarketService.GetCurrentMarket();
var priceToReturn = StoreHelper.GetSalePrice(entry, quantity, currentMarket);
return priceToReturn;
}
Nothing is null, that i am sending in. I got a Entry, and the currentMarket also.
The price is in the currentmarket, for the sku.
Does anyone any idea? Do I missing something?
Thanks