bumbarash Posted February 12, 2009 Author Share Posted February 12, 2009 Nice work! Thanks :) Any piece of advise how to make it more compatible with gazillion other contributions? Quote Link to comment Share on other sites More sharing options...
bumbarash Posted February 12, 2009 Author Share Posted February 12, 2009 when I click on the categories; i have a redirection directly to my main shop and the belonging category (full web version, not the mobile version!)Any ideas and solutions for this problem? I think there must be a redirection problem. But where :-( It might be redirection problem or configuration problem. If you are on http://www.yoursite.com/catalog/mobile/index.php and you move your cursor over "About" button what link do you see in the browser status bar? Is it http://www.yoursite.com/catalog/mobile/about.php? If not then it's a configuration problem if you type directly http://www.yoursite.com/catalog/mobile/about.php and end up somewhere else it's a redirect. Could you send me your website url, so I could take a look? Quote Link to comment Share on other sites More sharing options...
idefix-69 Posted February 13, 2009 Share Posted February 13, 2009 (edited) Hallo, thanks for your answer and again thanks a lot for your help on e-mal some days ago!! If I do so I´m coming up to http://www.yoursite.com/catalog/mobile/about.php This is working. Only that there is nothing under it, no entries. If I move pver the products, the link is the following: http://www.yoursite.com/catalog/mobile/productxycv123.html When I cclick on it I´m comning to the product of the main website. Maybe somthing wrong in the config.php - I don´t know Also something important, I don´t know also: the shop is not under "http://www.yoursite.com/catalog/..... I don´t have the file catalog, it´s directly under "http://www.yoursite.com/index.php and I placed the moblie in the main directory like "http://www.yoursite.com/mobile/ Edited February 13, 2009 by idefix-69 Quote Link to comment Share on other sites More sharing options...
usvi4me Posted February 13, 2009 Share Posted February 13, 2009 Hallo, thanks for your answer and again thanks a lot for your help on e-mal some days ago!! If I do so I´m coming up to http://www.yoursite.com/catalog/mobile/about.php This is working. Only that there is nothing under it, no entries. If I move pver the products, the link is the following: http://www.yoursite.com/catalog/mobile/productxycv123.html When I cclick on it I´m comning to the product of the main website. Maybe somthing wrong in the config.php - I don´t know Also something important, I don´t know also: the shop is not under "http://www.yoursite.com/catalog/..... I don´t have the file catalog, it´s directly under "http://www.yoursite.com/index.php and I placed the moblie in the main directory like "http://www.yoursite.com/mobile/ Try making your changes in the mobile/includes/config.php to the following <?php define('DIR_MAIN_HTTP_CATALOG', ''); define('DIR_WS_HTTP_CATALOG', '/mobile/'); define('DIR_WS_IMAGES', '../images/'); define('DIR_WS_INCLUDES', '../includes/'); define('DIR_MOBILE_IMAGES', 'images/'); define('DIR_MOBILE_INCLUDES', 'includes/'); define('DIR_MOBILE_MODULES', DIR_MOBILE_INCLUDES . 'modules/'); define('DIR_MOBILE_CLASSES', DIR_MOBILE_INCLUDES . 'classes/'); define('DIR_MOBILE_HEADERS', DIR_MOBILE_INCLUDES . 'headers/'); define('DIR_MOBILE_LANGUAGES', 'includes/languages/'); define ('MOBILE_IMAGE_WIDTH', '80px'); define ('MOBILE_IMAGE_HEIGHT', '80px'); define ('FILENAME_MOBILE', 'mobile.php'); define ('FILENAME_PRODUCTS', 'products.php'); define ('FILENAME_ABOUT', 'about.php'); define ('FILENAME_SEARCH', 'search.php'); define ('FILENAME_LANGUAGES', 'languages.php'); define ('SEO_ENABLED', 'false'); ?> Take out the "osc" reference Quote Link to comment Share on other sites More sharing options...
bugywugy Posted February 13, 2009 Share Posted February 13, 2009 is there a way to determine if the visitor is using an iPhone or a computer and redirect him to the apropriate version mobile or standard? thanks Quote Link to comment Share on other sites More sharing options...
bumbarash Posted February 13, 2009 Author Share Posted February 13, 2009 is there a way to determine if the visitor is using an iPhone or a computer and redirect him to the apropriate version mobile or standard? Yes, add this at the end of your catalog/includes/application_top.php define(DIR_MOBILE_CLASSES , 'mobile/includes/classes/'); require(DIR_MOBILE_CLASSES . 'mobile_redirect.php'); $mobileRedirect = new mobileRedirect; Quote Link to comment Share on other sites More sharing options...
idefix-69 Posted February 13, 2009 Share Posted February 13, 2009 I had this code before, nothing with osc. But I changed it to your reference like: <?php define('DIR_MAIN_HTTP_CATALOG', ''); define('DIR_WS_HTTP_CATALOG', '/mobile/'); define('DIR_WS_IMAGES', '../images/'); define('DIR_WS_INCLUDES', '../includes/'); define('DIR_MOBILE_IMAGES', 'images/'); define('DIR_MOBILE_INCLUDES', 'includes/'); define('DIR_MOBILE_MODULES', DIR_MOBILE_INCLUDES . 'modules/'); define('DIR_MOBILE_CLASSES', DIR_MOBILE_INCLUDES . 'classes/'); define('DIR_MOBILE_HEADERS', DIR_MOBILE_INCLUDES . 'headers/'); define('DIR_MOBILE_LANGUAGES', 'includes/languages/'); define ('MOBILE_IMAGE_WIDTH', '80px'); define ('MOBILE_IMAGE_HEIGHT', '80px'); define ('FILENAME_MOBILE', 'mobile.php'); define ('FILENAME_PRODUCTS', 'products.php'); define ('FILENAME_ABOUT', 'about.php'); define ('FILENAME_SEARCH', 'search.php'); define ('FILENAME_LANGUAGES', 'languages.php'); define ('SEO_ENABLED', 'false'); ?> And it´s still the same. I come directly to the main website when I click on one of the category names :blush: Maybe something interesting, it worked better with the first version, there I had only the problem, wehn I had only a main catergory without a subcategory I was directly linked to the main website. It worked well when I had subcategories. Everything was seen perfectly. So now nothing ois working, I have a direct relinking to the main shop. Any ideas what is going on because I really like this contri!! Thanks a lot Quote Link to comment Share on other sites More sharing options...
usvi4me Posted February 13, 2009 Share Posted February 13, 2009 define ('SEO_ENABLED', 'false');?> And it´s still the same. I come directly to the main website when I click on one of the category names :blush: Maybe something interesting, it worked better with the first version, there I had only the problem, wehn I had only a main catergory without a subcategory I was directly linked to the main website. It worked well when I had subcategories. Everything was seen perfectly. So now nothing ois working, I have a direct relinking to the main shop. Any ideas what is going on because I really like this contri!! Thanks a lot I had the same kind of problem but it was fixed with the line define ('SEO_ENABLED', 'false'); Perhaps removing this line will help ???? Do you have SEO URL active Just a thought. I really like this contribution as well. Quote Link to comment Share on other sites More sharing options...
idefix-69 Posted February 13, 2009 Share Posted February 13, 2009 So I tried it again. First remove this line >> nothing changed, just the same redirect Change it from false to true >> nothing changed, just the same redirect Sorry :blush: Any further ideas??? I really hope. Quote Link to comment Share on other sites More sharing options...
usvi4me Posted February 13, 2009 Share Posted February 13, 2009 So I tried it again. First remove this line >> nothing changed, just the same redirect Change it from false to true >> nothing changed, just the same redirect Sorry :blush: Any further ideas??? I really hope. The only thing I can think of that in your index file there is: tep_redirect(tep_href_link (FILENAME_PRODUCTS) instead of tep_redirect(tep_mobile_link(FILENAME_PRODUCTS) Not sure why that would be ..... Quote Link to comment Share on other sites More sharing options...
idefix-69 Posted February 13, 2009 Share Posted February 13, 2009 Also not working. I tried again several things and this is a little bit working. When I use the index.php form V1 like this, its working nearly 90% <?php require_once('includes/application_top.php'); // calculate category path $redirect = false; if (isset($cPath) && tep_not_null($cPath)) { $product_module_name = 'products'; // use product_listing for "traditional" OSCommerce look // $product_module_name = 'products_listing'; $categories_products_query = tep_db_query("select count(*) as total from " . TABLE_PRODUCTS_TO_CATEGORIES . " where categories_id = '" . (int)$current_category_id . "'"); $cateqories_products = tep_db_fetch_array($categories_products_query); if ($cateqories_products['total'] > 0) { $redirect = true; // display products } else { $category_parent_query = tep_db_query("select count(*) as total from " . TABLE_CATEGORIES . " where parent_id = '" . (int)$current_category_id . "'"); $category_parent = tep_db_fetch_array($category_parent_query); if ($category_parent['total'] == 0) { $redirect = true; // display products } } } if($redirect) tep_redirect(tep_mobile_link(FILENAME_PRODUCTS, tep_get_all_get_params())); $list = array(); $parent_id = (tep_not_null($cPath) == true) ? (int)$cPath : 0; $categories_query = tep_db_query("select c.categories_id, cd.categories_name, c.categories_image, c.parent_id from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.parent_id = " . $parent_id . " and c.categories_id = cd.categories_id and cd.language_id='" . (int)$languages_id . $path_cond . "' order by sort_order, cd.categories_name"); while ($categories = tep_db_fetch_array($categories_query)) { $list[] = $categories; } require(DIR_MOBILE_INCLUDES . 'header.php'); require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_DEFAULT); ?> <!-- categories //--> <table class="categories" width="100%" cellpadding="0" cellspacing="0"> <?php foreach ($list as $item ) { $path = tep_mobile_link(FILENAME_MOBILE, 'cPath=' . $item['categories_id']); print tep_mobile_selection($path, array(tep_image(DIR_WS_IMAGES . $item['categories_image'], $item['categories_name'], 30,30), $item['categories_name'])); } ?> </table> <!-- categories_eof //--> <?php require(DIR_MOBILE_INCLUDES . 'footer.php'); ?> But when I use the index from V.1.1 like this, it´s not working. <?php require_once('includes/application_top.php'); // calculate category path $redirect = false; if (isset($cPath) && tep_not_null($cPath)) { $product_module_name = 'products'; // use product_listing for "traditional" OSCommerce look // $product_module_name = 'products_listing'; $categories_products_query = tep_db_query("select count(*) as total from " . TABLE_PRODUCTS_TO_CATEGORIES . " where categories_id = '" . (int)$current_category_id . "'"); $cateqories_products = tep_db_fetch_array($categories_products_query); if ($cateqories_products['total'] > 0) { $redirect = true; // display products } else { $category_parent_query = tep_db_query("select count(*) as total from " . TABLE_CATEGORIES . " where parent_id = '" . (int)$current_category_id . "'"); $category_parent = tep_db_fetch_array($category_parent_query); if ($category_parent['total'] == 0) { $redirect = true; // display products } } } if($redirect) tep_redirect(tep_mobile_link(FILENAME_PRODUCTS, tep_get_all_get_params())); $list = array(); $parent_id = (tep_not_null($cPath) == true) ? (int)$cPath : 0; $categories_query = tep_db_query("select c.categories_id, cd.categories_name, c.categories_image, c.parent_id from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.parent_id = " . $parent_id . " and c.categories_id = cd.categories_id and cd.language_id='" . (int)$languages_id . $path_cond . "' order by sort_order, cd.categories_name"); while ($categories = tep_db_fetch_array($categories_query)) { $list[] = $categories; } require(DIR_MOBILE_INCLUDES . 'header.php'); require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_DEFAULT); ?> <!-- categories //--> <table class="categories" width="100%" cellpadding="0" cellspacing="0"> <?php foreach ($list as $item ) { $path = tep_mobile_link(FILENAME_MOBILE, 'cPath=' . $item['categories_id']); print tep_mobile_selection($path, array(tep_image(DIR_WS_IMAGES . $item['categories_image'], $item['categories_name'], 30,30), $item['categories_name'])); } ?> </table> <!-- categories_eof //--> <?php require(DIR_MOBILE_INCLUDES . 'footer.php'); ?> So I don´t know. When I use index from V1.0 I dont have the blue header and I also have the problem with a category that has no subcategories. The products are displayed but when I want to order or want to see the products closer, I also get a redirection to the main shop. If the category has subcategories, it´s working fine. Any ideas and what is the difference of the V1.0 and V1.1. idex.php?? Thanks again for your support!! Quote Link to comment Share on other sites More sharing options...
clasf Posted February 14, 2009 Share Posted February 14, 2009 Hi, This contrib is great. However I cant get it working with the images. I can see You have a solution for phptumb. I am using another thumbnailer called oscthumb, http://addons.oscommerce.com/info/5491 and I cant get it to work. Do You have any solutions for that? The pictures wont show up at all. /clasf Quote Link to comment Share on other sites More sharing options...
usvi4me Posted February 14, 2009 Share Posted February 14, 2009 Also not working. I tried again several things and this is a little bit working. When I use the index.php form V1 like this, its working nearly 90% <?php require_once('includes/application_top.php'); // calculate category path $redirect = false; if (isset($cPath) && tep_not_null($cPath)) { $product_module_name = 'products'; // use product_listing for "traditional" OSCommerce look // $product_module_name = 'products_listing'; $categories_products_query = tep_db_query("select count(*) as total from " . TABLE_PRODUCTS_TO_CATEGORIES . " where categories_id = '" . (int)$current_category_id . "'"); $cateqories_products = tep_db_fetch_array($categories_products_query); if ($cateqories_products['total'] > 0) { $redirect = true; // display products } else { $category_parent_query = tep_db_query("select count(*) as total from " . TABLE_CATEGORIES . " where parent_id = '" . (int)$current_category_id . "'"); $category_parent = tep_db_fetch_array($category_parent_query); if ($category_parent['total'] == 0) { $redirect = true; // display products } } } if($redirect) tep_redirect(tep_mobile_link(FILENAME_PRODUCTS, tep_get_all_get_params())); $list = array(); $parent_id = (tep_not_null($cPath) == true) ? (int)$cPath : 0; $categories_query = tep_db_query("select c.categories_id, cd.categories_name, c.categories_image, c.parent_id from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.parent_id = " . $parent_id . " and c.categories_id = cd.categories_id and cd.language_id='" . (int)$languages_id . $path_cond . "' order by sort_order, cd.categories_name"); while ($categories = tep_db_fetch_array($categories_query)) { $list[] = $categories; } require(DIR_MOBILE_INCLUDES . 'header.php'); require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_DEFAULT); ?> <!-- categories //--> <table class="categories" width="100%" cellpadding="0" cellspacing="0"> <?php foreach ($list as $item ) { $path = tep_mobile_link(FILENAME_MOBILE, 'cPath=' . $item['categories_id']); print tep_mobile_selection($path, array(tep_image(DIR_WS_IMAGES . $item['categories_image'], $item['categories_name'], 30,30), $item['categories_name'])); } ?> </table> <!-- categories_eof //--> <?php require(DIR_MOBILE_INCLUDES . 'footer.php'); ?> But when I use the index from V.1.1 like this, it´s not working. <?php require_once('includes/application_top.php'); // calculate category path $redirect = false; if (isset($cPath) && tep_not_null($cPath)) { $product_module_name = 'products'; // use product_listing for "traditional" OSCommerce look // $product_module_name = 'products_listing'; $categories_products_query = tep_db_query("select count(*) as total from " . TABLE_PRODUCTS_TO_CATEGORIES . " where categories_id = '" . (int)$current_category_id . "'"); $cateqories_products = tep_db_fetch_array($categories_products_query); if ($cateqories_products['total'] > 0) { $redirect = true; // display products } else { $category_parent_query = tep_db_query("select count(*) as total from " . TABLE_CATEGORIES . " where parent_id = '" . (int)$current_category_id . "'"); $category_parent = tep_db_fetch_array($category_parent_query); if ($category_parent['total'] == 0) { $redirect = true; // display products } } } if($redirect) tep_redirect(tep_mobile_link(FILENAME_PRODUCTS, tep_get_all_get_params())); $list = array(); $parent_id = (tep_not_null($cPath) == true) ? (int)$cPath : 0; $categories_query = tep_db_query("select c.categories_id, cd.categories_name, c.categories_image, c.parent_id from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.parent_id = " . $parent_id . " and c.categories_id = cd.categories_id and cd.language_id='" . (int)$languages_id . $path_cond . "' order by sort_order, cd.categories_name"); while ($categories = tep_db_fetch_array($categories_query)) { $list[] = $categories; } require(DIR_MOBILE_INCLUDES . 'header.php'); require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_DEFAULT); ?> <!-- categories //--> <table class="categories" width="100%" cellpadding="0" cellspacing="0"> <?php foreach ($list as $item ) { $path = tep_mobile_link(FILENAME_MOBILE, 'cPath=' . $item['categories_id']); print tep_mobile_selection($path, array(tep_image(DIR_WS_IMAGES . $item['categories_image'], $item['categories_name'], 30,30), $item['categories_name'])); } ?> </table> <!-- categories_eof //--> <?php require(DIR_MOBILE_INCLUDES . 'footer.php'); ?> So I don´t know. When I use index from V1.0 I dont have the blue header and I also have the problem with a category that has no subcategories. The products are displayed but when I want to order or want to see the products closer, I also get a redirection to the main shop. If the category has subcategories, it´s working fine. Any ideas and what is the difference of the V1.0 and V1.1. idex.php?? Thanks again for your support!! I copied and pasted the two files files above and ran it through a compare software. They are identical <????) Quote Link to comment Share on other sites More sharing options...
sultanos Posted February 14, 2009 Share Posted February 14, 2009 (edited) Ok here is my Iosc iphone site ->>Comprar vino. I solved the image problem as explained in page 2 of this threat. Thanks . link to solution of page thumbs not showing images I also solved the redirection to main product info normal OSC page. By setting at mobile/includes/configure.php define ('SEO_ENABLED', 'false') But... When i try to checkout i cannot , why ? pour qua? porque? I must say i have sid killer and https enabled Edited February 14, 2009 by sultanos Quote If you are not part of the solution, you are part of the problem Link to comment Share on other sites More sharing options...
sultanos Posted February 14, 2009 Share Posted February 14, 2009 (edited) Ok here is my Iosc iphone site ->>Comprar vino.I solved the image problem as explained in page 2 of this threat. Thanks . link to solution of page thumbs not showing images I also solved the redirection to main product info normal OSC page. By setting at mobile/includes/configure.php define ('SEO_ENABLED', 'false') But... When i try to checkout i cannot , why ? pour qua? porque? I must say i have sid killer and https enabled Ok i have solve this a bit.... It seems that the <td class="main"><?php echo tep_mobile_button(IMAGE_BUTTON_UPDATE_CART);/*tep_image_submit('button_update_cart.gif', IMAGE_BUTTON_UPDATE_CART);*/ ?></td> <td align="right" class="main"><?php echo '<a href="' . tep_mobile_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL') . '">' . tep_mobile_button(IMAGE_BUTTON_CHECKOUT) . '</a>'; ?></td> is somehow taking the link of the update cart and repeating it at the checkout shipping (both are the same, they do the same , update the cart). I have changed to this code which is temporally but works by now , just to state my problem <td class="main"><?php echo tep_mobile_button(IMAGE_BUTTON_UPDATE_CART);?> </a></td> <td align="right" class="main"><?php echo '<a href="' . tep_mobile_link('mobile/'.FILENAME_CHECKOUT_SHIPPING, '', 'SSL') . '"> Comprar </a>'; ?></td> BTW as you keep on the buying process it looses the /mobile directory to go to root as you can see i manually added , but rest of the process completes with root files therefore iphone /MOBile version is lost and standar come over. Edited February 14, 2009 by sultanos Quote If you are not part of the solution, you are part of the problem Link to comment Share on other sites More sharing options...
usvi4me Posted February 14, 2009 Share Posted February 14, 2009 Sultanos, You also have an error on your product pages (the bottom) Customers who bought this product also purchased Warning: Division by zero in /usr/local/pem/vhosts/108552/webspace/httpdocs/includes/functions/html_output.php on line 191 Warning: Division by zero in /usr/local/pem/vhosts/108552/webspace/httpdocs/includes/functions/html_output.php on line 191 Quote Link to comment Share on other sites More sharing options...
sultanos Posted February 14, 2009 Share Posted February 14, 2009 Sultanos, You also have an error on your product pages (the bottom) Customers who bought this product also purchased Warning: Division by zero in /usr/local/pem/vhosts/108552/webspace/httpdocs/includes/functions/html_output.php on line 191 Warning: Division by zero in /usr/local/pem/vhosts/108552/webspace/httpdocs/includes/functions/html_output.php on line 191 Thanks i found out that i had changed my mobile/includes/configure.php to define ('MOBILE_IMAGE_HEIGHT','79px'); from the original ('MOBILE_IMAGE_HIGHT','79px'); at line 24 more at also mobile/modules/also_purchased_product in mobile diretory $img = tep_image(DIR_WS_IMAGES . $orders['products_image'], $orders['products_name'], MOBILE_IMAGE_WIDTH, MOBILE_IMAGE_HEIGHT); what i think is that my tep_mobile_link() function is doing something wrong, probably due to SEO .... Quote If you are not part of the solution, you are part of the problem Link to comment Share on other sites More sharing options...
sultanos Posted February 15, 2009 Share Posted February 15, 2009 When i press checkout button it makes an update cart ,and you are not able to proceed with checkout process, nor doesnt let me make a new account. This was happening at the Demo URL http://www.zaramir.com/osc/mobile/shopping...0ff60848ebf6f67 But it also happend at my web. Has anyone had same problem? Quote If you are not part of the solution, you are part of the problem Link to comment Share on other sites More sharing options...
sultanos Posted February 15, 2009 Share Posted February 15, 2009 When i press checkout button it makes an update cart ,and you are not able to proceed with checkout process, nor doesnt let me make a new account. This was happening at the Demo URL http://www.zaramir.com/osc/mobile/shopping...0ff60848ebf6f67 But it also happend at my web. Has anyone had same problem? wOW if you navigate with IE it doesnt recognize the button , but with mozilla it works well Quote If you are not part of the solution, you are part of the problem Link to comment Share on other sites More sharing options...
bumbarash Posted February 15, 2009 Author Share Posted February 15, 2009 If I move pver the products, the link is the following: http://www.yoursite.com/catalog/mobile/productxycv123.html First of all, I want to make sure your main website is located at http://www.yoursite.com/catalog/ If not and you have it at http://www.yoursite.com/ , them mobile directory should be to be http://www.yoursite.com/mobile If link to your product look this way productxycv123.html it means you are using some search engine optimization contribution. Setting define ('SEO_ENABLED', 'false'); in your mobile/includes/configuration.php should solve this problem for Ultimate SEO URL contribution, but if you use something else please let me know. Link to your site would help Quote Link to comment Share on other sites More sharing options...
bumbarash Posted February 15, 2009 Author Share Posted February 15, 2009 wOW if you navigate with IE it doesnt recognize the button , but with mozilla it works well :-) Never tried it on IE, I use FF for development .Just opened it first time in IE - looks ugly :-) My main concern is Safari, since it's a iPhone website I'll try to make it more IE compatible (just for fun of it) in the next release Quote Link to comment Share on other sites More sharing options...
sultanos Posted February 16, 2009 Share Posted February 16, 2009 i have 2 main problems 1-redirect not working. 2- after i pass shoppingcart.php, it goes to root directory , the mobile root disapears from url see it here Quote If you are not part of the solution, you are part of the problem Link to comment Share on other sites More sharing options...
clasf Posted February 16, 2009 Share Posted February 16, 2009 Hi, Thank You for this one it works fine except if I do a search and search for something that's not in the store then I get this error: 1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '-12, 12' at line 1 select distinct p.products_image, m.manufacturers_id, p.products_id, pd.products_name, p.products_price, p.products_tax_class_id, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status, s.specials_new_products_price, p.products_price) as final_price from products p left join manufacturers m using(manufacturers_id) left join specials s on p.products_id = s.products_id, products_description pd, categories c, products_to_categories p2c where p.products_status = '1' and p.products_id = pd.products_id and pd.language_id = '4' and p.products_id = p2c.products_id and p2c.categories_id = c.categories_id and ((pd.products_name like '%james%' or p.products_model like '%james%' or m.manufacturers_name like '%james%') and (pd.products_name like '%bond%' or p.products_model like '%bond%' or m.manufacturers_name like '%bond%') ) order by pd.products_name limit -12, 12 [TEP STOP] I have tried to search for exactly the same in the PC-site and then it returns "There is no product that matches the search criteria." but when I search from Your mobile app it returns the error above. Any clue? Br, Clas Quote Link to comment Share on other sites More sharing options...
usvi4me Posted February 16, 2009 Share Posted February 16, 2009 (edited) Bumbarash I am wondering if it is possible when a visitor on the mobile website is on a products_info.php page when he/she clicks on the PC Site button he/she is automatically redirected to the corresponding PC Site product page instead of the index.php file ??? Looking forward to your response. Edited February 16, 2009 by usvi4me Quote Link to comment Share on other sites More sharing options...
bumbarash Posted February 17, 2009 Author Share Posted February 17, 2009 select distinct p.products_image, m.manufacturers_id, p.products_id, pd.products_name, p.products_price, p.products_tax_class_id, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status, s.specials_new_products_price, p.products_price) as final_price from products p left join manufacturers m using(manufacturers_id) left join specials s on p.products_id = s.products_id, products_description pd, categories c, products_to_categories p2c where p.products_status = '1' and p.products_id = pd.products_id and pd.language_id = '4' and p.products_id = p2c.products_id and p2c.categories_id = c.categories_id and ((pd.products_name like '%james%' or p.products_model like '%james%' or m.manufacturers_name like '%james%') and (pd.products_name like '%bond%' or p.products_model like '%bond%' or m.manufacturers_name like '%bond%') ) order by pd.products_name limit -12, 12 This SQL query is generated by splitPageResults class. This standard OSCommerce class. Please verify your catalog/includes/classes/split_page_results.php line 67 should be $this->sql_query .= " limit " . max($offset, 0) . ", " . $this->number_of_rows_per_page; Quote 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.