Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

rafhun

Pioneers
  • Posts

    16
  • Joined

  • Last visited

  • Days Won

    1

Reputation Activity

  1. Like
    rafhun got a reaction from raiwa in [Contribution] iOSC - mobile version of OSC on your iPhone   
    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. Like
    rafhun reacted to raiwa in [Contribution] iOSC - mobile version of OSC on your iPhone   
    Hello Raphael @@rafhun,
     
    Thank you. This is already prepared for the next update. All input fields will be enhanced.
     
    regards
    Rainer
  3. Like
    rafhun got a reaction from raiwa in [Contribution] iOSC - mobile version of OSC on your iPhone   
    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. Like
    rafhun got a reaction from raiwa in [Contribution] iOSC - mobile version of OSC on your iPhone   
    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!
  5. Like
    rafhun got a reaction from raiwa in [Contribution] iOSC - mobile version of OSC on your iPhone   
    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 :)
  6. Like
    rafhun got a reaction from raiwa in [Contribution] iOSC - mobile version of OSC on your iPhone   
    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
  7. Like
    rafhun reacted to raiwa in [Contribution] iOSC - mobile version of OSC on your iPhone   
    Hello Raphael @@rafhun,
     
    Just uploaded Mobile OsC 7.3.0. which inludes support for the product title and image resize.
  8. Like
    rafhun reacted to raiwa in [Contribution] iOSC - mobile version of OSC on your iPhone   
    Hello again Raphael @@rafhun,
     
    Adding the Storename to mobile/includes/header.php line 4 will add the storename to all page titles:

    <title><?php echo $headerTitleText = $breadcrumb->_trail[sizeof($breadcrumb->_trail) - 1]['title'] . ', ' . STORE_NAME; ?></title>
     
    regards
    Rainer
×
×
  • Create New...