The Order Origin mod is now available in the Plugins area to help you determine which of your orders came from a mobile device.
https://www.zen-cart.com/downloads.php?do=file&id=2073
The Order Origin mod is now available in the Plugins area to help you determine which of your orders came from a mobile device.
https://www.zen-cart.com/downloads.php?do=file&id=2073
Last edited by swguy; 2 May 2016 at 02:48 AM.
That Software Guy. My Store: Zen Cart Modifications
Available for hire - See my ad in Services
Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
Do you benefit from Zen Cart? Then please support the project.
Hi Scott
Can I please ask - just installed the module but no M's showing up - will it only work now when new mobile orders come in. as I presume the data was not collected before that?
Are we able to back-track-it at all? even if its manually updating it - is there anywhere in DB that does show which were mobile orders?
Thank you
Installed on 1.5.4 did it line by line but other than nothing showing works fine :)
Thanks
Sarah
Sarah, you are correct, it is for new orders only.
You can certainly update older orders but there's no admin interface; you'd need to use PHPMyAdmin or Install SQL Patches and do an update there.
That Software Guy. My Store: Zen Cart Modifications
Available for hire - See my ad in Services
Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
Do you benefit from Zen Cart? Then please support the project.
Thanks Scott - are you able to tell me where that data is stored in the MySQL database so I can start pulling it out??
it's an interesting bit of information.
as far as updating old orders, its seems the MobileDetect class is far more sophisticated that a simple sql string. but the following sql update could do all of the old orders.
as always with sql statements, use at your own peril, comes with no guarantees/warranties, etc.
someone else may want to chime in as i think that sql statement covers most of the mobile devices.Code:update orders set mobile_order = 1 where ord_user_agent REGEXP 'iPhone|iPad|Android|Blackberry'
good luck.
hmm ok I cannot find anything that matches that - where are you looking for that ord_user_agent .. ?
sarah,
i APOLOGIZE!
i'm trying to reconstruct what i did. i think at some point, i saw the user_agent in the whos on-line page, and i then modified the create function within the order class with the following line:
which now stores that information in the order table. (i modified the orders table using an sql statement to add this extra field.) i have not been doing anything with it, but i have stored it! which i suppose for me makes this plugin a little superfluous. although i am unclear if my regular expression search is more definitive than the mobile detect class.Code:'ord_user_agent' => substr(zen_db_prepare_input($_SERVER['HTTP_USER_AGENT']), 0, 254)
in looking at the order table, i'm not sure there is anything else stored there that will indicate mobile or not. nor am i seeing an other table where one could gather this information. although it "might" be there.
given that information, i am not sure one could reconstruct mobile or not for older orders.
again, i apologize for leading you a bit astray!
best.
@SarahL you would have to know which orders were placed by mobile - there's no way to determine this after the fact. But if you know you can set the mobile_order in a SQL statement.
That Software Guy. My Store: Zen Cart Modifications
Available for hire - See my ad in Services
Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
Do you benefit from Zen Cart? Then please support the project.
Bookmarks