Shopping Basket

 x 

Cart empty


Log In

Find Us Elsewhere

SSL

Forum Search

Keyword

Googlebasexml SEF URLs

  • merseyman
  • Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
More
4 years 6 months ago #3187 by merseyman
Googlebasexml SEF URLs was created by merseyman
Hi,

I'm using VM3 with JoomSEF and was wondering if it was possible to submit SEF URLs in the feed?

Thanks,
Rob

Please Log in or Create an account to join the conversation.

More
4 years 6 months ago #3188 by boggler
Replied by boggler on topic Googlebasexml SEF URLs
Hello, it should supply SEF URLs, but it looks like there has been a change in the way that Virtuemart 3 handles URLs that is causing a problem with this. The feed just uses the product link that Virtuemart supplies, in the past this was the SEF URL, now suddenly it looks like it supplies the native Joomla URL.

Whatever, it is quite easy to fix, in the file components/com_googlebasexml/models/googlebasexml.php, line 690:-
$baseurl = $this->getBase();

change to
$url = JRoute::_($url);
$baseurl = $this->getBase();

We will include a fix in the next release. I don't know if it actually makes any difference to Google shopping results though, I don't think it actually causes any problems to use the native Joomla URL instead, as long as it links to the correct product page. I doubt if they depend on keywords in the URL in deciding which products to display, they use the Google product type attribute for that.

Please Log in or Create an account to join the conversation.

  • merseyman
  • Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
More
4 years 6 months ago #3189 by merseyman
Replied by merseyman on topic Googlebasexml SEF URLs
Thanks for replying so quickly.
When I've changed googlebasexml.php, it's now showing the domain name duplicated at the start of each product link in the feed.
Your help with this is greatly appreciated.

Please Log in or Create an account to join the conversation.

More
4 years 6 months ago #3190 by boggler
Replied by boggler on topic Googlebasexml SEF URLs
Hello, that is an odd quirk of the Joomla router, that happens with SEF URLs when the site is in a subdirectory of the main root. There is an option in GooglebaseXML that is designed to deal with this, on the advanced tab, set the Base URL option to just the main domain of your site, without the subdirectory path, ie

www.example.com/

instead of

www.example.com/shop/

You should find that the URLs work as they should.

Please Log in or Create an account to join the conversation.

  • merseyman
  • Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
More
4 years 6 months ago - 4 years 6 months ago #3191 by merseyman
Replied by merseyman on topic Googlebasexml SEF URLs
The shop's in the root directory ... I am using SSL across the site if this has any bearing? Both store URL and base URL include the 'https://'
Last edit: 4 years 6 months ago by merseyman.

Please Log in or Create an account to join the conversation.

  • merseyman
  • Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
More
4 years 6 months ago #3192 by merseyman
Replied by merseyman on topic Googlebasexml SEF URLs
I may have misunderstood your above fix, but I got it working by replacing $baseurl = $this->getBase(); with $url = JRoute::_($url);
All sorted now.

Thanks

Please Log in or Create an account to join the conversation.

More
4 years 6 months ago #3193 by boggler
Replied by boggler on topic Googlebasexml SEF URLs
Actually I misunderstood your question slightly. You are right, I think that this is to do with the fact that your site uses SSL. Normally I would expect JRoute::_() to return the URL without the domain, which is why it is added.

I suggest that you modify the solution slightly so that you have
$url = JRoute::_($url);
$baseurl = '';

Please Log in or Create an account to join the conversation.

  • merseyman
  • Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
More
4 years 6 months ago #3194 by merseyman
Replied by merseyman on topic Googlebasexml SEF URLs
Nice one.
Regarding why SEF URLs in the feed, I just wanted to be covered for the Google's URL upgrade - support.google.com/adwords/answer/6049217 ... although I guess this wouldn't have such an impact on Shopping feeds?

Thanks again for your help with this.

Please Log in or Create an account to join the conversation.

More
4 years 6 months ago #3195 by boggler
Replied by boggler on topic Googlebasexml SEF URLs
I don't think that it would cause problems, since they say that the final url can contain redirects. Still I think it is best as far as possible that the product url matches the one that customers would naturally see on your site, it makes things less confusing.

Since you posted I have re-written the code that handles the product url so that hopefully it will now (in the next release) be correct in all cases, whether you are using Virtuemart 2 or 3, SSL or non-SSL, in a sub-domain or main domain.

Please Log in or Create an account to join the conversation.

Moderators: boggler
Time to create page: 0.213 seconds

Donate to Us

If you like our extensions, consider making a donation to say thanks.