Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Peter 89 posts 160 karma points
    Dec 31, 2012 @ 14:33
    Peter
    0

    TeaCommerce.Data.OrderLineProperty.OrderLineProperty has some invalid arguments

    This is an odd one, well it could be simple but right now i am stumped.

    I have an WebshopEvents_OrderLineAdded(Order order, OrderLine orderLine) event which is being called, but not working. On further investigation and some tinkering with the debug it seems that I have conflicting information about the OrderLineProperty constructor.

    To compile the code I have options of the following overloads (alias, value), (alias, value, serverSideOnly) and (alias, value, serverSideOnly, isReadOnly).

    But as soon as an order line item is added to the basket and the code is "excited", errors are thrown complaining about the invalid arguments. I comment the line out and get the debugger to stop in the Event, open up the intermediate window and find that the contructor should be (string, string, int?) and using that i can add properties from the intermediate window.

    I replaced the dlls I had with ones from 1.4.4.1 but no better. 

    It could be a non teacommerce problem, but I just don't understand why the signatures whilst compiling is different from running. :/

  • Peter 89 posts 160 karma points
    Dec 31, 2012 @ 16:48
    Peter
    0

    Immediate window. not intermediate :)

  • Rune Grønkjær 1372 posts 3103 karma points
    Jan 02, 2013 @ 08:05
    Rune Grønkjær
    0

    Hi Peter,

    Could you post some of your code? Sounds like a really weird problem, so the solutions might be quite simple.

    /Rune

  • Peter 89 posts 160 karma points
    Jan 04, 2013 @ 11:58
    Peter
    0

    Hi Rune, 

    I don't think the code itself won't show anything more as the issue is a conflict between the method signature at compile time and runtime. :/ I'll try and take some screen shots of the error to give you a little more info a little later. The code is basically the same as in this question about vairant prices 

    I am now working with a unqiue item (explained here) so i have added the additional properties on the client call, then i can tinker server side.

    P

  • Peter 89 posts 160 karma points
    Jan 12, 2013 @ 16:24
    Peter
    0

    Sorry about the delay, a busy week.

    So, hopefully this will give a little more clarity on the situation. Here is a screen shot of visual studio teling me the overloads for the method and for the purpose of the screen shot i have written three so you can see the ones it doesn't like underlined.

    But then running the code and triggering the event it throws an error as it doesn't like the  (string,string,bool)  method :-/

    INNEREXCEPTION:
    System.MissingMethodException: Method not found: 'Void TeaCommerce.Data.OrderLineProperty..ctor(System.String, System.String, Boolean)'.
    at WebShop.Intergration.NewOrderLine.WebshopEvents_OrderLineAdded(Order order, OrderLine orderLine)
    at TeaCommerce.Data.Order.Save()
    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)
    at TeaCommerce.Base.AddUniqueOrderLine(Int32 nodeId, Int64 orderLineId, Decimal quantity)]

    So, I have commented out the call which is throwing the error, put a break point in and then had a look via the Immediate window...

    new OrderLineProperty("customProperty", "value", false)
    The best overloaded method match for 'TeaCommerce.Data.OrderLineProperty.OrderLineProperty(string, string, int?)' has some invalid arguments

     but....what didn't compile now runs in the in the immediate window..

    new OrderLineProperty("customProperty", "value", null)
    {value}
        base {TeaCommerce.Data.OrderProperty}: {value}
        UmbracoLanguageId: 0
    

    screen shot for your pleasure...

    it's as if two different dlls are being used. A little confused.

     Thanks! 

    Peter

  • Rune Grønkjær 1372 posts 3103 karma points
    Jan 14, 2013 @ 08:08
    Rune Grønkjær
    0

    Almost looks like you are running two different binaries. Have you double checked that the Umbraco site runs on the same dll's as your visual studio when you build your project.

    /Rune

  • Peter 89 posts 160 karma points
    Jan 14, 2013 @ 11:18
    Peter
    0

    Hey Rune, 

    I agree, it is exactly what it looks like and I have deleted all the references, then deleted the bin folder, re-added the references (the same ones to the different projects) and built.

    I'll do it again. It's possible something didn't clear or something. I appreciate your thoughts though.

    Peter

  • Peter 89 posts 160 karma points
    Jul 02, 2013 @ 19:57
    Peter
    0

    Hey Rune, 

    I am somehow back here and was trying to add a property in the c# event, but having the same things as explained previously. I knew i was having a feeling of de-ja-vu. 

    I think I previously got around it by passing in the new properties with the javascript and now doing anything in the event. That's not possible in what I need to do now.

    So I have updated the dlls, - 2.1.3 looks like it's not going to be much help so i chose 1.4.4.5 which looks a little familier. I as there is no presentation dll in the zip, i seem to have issues with my tcbase javascript calls.  What do i have to do to fix this? Should the dll be in the package? or should i have new references in the web.config?

    Thanks in advance,

    Peter

  • Peter 89 posts 160 karma points
    Jul 02, 2013 @ 20:06
    Peter
    0

    It looks like this is the problem ... 

    1.4.4.1 - 23 November 2012
    BREAKING: Removed old Tea Commerce request module, which was not compatible with Umbraco 4.10.1. Tea Commerce now uses the built in Umbraco base.
    ONLY Umbraco 4.5 versions will be broken by this.

    ... so what should I do to fix? although I am using 4.7.1 :s

  • Anders Burla 2560 posts 8256 karma points
    Jul 02, 2013 @ 20:22
    Anders Burla
    0

    Hi Peter

    You should change all the forms and JavaScript calls from "tcbase" to just the normal Umbraco base. That's it.

    Kind regards
    Anders

  • Peter 89 posts 160 karma points
    Jul 02, 2013 @ 21:58
    Peter
    0

    Thanks Anders. Unfortunatly I am now back to the orginial problem. :'(

    This really makes no sense.

  • Anders Burla 2560 posts 8256 karma points
    Jul 02, 2013 @ 22:08
    Anders Burla
    0

    Have you upgraded your VS solution to build agains the Tea Commerce dll files that are used on the website? Those need to be the same. Be sure to check the path to the dll in VS so you know it is the right one.

  • Peter 89 posts 160 karma points
    Jul 02, 2013 @ 22:27
    Peter
    0

    Hey Anders, I am only running locally, which is why i can attach the debugger and use the Immediate window.

    I did remove the references to old dlls, cleaned the solution (all projects) and then built to see the dlls were missing, then i added new references.

    it's nuts. 

  • Anders Burla 2560 posts 8256 karma points
    Jul 02, 2013 @ 22:48
    Anders Burla
    0

    Try to clean and rebuild. there must be something wrong or cahced somehow! :(

  • Peter 89 posts 160 karma points
    Jul 02, 2013 @ 22:50
    Peter
    0

    What you are saying is making sense and I agree with everything you are saying Anders, and i am trying. but it's just not making sense. I'll keep looking.

  • Peter 89 posts 160 karma points
    Jul 02, 2013 @ 22:52
    Peter
    0

    As I said at the beginning this is bound to be something simple and you'll be more than welcome to call me a n00b.

  • Peter 89 posts 160 karma points
    Jul 02, 2013 @ 23:00
    Peter
    0

    Out of interest, what version of the teacommerce.data had these methods in which it is looking for when running?

    new OrderLineProperty(string,string,int?) 

    is there something I could look for to hunt out the old version?  it must be referenced somewhere? like a config file or something.

  • Anders Burla 2560 posts 8256 karma points
    Jul 02, 2013 @ 23:46
    Anders Burla
    0

    It is properly from 1.3.0 where that was added.

Please Sign in or register to post replies

Write your reply to:

Draft