Ive just installed your package, since its just what my customer needs (awesome YAY).
Ive changed my price property alias so its now called "productPriceDKK" ive also updated this in the backend of teacommerce so its this alias its going for.
Ive then added your datatype and named it "productPriceBreaksDKK" just like your install guide says :)
ive then added a few rules, normal price is 100. ive then added a price called 10 for 5 and above.
when i add the product im getting this error
MESSAGE: Exception has been thrown by the target of an invocation. STACKTRACE: at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at TeaCommerce.Presentation.TeaCommerceBase.RequestModule.invokeMethod(restExtension myExtension, Object[] paras) INNEREXCEPTION: System.MissingMethodException: Method not found: 'Void TeaCommerce.Data.OrderLineProperty..ctor(System.String, System.String, System.Nullable`1<Int32>)'.
at CogworksPriceBreaksForTeaCommerce.BusinessLogic.ApplyPriceBreaksToUnitPrice(Order order, OrderLine orderLine)
at CogworksPriceBreaksForTeaCommerce.TeaCommerceEvents.WebshopEvents_OrderLineAdded(Order order, OrderLine orderLine)
at TeaCommerce.Data.Extensibility.WebshopEvents.SendOrderLineAdded(Order order, OrderLine orderLine) in D:\Development\Projects\Tea Commerce\TeaCommerce.Data\Extensibility\Eventhandlers.cs:line 149
at TeaCommerce.Data.Order.Save() in D:\Development\Projects\Tea Commerce\TeaCommerce.Data\Order.cs:line 998
at TeaCommerce.Base.AddOrderLine(Order order, Int32 nodeId, Nullable`1 orderLineId, Decimal quantity, Boolean isUnique, Boolean overwriteQuantity, IDictionary`2 dynamicProperties)
at TeaCommerce.Base.AddOrderLine(Int32 nodeId, Nullable`1 orderLineId, Decimal quantity, Boolean isUnique, Boolean overwriteQuantity, IDictionary`2 dynamicProperties)
at TeaCommerce.Base.FormAddOrderLine(Dictionary`2 fieldKeyValues)
at TeaCommerce.Base.ParseAction(IDictionary`2 vars)
at TeaCommerce.Base.SubmitForm()
Well first of all i havent tried with GBP but I could.
I just tried to hook me into the process through VS, tough i ofc didnt have any of the files it requested(i dont have the Tea source) but there was nothing new in it, the same as i get from error.
Leave this with me for 24 hours or so and I will try and recreate the issue here.
Inital thoughts - it was tested on Tea Commerce 1.4.2.4 and you are working on version 1.4.3.1 (newer) so there could have been a breaking change in the API. As it is such a small version increment, I think this is the least likely explanation.
Alternatively, have you hooked into the Tea Commerce event model in any other locations with any custom code? This uses the event model so I wonder if there could be a conflict somewhere? What is the purpose of the priceOrgDKK field?
Ill just get Anders's points if there should be any breaking changes in this setup.
to clarify your questions.
I havnt hooked into the event model anywhere, so its 100% untouched besides your code.
That field is just a field where the customer can write the original price and then they can write a reduced price in the real price field. Its just so we can do something different with the design if it has a reduced price.
I could not replicate the issue at this end, so I decided it must be something to do with the way I am interacting with the Tea Commerce API for the particular version of Tea Commerce.
At one point in the code I create a new order line property to store the original, un-modified unit price. This is so I don't have to fetch it from the node each time. The inner exception shows that there is a problem with finding the specific version of the overloaded constructer for OrderLineProperty that I'm using.
I downloaded the latest version of Tea Commerce and then compared both DLLs, as you can see below, the OrderLineProperty class has changed in the new version. Specifically, the constructors are different. (the language id has been abstracted away)
I'll create a new version of the package that will work with the new version of the Tea Commerce API over the next couple of days and get it uploaded. I'll post here when done,
Getting an exception
Hey :)
Ive just installed your package, since its just what my customer needs (awesome YAY).
Ive changed my price property alias so its now called "productPriceDKK" ive also updated this in the backend of teacommerce so its this alias its going for.
Ive then added your datatype and named it "productPriceBreaksDKK" just like your install guide says :)
ive then added a few rules, normal price is 100. ive then added a price called 10 for 5 and above.
when i add the product im getting this error
MESSAGE: Exception has been thrown by the target of an invocation. STACKTRACE: at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor) at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments) at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) at TeaCommerce.Presentation.TeaCommerceBase.RequestModule.invokeMethod(restExtension myExtension, Object[] paras) INNEREXCEPTION: System.MissingMethodException: Method not found: 'Void TeaCommerce.Data.OrderLineProperty..ctor(System.String, System.String, System.Nullable`1<Int32>)'. at CogworksPriceBreaksForTeaCommerce.BusinessLogic.ApplyPriceBreaksToUnitPrice(Order order, OrderLine orderLine) at CogworksPriceBreaksForTeaCommerce.TeaCommerceEvents.WebshopEvents_OrderLineAdded(Order order, OrderLine orderLine) at TeaCommerce.Data.Extensibility.WebshopEvents.SendOrderLineAdded(Order order, OrderLine orderLine) in D:\Development\Projects\Tea Commerce\TeaCommerce.Data\Extensibility\Eventhandlers.cs:line 149 at TeaCommerce.Data.Order.Save() in D:\Development\Projects\Tea Commerce\TeaCommerce.Data\Order.cs:line 998 at TeaCommerce.Base.AddOrderLine(Order order, Int32 nodeId, Nullable`1 orderLineId, Decimal quantity, Boolean isUnique, Boolean overwriteQuantity, IDictionary`2 dynamicProperties) at TeaCommerce.Base.AddOrderLine(Int32 nodeId, Nullable`1 orderLineId, Decimal quantity, Boolean isUnique, Boolean overwriteQuantity, IDictionary`2 dynamicProperties) at TeaCommerce.Base.FormAddOrderLine(Dictionary`2 fieldKeyValues) at TeaCommerce.Base.ParseAction(IDictionary`2 vars) at TeaCommerce.Base.SubmitForm()
Im running umb 4.7.2 and teacommerce 1.4.3.1 and ucomp 3.1.1
Hi Rasmus,
Not seen this one before - looks like there is a missing method there somewhere?
Methodnot found:'Void TeaCommerce.Data.OrderLineProperty..ctor(System.String, System.String, System.Nullable`1<Int32>)'
Is there any way you can post the full content of the inner exeption? By attaching to the process in Visual Studio maybe?
Does the same error occur when using GBP?
Please could you post a picture / list of how the price breaks are set up in the Umbraco backoffice?
Many Thanks,
Tom
Hey Tom
Thx for helping me out !
Well first of all i havent tried with GBP but I could.
I just tried to hook me into the process through VS, tough i ofc didnt have any of the files it requested(i dont have the Tea source) but there was nothing new in it, the same as i get from error.
Its saying it something about order.save
TeaCommerce.Data.Order.Save()in D:\Development\Projects\TeaCommerce\TeaCommerce.Data\Order.cs:line 998
I have a few screenshots of how i have set it up :
document type :
setup in Teacommerce
On the content node
Same if i change it to GBP
Hi Rasmus,
Thanks for the info.
Leave this with me for 24 hours or so and I will try and recreate the issue here.
Inital thoughts - it was tested on Tea Commerce 1.4.2.4 and you are working on version 1.4.3.1 (newer) so there could have been a breaking change in the API. As it is such a small version increment, I think this is the least likely explanation.
Alternatively, have you hooked into the Tea Commerce event model in any other locations with any custom code? This uses the event model so I wonder if there could be a conflict somewhere? What is the purpose of the priceOrgDKK field?
Many Thanks,
Tom
Thx your a champ!
Ill just get Anders's points if there should be any breaking changes in this setup.
to clarify your questions.
I havnt hooked into the event model anywhere, so its 100% untouched besides your code.
That field is just a field where the customer can write the original price and then they can write a reduced price in the real price field. Its just so we can do something different with the design if it has a reduced price.
Hi Rasmus,
I've investigated this further,
I could not replicate the issue at this end, so I decided it must be something to do with the way I am interacting with the Tea Commerce API for the particular version of Tea Commerce.
At one point in the code I create a new order line property to store the original, un-modified unit price. This is so I don't have to fetch it from the node each time. The inner exception shows that there is a problem with finding the specific version of the overloaded constructer for OrderLineProperty that I'm using.
I downloaded the latest version of Tea Commerce and then compared both DLLs, as you can see below, the OrderLineProperty class has changed in the new version. Specifically, the constructors are different. (the language id has been abstracted away)
The issue is therefore a result of a breaking change in Tea Commerce. The revision history on the Tea Commerce website supports this conclusion http://www.teacommerce.net/en/documentation/revision-history.aspx
I'll create a new version of the package that will work with the new version of the Tea Commerce API over the next couple of days and get it uploaded. I'll post here when done,
Many Thanks,
Tom
Hi Rasmus,
I thought of a quicker way round it so version 1.1 of the package with a fix has now been released,
You can download it from the package page. Let me know if it sorts the issue?
Many Thanks,
Tom
Damn Tom that sounds pure awesome ! will try it first thing tomorrow morning at work !
And shit just works !
Your are a champion Tom !
Big HIGH 5 YOU ROCK going out to you for this work !
is working on a reply...