Directing visitors who are using Smartphones such as IPhones or Androids to view mobile-enabled OSCommerce sites is easy. Simply go to www.handsetdetection.com or other similar sites and get a API script reference. Paste this script in the head of your normal sites index. Voila, anyone using a smart phone will be directed to your mobile OSCommerce site.
For a DEMO:, go to www.niora.com on your laptop or desktop computer. You’ll see the regular OSCommerce shopping cart. Now go to the same site, but using your smartphone. You’ll be at Niora’s mobile OSCommerce site.
Because the script is maintained externally, the script is always up-to-date (in theory), and covers all popular smart phones. If you would like to use your own code loaded locally on your website, you’ll need code for all the different phone types. www.hand-interactive.com is an example of a site that goes into detail on how to do this.
(snippet courtesy of catswhocode)