Override Default Services Implementation for AC Gold

For general questions and discussions specific to the AbleCommerce GOLD ASP.Net shopping cart software.
Post Reply
User avatar
Naveed
Rear Admiral (RADM)
Rear Admiral (RADM)
Posts: 611
Joined: Thu Apr 03, 2008 4:48 am

Override Default Services Implementation for AC Gold

Post by Naveed » Mon Aug 12, 2013 9:36 am

AbleCommerce CommerceBuilder API implements many services for different features, for example Coupon Calculator service, Checkout service, Shipping and Tax quotes calculation services. And it uses Castle Windsor to resolve the implementation of these services. This way its fairly easy to override the default implementation of these services with a custom implementation.

Each service have an interface, and the implementation follows that interface. For example the default implementation "CommerceBuilder.Services.ShipRateQuoteCalculator" for shipping rate calculation service implements the interface "CommerceBuilder.Services.IShipRateQuoteCalculator". So, you can provide your own custom implementation by implementation the respective service interface and update the Windsor config file to use your custom implementation.

Please check this wiki article for details about how you can override the default services implementation for AC Gold with your own custom implementation:

http://wiki.ablecommerce.com/index.php/ ... or_AC_Gold

User avatar
jmestep
AbleCommerce Angel
Posts: 8164
Joined: Sun Feb 29, 2004 8:04 pm
Location: Dayton, OH
Contact:

Re: Override Default Services Implementation for AC Gold

Post by jmestep » Tue Aug 13, 2013 6:08 am

This was very helpful in an R4 site I worked on, but be careful that you don't delete your dll with the windsor config file on the site and make sure you put your dll on the site before the windsor config file or the site will break until you fix it.

Able provided an easier way for my need in R5. For a coupon calculator, I didn't have to create my new service to do what I needed. I overrode the IsCouponValid method in Able's coupon calculator with my own since they have made more methods virtual. I didn't need to have the windsor config file and the new way makes it easier to integrate with instances in the future where I might have needed to have a basket service for a different reason. I wouldn't have needed to make a dll but I did it since it was for a plugin.
Judy Estep
Web Developer
jestep@web2market.com
http://www.web2market.com
708-653-3100 x209
New search report plugin for business intelligence:
http://www.web2market.com/Search-Report ... -P154.aspx

User avatar
Naveed
Rear Admiral (RADM)
Rear Admiral (RADM)
Posts: 611
Joined: Thu Apr 03, 2008 4:48 am

Re: Override Default Services Implementation for AC Gold

Post by Naveed » Tue Aug 13, 2013 8:22 am

Thanks Judy for the feedback, I have updated the wiki article contents and added the instructions to copy the service assembly dll file to Bin folder before configuring the Windsor config file. I have also updated/re-arranged other contents and added some descriptions about services which are resolvable by Windsor.

Post Reply