yoyoman Posted July 12, 2011 Share Posted July 12, 2011 Ok i will add somthing to the above i thought the problem was in mobile_product_info.php as that was the page that displayed all wrong but it does display very nicely if i go from the basket back to the product page any ideas would be great as i like this contribution a lot and would love ot get it working properly thanks in advance is there no support for this contribution anymore? Quote Link to comment Share on other sites More sharing options...
assassin11 Posted July 21, 2011 Share Posted July 21, 2011 Did anybody have any luck with automatic redirecton for mobile browsers? I add this at the end of catalog/includes/application_top.php //BEGIN : MOBILE iOSC REDIRECT_SCRIPT require_once(DIR_WS_FUNCTIONS . 'iosc.php'); //END : MOBILE iOSC REDIRECT_SCRIPT when Im going to www.mydomainname.com on my PC simply takes me to the mobile site instead (pc version) Thanks for your help ---------- -------------- Quote Link to comment Share on other sites More sharing options...
wflynn Posted July 31, 2011 Share Posted July 31, 2011 I have the same problem exactly does anyone have a fix for this I love this add on but if I add automatic redirection by adding: //BEGIN : MOBILE iOSC REDIRECT_SCRIPT require_once(DIR_WS_FUNCTIONS . 'iosc.php'); //END : MOBILE iOSC REDIRECT_SCRIPT my PC simply takes me to the mobile site instead (pc version) even when my site is viewed on a PC? Did anybody have any luck with automatic redirecton for mobile browsers? I add this at the end of catalog/includes/application_top.php //BEGIN : MOBILE iOSC REDIRECT_SCRIPT require_once(DIR_WS_FUNCTIONS . 'iosc.php'); //END : MOBILE iOSC REDIRECT_SCRIPT when Im going to www.mydomainname.com on my PC simply takes me to the mobile site instead (pc version) Thanks for your help ---------- -------------- Quote Link to comment Share on other sites More sharing options...
wflynn Posted July 31, 2011 Share Posted July 31, 2011 I found the solution it was already posted in this forum a while back for those having troubles with redirects and this script just read below. Thanks goes to itzbilly Just a few thoughts and tips for users of this contrib. Although I've read the length of this thread, some of these ideas may have been mentioned before. My apologies if there are repeats. :rolleyes: Testing the Contrib For folks who lack multiple devices for testing, you can download a User Agent emulator for FireFox at https://addons.mozilla.org/en-US/firefox/addon/59/ . Among the possibilities are several mobile devices / OSs / Browsers. Since your mobile site is based on a different screen resolution, the header will appear wrong, but I've found it invaluable in testing redirects and other functions. Redirect Problems For folks with redirect problems, the author of this contrib has done us all a great service. I applaud their ingenuity. Unfortunately, like many others I just couldn't get the redirect to work. With all the new devices emerging daily too, I suspected that if the redirect worked for me now, it would be missing some devices in the near future. I have opted for a different redirect script. It is open source, so it is constantly being updated and totally free. It can be downloaded at http://detectmobilebrowser.com/ . Click download scripts and then php. You can set yourself a reminder to download every month or so and you're always up to date. (Again, no joy taken away from the original author. Honestly great work.) Now for the implementation. I was getting errors with the redirect being called from application_top.php when the mobile_index.php calls it's own application_top that then calls the original application_top again. I was getting a loop and the address wouldn't resolve. Perhaps I did something else wrong, but I did find a solution. I call the redirect from the main site header.php. (Actually, I use a template system, so I call it from the main template, but I believe most users would use their header.php.) Here's how it would work. a. Create a php file in the mobile/includes/classes dir called mobile_user_detect.php. Put the script you downloaded above in it. The last part of the script contains the redirect looking something like "header('Location: http://detectmobilebrowser.com/mobile');". Change to read "header('Location: http://yousitename.com/catalog/mobile_' . $mobile_device_url);". (I'll get to the $mobile_device_url in a moment.) If your mobile dir and mobile_* files reside in a different directory, naturally, you'll have to change this url some. b. In your header.php, put the following line "require_once('mobile/includes/classes/mobile_user_detect.php');". Again, if this doesn't resolve to the right location, you'll have to adjust for your structure. c. Last thing is the $mobile_device_url. If you are like me, most visitors don't enter your site on your homepage anyway. They click a search ad or organic result and enter on a product page. Redirecting to mobile_index.php doesn't make sense. You want them to go to the correct product page, just on the mobile version. Here's what you do. In your header.php immediately before the "require_once('mobile/includes/classes/mobile_user_detect.php');" line you just added, insert this code "$mobile_device_url = basename($PHP_SELF) . '?' . tep_get_all_get_params();". This grabs the product id and correct file name from the referring URL so the redirect can append it to the new URL. So, "www.yousite.com/catalog/product_info.php?product_id=1" becomes "www.yousite.com/catalog/mobile_product_info.php?product_id=1". Added Benefits For folks who are struggling with links always referring back to your main site, I think this would just send them to your mobile site again. I wasn't having this issue thanks to some previous posts, but I suspect it would function in this fashion. Guess someone else will have to try it. For folks who normally use SEO URLS, this even allows my install to correctly redirect to these product pages. Basically then, "www.yousite.com/catalog/some-great-product-1.html" becomes "www.yousite.com/catalog/mobile_product_info.php?product_id=1". If you're using a different SEO URLs and it doesn't work for you, sorry. For many though, this will save you having to rewrite all your links with your PPC providers to the non-SEO URL format. It works either way. I know this was a little long. Hopefully, it contains some useful info for someone. I have added several changes from some previous posts on this thread, so I don't really have a way to see if these changes will work with the contrib "out of the box". Good luck to all and thanks to the original author and many previous posters. Quote Link to comment Share on other sites More sharing options...
assassin11 Posted August 13, 2011 Share Posted August 13, 2011 Thanks wflynn but I found I think the easiest solution and most reliable, I add this code in to .htaccess file: ///////////////////////////// # don't apply the rules if you're already in the mobile directory, infintine loop # you'll want to test against the host if you're using a subdomain RewriteCond %{REQUEST_URI} !^/mobile_catalogue.php.*$ # if the browser accepts these mime-types, it's definitely mobile, or pretending to be RewriteCond %{HTTP_ACCEPT} "text\/vnd\.wap\.wml|application\/vnd\.wap\.xhtml\+xml" [NC,OR] # a bunch of user agent tests RewriteCond %{HTTP_USER_AGENT} "sony|symbian|nokia|samsung|mobile|windows ce|epoc|opera" [NC,OR] RewriteCond %{HTTP_USER_AGENT} "mini|nitro|j2me|midp-|cldc-|netfront|mot|up\.browser|up\.link|audiovox"[NC,OR] RewriteCond %{HTTP_USER_AGENT} "blackberry|ericsson,|panasonic|philips|sanyo|sharp|sie-"[NC,OR] RewriteCond %{HTTP_USER_AGENT} "portalmmm|blazer|avantgo|danger|palm|series60|palmsource|pocketpc"[NC,OR] RewriteCond %{HTTP_USER_AGENT} "smartphone|rover|ipaq|au-mic,|alcatel|ericy|vodafone\/|wap1\.|wap2\.|iPhone|android"[NC] RewriteCond %{REQUEST_URI} ^/$ RewriteRule ^$ /mobile_catalogue.php [L,R=302] ////////////////////////// I change just RewriteRule and RewriteCond to my mobile file that should show up at the begining, this is it. Quote Link to comment Share on other sites More sharing options...
thom000 Posted August 28, 2011 Share Posted August 28, 2011 Great contri I have only 2 problems if i click on the mobile site on product info it doesnt do anything. And if i click on the link classic in the mobile it is turning to the mobile site not to the normal site. Please can you help me. my site is http://www.taartwinkeltje.nl Quote Link to comment Share on other sites More sharing options...
Guest Posted September 27, 2011 Share Posted September 27, 2011 (edited) Superb mobile contribution by the way!! I really believe this contrib would be complete if there were back buttons. Especially a parent categories back button that takes the user back to the parent category (right now we have to always click the mobile_catalogue.php link at the top of page). I have been jibby jabbying the code but to no avail. Every time I try to install a back button it will take me back to the mobile_index.php page. Anyone here agree back buttons would be a nice addition? Have a great evening everyone. Edited September 27, 2011 by niagaramerchant Quote Link to comment Share on other sites More sharing options...
seanpatrick Posted October 17, 2011 Share Posted October 17, 2011 I've made a few of the changes B!!! suggests on page 20 of this thread which resolved almost all the issues I was having. One outstanding thing I noticed in testing iOSC for my store is that when on the mobile version, if a product has attributes associated with it, all attributes are displayed whether or not that attribute has inventory (I use QTPro for this on the "classic" version). Any solutions or ways to get QTPro working on the mobile version? Thanks! Quote Link to comment Share on other sites More sharing options...
andes1 Posted October 20, 2011 Share Posted October 20, 2011 Superb mobile contribution by the way!! I really believe this contrib would be complete if there were back buttons. Especially a parent categories back button that takes the user back to the parent category (right now we have to always click the mobile_catalogue.php link at the top of page). I have been jibby jabbying the code but to no avail. Every time I try to install a back button it will take me back to the mobile_index.php page. Anyone here agree back buttons would be a nice addition? Have a great evening everyone. the idea is a clean interface not cluttered, so the back button of your browser is plenty enouhgt... in dec ill start again to work in this addon Quote Link to comment Share on other sites More sharing options...
DawnG Posted November 6, 2011 Share Posted November 6, 2011 (edited) Hello all. great contrib love it! I am having one issue that I hope you can help me with on www.pagan-magic.co.uk/shop/mobile_checkout_shipping.php - the text is all bunched together for the postage options, could someone have a look and tell me what I need to do to clear up the format. Many Thanks Dawn Edited November 6, 2011 by DawnG Quote Link to comment Share on other sites More sharing options...
Guest Posted November 9, 2011 Share Posted November 9, 2011 redirect problems I tried the advice of assassin11 about the .haccess, but not luck Also the wflynn same result.. does anybody reach a working redirect?? Quote Link to comment Share on other sites More sharing options...
Guest Posted November 17, 2011 Share Posted November 17, 2011 redirect problems I tried the advice of assassin11 about the .haccess, but not luck Also the wflynn same result.. does anybody reach a working redirect?? I had this working just fine 'out of the box' on a WAMP localhost but when I uploaded to a live site on *NIX then no redirect - spent ages trying to work out why by following the redirect through the new mobile class and whilst all values looked/echoed out correctly - no redirect - so some sort of server setting preventing it? So adapted wflynn's suggestion above and only edited catalog/includes/application_top.php (unlike wflynn I was not experiencing a loop) with the following code right before the closing ?> and replacing the code from the original add-on/contribution if (MOBILE_SITE=='True'){ $useragent=$_SERVER['HTTP_USER_AGENT']; //start of code from http://detectmobilebrowser.com/ . if(preg_match('/android.+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i',$useragent)||preg_match('/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|e\-|e\/|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(di|rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|xda(\-|2|g)|yas\-|your|zeto|zte\-/i',substr($useragent,0,4))) //end fo code from http://detectmobilebrowser.com/ //start of code from original class file mobile_redirect.php { $path = split("/" , $_SERVER['SCRIPT_NAME']); $filename = $path[sizeof($path)-1]; $file = 'mobile_' . $filename; $qstring = urldecode($_SERVER['QUERY_STRING']); $SSL = ($_SERVER['HTTPS']) ? "SSL" : "NONSSL"; if (file_exists($file)){ tep_redirect(tep_href_link($file, str_replace('&', '&',$qstring), $SSL, false, false)); } //end of original } }//end if (MOBILE_SITE=='True') Grab the code as he advises from http://detectmobilebrowser.com/ and use it as: if (preg_match......)//detectmobilebrowser code { // your redirect code } I've also wrapped this redirect in a if (MOBILE_SITE=='True'){ }//end if (MOBILE_SITE=='True') so that I could turn it off easily in the live site - to use this you need to insert the following using phpMyAdmin or whatever floats your boat: INSERT INTO `configuration` VALUES ('', 'Enable Mobile Site?', 'MOBILE_SITE', 'FALSE', 'Do you want to enable the mobile version of the site?', 1, 99, NULL, '2011-09-19 08:47:54', NULL, 'tep_cfg_select_option(array(''True'', ''False''), '); Now go to store admin, configuration, My Store and change the 'Enable Mobile Site' to 'True'. If you do not want to use it just delete the code in the last box (if(MOBILE_....) the site concerned uses RC 2.2, STS Templates and SEO Urls. If you find that you now get a working categories list but 404 for products try checking the products url - you may see an '&' in there - if so then check your file catalog/includes/functions/general.php for the function tep_redirect($url) you may need to add the line $url = str_replace('&', '&', $url); towards the end of the file thus: $url = str_replace('&', '&', $url); header('Location: ' . $url); tep_exit(); May help but YMMV Graeme Quote Link to comment Share on other sites More sharing options...
Guest Posted November 17, 2011 Share Posted November 17, 2011 thanks i'm gonna try it Quote Link to comment Share on other sites More sharing options...
bsreinstra Posted November 30, 2011 Share Posted November 30, 2011 This is a really awesome contrib - Thank you! Everything works on my site for the most part, but I have two problems. 1) When you click to submit the credit card info - instead of a confirmation page - it just reloads the same page. It works fine with the check or money order module but not the credit card. and 2) When I click on a product (on my android phone) The browser returns "The page has too many server redirects" When I click on my regular browser on my computer it goes to the non-mobile page. I have ultimate SEO enabled on the main site and I have the define ('SEO_ENABLED', false); line in my configure.php We recently changed our domain from www.elanteluggage.com to www.luggage-logic.com There is a 301 redirect in the htaccess file to redirect traffic from the old site to the new one. The iOSC install is stock, I am using: // require_once(DIR_WS_FUNCTIONS . 'iosc.php'); define(DIR_MOBILE_CLASSES , 'mobile/includes/classes/'); require(DIR_MOBILE_CLASSES . 'mobile_redirect.php'); $mobileRedirect = new mobileRedirect; In application_top.php This is my htaccess: RewriteEngine On RewriteCond %{HTTP_HOST} ^elanteluggage.com [OR] RewriteCond %{HTTP_HOST} ^www.elanteluggage.com RewriteRule ^(.*)$ http://www.luggage-logic.com/$1 [L,R=301] # $Id: .htaccess,v 1.3 2003/06/12 10:53:20 hpdl Exp $ # # This is used with Apache WebServers # # For this to work, you must include the parameter 'Options' to # the AllowOverride configuration # # Example: # # <Directory "/usr/local/apache/htdocs"> # AllowOverride Options # </Directory> # # 'All' with also work. (This configuration is in the # apache/conf/httpd.conf file) # The following makes adjustments to the SSL protocol for Internet # Explorer browsers #<IfModule mod_setenvif.c> #<IfDefine SSL> #SetEnvIf User-Agent ".*MSIE.*" \ #nokeepalive ssl-unclean-shutdown \ #downgrade-1.0 force-response-1.0 #</IfDefine> #</IfModule> # If Search Engine Friendly URLs do not work, try enabling the # following Apache configuration parameter # # AcceptPathInfo On # Fix certain PHP values # (commented out by default to prevent errors occuring on certain # servers) # #<IfModule mod_php4.c> # php_value session.use_trans_sid 0 # php_value register_globals 1 #</IfModule> # Ultimate SEO URLs BEGIN #Options +FollowSymLinks RewriteEngine On #RewriteBase /home/elantelu/public_html/ RewriteCond %{HTTP_HOST} ^elanteluggage.com [NC] RewriteRule (.*) http://www.elanteluggage.com/$1 [R=301,QSA,L] RewriteBase /~elantelu RewriteRule ^(.*)-p-(.*).html$ product_info.php?products_id=$2&%{QUERY_STRING} RewriteRule ^(.*)-c-(.*).html$ index.php?cPath=$2&%{QUERY_STRING} RewriteRule ^(.*)-m-([0-9]+).html$ index.php?manufacturers_id=$2&%{QUERY_STRING} RewriteRule ^(.*)-pi-([0-9]+).html$ popup_image.php?pID=$2&%{QUERY_STRING} RewriteRule ^(.*)-t-([0-9]+).html$ articles.php?tPath=$2&%{QUERY_STRING} RewriteRule ^(.*)-a-([0-9]+).html$ article_info.php?articles_id=$2&%{QUERY_STRING} RewriteRule ^(.*)-pr-([0-9]+).html$ product_reviews.php?products_id=$2&%{QUERY_STRING} RewriteRule ^(.*)-pri-([0-9]+).html$ product_reviews_info.php?products_id=$2&%{QUERY_STRING} RewriteRule ^(.*)-i-([0-9]+).html$ information.php?info_id=$2&%{QUERY_STRING} # Ultimate SEO URLs END Any help would be appreciated!!! Quote Link to comment Share on other sites More sharing options...
bsreinstra Posted December 1, 2011 Share Posted December 1, 2011 This is a really awesome contrib - Thank you! Everything works on my site for the most part, but I have two problems. 1) When you click to submit the credit card info - instead of a confirmation page - it just reloads the same page. It works fine with the check or money order module but not the credit card. and 2) When I click on a product (on my android phone) The browser returns "The page has too many server redirects" When I click on my regular browser on my computer it goes to the non-mobile page. I have ultimate SEO enabled on the main site and I have the define ('SEO_ENABLED', false); line in my configure.php We recently changed our domain from www.elanteluggage.com to www.luggage-logic.com There is a 301 redirect in the htaccess file to redirect traffic from the old site to the new one. The iOSC install is stock, I am using: // require_once(DIR_WS_FUNCTIONS . 'iosc.php'); define(DIR_MOBILE_CLASSES , 'mobile/includes/classes/'); require(DIR_MOBILE_CLASSES . 'mobile_redirect.php'); $mobileRedirect = new mobileRedirect; In application_top.php This is my htaccess: RewriteEngine On RewriteCond %{HTTP_HOST} ^elanteluggage.com [OR] RewriteCond %{HTTP_HOST} ^www.elanteluggage.com RewriteRule ^(.*)$ http://www.luggage-logic.com/$1 [L,R=301] # $Id: .htaccess,v 1.3 2003/06/12 10:53:20 hpdl Exp $ # # This is used with Apache WebServers # # For this to work, you must include the parameter 'Options' to # the AllowOverride configuration # # Example: # # <Directory "/usr/local/apache/htdocs"> # AllowOverride Options # </Directory> # # 'All' with also work. (This configuration is in the # apache/conf/httpd.conf file) # The following makes adjustments to the SSL protocol for Internet # Explorer browsers #<IfModule mod_setenvif.c> #<IfDefine SSL> #SetEnvIf User-Agent ".*MSIE.*" \ #nokeepalive ssl-unclean-shutdown \ #downgrade-1.0 force-response-1.0 #</IfDefine> #</IfModule> # If Search Engine Friendly URLs do not work, try enabling the # following Apache configuration parameter # # AcceptPathInfo On # Fix certain PHP values # (commented out by default to prevent errors occuring on certain # servers) # #<IfModule mod_php4.c> # php_value session.use_trans_sid 0 # php_value register_globals 1 #</IfModule> # Ultimate SEO URLs BEGIN #Options +FollowSymLinks RewriteEngine On #RewriteBase /home/elantelu/public_html/ RewriteCond %{HTTP_HOST} ^elanteluggage.com [NC] RewriteRule (.*) http://www.elanteluggage.com/$1 [R=301,QSA,L] RewriteBase /~elantelu RewriteRule ^(.*)-p-(.*).html$ product_info.php?products_id=$2&%{QUERY_STRING} RewriteRule ^(.*)-c-(.*).html$ index.php?cPath=$2&%{QUERY_STRING} RewriteRule ^(.*)-m-([0-9]+).html$ index.php?manufacturers_id=$2&%{QUERY_STRING} RewriteRule ^(.*)-pi-([0-9]+).html$ popup_image.php?pID=$2&%{QUERY_STRING} RewriteRule ^(.*)-t-([0-9]+).html$ articles.php?tPath=$2&%{QUERY_STRING} RewriteRule ^(.*)-a-([0-9]+).html$ article_info.php?articles_id=$2&%{QUERY_STRING} RewriteRule ^(.*)-pr-([0-9]+).html$ product_reviews.php?products_id=$2&%{QUERY_STRING} RewriteRule ^(.*)-pri-([0-9]+).html$ product_reviews_info.php?products_id=$2&%{QUERY_STRING} RewriteRule ^(.*)-i-([0-9]+).html$ information.php?info_id=$2&%{QUERY_STRING} # Ultimate SEO URLs END Any help would be appreciated!!! SO I have been working on this for the last 24 hours with no luck...... My tech support at my host says: I've carefully investigated the issue and I managed to reproduce the problem on my end. I accessed the website using my HTC Android phone and when I attempted to access a product I got the error. In order to find out why the redirection occurs I used the Apache mod_rewrite RewriteLog debugging feature. When enabled, this option of mod_rewrite adds information to a text file regarding the way redirects in your .htaccess file are processed. The text file accessible at: http://www.luggage-logic.com/rewrite.txt According to the information in the file there is a problem between your OS Commerce mobile website contribution and your Ultimate SEO URLs plugin. The rules in your .htaccess file redirect all requests to the following OS Commerce files: product_info.php index.php popup_image.php articles.php article_info.php product_reviews.php product_reviews_info.php information.php Unfortunately, the mobile version contribution redirects the user again because it detects that the request comes from a mobile device. That said, you need to contact the developers of the two extensions and ask for assistance. After all, they have created the software packages and only they will be able to assist you. I am sure that there are other people using the contributions and they will be glad to fix this bug. Let us know if we can do anything else for you! Another odd thing - with certain products the shopping cart works (adds product and takes you to cart) for others it does not. At first I thought it was products with more than one picture that weren't working but I was wrong. The shopping cart works for both products: http://www.luggage-logic.com/mobile_products.php?cPath=65 The shopping cart doesn't work for any of these EXCEPT the "pack-flat back up bag": http://www.luggage-logic.com/mobile_products.php?cPath=41 I am about ready to give up....... As an idea, could a mobile URL field be put in the database and just have the program call that instead of using redirects? Thanks, Brian Quote Link to comment Share on other sites More sharing options...
bsreinstra Posted December 4, 2011 Share Posted December 4, 2011 Solution found. Turn off the "enable automatic redrects" in the Seo url contrib. Quote Link to comment Share on other sites More sharing options...
♥DAVID3733 Posted December 27, 2011 Share Posted December 27, 2011 Hi there I have spent Christmas with this and think its great, i have everything working as it should except the look, all i get in emulators and my own Android and a friends Iphone are text links for the header and no styles, the images for the products are there so i assume its not configure.php, i know its something silly but i cant work it out, if there is anyone who could point me in the right direction for the code i would appriate it, the address of the phone site is http://www.batterytrader.com/mobile_index.php Merry Christmas Quote David Link to comment Share on other sites More sharing options...
♥DAVID3733 Posted December 27, 2011 Share Posted December 27, 2011 Hi just an update on the above, the look is perfect in explorer on my PC but not on chrome, safari, and firefox on a PC nor in andriod, opera for mobile and iphone on a phone So i assume its the CSS sheets or the way they are being sourced This is the code in the header <meta name="viewport" content="width=320; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" /> <style type="text/css" media="screen"> @import "<?php echo DIR_MOBILE_INCLUDES; ?>iphone.css"; @import "<?php echo DIR_MOBILE_INCLUDES; ?>custom.css"; </style> and this is the code in iphone.css /* iOSC 3.0 by LTGraf.com 2010-11-19 */ body { margin: 0; font-family: Helvetica; background: #FFFFFF; color: #1e1e1e; overflow-x: hidden; -webkit-user-select: none; -webkit-text-size-adjust: none; -webkit-font-smoothing: antialiased; font-smoothing:antialiased;/*css3*/ -moz-font-smoothing:antialiased;/*gecko (ex:Firefox)*/ } form { display:inline; } A { color: #6699DD; text-decoration: none; } A:hover { text-decoration: underline; } #iphone_content { width:100%; position:absolute; } #headerLogo { color:#FFFFFF; text-transform:uppercase; font-size:18px; text-align:center; background:url(../images/header_back.png) repeat-x; line-height:48px; } table.logo{ display: none; } #returning_cust, #new_cust, #inscription { width:90%; border-radius:5px;/*css3*/ -moz-border-radius:5px;/*gecko (ex:Firefox)*/ -webkit-border-radius:5px;/*webkit (ex:safari)*/ padding:5px; color:#1e1e1e; border:1px solid #ccc; margin:auto; margin-top:5px; background:#F4F4F4; margin-bottom:5px; } #returning_cust h1, #new_cust h1, #inscription h1 { margin:0; font-size:18px; margin-bottom:5px; } #returning_cust input, #new_cust input, #inscription input { width:150px; } #returning_cust .float { display: block; width:33%; float:left; text-align:left; font-weight:bold; } #inscription .float { display: block; width:45%; float:left; text-align:left; font-weight:normal; } #inscription .obligatoire { color:#FF0000; } #inscription .form_line{ clear:left; margin-bottom:5px; } #inscription .form_line.gender input { width:auto; } #inscription .form_line.birthdate input { width:100px; } #also_purchased { width:90%; border-radius:5px;/*css3*/ -moz-border-radius:5px;/*gecko (ex:Firefox)*/ -webkit-border-radius:5px;/*webkit (ex:safari)*/ padding:10px; color:#1e1e1e; border:1px solid #ccc; margin:auto; margin-top:5px; background:#F4F4F4; margin-bottom:5px; text-align:justify; display:block; float:left; } #prodCell_also { width:30%; min-height:125px; border:0px solid #ccc; border-radius:5px;/*css3*/ -moz-border-radius:5px;/*gecko (ex:Firefox)*/ -webkit-border-radius:5px;/*webkit (ex:safari)*/ padding:2px; float:left; margin:2px; background:#ccc; } #prodCell_also img, #prodCell img, #ficheProdTop img { border-radius:5px;/*css3*/ -moz-border-radius:5px;/*gecko (ex:Firefox)*/ -webkit-border-radius:5px;/*webkit (ex:safari)*/ } #prodCell_also .prodImg, #prodCell .prodImg { margin:auto; border-bottom:1px solid #ccc; text-align:center; margin-bottom:2px; border-radius:5px;/*css3*/ -moz-border-radius:5px;/*gecko (ex:Firefox)*/ -webkit-border-radius:5px;/*webkit (ex:safari)*/ background:#f4f4f4; padding-top:2px; } #prodCell_also .prodName { font-size:12px; text-align:justify; padding:2px; border-radius:5px;/*css3*/ -moz-border-radius:5px;/*gecko (ex:Firefox)*/ -webkit-border-radius:5px;/*webkit (ex:safari)*/ background:#e7e7e7; margin-bottom:2px; min-height:80px; text-align:center; } #prodCell { width:30%; min-height:225px; border:1px solid #ccc; border-radius:5px;/*css3*/ -moz-border-radius:5px;/*gecko (ex:Firefox)*/ -webkit-border-radius:5px;/*webkit (ex:safari)*/ padding:2px; display:block; float:left; margin:2px; } #prodCell #empty { border:0; } #prodCell input { width:100px; } #prodCell .prodName { font-size:10px; text-align:justify; padding:2px; border-radius:5px;/*css3*/ -moz-border-radius:5px;/*gecko (ex:Firefox)*/ -webkit-border-radius:5px;/*webkit (ex:safari)*/ background:#e7e7e7; margin-bottom:2px; min-height:60px; } #prodCell .prodPrice { font-size:16px; text-align:center; padding:2px; border-radius:5px;/*css3*/ -moz-border-radius:5px;/*gecko (ex:Firefox)*/ -webkit-border-radius:5px;/*webkit (ex:safari)*/ background:#1e1e1e; margin-bottom:2px; font-weight:bold; color:#fff; } #prodCell .prodBuy { text-align:center; padding:2px; border-radius:5px;/*css3*/ -moz-border-radius:5px;/*gecko (ex:Firefox)*/ -webkit-border-radius:5px;/*webkit (ex:safari)*/ background:#77ae01; margin-bottom:2px; height:30px; } #ficheProdTop { width:95%; border:1px solid #ccc; border-radius:5px;/*css3*/ -moz-border-radius:5px;/*gecko (ex:Firefox)*/ -webkit-border-radius:5px;/*webkit (ex:safari)*/ padding:2px; display:block; float:left; margin-left:5px; margin-top:5px; margin-bottom:5px; } #ficheProdTop .visuel { text-align:center; border-radius:5px;/*css3*/ -moz-border-radius:5px;/*gecko (ex:Firefox)*/ -webkit-border-radius:5px;/*webkit (ex:safari)*/ padding:2px; background:#e7e7e7; display:block; float:left; width:100px; height:90px; } #ficheProdTop h2 { font-size:14px; margin:0; margin-left:110px; } #ficheProdTop .prodPrice { font-size:16px; text-align:center; padding:2px; border-radius:5px;/*css3*/ -moz-border-radius:5px;/*gecko (ex:Firefox)*/ -webkit-border-radius:5px;/*webkit (ex:safari)*/ background:#1e1e1e; margin-bottom:10px; margin-left:110px; margin-top:15px; font-weight:bold; color:#fff; width:25%; } #ficheProdTop .options { border-radius:5px;/*css3*/ -moz-border-radius:5px;/*gecko (ex:Firefox)*/ -webkit-border-radius:5px;/*webkit (ex:safari)*/ padding:2px; background:#e7e7e7; display:block; float:left; margin-top:5px!important; margin-left:0px; margin-bottom:5px; clear:left; } #ficheProdTop .optName { font-size:12px; } #ficheProdTop .bouton { border-radius:5px;/*css3*/ -moz-border-radius:5px;/*gecko (ex:Firefox)*/ -webkit-border-radius:5px;/*webkit (ex:safari)*/ padding:2px; background:#e7e7e7; display:block; float:left; margin-top:5px; margin-left:5px; clear:both; } #ficheProdMid { width:95%; border:1px solid #ccc; border-radius:5px;/*css3*/ -moz-border-radius:5px;/*gecko (ex:Firefox)*/ -webkit-border-radius:5px;/*webkit (ex:safari)*/ padding:2px; display:block; float:left; margin:auto; margin-left:5px; margin-top:10px; } #contactForm { width:90%; border-radius:5px;/*css3*/ -moz-border-radius:5px;/*gecko (ex:Firefox)*/ -webkit-border-radius:5px;/*webkit (ex:safari)*/ padding:5px; color:#1e1e1e; border:1px solid #ccc; margin:auto; margin-top:5px; background:#F4F4F4; margin-bottom:5px; } #contactForm .float { display: block; width:40%; float:left; text-align:left; font-weight:bold; font-size:14px; } #contactForm .float_full_width { display: block; width:100%; float:left; text-align:left; font-weight:bold; font-size:14px; } #results { width:90%; border-radius:5px;/*css3*/ -moz-border-radius:5px;/*gecko (ex:Firefox)*/ -webkit-border-radius:5px;/*webkit (ex:safari)*/ padding:10px; color:#1e1e1e; border:1px solid #ccc; margin:auto; margin-top:5px; background:#ccc; margin-bottom:5px; text-align:justify; display:block; float:left; text-align:center; } #cms { width:90%; border-radius:5px;/*css3*/ -moz-border-radius:5px;/*gecko (ex:Firefox)*/ -webkit-border-radius:5px;/*webkit (ex:safari)*/ padding:10px; color:#1e1e1e; border:1px solid #ccc; margin:auto; margin-top:5px; background:#F4F4F4; margin-bottom:5px; text-align:justify; } #cms h2 { font-size:16px; } #accthistpl { width:95%; border-radius:5px;/*css3*/ -moz-border-radius:5px;/*gecko (ex:Firefox)*/ -webkit-border-radius:5px;/*webkit (ex:safari)*/ padding:5px; color:#1e1e1e; border:1px solid #ccc; margin:auto; margin-top:5px; background:#F4F4F4; margin-bottom:5px; } #accthistpl h1 { font-size:16px; margin:2px; margin-left:0px; } #accthistpl h2 { font-size:14px; margin:2px; margin-left:0px; } #accthistpl #nomProd { font-size:14px; font-weight:bold; float:left; width:70%; } #accthistpl #ligneProdNom { font-size:11px; float:left; width:70%; } #accthistpl #taxProd { font-size:14px; font-weight:bold; display:inline; float:right; width:15%; } #accthistpl #ligneProdTax { font-size:11px; display:inline; float:right; width:15%; } #accthistpl #totalProd { font-size:14px; font-weight:bold; display:inline; float:right; width:15%; } #accthistpl #ligneProdPrix { font-size:11px; display:inline; float:right; width:15%; text-align:right; } #accthistpl #subTotal { border-radius:5px;/*css3*/ -moz-border-radius:5px;/*gecko (ex:Firefox)*/ -webkit-border-radius:5px;/*webkit (ex:safari)*/ padding:5px; background:#ccc; } #accthistpl #titre { font-size:12px; font-weight:bold; float:left; width:85%; text-align:right; } #accthistpl #text { font-size:11px; float:right; width:15%; text-align:right; } #accthistpl #delivery { width:40%; border-radius:5px;/*css3*/ -moz-border-radius:5px;/*gecko (ex:Firefox)*/ -webkit-border-radius:5px;/*webkit (ex:safari)*/ padding:5px; background:#ccc; display:block; float:left; } #accthistpl #shipping { width:55%; border-radius:5px;/*css3*/ -moz-border-radius:5px;/*gecko (ex:Firefox)*/ -webkit-border-radius:5px;/*webkit (ex:safari)*/ padding:5px; background:#ccc; margin-left:5px; display:inline-table; } #accthistpl #historic { width:95.5%; border-radius:5px;/*css3*/ -moz-border-radius:5px;/*gecko (ex:Firefox)*/ -webkit-border-radius:5px;/*webkit (ex:safari)*/ padding:5px; background:#ccc; margin-top:5px; } #accthistpl .clear { clear:both; } #accthistpl #billing { width:40%; border-radius:5px;/*css3*/ -moz-border-radius:5px;/*gecko (ex:Firefox)*/ -webkit-border-radius:5px;/*webkit (ex:safari)*/ padding:5px; background:#ccc; display:block; float:left; margin-top:5px; } #accthistpl #payment { width:55%; border-radius:5px;/*css3*/ -moz-border-radius:5px;/*gecko (ex:Firefox)*/ -webkit-border-radius:5px;/*webkit (ex:safari)*/ padding:5px; background:#ccc; margin-left:5px; margin-top:5px; display:inline-table; } #accthistpl .fleche { float:right; vertical-align:middle; display:inline; margin-top:-60px; } #accthistpl #maxentries { width:92%; border-radius:5px;/*css3*/ -moz-border-radius:5px;/*gecko (ex:Firefox)*/ -webkit-border-radius:5px;/*webkit (ex:safari)*/ padding:5px; background:#ccc; margin:10px; } #accthistpl #bouton { width:92%; border-radius:5px;/*css3*/ -moz-border-radius:5px;/*gecko (ex:Firefox)*/ -webkit-border-radius:5px;/*webkit (ex:safari)*/ padding:5px; background:#999; margin:10px; text-align:center; } #acctHist { width:98%; border-bottom:1px solid #ccc; border-radius:5px;/*css3*/ -moz-border-radius:5px;/*gecko (ex:Firefox)*/ -webkit-border-radius:5px;/*webkit (ex:safari)*/ padding:5px; } #acctHist .fleche { float:right; vertical-align:middle; display:inline; margin-top:-30px; } .fleche { float:right; vertical-align:middle; display:inline; } #newsletter, #notifications, #password, #abd, #checkout_conf, #checkout_shipping, #checkout_payment, #checkout_pmt_add, #checkout_ship_add, #checkout_success { width:95%; border:1px solid #ccc; border-radius:5px;/*css3*/ -moz-border-radius:5px;/*gecko (ex:Firefox)*/ -webkit-border-radius:5px;/*webkit (ex:safari)*/ padding:5px; margin:5px; } #newsletter #titre { float:right; font-size:18px; font-weight:bold; } #newsletter #text, #notifications #text, #password #text, #checkout_conf #text { border-radius:5px;/*css3*/ -moz-border-radius:5px;/*gecko (ex:Firefox)*/ -webkit-border-radius:5px;/*webkit (ex:safari)*/ padding:5px; background:#ccc; margin:10px; } #notifications h1, #abd h1, #checkout_conf h1, #checkout_shipping h1, #checkout_payment h1, #checkout_pmt_add h1, #checkout_ship_add h1, #checkout_success h1, #cms h1, #also_purchased h1 { font-size:18px; margin:2px; margin-left:0px; } #checkout_conf #bouton, #checkout_shipping #bouton, #checkout_payment #bouton, #checkout_pmt_add #bouton, #checkout_ship_add #bouton, #checkout_success #bouton, #cms #bouton { width:93%; border-radius:5px;/*css3*/ -moz-border-radius:5px;/*gecko (ex:Firefox)*/ -webkit-border-radius:5px;/*webkit (ex:safari)*/ padding:5px; background:#999; margin:10px; text-align:center; } #checkout_shipping #module, #checkout_payment #module { width:95%; border-radius:5px;/*css3*/ -moz-border-radius:5px;/*gecko (ex:Firefox)*/ -webkit-border-radius:5px;/*webkit (ex:safari)*/ padding:5px; background:#999; margin-top:5px; } #checkout_shipping #ship_add, #checkout_payment #bill_add, #checkout_pmt_add #bill_add, #checkout_ship_add #ship_add { width:95%; border-radius:5px;/*css3*/ -moz-border-radius:5px;/*gecko (ex:Firefox)*/ -webkit-border-radius:5px;/*webkit (ex:safari)*/ padding:5px; background:#ccc; margin-top:5px; } #checkout_conf #ligneProd { font-size:11px; float:left; margin-right:5px; } #checkout_conf .gras { font-size:11px; font-weight:bold; text-align:right; } #abd .required { color:#FF0000; font-size:11px; font-weight:bold; float:right; display:inline; } #abd .float { display: block; width:50%; float:left; text-align:left; } #abd .inputRequirement { color:#FF0000; } #password .float { display: block; width:55%; float:left; text-align:left; font-weight:bold; } table.categories { width: 100%; padding: 0; margin: 0; border-collapse: collapse; font-size: 16px; font-weight: bold; color: #333333; cursor: hand; cursor: pointer; } tr.categories{ background-color: white; } tr.categories:hover{ background-color: #EEEEEE; } tr.categoriesselect{ background-color: #FFFFCC; } td.categories { padding-left: 5px; height:40px; border-top-color: #AAAAAA; border-top-style: solid; border-top-width: thin; border-bottom-color: #AAAAAA; border-bottom-style: solid; border-bottom-width: thin; } td.categories a{ font-size: 16px; font-weight: bold; color: #333333; } hr.separator { border: 0px; background-color: #AAAAAA; height: 1px; } td.smallText, span.smallText, p.smallText { font-size: 10px; } td.midText, span.midText, p.midText { font-size: 10px; } span.orderEdit { font-size: 10px; } td.main { font-size: 12px; padding-left: 5px; padding-right: 5px; } td.review { padding-left:10px; font-size: 12px; } td.footer{ font-size: 10px; } TR.accountHistory-odd, TR.addressBook-odd, TR.alsoPurchased-odd, TR.payment-odd, TR.productListing-odd, TR.productReviews-odd, TR.upcomingProducts-odd, TR.shippingOptions-odd { background: #f8f8f9; } TR.accountHistory-even, TR.addressBook-even, TR.alsoPurchased-even, TR.payment-even, TR.productListing-even, TR.productReviews-even, TR.upcomingProducts-even, TR.shippingOptions-even { background: #f8f8f9; } TABLE.productListing { border: 1px; border-style: solid; border-color: #b6b7cb; border-spacing: 1px; } .productListing-heading { font-size: 10px; background: #b6b7cb; color: #FFFFFF; font-weight: bold; } TD.productListing-data { font-size: 10px; padding-right: 4px; } SPAN.productSpecialPrice { color: #ff0000; } table.productsGrid { border-collapse: collapse; } td.productsGrid{ border: 1px; border-style: solid; border-color: #b6b7cb; border-spacing: 1px; } table.productCell{ text-align: center; font-size: 10px; height: 100%; } td.stockWarning { font-size: 10px; } td.pageHeading { font-size: 14px; font-weight: bold; } td.productHeader { font-size: 14px; font-weight: bold; } #mobileButton table{ background: url(../images/greybutton/background.gif) repeat-x; border-collapse: collapse; } #mobileButton td{ height: 23px; font-size: 11px; font-weight: bold; color: navy; vertical-align: middle; padding: 0px; border: 0; cursor: pointer; } #header { } #mainBody { } #footer { width:97%; border-radius:5px;/*css3*/ -moz-border-radius:5px;/*gecko (ex:Firefox)*/ -webkit-border-radius:5px;/*webkit (ex:safari)*/ border:1px solid #ccc; margin-top:5px; margin-left:5px; margin-bottom:5px; display:block; float:left; } #mobileForm input[type="text"],input[type="password"], select { width: 150px; } #productAttribute select { width: 100px; } #errorMsg { font-size: 12px; background: #ff0000; color: #ffffff; font-weight : bold; text-align : center; } TABLE.headerNavigation { background-image: url("../images/header_navigation_back.png"); background-repeat: repeat-x; height: 50px; padding-top: 4px; padding-bottom: 4px; } tr.headerNavigation { } td.headerNavigation { font-size: 10px; text-align: center; font-weight : bold; vertical-align: bottom; width: 20%; cursor: pointer; } TD.headerNavigation A { color: #1e1e1e; } A.headerNavigation:hover { color: #999999; } #headerShop { background: url("../images/home.png") no-repeat center top; } #headerBoutique { background: url("../images/boutique.png") no-repeat center top; } #headerSearch { background: url("../images/search2.png") no-repeat center top; } #headerAccount { background: url("../images/compte.png") no-repeat center top; } #headerAbout { background: url("../images/help.png") no-repeat center top; } #headerLanguage { background: url("../images/language.png") no-repeat center top; } table.headerTitle{ height: 48px; background-image: url("../images/header_back.png"); background-repeat: repeat-x; color: #ffffff; font-size: 20px; font-weight: bold; text-align: center; } td.headerTitleRight{ width: 60px; text-align: right; vertical-align: top; padding-top: 9px; padding-right: 6px; } .messageBox {font-size: 10px; } #messageStack { width:90%; border-radius:5px;/*css3*/ -moz-border-radius:5px;/*gecko (ex:Firefox)*/ -webkit-border-radius:5px;/*webkit (ex:safari)*/ padding:5px; color:#FFFFFF; border:0px solid #ccc; margin:auto; margin-top:5px; } .messageStackError, .messageStackWarning {font-size: 10px; background-color:#a70004; } .messageStackSuccess {font-size: 10px; background-color: #64a700; } div.headerNavigation { filter:alpha(opacity=50); -moz-opacity:.50; opacity:.50; } I have now spent 2 days on it, i have not much ( or none ) experience with style sheets but am pretty sure that this is where the problem is as i cannot get them to validate, perhaps someone has a style sheet that is known to work ? thank you Quote David Link to comment Share on other sites More sharing options...
♥DAVID3733 Posted December 29, 2011 Share Posted December 29, 2011 Just another update I have almost eveything working as it should, and very good it is, i am very pleased with it, just have a couple of important problems left. I Use credit card processing and when confirm it clicked it goes to the correct site but it is not taking the info with it, but if you go back on the browser and click it again it does, I feel i am very close but no coconut yet, i am Using SSL and get the feeling its something to do with the cookies but cant work it out yet. Quote David Link to comment Share on other sites More sharing options...
AndiP Posted January 5, 2012 Share Posted January 5, 2012 Hello, Great contrib! But i have problems to view the product listings on my smartphone and in my pc. It says "Fehlende® oder ungültige® Größenparameter!". Thx for help! Quote Link to comment Share on other sites More sharing options...
AndiP Posted January 5, 2012 Share Posted January 5, 2012 Hello, Great contrib! But i have problems to view the product listings on my smartphone and in my pc. It says "Fehlende® oder ungültige® Größenparameter!". Thx for help! This was caused by the contrib "Automatic Thumbnail". Changed code in catalog/includes/functions/html_output.php: (!isset ($x) || ereg ('^[0-9]{1,}$', $x, $regs)) && (!isset ($y) || ereg ('^[0-9]{1,}$', $y, $regs)) && (isset ($x) || isset ($y)) ? true : DIE ('Fehlende® oder ungültige® Größenparameter!'); to /** (!isset ($x) || ereg ('^[0-9]{1,}$', $x, $regs)) && (!isset ($y) || ereg ('^[0-9]{1,}$', $y, $regs)) && (isset ($x) || isset ($y)) ? true : DIE ('Fehlende® oder ungültige® Größenparameter!'); **/ Don't know for what this code is but it works ;) Quote Link to comment Share on other sites More sharing options...
AndiP Posted January 6, 2012 Share Posted January 6, 2012 Some correction if it shows classic shop checkout_success.php after checkout: in mobile/includes/configure.php add define('FILENAME_CHECKOUT_PROCESS', 'mobile_checkout_process.php'); Quote Link to comment Share on other sites More sharing options...
Freeman Posted January 9, 2012 Share Posted January 9, 2012 Installed with some difficulties but now it's quite ok, i'm using it just to let people navigate through the catalog and check order status so it's quite good! The thing that i can't fix is the category nesting : i have a cat structure like this : TOP --Category ----Subcategory -------SUB-SUBCAT1 -------SUB-SUBCAT 2 But the menu looks like it can't go far than Category-Subcategory. It won't even display the SUB-SUBCAT Any idea? Cheers Fab Quote Advice on forum are Free, Email or Pm to fix your site is work...which I charge for :) ------------------- Link to comment Share on other sites More sharing options...
♥DAVID3733 Posted January 12, 2012 Share Posted January 12, 2012 I had this working just fine 'out of the box' on a WAMP localhost but when I uploaded to a live site on *NIX then no redirect - spent ages trying to work out why by following the redirect through the new mobile class and whilst all values looked/echoed out correctly - no redirect - so some sort of server setting preventing it? So adapted wflynn's suggestion above and only edited catalog/includes/application_top.php (unlike wflynn I was not experiencing a loop) with the following code right before the closing ?> and replacing the code from the original add-on/contribution if (MOBILE_SITE=='True'){ $useragent=$_SERVER['HTTP_USER_AGENT']; //start of code from http://detectmobilebrowser.com/ . if(preg_match('/android.+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i',$useragent)||preg_match('/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|e\-|e\/|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(di|rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|xda(\-|2|g)|yas\-|your|zeto|zte\-/i',substr($useragent,0,4))) //end fo code from http://detectmobilebrowser.com/ //start of code from original class file mobile_redirect.php { $path = split("/" , $_SERVER['SCRIPT_NAME']); $filename = $path[sizeof($path)-1]; $file = 'mobile_' . $filename; $qstring = urldecode($_SERVER['QUERY_STRING']); $SSL = ($_SERVER['HTTPS']) ? "SSL" : "NONSSL"; if (file_exists($file)){ tep_redirect(tep_href_link($file, str_replace('&', '&',$qstring), $SSL, false, false)); } //end of original } }//end if (MOBILE_SITE=='True') Grab the code as he advises from http://detectmobilebrowser.com/ and use it as: if (preg_match......)//detectmobilebrowser code { // your redirect code } I've also wrapped this redirect in a if (MOBILE_SITE=='True'){ }//end if (MOBILE_SITE=='True') so that I could turn it off easily in the live site - to use this you need to insert the following using phpMyAdmin or whatever floats your boat: INSERT INTO `configuration` VALUES ('', 'Enable Mobile Site?', 'MOBILE_SITE', 'FALSE', 'Do you want to enable the mobile version of the site?', 1, 99, NULL, '2011-09-19 08:47:54', NULL, 'tep_cfg_select_option(array(''True'', ''False''), '); Now go to store admin, configuration, My Store and change the 'Enable Mobile Site' to 'True'. If you do not want to use it just delete the code in the last box (if(MOBILE_....) the site concerned uses RC 2.2, STS Templates and SEO Urls. If you find that you now get a working categories list but 404 for products try checking the products url - you may see an '&' in there - if so then check your file catalog/includes/functions/general.php for the function tep_redirect($url) you may need to add the line $url = str_replace('&', '&', $url); towards the end of the file thus: $url = str_replace('&', '&', $url); header('Location: ' . $url); tep_exit(); May help but YMMV Graeme I have used the above and it almost works perfect, except that it is directing to mobile_index.php?cpath=123, but it should go to mobile_catalouge.php?cpath=123 Any ideas on how to make that change I tried changing $file = 'mobile_' . $filename; to mobile_cata... but it appears to be the $filename that needs to be split further thank you Quote David Link to comment Share on other sites More sharing options...
♥DAVID3733 Posted January 12, 2012 Share Posted January 12, 2012 Just an update The products link perfectly direct from Google, its only the Ctaegories that do not, this is because it is a slightly different struture using Mobile_catalouge I have tried in HTaccess (in the main site) to divert them, afterall it is only the mobile side of the site that will use them mobile_index.php?cpath=* to mobile_catalogue.php?cpath=* using RewriteCond %{QUERY_STRING} cpath=([0-9]+) RewriteRule ^mobile_index.php$ /mobile_catalogue.php?cPath$1? [R=301,NC,L] RewriteCond %{QUERY_STRING} cpath=([0-9]+)_([0-9]+) RewriteRule ^mobile_index.php$ /mobile_catalogue.php?cPath$1_$2? [R=301,NC,L] but i do not think its quite right, also not sure if the change should be made there either so will look to see if i should look elsewhere David Quote David Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.