Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

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


bumbarash

Recommended Posts

@@raiwa  and @@Jack_mcs

 

In regards to meta names in the header for Header Tags SEO.

 

I just want to verify that you feel this is accurate.  I'd like to make sure my site is indexed correctly for both the non-mobile and mobile sites.

 

My MOBILE header has:

<meta name="Description" content="blah blah blah" />
<meta name="Keywords" content="blah blah blah" />
<meta name="googlebot" content="noindex, nofollow" />
<meta name="bingbot" content="noindex, nofollow" />
<meta name="slurp" content="noindex, nofollow" />
<meta name="robots" content="noodp" />
<meta name="robots" content="noydir" />
<link rel="canonical" href="http://www.mysite.com/" />

And the NON-MOBILE version:

<meta name="Description" content="blah blah blah">
 <meta name="Keywords" content="blah blah blah">
 <meta name="googlebot-mobile" content="noindex, nofollow">
 <meta name="MSNBOT_Mobile" content="noindex, nofollow">
 <meta name="YahooSeeker/M1A1-R2D2" content="noindex, nofollow">
 <meta name="robots" content="noodp">
 <meta name="robots" content="noydir">
 <link rel="alternate" media="only screen and (max-width: 640px)" href="http://www.mysite.com/mobile/?redirectCancelled=true" >

Does that appear to be correct?  I just get worried when I see "noindex, nofollow" and I want to make sure I'm getting crawled correctly.

 

Thanks!! :)

Edited by phi148
Link to comment
Share on other sites

Hello Rainer,

 

Thanks for the wonderful contribution!

 

I installed the Header Tags SEO add on Ver5.2 and activated the header tags for a few pages that do not have an equivalent in the classic store, ex about.php.  When I checked Admin > Header Tags SEO > page control, these pages are not listed.  They were not excluded in /catalog/admin/includes/functions/header_tags.php so I am not sure what I need to do to have these pages to show in Admin so I can change the default header tags.  I double checked the install instructions but have come up with the same result.

 

What do I need to do to have this pages listed?

 

Best regards,

Joe

Link to comment
Share on other sites

Hello Joe @@catlover,

 

The mobile pages are not added as separate pages in the header tags page list, individual tags are not supported for these files.

The mobile index page and catalog_mb.php use the same tags as the main index Homepage (no category selected)

When inside a category in catalog_mb.php, the correspondent category tags are used, same for manufacturers.

On about.php and search.php the default tags are used. I believe there is no need to use specific tags on these pages.

 

Regards

Rainer

Link to comment
Share on other sites

@@phi148,

 

As far as I know it is correct. The tags say:

generic search engines: index only the main store pages

mobile specific search engines: index only the mobile site pages.

The only point I'm not sure is the canonical link:

google says: use it only on the mobile site and use the alternate tag on the main site (if mobile site exists)

others say: use canonical always on both sites.

 

@@Jack_mcs for sure knows more about that.

 

regards

Rainer

Link to comment
Share on other sites

I have installed Osc 7.5.9 in my Osc 2.3.3.4 shop with MTS

 

My Desktop version works ok.

When I open my shop on mobile then it opens ok,  when I go to store > catalog  i see manufacturers and specials but not categories.

Other thing I over write paypal_express.php which is in the Full 7.5.9 package and then I get the follwoing error:

 

Warning: include() [function.include]: Unable to access /public/sites/www.myshop.com/includes/apps/paypal/OSCOM_PayPal.php in /public/sites/www.myshop.com/includes/modules/payment/paypal_express.php on line 14

Warning: include(/public/sites/www./public/sites/www.myshop.com/includes/apps/paypal/OSCOM_PayPal.php/includes/apps/paypal/OSCOM_PayPal.php) [function.include]: failed to open stream: No such file or directory in /public/sites/www.myshop.com/includes/modules/payment/paypal_express.php on line 14

 

/public/sites/www.myshop.com/includes/apps/paypal/OSCOM_PayPal.php  is ofcourse not in my shop or I find in the 7.5.9 pack , its from the developer I suppose ?
I'm not a coder but I can add OSC addons or make changes which is in the addon manual.


Any Clue ?

Jan
 

Edited by Boldman
Link to comment
Share on other sites

@@phi148,

 

As far as I know it is correct. The tags say:

generic search engines: index only the main store pages

mobile specific search engines: index only the mobile site pages.

The only point I'm not sure is the canonical link:

google says: use it only on the mobile site and use the alternate tag on the main site (if mobile site exists)

others say: use canonical always on both sites.

 

@@Jack_mcs for sure knows more about that.

 

regards

Rainer

 

Gotcha, do you think the alternate tag should have the:  ?redirectCancelled=true at the end, or should it be this instead?

 <link rel="alternate" media="only screen and (max-width: 640px)" href="http://www.mysite.com/mobile/" >
Edited by phi148
Link to comment
Share on other sites

