Jump to content
Latest News: (loading..)


  • Content count

  • Joined

  • Last visited

  • Days Won


rafhun last won the day on February 21 2014

rafhun had the most liked content!

1 Follower

Profile Information

  • Real Name
    Raphael Hüni
  1. Hi Rainer @@raiwa I just did a small fix to my mobile/login.php file… Changed line89 to: <?php echo tep_input_jquery('email_address', '', '', 'email'); ?> so entering your email as login on a mobile device gets easier… Regards Raphael
  2. Yeah, of course… we at the moment only have internal links for the banners… otherwise I would probably create a new tep_display_banner function which redirect with int_banner resp. ext_banner to the redirect.php and there introduce a new case in the switch where internal links have the string replace and session id added and external links are handled "normally".
  3. Hi Rainer @@raiwa thanks for your reply. So I figured out that the session ID was lost in the banner link or rather just not added which probably started a new session? Thing is that the banners are managed through the internal banner manager and are the same as in the classic shop. I tweaked the index page a little to automatically display banners of the group which corresponds to the current category ID. This makes it very easy to show fitting banners below the categories… That's why I cannot alter the links too much. However I found a solution by tweaking the redirect page (mobile/redirect.php, l16) some more: case 'banner': $banner_query = tep_db_query("select banners_url from " . TABLE_BANNERS . " where banners_id = '" . (int)$HTTP_GET_VARS['goto'] . "'"); if (tep_db_num_rows($banner_query)) { $banner = tep_db_fetch_array($banner_query); tep_update_banner_click_count($HTTP_GET_VARS['goto']); if (tep_not_null($SID)) { $_sid = $SID; } elseif ( ( ($request_type == 'NONSSL') && ($connection == 'SSL') && (ENABLE_SSL == true) ) || ( ($request_type == 'SSL') && ($connection == 'NONSSL') ) ) { if (HTTP_COOKIE_DOMAIN != HTTPS_COOKIE_DOMAIN) { $_sid = tep_session_name() . '=' . tep_session_id(); } } tep_redirect(str_replace('profimusic.it/catalog', 'mobile.profimusic.it/mobile', $banner['banners_url']).'&'.$_sid); } break; I borrowed the obtaining of the $SID from the tep_href_link function. The string replace automatically converts my banner links to mobile links and now that the session ID is appended the shopping cart problem is solved :) regards Raphael
  4. Hi Rainer @@raiwa in my shop I am encountering the problem that I cannot put multiple products into the cart. Whenever I add a new product to the cart it replaces the existing contents instead of "appending" it to the list… Do you know of this problem? If you have the time you could quickly check it out for yourself in this shop: http://mobile.profimusic.it/mobile Just use the banners on the index page to find products and try adding them to the cart. Another problem I have found in the store is with the category links in the category box. When switching back and forth between mobile and classic view on my browser (I know, not a lot of people will have the idea to do this, but still…) while having Caching turned on leads to wrong category links. Meaning I get a mixture of links to the mobile shop and the classic shop, instead of the correct links… So when I'm looking at the category tree in my classic view I see some subcategories with links that start with mobile.profimusic… Turning Caching off solves the problem for customers but of course is not yet optimal… You will probably be able to recreate the bug with the shop mentioned above… I have Caching turned on there, so if you have the time, please give it a try. It's especially problematic for relatively deep subcategories… Do you know of these bugs or did my added programming cause them? Regards Raphael
  5. Hi Rainer @@raiwa I am encountering a problem with the search results… When I click on a result and then on the products page use the "back" button or use the browser's back button I only get a blank page and it loads indefinitely (at least on the iPhone)… Then when I refresh the blank page I get the message: Error! Unable to determine the page link! Do you know of this issue? Is it related to the ajax page load? regards Raphael
  6. One other thing I just added is a basic sort function for the catalog_mb product listing. It so far is just a very basic thing since I at this time only need to sort by one variable. But I think it would be easy to add more buttons and set different get variables. So the basic structure would be: In catalog_mb.php find $listing_sql .= " order by pd.products_name"; and replace it with: if (isset($HTTP_GET_VARS['sort'])) { $listing_sql .= " order by p.products_quantity desc"; } else { $listing_sql .= " order by pd.products_name"; } Here you can choose the row you want to sort by. Then go to includes/modules/products.php and find <div id="results"> <?php echo $listing_split->display_count(TEXT_DISPLAY_NUMBER_OF_PRODUCTS); echo '<div data-role="controlgroup" data-type="horizontal" data-mini="true">' . $listing_split->display_links_mobile(MAX_DISPLAY_PAGE_LINKS, tep_get_all_get_params(array('page', 'info', 'x', 'y'))) . '</div>'; Add directly after: if (!isset($HTTP_GET_VARS['sort'])){ $sort_url = htmlspecialchars($_SERVER['REQUEST_URI']); $sort_url .= ((strpos($sort_url,'?') > 0) ? '&sort=1' : '?sort=1'); echo '<a rel="external" data-theme="a" data-role="button" href="' . $sort_url . '">' . TEXT_SORT . '</a>'; } else { $sort_url = htmlspecialchars($_SERVER['REQUEST_URI']); $sort_url = ((strpos($sort_url,'?') > 0) ? str_replace('&sort=1', '', $sort_url) : str_replace('?sort=1', '', $sort_url)); echo '<a rel="external" data-theme="a" data-role="button" href="' . $sort_url . '">' . TEXT_SORT_AL . '</a>'; } This adds the button to switch between the two sorting options… I think you could add several more buttons here if you want to sort by more things (e.g. price...) to which you can assign specific get variables… Now all you that is left to do is to define the TEXT_SORT and TEXT_SORT_AL in the respective language files in includes/languages. Hopefully this helps a little :)
  7. Yeah sure, makes it even more visible :) Please feel free to add it to the next update! Since many people might have very similar datathemes it's also a good idea to still change the icon, so great addition! Thanks for the quick reply!
  8. Hello Rainer, I'm still working on my mobile store… :) Now I have found that I would like to see which options are chosen in the options screen… I did not edit this function away by accident, did I? Anyways I have added this code around l29 of the options.php file (in the mobile directory): while (list($key, $value) = each($lng->catalog_languages)) { if ($language == $value['directory']) { $icon = 'check'; } else { $icon = 'plus'; } echo tep_button_jquery(tep_image(DIR_WS_LANGUAGES . $value['directory'] . '/images/' . $value['image'], $value['name']) .' '. $value['name'] , $path . $key , 'a' , 'button' , 'data-icon="'.$icon.'" data-iconpos="right"' ); } This works beautifully and gives me a check for the language chosen and pluses for the other ones. Now I would like to add this function to the currencies too… Do you know the currency variable from the session variable and how to compare it to the key, value pair from the currencies array in similar fashion as I did with the languages? I do not plan to use the theme selector, but do you see opportunities there too? Just wondering :) Thanks for your reply! Raphael
  9. Strange, for me it works perfectly. I have tested it on my iPhone and in my browser, and the too large images resize perfectly while the ones that are too small are just enlarged to their actual size. If you want to check again, this product has an image that is 1500x1500px originally: http://mobile.breakthrough.ch/mobile/product_info.php?products_id=49442 While the image for this product is only 241x208px: http://mobile.breakthrough.ch/mobile/product_info.php?products_id=49442 I think that it does work :)
  10. OK, I have tweaked my code a little bit, now I get the results I wanted: Images are resized to fill out the space completely but not further than their own dimensions: <?php echo '<a class="fancyLink" data-fancybox-group="group" href="' . HTTP_SERVER . DIR_WS_HTTP_CATALOG . 'images/' . $product_info['products_image'] . '" target="_blank">' . tep_image(DIR_WS_IMAGES . $product_info['products_image'], addslashes($product_info['products_name']), 'auto', 'auto', 'style="max-width:100%; max-height:100%"') . '</a>'; ?> I guess this would also work on line 71 for the case of multiple product images… Have not tested this out though…
  11. Hi Rainer @@raiwa I've just installed the discount code contribution support. No problems there, but could you add in the instructions that the file discount_code.php needs to be copied into the mobile directory. Maybe I just missed that, but the discount code only works after the file has been copied over… At least if the store is installed on a subdomain… But since it is is only linked relatively I think the file is needed in the directory. Well, that's the quick solution I came up with, if there is something better please let me know…
  12. Another problem I was able to solve myself was with product images on the product_info page. For me they were not correctly sized therefore overlapping the box. As I do not have any products with multiple images, I do not know how far this is also a problem there, I just changed the "else" part of the statement. The whole image section (around lines 51-93 of mobile/product_info.php) now looks like this for me: <?php if (tep_not_null($product_info['products_image'])) { $pi_query = tep_db_query("select image, htmlcontent from " . TABLE_PRODUCTS_IMAGES . " where products_id = '" . (int)$product_info['products_id'] . "' order by sort_order"); if (tep_db_num_rows($pi_query) > 0) { ?> <div id="prodImage"> <?php $pi_counter = 0; while ($pi = tep_db_fetch_array($pi_query)) { $pi_counter++; $pi_entry = ' <a class="fancyLink" data-fancybox-group="group" href="'; if (tep_not_null($pi['htmlcontent'])) { $pi_entry .= '#piGalimg_' . $pi_counter; } else { $pi_entry .= HTTP_SERVER . DIR_WS_HTTP_CATALOG . 'images/' . $pi['image']; } $pi_entry .= '" target="_blank">' . tep_image(DIR_WS_IMAGES . $pi['image'], $product_info['products_name'], MOBILE_IMAGE_WIDTH, MOBILE_IMAGE_HEIGHT) . '</a>'; if (tep_not_null($pi['htmlcontent'])) { $pi_entry .= '<div style="display: none;"><div id="piGalimg_' . $pi_counter . '">' . $pi['htmlcontent'] . '</div>'; } if ($pi_counter == 1) { echo $pi_entry; } } ?> </div> <?php } else { ?> <div id="prodImage"> <?php echo '<a class="fancyLink" data-fancybox-group="group" href="' . HTTP_SERVER . DIR_WS_HTTP_CATALOG . 'images/' . $product_info['products_image'] . '" target="_blank">' . tep_image(DIR_WS_IMAGES . $product_info['products_image'], addslashes($product_info['products_name']), '100%', '100%') . '</a>'; ?> </div> <?php } } ?> Thanks to the percentages images are always scaled to fit their box which I think looks nice :)
  13. Thanks a lot, Rainer, this works perfectly. There are no problems in either the classic or mobile version so far. In order for the title to be the same as in the classic version I have appended the STORE_NAME constant after the product name: // add the products name to the breadcrumb trail for mobile if (MOBILE_SITE=='True' && isset($HTTP_GET_VARS['products_id'])) { $name_query = tep_db_query("select products_name from " . TABLE_PRODUCTS_DESCRIPTION . " where products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and language_id = '" . (int)$languages_id . "'"); if (tep_db_num_rows($name_query)) { $name = tep_db_fetch_array($name_query); $breadcrumb->add($name['products_name'] . ', ' . STORE_NAME, tep_href_link(FILENAME_PRODUCT_INFO, 'cPath=' . $cPath . '&products_id=' . $HTTP_GET_VARS['products_id'])); } } Thanks for your help! Regards, Raphael
  14. Hello Rainer, this line is correct in my store. However in the header file the title tag is defined as follows: <title><?php echo $headerTitleText = $breadcrumb->_trail[sizeof($breadcrumb->_trail) - 1]['title']; ?></title> This is line 4 of the mobile/includes/header.php file... Do I have to edit something there? If you'd like to take a look at the test store you can find it here: http://breakthrough.ch/catalog/product_info.php?products_id=49418 Or the direct link to the mobile version: http://mobile.breakthrough.ch/mobile/product_info.php?products_id=49418 As you can see by following the second link, the title is equal to the products_model instead of the name. Thanks for your help!
  15. Hi Rainer, I've just installed the add-on and am now testing it out for my store… One thing I have found that is bothering me is the behavior of the title tag on the product info page. I do not have an SEO add on installed and am running the latest version of OsC… Now on the product_info pages the title is set as the value "products_model" from the database. However I would like the title to behave the same way as on the desktop version -> showing the product's name... Did I miss something in the settings or what do I need to change in the original files? Thanks very much for your support and the contrib!