Our local order processing system interfaces with AbleCommerce through a custom handler which (in version 7.x) resides in the ClientAPI directory. This integration script allows for order downloads, inventory management and other tasks through HTML GET requests.
This integration script will not work in AbleCommerce GOLD unless it is placed in Mobile directory. If it resides in any other locations (including the original ClientAPI directory), AbleCommerce rewrites the raw HTML header, removing all GET data and changing the URL to the mobile directory. For example:
www.siteroot.com/ClientAPI/scriptname.a ... othervalue
becomes:
www.siteroot.com/Mobile/scriptname.ashx
I am assuming the default handler for AbleCommerce GOLD is responsible for changing the URL. When the script resides in the Mobile directory, it URL is left alone and the script works normally.
This isn't a huge deal, but I would prefer to keep third party integration scripts separated from normal AbleCommerce code. It doesn't make sense to have this script sitting in the Mobile directory.
Is there a way I can tell AbleCommerce GOLD's default handler to ignore this script?
Thank you for your help!
Third Party Custom Handler Script and AbleCommerce GOLD
-
- Lieutenant, Jr. Grade (LT JG)
- Posts: 27
- Joined: Fri Feb 05, 2010 9:37 am
- Location: Myrtle Beach, South Carolina
- Contact:
Third Party Custom Handler Script and AbleCommerce GOLD
Jamin' Leather Catalog Outlet
http://www.jaminleather.com
http://www.jaminleather.com
- ForumsAdmin
- AbleCommerce Moderator
- Posts: 399
- Joined: Wed Mar 13, 2013 7:19 am
Re: Third Party Custom Handler Script and AbleCommerce GOLD
It appears that AbleCommerce detects the calling client as a mobile device. One thing you can do to avoid getting redirected is to add a query parameter FSIntent=true to the URL.
-
- Lieutenant, Jr. Grade (LT JG)
- Posts: 27
- Joined: Fri Feb 05, 2010 9:37 am
- Location: Myrtle Beach, South Carolina
- Contact:
Re: Third Party Custom Handler Script and AbleCommerce GOLD
Thank you for the reply. That is good to know! Unfortunately I can not modify the query parameters as they are sent by the client software. Is there any other way to instruct AbleCommerce to avoid redirecting the url? Perhaps something in the ablecommerce.config file or something bit of code I can add to the script? Which file is controlling this redirection? Maybe I could modify it?ForumsAdmin wrote:It appears that AbleCommerce detects the calling client as a mobile device. One thing you can do to avoid getting redirected is to add a query parameter FSIntent=true to the URL.
Thank you again for your help!
Jamin' Leather Catalog Outlet
http://www.jaminleather.com
http://www.jaminleather.com
- jmestep
- AbleCommerce Angel
- Posts: 8164
- Joined: Sun Feb 29, 2004 8:04 pm
- Location: Dayton, OH
- Contact:
Re: Third Party Custom Handler Script and AbleCommerce GOLD
You could try changing this in the App_Code/PageHelper.cs
Code: Select all
public static bool IsInMobileContext(HttpRequest request)
{
return request.AppRelativeCurrentExecutionFilePath.ToLower()
.StartsWith("~/mobile/");
}
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
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
-
- Lieutenant, Jr. Grade (LT JG)
- Posts: 27
- Joined: Fri Feb 05, 2010 9:37 am
- Location: Myrtle Beach, South Carolina
- Contact:
Re: Third Party Custom Handler Script and AbleCommerce GOLD
Thanks for the reply! Not sure it helps for preventing the header modification of this one particular third party script, but it points me in a direction to look. I appreciate all the helpjmestep wrote:You could try changing this in the App_Code/PageHelper.csCode: Select all
public static bool IsInMobileContext(HttpRequest request) { return request.AppRelativeCurrentExecutionFilePath.ToLower() .StartsWith("~/mobile/"); }
Jamin' Leather Catalog Outlet
http://www.jaminleather.com
http://www.jaminleather.com