Tax Provider Integration : Avalara

For general questions and discussions specific to the AbleCommerce 7.0 Asp.Net product.
jrobgood
Lieutenant (LT)
Lieutenant (LT)
Posts: 56
Joined: Wed Nov 14, 2007 2:27 am

Re: Avalara integration

Post by jrobgood » Tue Jul 29, 2008 8:28 pm

Rob here, chiming in on the error Brian and I are experiencing:

Here is the explicit output of the error...

Code: Select all

Object reference not set to an instance of an object.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. 

Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.

Source Error: 


Line 189:        Basket basket = Token.Instance.User.Basket;
Line 190:		basket.Package(true);
Line 191:        basket.Recalculate();
Line 192:        //VALIDATE THE BASKET
Line 193:        List<string> basketMessages;

Source File: c:\srv\www\ConLib\Basket.ascx.cs    Line: 191 

Stack Trace: 


[NullReferenceException: Object reference not set to an instance of an object.]
   CommerceBuilder.Taxes.TaxCalculator.Calculate(Basket basket) +583
   CommerceBuilder.Orders.Basket.Recalculate() +59
   ConLib_Basket.Page_PreRender(Object sender, EventArgs e) in c:\srv\www\ConLib\Basket.ascx.cs:191
   System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +24
   System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +57
   System.Web.UI.Control.OnPreRender(EventArgs e) +126
   System.Web.UI.Control.PreRenderRecursiveInternal() +143
   System.Web.UI.Control.PreRenderRecursiveInternal() +257
   System.Web.UI.Control.PreRenderRecursiveInternal() +257
   System.Web.UI.Control.PreRenderRecursiveInternal() +257
   System.Web.UI.Control.PreRenderRecursiveInternal() +257
   System.Web.UI.Control.PreRenderRecursiveInternal() +257
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3680

User avatar
sohaib
Developer
Developer
Posts: 1079
Joined: Fri Jan 23, 2004 1:38 am

Re: Avalara integration

Post by sohaib » Wed Jul 30, 2008 2:19 am

Our classID is now namespace.classname, so it's AvalaraTaxProvider.MyTaxClass. (this is in the appcode folder, using the TaxProvider.cs file)
I suspect that problem you are having could be because of your implementation being in App_Code rather than a pre-compiled DLL. Ablecommerce dynamically tries to load the class with given ClassId and create an instance of it. If it fails to create an instance a null instance is returned. I think that is where you are getting this exception from.

As an improvement, may be Ablecommerce should throw an exception when it fails to create an instance rather than trying to use a null instance.

Btw if you provide a wrong ClassId you will get the same error. So I am not sure whether the error you are getting is because of invalid ClassId or because of your classes being in App_Code.

BillEisenman
Ensign (ENS)
Ensign (ENS)
Posts: 4
Joined: Fri Oct 24, 2008 2:55 pm

Re: Tax Provider Integration : Avalara

Post by BillEisenman » Fri Oct 24, 2008 3:04 pm

I succeeded in recreating the Avalara Tax Provider Code from Brian's code with a bit of modifications and am unsure as how to (1) Test it. and (2) Register it with the store. Can I get someone to walk me thru it?

User avatar
mazhar
Master Yoda
Master Yoda
Posts: 5084
Joined: Wed Jul 09, 2008 8:21 am
Contact:

Re: Tax Provider Integration : Avalara

Post by mazhar » Sat Oct 25, 2008 7:25 am

I succeeded in recreating the Avalara Tax Provider Code from Brian's code with a bit of modifications and am unsure as how to (1) Test it. and (2) Register it with the store. Can I get someone to walk me thru it?
In order to register it with the store, please read the following post.
viewtopic.php?f=47&t=8694

Netfinity
Ensign (ENS)
Ensign (ENS)
Posts: 18
Joined: Sun Feb 22, 2009 10:22 pm

Re: Tax Provider Integration : Avalara

Post by Netfinity » Tue Feb 24, 2009 10:34 pm

Hey Brian,
Did you get the Avalara class completed? Are you interested in sharing it?
Image
http://www.netfinity.co.nz
AbleCommerce specialists for the International Community

