Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

[Contribution] iOSC - mobile version of OSC on your iPhone


bumbarash

Recommended Posts

Just seen one mistake I made, I had header tags 3.2.8 and upgraded it to 3.2.9 as i though that was the update required but now i have reread the file in support 4.2 for 7.5 it needs 3.0.0, i must have been looking at a older file before, I will proceed with that upgrade first and perhaps that will solve the canonical issue which is the most important element

 

Regards

 

David

David

Link to comment
Share on other sites

Thank you, Rainer! Am glad that the problem is now solved! Have been searching high and low why the err cache missing appears, then only stumbled that the URL is missing the keywords. :)

 

Hello @@khoking,

Here the fix:
in mobile_search.php and mobile_advanced_search.php:
find:
<?php echo tep_draw_form('quick_find', tep_mobile_link(FILENAME_ADVANCED_SEARCH_RESULT, '', 'NONSSL', false)) ?>
and change to:
<?php echo tep_draw_form('quick_find', tep_mobile_link(FILENAME_ADVANCED_SEARCH_RESULT, '', 'NONSSL', false), 'get') ?>


I'll include this in the next update, thank you.

Kind regards
Rainer

Best regards,

Koh Kho King

Link to comment
Share on other sites

Hello David,

 

If you still have trouble, please post the file includes/header_tags.php and for the css m/includes/header.php/header_with_htseo.php/header_with_products_htseo.php.

 

For the redirect: make sure you switched off "classic redirect" in  Admin : Configuration : Mobile SIte.

 

regards

Rainer

Link to comment
Share on other sites

Hi I have updated Headertags to 3.0.0 and reapplied the support changes but it still does not show a canonical link, I can conform the Admin auto direct to main site is set to false

 

Thank you

 

 

as requested here is the includes\header_tags.php file

 

<?php
/*
  $Id: header_tags_seo.php,v 3.0 2008/01/10 by Jack_mcs - http://www.oscommerce-solution.com

  osCommerce, Open Source E-Commerce Solutions
  http://www.oscommerce.com

  Copyright © 2003 osCommerce
  Portions Copyright 2009 oscommerce-solution.com

  Released under the GNU General Public License
*/

require_once(DIR_WS_FUNCTIONS . 'header_tags.php');
require_once(DIR_WS_FUNCTIONS . 'clean_html_comments.php'); // Clean out HTML comments from ALT tags etc.

$cache_output = '';
$canonical_url = '';
$header_tags_array = array();
$sortOrder = array();
$tmpTags = array();

$defaultTags_query = tep_db_query("select * from " . TABLE_HEADERTAGS_DEFAULT . " where language_id = '" . (int)$languages_id . "'");
$defaultTags = tep_db_fetch_array($defaultTags_query);
$tmpTags['def_title']     =  (tep_not_null($defaultTags['default_title'])) ? $defaultTags['default_title'] : '';
$tmpTags['def_desc']      =  (tep_not_null($defaultTags['default_description'])) ? $defaultTags['default_description'] : '';
$tmpTags['def_keywords']  =  (tep_not_null($defaultTags['default_keywords'])) ? $defaultTags['default_keywords'] : '';
$tmpTags['def_logo_text'] =  (tep_not_null($defaultTags['default_logo_text'])) ? $defaultTags['default_logo_text'] : '';
$languages_query = tep_db_query( "select code from " . TABLE_LANGUAGES . " where languages_id = '" . (int)$languages_id . "'");
$language_code = tep_db_fetch_array($languages_query);

