Jump to content



Photo
* * * * * 3 votes

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


  • Please log in to reply
1335 replies to this topic

#1321   DAVID3733

DAVID3733
  • Members
  • 174 posts
  • Real Name:DAVID
  • Location:essex UK

Posted 21 October 2014 - 10:09

Hi there

 

Firstly thank you for getting back to the thread so quickly

 

It looks like I might a version closer to IOSC V2.0.c

 

While it has been working for some years it has never been perfect, but it is a funtioning store and poeple place orders through it so i am loathe to change it

 

Never the less i would like to make important changes such as canonical tags to the stores SEO URL, if i turn on the define ('SEO_ENABLED', 'false'); to true in mobile/icludes/configure.php the mobile store is not able to fuction as there are to many server redirects, so i assume it goes around in a circle

 

If this version of IOSC is indeed to old would i be better upgrading to Version 5_4-REV2 or to the latest Ver 7 on my heavily modified 2.2 RCA

 

I am not a coder but manage to struggle by with most things if the instructions are clear, my concern is breaking the mobile site installing the new one, is there a upgrade path or is it best to install from scratch or an install service, and with that in mind  I am sure i read it might be better to have the mobile site on a subdomain, ie m.mywebsiteaddress.com, what are your thoughts on that

 

Thank you

 

 

david


David

#1322   raiwa

raiwa
  • Community Sponsor
  • 474 posts
  • Real Name:Rainer Schmied
  • Gender:Male
  • Location:Sant Iscle de Vallalta, Barcelona, Spain

Posted 21 October 2014 - 11:47

Hello David,

I began developing iosc since version 5, older versions are from other contributors.
Update instructions are available since my first version 5.0 up to the actual version 7.5.5., not for older versions, as far as I remember.
However there are so many changes that it for sure would be the better choice to install a new fresh 7.5.5 version and apply the necessary customizations again. I had a look on your store and there are not so many on the public store site, admin customizations do not affect the mobile files.

Canonical and alternate tag support is available over Header Tag Add-on since iosc 5 for 2.2 stores, the same for SEO URLs.
Subdirectory and Subdomain installation is better considered for SEO and the reason I implemented this in iosc version 6.

Version 7 does the big step to implement jquery mobile.

However there is a huge list of many other improvements, new features and fixes. You can get an idea reading the change-log doc included in the newest version. You'll find there also detailed installation instructions and help docs for add-on integration and customization.
There is also support and instructions for the most common add-ons available in the contribution support package.

Commercial offers are not allowed in the public forums, you should post in the commercial support forum.

Kind regards
Rainer

Edited by raiwa, 21 October 2014 - 11:48.


#1323   DAVID3733

DAVID3733
  • Members
  • 174 posts
  • Real Name:DAVID
  • Location:essex UK

Posted 21 October 2014 - 12:00

Thank you for a comprehensive and detailed Anwser

 

Regards

 

david


David

#1324   DAVID3733

DAVID3733
  • Members
  • 174 posts
  • Real Name:DAVID
  • Location:essex UK

Posted 21 October 2014 - 18:28

Hello

 

I am installing 7.5.5 as recomended but having a issue with the configure file ( i assume ) as the links on the mobile site are going to the main site, they are not prefixed with m., i have installed on a sub domain called m the folder for which is in the main site, i have taken the liberty of including part of the config file below, i cannot see what is wrong so would appriciate a pointer,

 

define('HTTP_SERVER', 'http://www.mydomain.com');
  define('HTTPS_SERVER', 'https://www.mydomain.com');
  define('ENABLE_SSL', true);
  define('HTTP_COOKIE_DOMAIN', 'www.mydomain.com');
  define('HTTPS_COOKIE_DOMAIN', 'www.mydomain.com');
  define('HTTP_COOKIE_PATH', '');
  define('HTTPS_COOKIE_PATH', '');
  define('DIR_WS_HTTP_CATALOG', '/');
  define('DIR_WS_HTTPS_CATALOG', '/');
//BOF Mobile
  define('HTTP_MOBILE_SERVER', 'http://m.mydomain.com');
  define('HTTPS_MOBILE_SERVER', 'https://m.mydomain.com');
  define('DIR_WS_HTTP_MOBILE', '/');
  define('DIR_WS_HTTPS_MOBILE', '/');
  (defined('MOBILE_SESSION') ? define('DIR_WS_IMAGES', ((getenv('HTTPS') == 'on')? HTTPS_SERVER . DIR_WS_HTTPS_CATALOG : HTTP_SERVER . DIR_WS_HTTP_CATALOG) . 'images/') : define('DIR_WS_IMAGES', 'images/'));
  define('DIR_WS_ICONS', DIR_WS_IMAGES . 'icons/');
  (defined('MOBILE_SESSION') ? define('DIR_WS_INCLUDES', '../includes/') : define('DIR_WS_INCLUDES', 'includes/'));