@@raiwa For the meta tags code, I don't think it is right. But part of that is how the googlebot option is setup in Header Tags SEO.  In a shop without the mobile addon installed, if the googlebot meta tag option in Page Control isn't checked, then a googlebot meta tag isn't displayed and the default value of all, meaning no restrictions, is assumed by google. But the same is true if that that checkbox is checked. I had originally meant to add options to choose the parameters for that tag but it got lost along the way.

 

So as it is now with the mobile code as it is, if the checkbox is not checked in Page Control, then the default value of all is assumed. If the box is checked, the pages are not indexed at all. To have it work as mentioned, the code should be changed to

  if ($defaultTags['meta_google']) { echo (defined('MOBILE_SESSION')? ' <meta name="googlebot" content="noindex, nofollow" />' . "\n" : '' }

 But I don't think having the no index, no follow is right. It means that if a search engine ends up on a product page, among others, that page won't be listed and any links on it won't be followed. With googles new ranking system for mobile pages, I'm not sure that is right. If they link to a product page and are redirected to a mobile page, is a 301 issued? If not, that may cause a duplicate content situation.  

 

I think the best solution is to not check the google meta tag box in Page Control. I also suggest being sure to use the latest google sitemap addon which includes the option to build mobile sitemaps.

 

For the canonical tag, they now want next prev to be used instead of the rel and alt tags but I've not been able to figure out a good way to do that so that it doesn't slow the site down. As you mentioned, there should be an alternate tag used but I haven't made that change for the same reason. Though I've not seen anything that indicates it matters. 

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

Link to comment
Share on other sites

@@phi148,

 

I think "?redirectCancelled=true" should be removed

 

Raiwa, would you know how to fix this?  I think the code is here:   /includes/header_tags.php

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")); }

$mobile_url is getting populated with the ?redirectCancelled=true 

 

Do you know where I could fix that at?

 

Thanks!

Link to comment
Share on other sites

Raiwa, would you know how to fix this?  I think the code is here:   /includes/header_tags.php

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")); }

$mobile_url is getting populated with the ?redirectCancelled=true 

 

Do you know where I could fix that at?

 

Thanks!

 

For now I just did a quick fix, but I'm not sure it is the right way to do it.  :)

if ($defaultTags['meta_canonical']){
    $new_mobile_url = str_replace('?redirectCancelled=true', '', $mobile_url);  
}

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="'. $new_mobile_url .'" >'. "\n")); }

Link to comment
Share on other sites

@@raiwa

 

Hi I noticed after installing Mobile Site under header tags for alternate mobile links that the source for alternate is generated for desktop version e.g. http://www.hdcabling.co.za/hdmi-inline-extender-repeater-active-equalizer-extend-hdmi-hdmi-cable-signal-meters-p-78.html?MredirectCancelled=true as mobile version / alternate link

http://mobile.hdcabling.co.za/hdmi-inline-extender-repeater-active-equalizer-extend-hdmi-hdmi-cable-signal-meters-p-78.html

 

When I copy and paste this into a browser it does not work and gives a NOT Found page error, the actual link on mobile site is http://mobile.hdcabling.co.za/hdmi-inline-extender-repeater-active-equalizer-extend-hdmi-hdmi-cable-signal-meters-mp-78.html?redirectCancelled=true where the -p- in SEO URL is changed to -mp-.

 

Is this normal and is the -mp- generated when switched to mobile view and will this affect google crawling ?

Link to comment
Share on other sites

@@thiartj,

 

can you please post the bottom of your includes/header_tags.php, where the canonical and alternate tags is defined.

From:

// MOBILE URLS REPLACEMENTS FOR CANONICAL URL

till the end

 

thanks

Rainer

Link to comment
Share on other sites

Hello Johan @@thiartj,

 

which exact header tags add-on are you using, can you please post the URL to the download.

 

regards

Rainer

Link to comment
Share on other sites

@@raiwa,

 

Hi I am using modular_seo_header_tags_1.4.6_min as at http://addons.oscommerce.com/info/7646 with the Mobile add-on v1.0 on the same add-on page. I also notice on mobile site that the canonical tags point to mobile site version -mp- where it should point to desktop version -p- product page e.g

<link rel="canonical" href="http://mobile.hdcabling.co.za/hdmi-inline-extender-repeater-active-equalizer-extend-hdmi-to-hdmi-cable-signal-up-to-40-meters-mp-78.html"

 

/> is shown on mobile product pages and on desktop version as explained above the alternate mobile link shows

<link rel="alternate" media="only screen and (max-width: 640px)" href="http://mobile.hdcabling.co.za/hdmi-inline-extender-repeater-active-equalizer-extend-hdmi-to-hdmi-cable-signal-up-to-40-meters-p-78.html" /> which should include the -mp- to mobile website since

Link to comment
Share on other sites

Rainer and other what is your opinion about this ? redirectCancelled=true  with canonical on mobile page. Recomendation from Google is that rel=”canonical” tag on the mobile URL pointing to the desktop page is required. I checked some source of other web pages and they have on desktop and on mobile version the same cannonical.

 
jack_mcs @ in mobile/header.php  I added your add-ons Header Tags SEO. It worked but I moved it away because of caution and because there is so many unknown things around this. What do you think or suggest it makes sense at all that mobile version is connected to this your perfect addons that I am using from beginning for many years now?
Link to comment
Share on other sites

@@Matjaz,

 

 

 

Recomendation from Google is that rel=”canonical” tag on the mobile URL pointing to the desktop page is required. I checked some source of other web pages and they have on desktop and on mobile version the same cannonical.

 

That's the same what I know about that. I believe that canonical also on the main site can be useful for other kind of variation like other language maybe.

Let's see what Jack says about.

Link to comment
Share on other sites

Hello Johan @@thiartj,

 

Please address to the author @@Gergely in the correspondent support thread:

http://www.oscommerce.com/forums/topic/367607-addon-modular-seo-header-tags/

 

regards

Rainer

Edited by raiwa
Link to comment
Share on other sites

@@raiwa and @@Matjaz: I don't think using rel or alt makes too much of a difference. Google does recommend using them. though, so it might be best to use them. But I am not familiar enough with the mobile code to provide a good example. But roughly, currently the canonical code is something like

 

if (defined mobile) {

 canonical link = rel

 canonical url = mobile page

} else {

 canonical link = rel

 canonical url = desktop page

}

 

That should be changed to something like:

 

if (defined mobile) {

 canonical link = rel

 canonical url = desktop page

} else {

 canonical link = alt

 canonical url = mobile page

}

 

But on the mobile side, a category page uses category_mb.php while it is index.php on the desktop side and I don't know of a way to detect what the other page should be. Rainer, is there a way to know which page to link to? If there is a generic way to do that so it catches all of the pages, then I think the above would switch correctly.

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

Hi

I have problem in shopping cart. I installed mobile osc 7 on osCommerce 2.2-MS2. I used the folder 'for_OsC_2.2rc2a' to install mobile version. The problem is my shopping cart is always empty on the mobile version. It is working fine on desktop side.

I worked with application_top.php of the desktop side and printed $_SESSION, which resulted in an empty array in case of mobile version while the desktop side printed the array fine( that is array has the cart items in desktop side).

The code "if ($cart->count_contents() > 0) {" is not working for mobile version.

Please let me know about solution. Store is http://apopular.com.br/ .

Thanks

Adnan

Link to comment
Share on other sites

Hello @@adnan_osc,

 

Yes, it is like you say, iosc mobile is written for at least osc2.2rc2a. You can get it to work with 2.2ms2, but you need to "downgrade" the coding of several files to ensure it will work flawless with osc2.2ms2.

You should compare an unmodified osc2.2ms2 file package with an unmodified 2.2rc2a file package and apply the differences (obviously functional differences in the public store only, not admin, design or layout differences) to the mobile files.

 

However it is also possible that the problem you report is related to an add-on or customization which has been applied to your main store.

Most typical would be in that case QTpro or any other add-on which is related to product attributes and/or stock control. Any functional add-on/customization of the public store side needs to be applied to the mobile files.

 

regards

Rainer

Edited by raiwa
Link to comment
Share on other sites

@Jack_mcs and @Matjaz,

 
This is what Goolgel states on the referenced page:

 

 

Annotation in the HTML
On the desktop page (http://www.example.com/page-1), add:
<link rel="alternate" media="only screen and (max-width: 640px)"
href="http://m.example.com/page-1">

and on the mobile page (http://m.example.com/page-1), the required annotation should be:
<link rel="canonical" href="http://www.example.com/page-1">

This rel=”canonical” tag on the mobile URL pointing to the desktop page is required.

 

The actual code in header tags does this:

if (defined mobile) {
 <link rel="canonical" href="classic-url" >
} else {
<link rel="alternate" media="only screen and (max-width: 640px)" href="mobile_url" >
}

another possibility following other users opinion could be:

if (defined mobile) {
 <link rel="canonical" href="classic-url" >
} else {
 <link rel="canonical" href="classic-url" >
 <link rel="alternate" media="only screen and (max-width: 640px)" href="mobile_url" >
}

But on the mobile side, a category page uses category_mb.php while it is index.php on the desktop side and I don't know of a way to detect what the other page should be. Rainer, is there a way to know which page to link to? If there is a generic way to do that so it catches all of the pages, then I think the above would switch correctly.

 

Since the classic auto redirect feature was introduced, the easiest way to retrieve the correspondent links is to use "$classic_url" and "$mobile_url" which are defined in mobile/includes/classes/classic_redirect.php and mobile_redirect.php.

 

They show the correct URLs even with SEO URLs installed. You only would need to strip "MredirectCancelled=true" and "redirectCancelled=true" to get all clean.

 

regards

Rainer

Edited by raiwa
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...