// Define specific settings per page:
switch (true) {
 // MOBILE_CATALOG_MB.PHP
  case (basename($_SERVER['PHP_SELF']) === FILENAME_CATALOG_MB):
    $id = ($current_category_id ? 'c_' . (int)$current_category_id : (($_GET['manufacturers_id'] ? 'm_' . (int)$_GET['manufacturers_id'] : '')));

    if (! ReadCacheHeaderTags($header_tags_array, basename($_SERVER['PHP_SELF']),  $id)) {
       $pageTags_query = tep_db_query("select * from " . TABLE_HEADERTAGS . " where page_name like '" . FILENAME_DEFAULT . "' and language_id = '" . (int)$languages_id . "'");
       $pageTags = tep_db_fetch_array($pageTags_query);

       $catStr = "select categories_htc_title_tag as htc_title_tag, categories_htc_desc_tag as htc_desc_tag, categories_htc_keywords_tag as htc_keywords_tag from " . TABLE_CATEGORIES_DESCRIPTION . " where categories_id = '" . (int)$current_category_id . "' and language_id = '" . (int)$languages_id . "' limit 1";
       $manStr = '';
       if (isset($_GET['manufacturers_id']) && $category_depth == 'top')
         $manStr = "select mi.manufacturers_htc_title_tag as htc_title_tag, mi.manufacturers_htc_desc_tag as htc_desc_tag, mi.manufacturers_htc_keywords_tag as htc_keywords_tag from " . TABLE_MANUFACTURERS . " m LEFT JOIN " . TABLE_MANUFACTURERS_INFO . " mi on m.manufacturers_id = mi.manufacturers_id where m.manufacturers_id = '" . (int)$_GET['manufacturers_id'] . "' and mi.languages_id = '" . (int)$languages_id . "' limit 1";

       if ($pageTags['append_root'] || $category_depth == 'top' && ! isset($_GET['manufacturers_id']) )
       {
         $sortOrder['title'][$pageTags['sortorder_root']] = $pageTags['page_title'];
         $sortOrder['description'][$pageTags['sortorder_root']] = $pageTags['page_description'];
         $sortOrder['keywords'][$pageTags['sortorder_root']] = $pageTags['page_keywords'];
         $sortOrder['logo'][$pageTags['sortorder_root']] = $pageTags['page_logo'];
         $sortOrder['logo_1'][$pageTags['sortorder_root_1']] = $pageTags['page_logo_1'];
         $sortOrder['logo_2'][$pageTags['sortorder_root_2']] = $pageTags['page_logo_2'];
         $sortOrder['logo_3'][$pageTags['sortorder_root_3']] = $pageTags['page_logo_3'];
         $sortOrder['logo_4'][$pageTags['sortorder_root_4']] = $pageTags['page_logo_4'];
       }

       $sortOrder = GetCategoryAndManufacturer($sortOrder, $pageTags, $defaultTags, $catStr, $manStr);

       if ($pageTags['append_default_title'] && tep_not_null($tmpTags['def_title'])) $sortOrder['title'][$pageTags['sortorder_title']] = $tmpTags['def_title'];
       if ($pageTags['append_default_description'] && tep_not_null($tmpTags['def_desc'])) $sortOrder['description'][$pageTags['sortorder_description']] = $tmpTags['def_desc'];
       if ($pageTags['append_default_keywords'] && tep_not_null($tmpTags['def_keywords'])) $sortOrder['keywords'][$pageTags['sortorder_keywords']] = $tmpTags['def_keywords'];
       if ($pageTags['append_default_logo'] && tep_not_null($tmpTags['def_logo_text']))  $sortOrder['logo'][$pageTags['sortorder_logo']] = $tmpTags['def_logo_text'];

       FillHeaderTagsArray($header_tags_array, $sortOrder); 

       // Canonical URL add-on
       if (tep_not_null($cPath) || (isset($_GET['manufacturers_id']) && $category_depth == 'top'))
       {
          $args = tep_get_all_get_params(array('action','currency', tep_session_name(),'sort','page'));
          $canonical_url = StripSID(tep_href_link(FILENAME_CATALOG_MB, $args, 'NONSSL', false) );
       }

       WriteCacheHeaderTags($header_tags_array, basename($_SERVER['PHP_SELF']),  $id);
    }  
    break;
  // INDEX.PHP
  case (basename($_SERVER['PHP_SELF']) === FILENAME_DEFAULT):
    $id = ($current_category_id ? 'c_' . (int)$current_category_id : (($_GET['manufacturers_id'] ? 'm_' . (int)$_GET['manufacturers_id'] : '')));

    if (! ReadCacheHeaderTags($header_tags_array, basename($_SERVER['PHP_SELF']),  $id)) {
       $pageTags_query = tep_db_query("select * from " . TABLE_HEADERTAGS . " where page_name like '" . FILENAME_DEFAULT . "' and language_id = '" . (int)$languages_id . "'");
       $pageTags = tep_db_fetch_array($pageTags_query);

       $catStr = "select categories_htc_title_tag as htc_title_tag, categories_htc_desc_tag as htc_desc_tag, categories_htc_keywords_tag as htc_keywords_tag from " . TABLE_CATEGORIES_DESCRIPTION . " where categories_id = '" . (int)$current_category_id . "' and language_id = '" . (int)$languages_id . "' limit 1";
       $manStr = '';
       if (isset($_GET['manufacturers_id']) && $category_depth == 'top')
         $manStr = "select mi.manufacturers_htc_title_tag as htc_title_tag, mi.manufacturers_htc_desc_tag as htc_desc_tag, mi.manufacturers_htc_keywords_tag as htc_keywords_tag from " . TABLE_MANUFACTURERS . " m LEFT JOIN " . TABLE_MANUFACTURERS_INFO . " mi on m.manufacturers_id = mi.manufacturers_id where m.manufacturers_id = '" . (int)$_GET['manufacturers_id'] . "' and mi.languages_id = '" . (int)$languages_id . "' limit 1";

       if ($pageTags['append_root'] || $category_depth == 'top' && ! isset($_GET['manufacturers_id']) )
       {
         $sortOrder['title'][$pageTags['sortorder_root']] = $pageTags['page_title'];
         $sortOrder['description'][$pageTags['sortorder_root']] = $pageTags['page_description'];
         $sortOrder['keywords'][$pageTags['sortorder_root']] = $pageTags['page_keywords'];
         $sortOrder['logo'][$pageTags['sortorder_root']] = $pageTags['page_logo'];
         $sortOrder['logo_1'][$pageTags['sortorder_root_1']] = $pageTags['page_logo_1'];
         $sortOrder['logo_2'][$pageTags['sortorder_root_2']] = $pageTags['page_logo_2'];
         $sortOrder['logo_3'][$pageTags['sortorder_root_3']] = $pageTags['page_logo_3'];
         $sortOrder['logo_4'][$pageTags['sortorder_root_4']] = $pageTags['page_logo_4'];
       }

       $sortOrder = GetCategoryAndManufacturer($sortOrder, $pageTags, $defaultTags, $catStr, $manStr);

       if ($pageTags['append_default_title'] && tep_not_null($tmpTags['def_title'])) $sortOrder['title'][$pageTags['sortorder_title']] = $tmpTags['def_title'];
       if ($pageTags['append_default_description'] && tep_not_null($tmpTags['def_desc'])) $sortOrder['description'][$pageTags['sortorder_description']] = $tmpTags['def_desc'];
       if ($pageTags['append_default_keywords'] && tep_not_null($tmpTags['def_keywords'])) $sortOrder['keywords'][$pageTags['sortorder_keywords']] = $tmpTags['def_keywords'];
       if ($pageTags['append_default_logo'] && tep_not_null($tmpTags['def_logo_text']))  $sortOrder['logo'][$pageTags['sortorder_logo']] = $tmpTags['def_logo_text'];

       FillHeaderTagsArray($header_tags_array, $sortOrder); 

       // Canonical URL add-on
       if (tep_not_null($cPath) || (isset($_GET['manufacturers_id']) && $category_depth == 'top'))
       {
          $args = tep_get_all_get_params(array('action','currency', tep_session_name(),'sort','page', 'language', 'display'));
          $canonical_url = StripSID(tep_href_link(FILENAME_DEFAULT, $args, 'NONSSL', false) );
       }

       WriteCacheHeaderTags($header_tags_array, basename($_SERVER['PHP_SELF']),  $id);
    }  
    break;

  // PRODUCT_INFO.PHP
  // PRODUCT_REVIEWS.PHP
  // PRODUCT_REVIEWS_INFO.PHP
  // PRODUCT_REVIEWS_WRITE.PHP
  case (basename($_SERVER['PHP_SELF']) === FILENAME_PRODUCT_INFO):
  case (basename($_SERVER['PHP_SELF']) === FILENAME_PRODUCT_REVIEWS):
  case (basename($_SERVER['PHP_SELF']) === FILENAME_PRODUCT_REVIEWS_INFO):
  case (basename($_SERVER['PHP_SELF']) === FILENAME_PRODUCT_REVIEWS_WRITE):

    switch (true)
    {
     case (basename($_SERVER['PHP_SELF']) === FILENAME_PRODUCT_INFO):          $filename = FILENAME_PRODUCT_INFO;          break;
     case (basename($_SERVER['PHP_SELF']) === FILENAME_PRODUCT_REVIEWS):       $filename = FILENAME_PRODUCT_REVIEWS;       break;
     case (basename($_SERVER['PHP_SELF']) === FILENAME_PRODUCT_REVIEWS_INFO):  $filename = FILENAME_PRODUCT_REVIEWS_INFO;  break;
     case (basename($_SERVER['PHP_SELF']) === FILENAME_PRODUCT_REVIEWS_WRITE): $filename = FILENAME_PRODUCT_REVIEWS_WRITE; break;
     default: $filename = FILENAME_PRODUCT_INFO;
    }

    $id = ($_GET['products_id'] ? 'p_' . (int)$_GET['products_id'] : '');

    if (! ReadCacheHeaderTags($header_tags_array, basename($_SERVER['PHP_SELF']), $id))
    {
       $pageTags_query = tep_db_query("select * from " . TABLE_HEADERTAGS . " where page_name like '" . $filename . "' and language_id = '" . (int)$languages_id . "'");
       $pageTags = tep_db_fetch_array($pageTags_query);

       $the_product_info_query = tep_db_query("select p.products_id, pd.products_head_title_tag, pd.products_head_keywords_tag, pd.products_head_desc_tag, p.manufacturers_id, p.products_model from " . TABLE_PRODUCTS . " p inner join " . TABLE_PRODUCTS_DESCRIPTION . " pd on p.products_id = pd.products_id where p.products_id = '" . (int)$_GET['products_id'] . "' and pd.language_id ='" .  (int)$languages_id . "' limit 1");
       $the_product_info = tep_db_fetch_array($the_product_info_query);
       $header_tags_array['product'] = $the_product_info['products_head_title_tag'];  //save for use on the logo
       $tmpTags['prod_title'] = (tep_not_null($the_product_info['products_head_title_tag'])) ? $the_product_info['products_head_title_tag'] : '';
       $tmpTags['prod_desc'] = (tep_not_null($the_product_info['products_head_desc_tag'])) ? $the_product_info['products_head_desc_tag'] : '';
       $tmpTags['prod_keywords'] = (tep_not_null($the_product_info['products_head_keywords_tag'])) ? $the_product_info['products_head_keywords_tag'] : '';
       $tmpTags['prod_model'] = (tep_not_null($the_product_info['products_model'])) ? $the_product_info['products_model'] : '';

       $catStr = "select c.categories_htc_title_tag as htc_title_tag, c.categories_htc_desc_tag as htc_desc_tag, c.categories_htc_keywords_tag as htc_keywords_tag from " . TABLE_CATEGORIES_DESCRIPTION . " c, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c where c.categories_id = p2c.categories_id and p2c.products_id = '" . (int)$the_product_info['products_id'] . "' and language_id = '" . (int)$languages_id . "'";
       $manStr = "select mi.manufacturers_htc_title_tag as htc_title_tag, mi.manufacturers_htc_desc_tag as htc_desc_tag, mi.manufacturers_htc_keywords_tag as htc_keywords_tag from " . TABLE_MANUFACTURERS . " m LEFT JOIN " . TABLE_MANUFACTURERS_INFO . " mi on m.manufacturers_id = mi.manufacturers_id  where m.manufacturers_id = '" . (int)$the_product_info['manufacturers_id'] . "' and mi.languages_id = '" . (int)$languages_id . "' LIMIT 1";

       if ($pageTags['append_root'])
       {
         $sortOrder['title'][$pageTags['sortorder_root']] = $pageTags['page_title'];
         $sortOrder['description'][$pageTags['sortorder_root']] = $pageTags['page_description'];
         $sortOrder['keywords'][$pageTags['sortorder_root']] = $pageTags['page_keywords'];
         $sortOrder['logo'][$pageTags['sortorder_root']] = $pageTags['page_logo'];
         $sortOrder['logo_1'][$pageTags['sortorder_root_1']] = $pageTags['page_logo_1'];
         $sortOrder['logo_2'][$pageTags['sortorder_root_2']] = $pageTags['page_logo_2'];
         $sortOrder['logo_3'][$pageTags['sortorder_root_3']] = $pageTags['page_logo_3'];
         $sortOrder['logo_4'][$pageTags['sortorder_root_4']] = $pageTags['page_logo_4'];     
       }

       if ($pageTags['append_product'])
       {   
         $sortOrder['title'][$pageTags['sortorder_product']] = $tmpTags['prod_title'];  //places the product title at the end of the list
         $sortOrder['description'][$pageTags['sortorder_product']] = $tmpTags['prod_desc'];
         $sortOrder['keywords'][$pageTags['sortorder_product']] = $tmpTags['prod_keywords'];
         $sortOrder['logo'][$pageTags['sortorder_product']] = $tmpTags['prod_title'];
       }

       if ($pageTags['append_model'])
       {   
         $sortOrder['title'][$pageTags['sortorder_model']] = $tmpTags['prod_model'];  //places the product title at the end of the list
         $sortOrder['description'][$pageTags['sortorder_model']] = $tmpTags['prod_model'];
         $sortOrder['keywords'][$pageTags['sortorder_model']] = $tmpTags['prod_model'];
         $sortOrder['logo'][$pageTags['sortorder_model']] = $tmpTags['prod_model'];
       }

       $sortOrder = GetCategoryAndManufacturer($sortOrder, $pageTags, $defaultTags, $catStr, $manStr, true);

       if ($pageTags['append_default_title'] && tep_not_null($tmpTags['def_title'])) $sortOrder['title'][$pageTags['sortorder_title']] = $tmpTags['def_title'];
       if ($pageTags['append_default_description'] && tep_not_null($tmpTags['def_desc'])) $sortOrder['description'][$pageTags['sortorder_description']] = $tmpTags['def_desc'];
       if ($pageTags['append_default_keywords'] && tep_not_null($tmpTags['def_keywords'])) $sortOrder['keywords'][$pageTags['sortorder_keywords']] = $tmpTags['def_keywords'];
       if ($pageTags['append_default_logo'] && tep_not_null($tmpTags['def_logo_text']))  $sortOrder['logo'][$pageTags['sortorder_logo']] = $tmpTags['def_logo_text'];

       FillHeaderTagsArray($header_tags_array, $sortOrder); 

       // Canonical URL add-on
       if ($_GET['products_id'] != '') {
          $args = tep_get_all_get_params(array('action','currency', tep_session_name(),'cPath','manufacturers_id','sort','page'));
          $canonical_url = StripSID(tep_href_link(basename($_SERVER['PHP_SELF']), $args, 'NONSSL', false) );
       }
       WriteCacheHeaderTags($header_tags_array, basename($_SERVER['PHP_SELF']), $id);
    }

    break;

  // SPECIALS.PHP
  case (basename($_SERVER['PHP_SELF']) === FILENAME_SPECIALS):
    if (! ReadCacheHeaderTags($header_tags_array, basename($_SERVER['PHP_SELF']), ''))
    {
       $pageTags_query = tep_db_query("select * from " . TABLE_HEADERTAGS . " where page_name like '" . FILENAME_SPECIALS . "' and language_id = '" . (int)$languages_id . "'");
       $pageTags = tep_db_fetch_array($pageTags_query); 

       // Build a list of ALL specials product names to put in keywords
       $new = tep_db_query("select p.products_id, pd.products_name, p.products_price, p.products_tax_class_id, p.products_image, s.specials_new_products_price from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_SPECIALS . " s where p.products_status = '1' and s.products_id = p.products_id and p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "' and s.status = '1' order by s.specials_date_added DESC ");
       $row = 0;
       $the_specials='';
       while ($new_values = tep_db_fetch_array($new)) {
         $the_specials .= clean_html_comments($new_values['products_name']) . ', ';
       }

       if (strlen($the_specials) > 30000)                  //arbitrary number - may vary with server setting
        $the_specials = substr($the_specials, 0, 30000);   //adjust as needed

       if ($pageTags['append_root'])
       {
         $sortOrder['title'][$pageTags['sortorder_root']] = $pageTags['page_title'];
         $sortOrder['description'][$pageTags['sortorder_root']] = $pageTags['page_description'];
         $sortOrder['keywords'][$pageTags['sortorder_root']] = $pageTags['page_keywords'];
         $sortOrder['logo'][$pageTags['sortorder_root']] = $pageTags['page_logo'];
         $sortOrder['logo_1'][$pageTags['sortorder_root']] = $pageTags['page_logo_1'];
         $sortOrder['logo_2'][$pageTags['sortorder_root']] = $pageTags['page_logo_2'];
         $sortOrder['logo_3'][$pageTags['sortorder_root']] = $pageTags['page_logo_3'];
         $sortOrder['logo_4'][$pageTags['sortorder_root']] = $pageTags['page_logo_4'];     
       }

       $sortOrder['keywords'][10] = $the_specials;;

       if ($pageTags['append_default_title'] && tep_not_null($tmpTags['def_title'])) $sortOrder['title'][$pageTags['sortorder_title']] = $tmpTags['def_title'];
       if ($pageTags['append_default_description'] && tep_not_null($tmpTags['def_desc'])) $sortOrder['description'][$pageTags['sortorder_description']] = $tmpTags['def_desc'];
       if ($pageTags['append_default_keywords'] && tep_not_null($tmpTags['def_keywords'])) $sortOrder['keywords'][$pageTags['sortorder_keywords']] = $tmpTags['def_keywords'];
       if ($pageTags['append_default_logo'] && tep_not_null($tmpTags['def_logo_text']))  $sortOrder['logo'][$pageTags['sortorder_logo']] = $tmpTags['def_logo_text'];

       FillHeaderTagsArray($header_tags_array, $sortOrder); 
      WriteCacheHeaderTags($header_tags_array, basename($_SERVER['PHP_SELF']),  '');
    }
  break;

// ALL OTHER PAGES NOT DEFINED ABOVE
  default:
    $header_tags_array['title'] = tep_db_prepare_input($defaultTags['default_title']);
    $header_tags_array['desc'] = tep_db_prepare_input($defaultTags['default_description']);
    $header_tags_array['keywords'] = tep_db_prepare_input($defaultTags['default_keywords']);
    break;
  }   
 
