X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Dev Questions (https://forum.x-cart.com/forumdisplay.php?f=20)
-   -   Google Sitelinks Search Box (https://forum.x-cart.com/showthread.php?t=70727)

mcanitano 12-08-2014 05:37 AM

Google Sitelinks Search Box
 
We recently have been trying to implement google's sitelinks search box feature into our website.

See (https://developers.google.com/webmasters/richsnippets/sitelinkssearch?utm_source=wmc-blog&utm_medium=direc...inks-searchbox)

We've followed the steps provided by Google and implemented the following code into common_files/customer/search.tpl:

Code:


{literal}
<script type="application/ld+json">
{
  "@context": "http://schema.org",
  "@type": "WebSite",
  "url": "https://www.OURSITE.com/",
  "potentialAction": {
    "@type": "SearchAction",
    "target": "https://www.OURSITE.com/search.php?mode=search&substring={search_term_string}",
    "query-input": "required name=search_term_string"
  }
}
</script>
{/literal}


We've checked the JSON-LD markup for any errors and aren't seeing any. It's been over two weeks and we've had no luck with Google implementing the sitelinks search box when searching for our website.

Has anyone gotten this to work on X-Cart? If so, how long did it take for Google to implement this, and what code did you use?

BCSE 12-11-2014 07:50 AM

Re: Google Sitelinks Search Box
 
It looks like you have it right, however your site redirects https to http. You may need to turn that off or have the code use http instead of https.

Thanks,

Carrie

BCSE 12-11-2014 07:55 AM

Re: Google Sitelinks Search Box
 
See requirement A which further shows you need to do my suggestion. Your canonical url is http, not https. It may matter.

Thanks,

Carrie

mcanitano 12-12-2014 05:16 AM

Re: Google Sitelinks Search Box
 
Quote:

Originally Posted by BCSE
See requirement A which further shows you need to do my suggestion. Your canonical url is http, not https. It may matter.

Thanks,

Carrie


Carrie, thanks for the suggestion. Since our canonical is http, should the "target" URL in my JSON code be HTTP?

We turned off the HTTPS to HTTP redirect.

BCSE 12-12-2014 09:06 AM

Re: Google Sitelinks Search Box
 
Quote:

Originally Posted by mcanitano
Carrie, thanks for the suggestion. Since our canonical is http, should the "target" URL in my JSON code be HTTP?

We turned off the HTTPS to HTTP redirect.


I would recommend trying it. I installed it on our site yesterday so I'll let you know how long it takes to get picked up for us too.

Carrie

mcanitano 12-15-2014 11:15 AM

Re: Google Sitelinks Search Box
 
We were looking around at a website that currently has the sitelink search bar working, and noticed it is in between the <head></head> tags on their site, and ours are between the body tags. Should we move it to the head?

Also, if it's in the head tag, should the rel="canonical" link come before it?

mcanitano 01-13-2015 10:02 AM

Re: Google Sitelinks Search Box
 
Quote:

Originally Posted by BCSE
I would recommend trying it. I installed it on our site yesterday so I'll let you know how long it takes to get picked up for us too.

Carrie


Any update on if Google has noticed and included your search box?

It's been close to a month and no luck for us yet.

BCSE 01-13-2015 10:49 AM

Re: Google Sitelinks Search Box
 
No I'm not seeing it either. :(

Carrie

mcanitano 03-05-2015 11:32 AM

Re: Google Sitelinks Search Box
 
Three months later, and still no search box. Wondering if it's due to google choosing just simply to not include it?

mcanitano 04-02-2015 07:45 AM

Re: Google Sitelinks Search Box
 
Another month passed and no update.

BUT, we ran into an error on our site with another .php file, and we realized it was a JSON error. Our server host informed us that JSON was disabled.

They recently ran maintenance and it may have been disabled during the maintenance, but if that's not the case, JSON would not be working from the beginning; therefore this code would have never been recognized by Google.

Will wait another month to see if it works now.


All times are GMT -8. The time now is 12:10 PM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.