//EOF Mobile

  define('DIR_WS_BOXES', DIR_WS_INCLUDES . 'boxes/');
  define('DIR_WS_FUNCTIONS', DIR_WS_INCLUDES . 'functions/');
  define('DIR_WS_CLASSES', DIR_WS_INCLUDES . 'classes/');
  define('DIR_WS_MODULES', DIR_WS_INCLUDES . 'modules/');
  define('DIR_WS_LANGUAGES', DIR_WS_INCLUDES . 'languages/');
//BOF Mobile
  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', DIR_MOBILE_INCLUDES . 'languages/');
//EOF Mobile

  //BOF Mobile
  (defined('MOBILE_SESSION') ? define('DIR_WS_DOWNLOAD_PUBLIC', HTTP_SERVER . DIR_WS_HTTP_CATALOG . 'pub/') : define('DIR_WS_DOWNLOAD_PUBLIC', 'pub/')); 
//EOF Mobile

  define('DIR_FS_CATALOG', '/home/mydomain/public_html/');
  //BOF Mobile
  define('DIR_FS_MOBILE', '/home/mydomain/public_html/m/');
//EOF Mobile

  define('DIR_FS_DOWNLOAD', DIR_FS_CATALOG . 'download/');
  define('DIR_FS_DOWNLOAD_PUBLIC', DIR_FS_CATALOG . 'pub/');
  define('DIR_MAIN_HTTP_CATALOG', '/');


David

#1325   DAVID3733

DAVID3733
  • Members
  • 174 posts
  • Real Name:DAVID
  • Location:essex UK

Posted 21 October 2014 - 19:07

Please Ignore the above post, its something to do with the SEO URLs i have installed on the main site, working my way through it

 

Regards

 

David


David

#1326   DAVID3733

DAVID3733
  • Members
  • 174 posts
  • Real Name:DAVID
  • Location:essex UK

Posted 22 October 2014 - 00:01

Hi There

 

I think your instructions are very good but i stillI have a few issues perhaps i could get advise on

 

I have seo tags 3.2.9 and SEO URLs but can not get the canical tag to show on the main site or the mobile with the new files, it does show the mobile site link as alt so it is working just no canoical, if i revert back to the old header_tags file the canoical shows on the main site as it should, I have reinstalled everything twice but to no avail.

 

The mobile site shows with styles on PC with old version of explorer but shows as text in chrome and on andriod mobile, i assume this is something to do with CSS needing to be activated somewhere, or maybe the path is wrong.

 

I loaded onto a subdomain, i didnt realse I would need a different SSL cert for the subdomain, if the mobile site is not using SSL and the main site does would it cause any problems tranfering data, I will look into the new cert or maybe the original can be varied but would have liked to have it all up and running first

 

I belive i have On the Fly Thumbnailer with Caching Option, will this be suitble for the mobile site, the images are showing in the product pages on the PC although they do look big but not on  the mobil yet

 

Thats it for a Mo, off to bed now


David

#1327   DAVID3733

DAVID3733
  • Members
  • 174 posts
  • Real Name:DAVID
  • Location:essex UK

Posted 22 October 2014 - 11:20

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

#1328   khoking

khoking
  • Members
  • 223 posts
  • Real Name:KOH KHO KING
  • Gender:Male
  • Location:Malaysia

Posted 22 October 2014 - 11:26

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

#1329   raiwa

raiwa
  • Community Sponsor
  • 474 posts
  • Real Name:Rainer Schmied
  • Gender:Male
  • Location:Sant Iscle de Vallalta, Barcelona, Spain

Posted 22 October 2014 - 11:55

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



#1330   DAVID3733

DAVID3733
  • Members
  • 174 posts
  • Real Name:DAVID
  • Location:essex UK

Posted 22 October 2014 - 12:59

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.co...emailcollection" />' . "\n" : ' <meta name="no-email-collection" content="http://www.unspam.co...ilcollection">' . "\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

#1331   raiwa

raiwa
  • Community Sponsor
  • 474 posts
  • Real Name:Rainer Schmied
  • Gender:Male
  • Location:Sant Iscle de Vallalta, Barcelona, Spain

Posted 23 October 2014 - 10:01

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.g...e-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:

@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



#1332   DAVID3733

DAVID3733
  • Members
  • 174 posts
  • Real Name:DAVID
  • Location:essex UK

Posted 23 October 2014 - 10:41

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

#1333   raiwa

raiwa
  • Community Sponsor
  • 474 posts
  • Real Name:Rainer Schmied
  • Gender:Male
  • Location:Sant Iscle de Vallalta, Barcelona, Spain

Posted 23 October 2014 - 11:15

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



#1334   DAVID3733

DAVID3733
  • Members
  • 174 posts
  • Real Name:DAVID
  • Location:essex UK

Posted 23 October 2014 - 11:25

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

#1335   raiwa

raiwa
  • Community Sponsor
  • 474 posts
  • Real Name:Rainer Schmied
  • Gender:Male
  • Location:Sant Iscle de Vallalta, Barcelona, Spain

Posted 23 October 2014 - 11:48

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



#1336   DAVID3733

DAVID3733
  • Members
  • 174 posts
  • Real Name:DAVID
  • Location:essex UK

Posted 23 October 2014 - 12:34

Just uploaded all of them again, there might have been a couple missing, but it has not resolved it yet

 

regards


David