// MOBILE URLS REPLACEMENTS FOR CANONICAL URL
$str_replace_from = array('-mc-', '-mi-', '-mby-', '-mpr-', '-mpri-', '-mp-', '-mm-', 'catalog_mb.php', 'about.php',  'search.php', 'currencies.php', 'languages.php', 'mobile/', '?redirectCancelled=true', '&redirectCancelled=true');
$str_replace_to = array('-c-', '-i-', '-by-', '-pr-', '-pri-', '-p-', '-m-', 'index.php', 'index.php', 'index.php', 'index.php', 'index.php');
$str_replace_alt_from = array('mobile/', '?redirectCancelled=true', '&redirectCancelled=true');
$str_replace_alt_to = array('/mobile/', '', '');

echo (defined('MOBILE_SESSION')? ' <meta http-equiv="Content-Type" content="text/html; charset=' . CHARSET  . '" />'."\n" : '<meta http-equiv="Content-Type" content="text/html; charset=' . CHARSET  . '">'."\n");
echo ' <title>' . $header_tags_array['title'] . '</title>' . "\n";
echo (defined('MOBILE_SESSION')? ' <meta name="Description" content="' . $header_tags_array['desc'] . '" />' . "\n" : ' <meta name="Description" content="' . $header_tags_array['desc'] . '">' . "\n");
echo (defined('MOBILE_SESSION')? ' <meta name="Keywords" content="' . $header_tags_array['keywords'] . '" />' . "\n" : ' <meta name="Keywords" content="' . $header_tags_array['keywords'] . '">' . "\n");

