Getting this error when trying to get price. I have just installed teacommerce from Developer-section and set everything up.
Whats wrong?
The requested service 'TeaCommerce.Api.InformationExtractors.IProductInformationExtractor`2[[System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089],[TeaCommerce.Umbraco.Configuration.Variants.Models.VariantPublishedContent, TeaCommerce.Umbraco.Configuration, Version=3.0.0.0, Culture=neutral, PublicKeyToken=null]]' has not been registered. To avoid this exception, either register a component to provide the service, check for service registration using IsRegistered(), or use the ResolveOptional() method to resolve an optional dependency.
That is because the productIdentifier should be a string or an object like IPublishedContent. You can also use ExamineSearchResult or anything else if you make your own provider for it. That is why the integer fails, because there is no provider for it.
Error when getting price
Getting this error when trying to get price. I have just installed teacommerce from Developer-section and set everything up.
Whats wrong?
Hi Tobbe
I see what happens - sorry for that. Could you try and just send the firstArticle as the second parameter and not the Id.
Kind regards
Anders
I see that is not possible. Marked as bug and will fix it ASAP. Because of holiday in denmark it will be next week. Sorry for that!!!
I know it works in the demo/starter kit. Could you try and see what is different there from just parsing in the id? https://github.com/TeaCommerce/Starter-kit-for-Umbraco
Kind regards
Anders
Hi Anders!
The starter kit uses
TC.GetPrice(storeId, product.Id.ToString(CultureInfo.InvariantCulture))
and it works! :)TC.GetPrice(storeId, product.Id.ToString())
andTC.GetPrice(1, firstArticle)
works aswell (dont know why I didnt try this...)But it seems like a bug when passing the Id as an integer.
That is because the productIdentifier should be a string or an object like IPublishedContent. You can also use ExamineSearchResult or anything else if you make your own provider for it. That is why the integer fails, because there is no provider for it.
is working on a reply...