Ok, here's the problem. The admin panel's web patch simply adds new user agents to the WURFL and identifies them as web browsers. Apparently, what you want to do is override the capabilities of the iPad so it's detected as a desktop browser, and not redirected to your mobile site (I'm guessing). To accomplish this, you need to
override the iPad device and change it's
is_wireless_device property from
true to
false. In Tera-WURFL and the official WURFL APIs, you need to create a patch file that overrides the root iPad device - the one that all the other iPad devices fall back on. In the WURFL, these root devices are always given the suffix
_ver1. In your case, the iPad root device is
apple_ipad_ver1.
Here's the WURFL Patch file that will do what you want:
- Code: Select all
<?xml version="1.0" encoding="utf-8"?>
<wurfl_patch>
<devices>
<device user_agent="Mozilla/5.0 (iPad; U; CPU iPhone OS 3_2 like Mac OS X; xx-xx) AppleWebKit/531.21.10 (KHTML, like Gecko) Mobile/7D11" fall_back="apple_generic" id="apple_ipad_ver1">
<group id="product_info">
<capability name="is_wireless_device" value="false"/>
</group>
</device>
</devices>
</wurfl_patch>
To use this, make a new file (let's call it
override_patch.xml ), then paste the code from above into this file. Now edit
TeraWurflConfig.php and find the
$PATCH_FILE directive; by default it is set to
- Code: Select all
public static $PATCH_FILE = 'custom_web_patch.xml;web_browsers_patch.xml';
You will need to change it as follows so it loads your new patch file:
- Code: Select all
public static $PATCH_FILE = 'custom_web_patch.xml;web_browsers_patch.xml;override_patch.xml';