if ($defaultTags['meta_language']) { $langName = explode(",", $_SERVER["HTTP_ACCEPT_LANGUAGE"]); echo (defined('MOBILE_SESSION')? ' <meta http-equiv="Content-Language" content="' . $langName[0] . '" />'."\n" : ' <meta http-equiv="Content-Language" content="' . $langName[0] . '">'."\n"); }
if ($defaultTags['meta_google']) { echo (defined('MOBILE_SESSION')? ' <meta name="googlebot" content="noindex, nofollow" />' . "\n" : ' <meta name="googlebot-mobile" content="noindex, nofollow">' . "\n"); }
if ($defaultTags['meta_google']) { echo (defined('MOBILE_SESSION')? ' <meta name="bingbot" content="noindex, nofollow" />' . "\n" : ' <meta name="MSNBOT_Mobile" content="noindex, nofollow">' . "\n"); }
if ($defaultTags['meta_google']) { echo (defined('MOBILE_SESSION')? ' <meta name="slurp" content="noindex, nofollow" />' . "\n" : ' <meta name="YahooSeeker/M1A1-R2D2" content="noindex, nofollow">' . "\n"); }
if ($defaultTags['meta_noodp']) { echo (defined('MOBILE_SESSION')? ' <meta name="robots" content="noodp" />' . "\n" : ' <meta name="robots" content="noodp">' . "\n"); }
if ($defaultTags['meta_noydir']) { echo (defined('MOBILE_SESSION')? ' <meta name="robots" content="noydir" />' . "\n" : ' <meta name="robots" content="noydir">' . "\n"); }
if ($defaultTags['meta_revisit']) { echo (defined('MOBILE_SESSION')? ' <meta name="revisit-after" content="1 days" />' . "\n" : ' <meta name="revisit-after" content="1 days">' . "\n"); }
if ($defaultTags['meta_robots']) { echo (defined('MOBILE_SESSION')? '' : ' <meta name="robots" content="index, follow">' . "\n"); }
if ($defaultTags['meta_unspam']) { echo (defined('MOBILE_SESSION')? ' <meta name="no-email-collection" content="http://www.unspam.com/noemailcollection" />' . "\n" : ' <meta name="no-email-collection" content="http://www.unspam.com/noemailcollection">' . "\n"); }
if ($defaultTags['meta_replyto']) { echo (defined('MOBILE_SESSION')? ' <meta name="Reply-to" content="' . STORE_OWNER_EMAIL_ADDRESS . '" />' . "\n" : ' <meta name="Reply-to" content="' . STORE_OWNER_EMAIL_ADDRESS . '">' . "\n"); }
if ($defaultTags['meta_canonical']) { echo (defined('MOBILE_SESSION')? html_entity_decode(str_replace($str_replace_from, $str_replace_to, (tep_not_null($canonical_url) ? ' <link rel="canonical" href="'.$canonical_url.'" />'. "\n" : ' <link rel="canonical" href="'.GetCanonicalURL().'" />'. "\n"))) : ( ' <link rel="alternate" media="only screen and (max-width: 640px)" href="'. $mobile_url .'" >'. "\n")); }

echo '<!-- EOF: Header Tags SEO Generated Meta Tags -->' . "\n"; 
?>

 

 

 

and the m/includes/header.php

 

 

<!DOCTYPE html>
<head>
<meta charset="<?php echo ((CHARSET == 'utf-8')? CHARSET : MOBILE_CHARSET); ?>" />
<title><?php echo $headerTitleText = $breadcrumb->_trail[sizeof($breadcrumb->_trail) - 1]['title'] . ', ' . STORE_NAME; ?></title>
<meta name="viewport"
content="width=320, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
<meta name="apple-mobile-web-app-capable"
         content="yes" />
<meta name="apple-mobile-web-app-status-bar-style"
         content="default" />
<?php
if (strpos($PHP_SELF,'checkout') || strpos($PHP_SELF,'shopping_cart') || strpos($PHP_SELF,'account') || strpos($PHP_SELF,'log') ) {
?>
<meta name="googlebot"
   content="noindex, nofollow">
<meta name="robots"
   content="noindex, nofollow">
<?php
}
?>
<base href="<?php echo (($request_type == 'SSL') ? HTTPS_MOBILE_SERVER . DIR_WS_HTTPS_MOBILE : HTTP_MOBILE_SERVER . DIR_WS_HTTP_MOBILE); ?>" />
<link rel="stylesheet" href="ext/css/mobile_stylesheet.css?<?php echo time()?>" />
<!--Include JQM-->
<link rel="stylesheet" href="ext/css/theme-<?php echo CSS;?>-min.css?time=<?php echo time()?>" />
<link rel="stylesheet" href="ext/css/jquery.mobile.structure-1.3.2.min.css" />
<script src="ext/jquery/jquery-1.10.2.min.js"></script>
<link rel="stylesheet" type="text/css" href="ext/jquery/fancybox/jquery.fancybox-2.1.5.css">
<script type="text/javascript" src="ext/jquery/fancybox/jquery.fancybox.pack-2.1.5.js"></script>
<?php
/* Desactivate Ajax for the checkout and catalog_mb pages !*/
if (AJAX_ENABLED != 'true' || substr(basename($PHP_SELF), 0, 8) == 'checkout' || basename($PHP_SELF) == FILENAME_CATALOG_MB || substr(basename($PHP_SELF), 0, 7) == 'account' || substr(basename($PHP_SELF), 0, 12) == 'address_book' || basename($PHP_SELF) == FILENAME_LOGIN || basename($PHP_SELF) == FILENAME_CREATE_ACCOUNT)
echo '<script type="text/javascript">
$(document).bind("mobileinit", function () {
    $.mobile.ajaxEnabled = false;
});
</script>';
?>

<script src="ext/jquery/mobile/jquery.mobile-1.3.2.min.js"></script>
<script src="ext/js/jquery.validate.min.js"></script>
<?php
$languages_query = tep_db_query("select languages_id, code from " . TABLE_LANGUAGES . " order by sort_order");
while ($languages = tep_db_fetch_array($languages_query)) {
 if ($languages['languages_id'] == $languages_id)
  $lang = $languages['code'];
 }
if ($lang != 'en') { ?>
<script src="ext/js/localization/messages_<?php echo $lang; ?>.js"></script>
<?php }