sfeher
Captain (CAPT)
Captain (CAPT)
Posts: 220
Joined: Fri Jun 04, 2004 1:58 pm
Location: Steubenville, Ohio

Re: Tax Provider Integration : Avalara

Post by sfeher » Fri Jun 26, 2009 8:50 am

Anyone made any major changes to this for the 7.0.3 install?
I have a client who has used Certitax on their version 5.5 cart and wants to see us maintain Certitax for their AC 7x install, but this might be a better option if you have had success already.

Any advice to pass along here?
Anyone have an integration with Certitax that is working on AC 7x?

Thanks!

sfeher
Captain (CAPT)
Captain (CAPT)
Posts: 220
Joined: Fri Jun 04, 2004 1:58 pm
Location: Steubenville, Ohio

Re: Tax Provider Integration : Avalara

Post by sfeher » Tue Sep 22, 2009 9:32 am

Still curious if anyone has implemented Certitax within the 7.0.3 cart.
We have a project that requires Certitax and there doesn't appear to be much remaining interest inside the AC community for using this third party service.

I have the tax provider integration from the wiki page (see http://wiki.ablecommerce.com/index.php/ ... x_Provider ), but I am trying to see if anyone has successfully implemented with Certitax. It seems to have fallen out of use/favor.

Anyone?

Thanks!

joea84
Lieutenant, Jr. Grade (LT JG)
Lieutenant, Jr. Grade (LT JG)
Posts: 27
Joined: Wed May 26, 2010 11:55 am

Re: Tax Provider Integration : Avalara

Post by joea84 » Mon Oct 25, 2010 9:30 am

Hi,

If you want to create a custom tax provider and add tax at the order stage (so you can test for billing state, etc.), this code would work:

Code: Select all

/// <summary>
        /// Commit the taxes by this provider for the given order
        /// </summary>
        /// <param name="order">The order for which to commit the taxes</param>
        public override void Commit(Order order)
        {
            OrderItem oi = new OrderItem();
            oi.OrderId = order.OrderId;
            oi.Price = 1200;
            oi.Name = "Joe's Custom Order tax.";
            oi.OrderItemType = OrderItemType.Tax;
            oi.Quantity = 1;
            oi.Save();
            order.Items.Add(oi);
            order.Save();
        }
I am using AC 7.0.4. You must go to the admin > Configure > Taxes > 3rd Party Providers and click the activate button next to your tax provider.

Joseph Anderson
JMA Web Technologies, Inc.
http://www.jmawebtechnologies.com
info@jmawebtechnologies.com
781 330 0737

User avatar
Logan Rhodehamel
Developer
Developer
Posts: 4116
Joined: Wed Dec 10, 2003 5:26 pm

Re: Tax Provider Integration : Avalara

Post by Logan Rhodehamel » Mon Nov 01, 2010 9:21 am

I'm not sure why this thread got bumped up, but since this time, we were contacted by Avalara and asked to do the integration officially. A fully supported AvaTax connector is now available for AbleCommerce 7.0.3 and above. Our current release of the AvaTax connector for AbleCommerce requires full trust to run. A new version of our connector that works in medium trust has been developed and is currently in a QA process.
Cheers,
Logan
Image.com

If I do not respond to an unsolicited private message, it's not because I'm ignoring you. It's because the answer to your question is valuable to others. Try the new topic button.

dirk.mccomsey
Ensign (ENS)
Ensign (ENS)
Posts: 1
Joined: Thu May 12, 2011 9:51 am

Re: Tax Provider Integration : Avalara

Post by dirk.mccomsey » Mon Aug 01, 2011 3:31 pm

I couldn't find a place in the wiki to leave a comment, but it seems that with 7.0.7, this portion of the code

Code: Select all

        /// <summary>
        /// Is the tax provider activated or not
        /// </summary>
        public override bool Activated
        {
            get { throw new Exception("The method or operation is not implemented."); }
        }
is now invalid... Apparently Activated must now be implemented.

Post Reply