if ( ((basename($PHP_SELF) == FILENAME_CATALOG_MB || basename($PHP_SELF) == FILENAME_NEW_PRODUCTS || basename($PHP_SELF) == FILENAME_SPECIALS || basename($PHP_SELF) == FILENAME_ADVANCED_SEARCH_RESULT) && MOBILE_PRODUCT_LISTING == 0) || (basename($PHP_SELF) == FILENAME_DEFAULT && (MOBILE_NEW_PRODUCTS_MODULE > 0 || MOBILE_SPECIALS_MODULE > 0 || MOBILE_UPCOMING_MODULE > 0)) )echo '<style type="text/css">
/* stack all grids below 40em (640px) */
@@media all and (max-width: ' . MOBILE_PRODUCT_LIST_BREAKPOINT . 'em) {
 .product-listing-breakpoint .ui-block-a,
 .product-listing-breakpoint .ui-block-b,
 .product-listing-breakpoint .ui-block-c,
 .product-listing-breakpoint .ui-block-d,
 .product-listing-breakpoint .ui-block-e {
  width: 100%;
  float: none;
 }
}
</style>';
if ( (basename($PHP_SELF) == FILENAME_CATALOG_MB || basename($PHP_SELF) == FILENAME_NEW_PRODUCTS || basename($PHP_SELF) == FILENAME_SPECIALS || basename($PHP_SELF) == FILENAME_ADVANCED_SEARCH_RESULT) && MOBILE_PRODUCT_LISTING == 1 )echo '<style type="text/css">
@@media ( min-width: ' . MOBILE_PRODUCT_LIST_BREAKPOINT . 'em ) {
 /* Show the table header rows and set all cells to display: table-cell */
 .product-table-breakpoint td,
 .product-table-breakpoint th,
 .product-table-breakpoint tbody th,
 .product-table-breakpoint tbody td,
 .product-table-breakpoint thead td,
 .product-table-breakpoint thead th {
  display: table-cell;
  margin: 0;
  text-align:right;
 }
 /* Hide the labels in each cell */
 .product-table-breakpoint td .ui-table-cell-label,
 .product-table-breakpoint th .ui-table-cell-label {
  display: none;
 }
}
</style>';
?>

</head>
<body>
<?php
echo '<noscript>';
echo '<div class="" id="errorMsg">'.TEXT_NOSCRIPT.'<br><a rel="external"
href="' . $classic_url . '">' . TEXT_SHOW_VIEW_1 . TEXT_CLASSIC_VIEW .
TEXT_SHOW_VIEW_2 . '</a></div>';
echo '</noscript>';
?>

<!-- header //-->
<div data-role="page" class="ui-page" data-dom-cache="false">
<div id="errorMsg">
<?php
if ($messageStack->size('header') > 0) {
echo $messageStack->output('header');
}
?>
</div>
<!-- error msg -->

<?php
echo '<div data-role="header" class="nav-glyphish-example" data-tap-toggle="false" data-hide-during-focus="">
      <div id="headerLogo"><a href="' . tep_mobile_link(FILENAME_DEFAULT) . '">' . tep_image(DIR_WS_HTTP_MOBILE . DIR_MOBILE_IMAGES . 'store_logo.png', STORE_NAME) . '</a></div>
    <div data-role="navbar" class="nav-glyphish-example" data-grid="d" data-hide-during-focus="">
    <ul>
        <li>'.tep_button_jquery( TEXT_HOME, tep_mobile_link(FILENAME_DEFAULT), 'a' , '' , 'id="homes" data-icon="custom"' ).'</li>
 <li>'.tep_button_jquery( TEXT_SHOP, tep_mobile_link(FILENAME_CATALOG_MB), 'a' , '' , 'id="boutique" data-icon="custom"' ).'</li>
        <li>'.tep_button_jquery( TEXT_ACCOUNT, tep_mobile_link(FILENAME_ACCOUNT, '', 'SSL'), 'a' , '' , 'id="compte" data-icon="custom"' ).'</li>
 <li>'.tep_button_jquery( IMAGE_BUTTON_SEARCH, tep_mobile_link(FILENAME_SEARCH), 'a' , '' , 'id="search" data-icon="custom"' ).'</li>
 <li>'.tep_button_jquery( TEXT_ABOUT, tep_mobile_link(FILENAME_ABOUT), 'a' , '' , 'id="about" data-icon="custom"' ).'</li>
    </ul>
    </div>
</div>';
?>

<div id="header">
<?php

    if(sizeof($breadcrumb->_trail) > 0)
  $headerTitleText = $breadcrumb->_trail[sizeof($breadcrumb->_trail) - 1]['title'];

    if (isset($HTTP_GET_VARS['error_message']) && tep_not_null($HTTP_GET_VARS['error_message']))
 echo htmlspecialchars(stripslashes(urldecode($HTTP_GET_VARS['error_message'])));
?>
</div>

 

 

 

 

m/includes/header_with_htseo.php

 

<!DOCTYPE html>
<head>
<?php
/*** Begin Header Tags SEO ***/
if ( file_exists(DIR_WS_INCLUDES . 'header_tags.php') ) {
  require(DIR_WS_INCLUDES . 'header_tags.php');
} else {
?>
<meta charset="<?php echo ((CHARSET == 'utf-8')? CHARSET : MOBILE_CHARSET); ?>" />
<?php
if (HEADER_TAGS_DISPLAY_PAGE_TOP_TITLE == 'true') {
 echo '<title>' . $header_tags_array['title'] . '</title>';
 } else {
 echo '<title>' . $headerTitleText = $breadcrumb->_trail[sizeof($breadcrumb->_trail) - 1]['title'] . '</title>';
}
}
/*** End Header Tags SEO ***/
?>
<meta name="viewport"
content="width=320, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
<meta name="apple-mobile-web-app-capable"
         content="yes" />
<meta name="apple-mobile-web-app-status-bar-style"
         content="default" />
<base href="<?php echo (($request_type == 'SSL') ? HTTPS_MOBILE_SERVER . DIR_WS_HTTPS_MOBILE : HTTP_MOBILE_SERVER . DIR_WS_HTTP_MOBILE); ?>" />
<link rel="stylesheet" href="ext/css/mobile_stylesheet.css?<?php echo time()?>" />
<!--Include JQM-->
<link rel="stylesheet" href="ext/css/theme-<?php echo CSS;?>-min.css?time=<?php echo time()?>" />
<link rel="stylesheet" href="ext/css/jquery.mobile.structure-1.3.2.min.css" />
<script src="ext/jquery/jquery-1.10.2.min.js"></script>
<link rel="stylesheet" type="text/css" href="ext/jquery/fancybox/jquery.fancybox-2.1.5.css">
<script type="text/javascript" src="ext/jquery/fancybox/jquery.fancybox.pack-2.1.5.js"></script>
<?php
/* Desactivate Ajax for the checkout and catalog_mb pages !*/
if (AJAX_ENABLED != 'true' || substr(basename($PHP_SELF), 0, 8) == 'checkout' || basename($PHP_SELF) == FILENAME_CATALOG_MB || substr(basename($PHP_SELF), 0, 7) == 'account' || substr(basename($PHP_SELF), 0, 12) == 'address_book' || basename($PHP_SELF) == FILENAME_LOGIN || basename($PHP_SELF) == FILENAME_CREATE_ACCOUNT)
echo '<script type="text/javascript">
$(document).bind("mobileinit", function () {
    $.mobile.ajaxEnabled = false;
});
</script>';
?>

<script src="ext/jquery/mobile/jquery.mobile-1.3.2.min.js"></script>
<script src="ext/js/jquery.validate.min.js"></script>
<?php
$languages_query = tep_db_query("select languages_id, code from " . TABLE_LANGUAGES . " order by sort_order");
while ($languages = tep_db_fetch_array($languages_query)) {
 if ($languages['languages_id'] == $languages_id)
  $lang = $languages['code'];
 }
if ($lang != 'en') { ?>
<script src="ext/js/localization/messages_<?php echo $lang; ?>.js"></script>
<?php }

if ( ((basename($PHP_SELF) == FILENAME_CATALOG_MB || basename($PHP_SELF) == FILENAME_NEW_PRODUCTS || basename($PHP_SELF) == FILENAME_SPECIALS || basename($PHP_SELF) == FILENAME_ADVANCED_SEARCH_RESULT) && MOBILE_PRODUCT_LISTING == 0) || (basename($PHP_SELF) == FILENAME_DEFAULT && (MOBILE_NEW_PRODUCTS_MODULE > 0 || MOBILE_SPECIALS_MODULE > 0 || MOBILE_UPCOMING_MODULE > 0)) )echo '<style type="text/css">
/* stack all grids below 40em (640px) */
@@media all and (max-width: ' . MOBILE_PRODUCT_LIST_BREAKPOINT . 'em) {
 .product-listing-breakpoint .ui-block-a,
 .product-listing-breakpoint .ui-block-b,
 .product-listing-breakpoint .ui-block-c,
 .product-listing-breakpoint .ui-block-d,
 .product-listing-breakpoint .ui-block-e {
  width: 100%;
  float: none;
 }
}
</style>';
if ( (basename($PHP_SELF) == FILENAME_CATALOG_MB || basename($PHP_SELF) == FILENAME_NEW_PRODUCTS || basename($PHP_SELF) == FILENAME_SPECIALS || basename($PHP_SELF) == FILENAME_ADVANCED_SEARCH_RESULT) && MOBILE_PRODUCT_LISTING == 1 )echo '<style type="text/css">
@@media ( min-width: ' . MOBILE_PRODUCT_LIST_BREAKPOINT . 'em ) {
 /* Show the table header rows and set all cells to display: table-cell */
 .product-table-breakpoint td,
 .product-table-breakpoint th,
 .product-table-breakpoint tbody th,
 .product-table-breakpoint tbody td,
 .product-table-breakpoint thead td,
 .product-table-breakpoint thead th {
  display: table-cell;
  margin: 0;
  text-align:right;
 }
 /* Hide the labels in each cell */
 .product-table-breakpoint td .ui-table-cell-label,
 .product-table-breakpoint th .ui-table-cell-label {
  display: none;
 }
}
</style>';
?>

</head>
<body>
<?php
echo '<noscript>';
echo '<div class="" id="errorMsg">'.TEXT_NOSCRIPT.'<br><a rel="external"
href="' . $classic_url . '">' . TEXT_SHOW_VIEW_1 . TEXT_CLASSIC_VIEW .
TEXT_SHOW_VIEW_2 . '</a></div>';
echo '</noscript>';
?>

<!-- header //-->
<div data-role="page" class="ui-page" data-dom-cache="false">
<div id="errorMsg">
<?php
if ($messageStack->size('header') > 0) {
echo $messageStack->output('header');
}
?>
</div>
<!-- error msg -->

<?php
echo '<div data-role="header" class="nav-glyphish-example" data-tap-toggle="false" data-hide-during-focus="">
      <div id="headerLogo"><a href="' . tep_mobile_link(FILENAME_DEFAULT) . '">' . tep_image(DIR_WS_HTTP_MOBILE . DIR_MOBILE_IMAGES . 'store_logo.png', STORE_NAME) . '</a></div>
    <div data-role="navbar" class="nav-glyphish-example" data-grid="d" data-hide-during-focus="">
    <ul>
        <li>'.tep_button_jquery( TEXT_HOME, tep_mobile_link(FILENAME_DEFAULT), 'a' , '' , 'id="homes" data-icon="custom"' ).'</li>
 <li>'.tep_button_jquery( TEXT_SHOP, tep_mobile_link(FILENAME_CATALOG_MB), 'a' , '' , 'id="boutique" data-icon="custom"' ).'</li>
        <li>'.tep_button_jquery( TEXT_ACCOUNT, tep_mobile_link(FILENAME_ACCOUNT, '', 'SSL'), 'a' , '' , 'id="compte" data-icon="custom"' ).'</li>
 <li>'.tep_button_jquery( IMAGE_BUTTON_SEARCH, tep_mobile_link(FILENAME_SEARCH), 'a' , '' , 'id="search" data-icon="custom"' ).'</li>
 <li>'.tep_button_jquery( TEXT_ABOUT, tep_mobile_link(FILENAME_ABOUT), 'a' , '' , 'id="about" data-icon="custom"' ).'</li>
    </ul>
    </div>
</div>';
?>

<div id="header">
<?php

    if(sizeof($breadcrumb->_trail) > 0)
  $headerTitleText = $breadcrumb->_trail[sizeof($breadcrumb->_trail) - 1]['title'];

    if (isset($HTTP_GET_VARS['error_message']) && tep_not_null($HTTP_GET_VARS['error_message']))
 echo htmlspecialchars(stripslashes(urldecode($HTTP_GET_VARS['error_message'])));
?>
</div>

 

 

and m/includes/header_with_products_htseo.php

 

 

<!DOCTYPE html>
<head>
<?php
/*** Begin Header Tags SEO ***/
if ( file_exists(DIR_WS_INCLUDES . 'header_tags.php') ) {
  require(DIR_WS_INCLUDES . 'header_tags.php');
} else {
?>
<meta charset="<?php echo ((CHARSET == 'utf-8')? CHARSET : MOBILE_CHARSET); ?>" />
<?php
if (HEADER_TAGS_DISPLAY_PAGE_TOP_TITLE == 'true') {
 echo '<title>' . $header_tags_array['title'] . '</title>';
 } else {
 echo '<title>' . $headerTitleText = $breadcrumb->_trail[sizeof($breadcrumb->_trail) - 1]['title'] . '</title>';
}
}
/*** End Header Tags SEO ***/
?>
<meta name="viewport"
content="width=320, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
<meta name="HandheldFriendly" content="True">
<meta name="MobileOptimized" content="" />
<meta name="apple-mobile-web-app-capable"
         content="yes" />
<meta name="apple-mobile-web-app-status-bar-style"
         content="default" />
<base href="<?php echo (($request_type == 'SSL') ? HTTPS_MOBILE_SERVER . DIR_WS_HTTPS_MOBILE : HTTP_MOBILE_SERVER . DIR_WS_HTTP_MOBILE); ?>" />
<link rel="stylesheet" href="ext/css/mobile_stylesheet.css?<?php echo time()?>" />
<!--Include JQM-->
<link rel="stylesheet" href="ext/css/theme-<?php echo CSS;?>-min.css?time=<?php echo time()?>" />
<link rel="stylesheet" href="ext/css/jquery.mobile.structure-1.3.2.min.css" />
<script src="ext/jquery/jquery-1.10.2.min.js"></script>
<link rel="stylesheet" type="text/css" href="ext/jquery/fancybox/jquery.fancybox-2.1.5.css">
<script type="text/javascript" src="ext/jquery/fancybox/jquery.fancybox.pack-2.1.5.js"></script>
<?php
/* Desactivate Ajax for the checkout and catalog_mb pages !*/
if (AJAX_ENABLED != 'true' || substr(basename($PHP_SELF), 0, 8) == 'checkout' || basename($PHP_SELF) == FILENAME_CATALOG_MB || substr(basename($PHP_SELF), 0, 7) == 'account' || substr(basename($PHP_SELF), 0, 12) == 'address_book' || basename($PHP_SELF) == FILENAME_LOGIN || basename($PHP_SELF) == FILENAME_CREATE_ACCOUNT)
echo '<script type="text/javascript">
$(document).bind("mobileinit", function () {
    $.mobile.ajaxEnabled = false;
});
</script>';
?>

<script src="ext/jquery/mobile/jquery.mobile-1.3.2.min.js"></script>
<script src="ext/js/jquery.validate.min.js"></script>
<?php
$languages_query = tep_db_query("select languages_id, code from " . TABLE_LANGUAGES . " order by sort_order");
while ($languages = tep_db_fetch_array($languages_query)) {
 if ($languages['languages_id'] == $languages_id)
  $lang = $languages['code'];
 }
if ($lang != 'en') { ?>
<script src="ext/js/localization/messages_<?php echo $lang; ?>.js"></script>
<?php }

if ( ((basename($PHP_SELF) == FILENAME_CATALOG_MB || basename($PHP_SELF) == FILENAME_NEW_PRODUCTS || basename($PHP_SELF) == FILENAME_SPECIALS || basename($PHP_SELF) == FILENAME_ADVANCED_SEARCH_RESULT) && MOBILE_PRODUCT_LISTING == 0) || (basename($PHP_SELF) == FILENAME_DEFAULT && (MOBILE_NEW_PRODUCTS_MODULE > 0 || MOBILE_SPECIALS_MODULE > 0 || MOBILE_UPCOMING_MODULE > 0)) )echo '<style type="text/css">
/* stack all grids below 40em (640px) */
@@media all and (max-width: ' . MOBILE_PRODUCT_LIST_BREAKPOINT . 'em) {
 .product-listing-breakpoint .ui-block-a,
 .product-listing-breakpoint .ui-block-b,
 .product-listing-breakpoint .ui-block-c,
 .product-listing-breakpoint .ui-block-d,
 .product-listing-breakpoint .ui-block-e {
  width: 100%;
  float: none;
 }
}
</style>';
if ( (basename($PHP_SELF) == FILENAME_CATALOG_MB || basename($PHP_SELF) == FILENAME_NEW_PRODUCTS || basename($PHP_SELF) == FILENAME_SPECIALS || basename($PHP_SELF) == FILENAME_ADVANCED_SEARCH_RESULT) && MOBILE_PRODUCT_LISTING == 1 )echo '<style type="text/css">
@@media ( min-width: ' . MOBILE_PRODUCT_LIST_BREAKPOINT . 'em ) {
 /* Show the table header rows and set all cells to display: table-cell */
 .product-table-breakpoint td,
 .product-table-breakpoint th,
 .product-table-breakpoint tbody th,
 .product-table-breakpoint tbody td,
 .product-table-breakpoint thead td,
 .product-table-breakpoint thead th {
  display: table-cell;
  margin: 0;
  text-align:right;
 }
 /* Hide the labels in each cell */
 .product-table-breakpoint td .ui-table-cell-label,
 .product-table-breakpoint th .ui-table-cell-label {
  display: none;
 }
}
</style>';
?>

</head>
<body>
<?php
echo '<noscript>';
echo '<div class="" id="errorMsg">'.TEXT_NOSCRIPT.'<br><a rel="external"
href="' . $classic_url . '">' . TEXT_SHOW_VIEW_1 . TEXT_CLASSIC_VIEW .
TEXT_SHOW_VIEW_2 . '</a></div>';
echo '</noscript>';
?>

<!-- header //-->
<div data-role="page" class="ui-page" data-dom-cache="false">
<div id="errorMsg">
<?php
if ($messageStack->size('header') > 0) {
echo $messageStack->output('header');
}
?>
</div>
<!-- error msg -->

<?php
echo '<div data-role="header" class="nav-glyphish-example" data-tap-toggle="false" data-hide-during-focus="">
      <div id="headerLogo"><a href="' . tep_mobile_link(FILENAME_DEFAULT) . '">' . tep_image(DIR_WS_HTTP_MOBILE . DIR_MOBILE_IMAGES . 'store_logo.png', STORE_NAME) . '</a></div>
    <div data-role="navbar" class="nav-glyphish-example" data-grid="d" data-hide-during-focus="">
    <ul>
        <li>'.tep_button_jquery( TEXT_HOME, tep_mobile_link(FILENAME_DEFAULT), 'a' , '' , 'id="homes" data-icon="custom"' ).'</li>
 <li>'.tep_button_jquery( TEXT_SHOP, tep_mobile_link(FILENAME_CATALOG_MB), 'a' , '' , 'id="boutique" data-icon="custom"' ).'</li>
        <li>'.tep_button_jquery( TEXT_ACCOUNT, tep_mobile_link(FILENAME_ACCOUNT, '', 'SSL'), 'a' , '' , 'id="compte" data-icon="custom"' ).'</li>
 <li>'.tep_button_jquery( IMAGE_BUTTON_SEARCH, tep_mobile_link(FILENAME_SEARCH), 'a' , '' , 'id="search" data-icon="custom"' ).'</li>
 <li>'.tep_button_jquery( TEXT_ABOUT, tep_mobile_link(FILENAME_ABOUT), 'a' , '' , 'id="about" data-icon="custom"' ).'</li>
    </ul>
    </div>
</div>';
?>

<div id="header">
<?php

    if(sizeof($breadcrumb->_trail) > 0)
  $headerTitleText = $breadcrumb->_trail[sizeof($breadcrumb->_trail) - 1]['title'];

    if (isset($HTTP_GET_VARS['error_message']) && tep_not_null($HTTP_GET_VARS['error_message']))
 echo htmlspecialchars(stripslashes(urldecode($HTTP_GET_VARS['error_message'])));
?>
</div>

David

Link to comment
Share on other sites

Hello David @@DAVID3733,

 

First of all sorry for the late reply, I was very busy.

 

Now by parts:

 

1. Canonical/Alternate Header Tag:

Your file seems to be ok.

I got now the problem you described, sorry:

Following Google guidelines for these tags, canonical should be shown only on the mobile site and alternate should be shown only on the main site:

https://developers.google.com/webmasters/smartphone-sites/details

 

However I know that there are different opinions about this and some people defend to put canonical on both sites.

So if you wish to do so, in includes/header_tags.php, just add this line before the modified canonical/alternate line, so it should look like this:

if ($defaultTags['meta_canonical']) { echo (defined('MOBILE_SESSION')? '' : (tep_not_null($canonical_url) ? ' <link rel="canonical" href="'.$canonical_url.'" >'. "\n" : ' <link rel="canonical" href="'.GetCanonicalURL().'" >'. "\n")); }
if ($defaultTags['meta_canonical']) { echo (defined('MOBILE_SESSION')? html_entity_decode(str_replace($str_replace_from, $str_replace_to, (tep_not_null($canonical_url) ? ' <link rel="canonical" href="'.$canonical_url.'" />'. "\n" : ' <link rel="canonical" href="'.GetCanonicalURL().'" />'. "\n"))) : ( ' <link rel="alternate" media="only screen and (max-width: 640px)" href="'. $mobile_url .'" >'. "\n")); }

2. For the image thumbnail:

Please read the recomendations in Add-On Support.doc Point 3. I think there is no support for your thumbnailer available, so: or custom modifications or changing to one of the recommended thumbnail Add-Ons.

 

3. For the css:

The header looks good and works on my teststore without problems.

Make sure you have this line:

@[member=import] "mobile_Osc_stylesheet.css";

at the beginning of your theme stylesheet which imports the second css used in mobile.

"Osc" maybe different if you copied and renamed the css.

Otherwise it's difficult to say what is wrong without having a look on your installation.

 

4. I tried to access your mobile subdomain and found that the modifications in includes/application_top.php are not done. Maybe you just apply them when you are testing.

You can apply all modifications for Mobile 7.5.5 in the main files. The constant "MOBILE_SESSION" which is used to condition the modified code for Mobile 7.5.5 in the main files, is not used in the old iosc version you are using until now. So there shouldn't be any problem using both versions with all necessary modifications for 7.5.5 in the shared files.

Just keep the old redirect code at the very end of includes/application_top.php to keep redirecting to your old iosc version during development.

Like this you can develop Mobile 7.5.5. meanwhile your old version still works for public and I can also access it for debugging.

 

Kind regards

Rainer

Link to comment
Share on other sites

Hi Thanks for getting back to the thread

 

My site has lots of issues like language and display that needs a canical link to avoid duplicates, in fact dring the evening i was testing your script i had loads of dupicates come up in google webmast the very next day for dupicates that google must have spidered while i was working.

 

Pleased to say your fix has worked perfectly, thank you

 

I would be very pleased to have both the mobile sites working at the same time so i can get 7.5.5 functioning right before switching over and not lose sales on the old mobile site, i placed the old divert script at the bottom of the amended application top but its going to the m subdomain, although the enable site is set to false in admin configure file, is there another setting somewhere, or maybe move the divert script up the page before the new mobile session?

 

David

David

Link to comment
Share on other sites

Hi Thanks for getting back to the thread

 

My site has lots of issues like language and display that needs a canical link to avoid duplicates, in fact dring the evening i was testing your script i had loads of dupicates come up in google webmast the very next day for dupicates that google must have spidered while i was working.

 

Pleased to say your fix has worked perfectly, thank you

 

I would be very pleased to have both the mobile sites working at the same time so i can get 7.5.5 functioning right before switching over and not lose sales on the old mobile site, i placed the old divert script at the bottom of the amended application top but its going to the m subdomain, although the enable site is set to false in admin configure file, is there another setting somewhere, or maybe move the divert script up the page before the new mobile session?

 

David

 

Hello David,

 

You do not need to include this code at the end of includes/application_top.php:

//BEGIN : MOBILE REDIRECT_SCRIPT    
	require(DIR_FS_MOBILE . 'includes/functions/devicelist.php');
	if ( MOBILE_SITE=='True'&& !defined('MOBILE_SESSION') ) {
	  require(DIR_FS_MOBILE . 'includes/classes/mobile_redirect.php');
	    if ( !strpos($_SERVER['REQUEST_URI'], 'checkout') )
			$mobileRedirect = new mobileRedirect;
	} elseif ( !strpos($_SERVER['REQUEST_URI'], 'checkout') ) {
	  require(DIR_FS_MOBILE . 'includes/classes/classic_redirect.php');
	  $mobileRedirect = new classicRedirect;
	}
//END : MOBILE REDIRECT_SCRIPT

just leave the old code to redirect to your old iosc version. The new 7.5.5 version under your subdomain should work all correct then if accessed manually typing the URL, except for the redirect link in the footer to classic site.

 

Regards

Rainer

Link to comment
Share on other sites

That was it, thanxs

 

In the admin conf file Theme setting i have Osc,Oscmobile,Grey, am i supposed to choose one of those

 

I have put @@import "mobile_Osc_stylesheet.css"; at the top of  mobile_stylesheet.css as this appears to be the one its asking for but this has not changed it, where was it supposed to go

David

Link to comment
Share on other sites

That was it, thanxs

 

In the admin conf file Theme setting i have Osc,Oscmobile,Grey, am i supposed to choose one of those

 

I have put @@import "mobile_Osc_stylesheet.css"; at the top of  mobile_stylesheet.css as this appears to be the one its asking for but this has not changed it, where was it supposed to go

If you are using the original themes, no need to modify anything there. I had a look on your mobile site and it looks more that some jquery/jquery mobile files are missing.

Please check again if you copied all files in the directory: mobile/ext/.

Make sure you added from both: common files AND for_OsC_2.2rc2a

 

regards

Rainer

Link to comment
Share on other sites

  • 2 weeks later...

Just installed your add on.

I have Mini Template System installed and when I try to access via a mobile I get the following error

 

Warning: require(mts/configuration/files/application_top.php): failed to open stream: No such file or directory in /home/....../public_html/catalog/includes/application_top.php on line 455

 

The line at 455 is -  require('mts/configuration/files/application_top.php');

 

I commented it out and the mobile site worked, but obviously the desk top site didn't

 

I assume that I wuld need to add an if statement ie if its mobile session then its not active, around it, but don't know how

 

Thanks

Frank

 

 

 

 

Link to comment
Share on other sites

Just installed your add on.

I have Mini Template System installed and when I try to access via a mobile I get the following error

 

Warning: require(mts/configuration/files/application_top.php): failed to open stream: No such file or directory in /home/....../public_html/catalog/includes/application_top.php on line 455

 

The line at 455 is -  require('mts/configuration/files/application_top.php');

 

I commented it out and the mobile site worked, but obviously the desk top site didn't

 

I assume that I wuld need to add an if statement ie if its mobile session then its not active, around it, but don't know how

 

Thanks

Frank

 

Hello Frank @@fmr,

 

you may need to do the modification similar to the configure.php:

  require((defined('MOBILE_SESSION') ? '../includes/configure.php' : 'includes/configure.php'));

I guess it should be:

  require((defined('MOBILE_SESSION') ? '../mts/configuration/files/application_top.php' : 'mts/configuration/files/application_top.php'));

regards

Rainer

Link to comment
Share on other sites

Is there a way to skip the index page and go straight to the catalog_mb page ie catalog_mb would be the home page

 

I have the add on working it looks great

 

Frank

 

Hello Frank @@fmr,

 

Yes there is:

 

1. rename the original mobile/index.php to something like index_old.php or delete it.

 

2. rename catalog_mb.php to index.php

 

3.a in: mobile/includes/header.php

find line 110:

data-grid="d"

change to:

data-grid="c"

for 4 item navbar instead of 5 item

 

3b. same file find and delete line 113:

	<li>'.tep_button_jquery( TEXT_SHOP, tep_mobile_link(FILENAME_CATALOG_MB), 'a' , '' , 'id="boutique" data-icon="custom"' ).'</li>

4. in: catalog/includes/filenames.php

find:

  define ('FILENAME_CATALOG_MB', 'catalog_mb.php');

change to:

  define ('FILENAME_CATALOG_MB', 'index.php');

Alternative to 4 you can change FILENAME_CATALOG_MB to FILENAME_DEFAULT in all mobile files. This would be cleaner, but it's more job.

 

regards

Rainer

Link to comment
Share on other sites

Thanks Rainer,

Just noticed what could be a bug, the Checkout with paypal button allows you to checkout when there is not enough stock, if I select the normal checkout method I get looped back to the cart the way it should be.

 

Frank

Link to comment
Share on other sites

  • 4 weeks later...

I've installed this today, had a few minor problems but almost everything seems to be functioning now.

 

The only problem... and it's quite major!  I can't get a redirect to the mobile version... even using the button in the box or the text switch CLASSIC/MOBILE doesn't work.

 

It seems to be something to do with the $mobile_url variable which isn't getting set.  Its always empty? 

 

Anyone got a similar issue or have I missed something???

 

I'm using the latest version with OSC2.3.3 with no SEO contribution.

 

Mark

Link to comment
Share on other sites

I've installed this today, had a few minor problems but almost everything seems to be functioning now.

 

The only problem... and it's quite major!  I can't get a redirect to the mobile version... even using the button in the box or the text switch CLASSIC/MOBILE doesn't work.

 

It seems to be something to do with the $mobile_url variable which isn't getting set.  Its always empty? 

 

Anyone got a similar issue or have I missed something???

 

I'm using the latest version with OSC2.3.3 with no SEO contribution.

 

Mark

 

Hello Mark @@markyvuk,

 

This can be related to the following:

- code block at the end of includes/application_top.php which loads the redirect class and device function

- DIR_FS_CATALOG and DIR_FS_MOBILE definition in includes/configure.php

- check that the following files are in place:

    - mobile/includes/classes/mobile_redirect.php

    - mobile/includes/classes/classic_redirect.php

    - mobile/includes/functions/devicelist.php

If you get something like "FILENAME_CATALOG_MB" in the wrong mobile URLs, make sure you added the mobile-filename-definitions to includes/filenames.php

 

If you still have problems, please post the wrong Urls you get hovering over the mobile box (text link) or let me know your store URL (In a private message, if you prefer) so I can have a look.

 

Kind regards

Rainer

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...