Shopping Basket

 x 

Cart empty


Log In

Find Us Elsewhere

SSL

Forum Search

Keyword

GoogleBaseXML error

  • Evolução Pet
  • Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
More
4 years 6 months ago #3200 by Evolução Pet
GoogleBaseXML error was created by Evolução Pet
When I view my GooglebaseXML feed it shows the following error:

"error on line 2 at column 18: XML declaration allowed only at the start of the document"

I can´t find the advanced option "Clean Output Buffer" and 'Use Identifier Exists Tag' in the GooglebaseXML options.

I´m using Joomla 1.5 and VM 1.1.9

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

More
4 years 6 months ago - 4 years 6 months ago #3201 by boggler
Replied by boggler on topic GoogleBaseXML error
Hello, these were options added in later versions of the component, you will need to edit the code slightly.

It is the file components/com_googlebasexml/views/googlebasexml/view.xml.php, you will see lines 30 to 33 are
		 /* do
		  {
			//clean all output buffers
		  } while(@ob_end_clean());*/

You can just remove the comment marks /* and */, so that it says
		  do
		  {
			//clean all output buffers
		  } while(@ob_end_clean());
Last edit: 4 years 6 months ago by boggler.

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

More
4 years 6 months ago - 4 years 6 months ago #3202 by boggler
Replied by boggler on topic GoogleBaseXML error
To add the identifier exists tag is possible, but will need some more coding. Sorry, but the version of the feed component for Joomla 1.5 and Virtuemart 1.1 is used so rarely now that it is simply not practical to add all the options used in more recent versions. When it was written the 'identifier-exists' tag had not been introduced by Google.

What I suggest is that you try first of all to supply an identifier of some sort, if you can't supply a gtin at least a brand or mpn. If that is really not possible for your products you can add it to the code directly, again in view.xml.php, just before lines 116 to 118, where it says
			   //prices
			   $productPrice =& $product->addChild($tags->price);
			   $productPrice->setData($item->price);

add in
		$productIE = $product->addChild('g:identifier_exists');
		 $productIE->setData('FALSE');

So the whole thing says
		$productIE = $product->addChild('g:identifier_exists');
		 $productIE->setData('FALSE');
		//prices
		 $productPrice =& $product->addChild($tags->price);
		$productPrice->setData($item->price);
Last edit: 4 years 6 months ago by boggler.

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

  • Evolução Pet
  • Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
More
4 years 6 months ago #3203 by Evolução Pet
Replied by Evolução Pet on topic GoogleBaseXML error
Thanks...But now I'm getting this error:

Erro: Failed to retrieve the Currency Converter XML document.

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

More
4 years 6 months ago - 4 years 6 months ago #3205 by boggler
Replied by boggler on topic GoogleBaseXML error
Hello, I think this is a known problem with Virtuemart's currency conversion. First of all, do you have a mult-currency store? If not, then you should make sure that you have the 'use default currency' option selected in the feed, so that no currency conversion is required.

Also check your Virtuemart currency configuration. Is the vendor currency the same as product currency?
To check it:
- Go to Store/Edit store and verify "Currency Display Style" content.
- Go to your(s) product(s) and verify currency used by "Product Price".
They should have the same currency.

If you have a multi-currency store then you will need to fix the root cause of the problem, which is that the Virtuemart ECB module uses an outdated URL to fetch the currency version feed. How to do this:-

Edit file: administrator/components/com_virtuemart/classes/currency/convertECB.php
and change the url: www.ecb.int/stats/eurofxref/eurofxref-daily.xml
to: www.ecb.europa.eu/stats/eurofxref/eurofxref-daily.xml
Last edit: 4 years 6 months ago by boggler.

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

  • Evolução Pet
  • Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
More
4 years 6 months ago #3211 by Evolução Pet
Replied by Evolução Pet on topic GoogleBaseXML error
Hello, I don't have a mult-currency store and currency is the same for store and products. Where I can select the 'use default currency' option ?

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

More
4 years 6 months ago #3212 by boggler
Replied by boggler on topic GoogleBaseXML error
Sorry, that was my mistake, that is an option in later versions of the feed. The way that your version handles currencies is quite different.

I think that you will need to edit the Virtuemart file administrator/components/com_virtuemart/classes/currency/convertECB.php as I mentioned before, it is quite straightforward.

What has happened is that the European Central Bank changed the URL of their currency feed a few years ago.

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

  • Evolução Pet
  • Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
More
4 years 6 months ago #3214 by Evolução Pet
Replied by Evolução Pet on topic GoogleBaseXML error
Thanks...I need to strip html from product description. Can you please point to me which part of the code I have to edit ?

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

More
4 years 6 months ago - 4 years 6 months ago #3215 by boggler
Replied by boggler on topic GoogleBaseXML error
Sorry for the delay in response.

In the file components/com_googlebasexml./models/googlebasexml.php, after the lines 652 to 664:-
			$show_product_desc = $this->params->get('show_product_desc','full');
			switch($show_product_desc)
			{
				case 'short': $items[$i]->description = $db->f("product_s_desc");
				              break;
				case 'long': $items[$i]->description = $db->f("product_desc");
				              break;
							  
				case 'full':
				default: $items[$i]->description = $db->f("product_s_desc")."\n".$db->f("product_desc");
				              break;
				
			}

add
$items[$i]->description = strip_tags($items[$i]->description);

But you don't need to strip out the html, the feed makes sure that any html entities are correctly encoded, so that it does not cause a problem with the XML validation. If you strip out all the html tags you will lose any formatting, which can make it look a bit messy.
Last edit: 4 years 6 months ago by boggler.

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

  • Evolução Pet
  • Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
More
4 years 6 months ago #3216 by Evolução Pet
Replied by Evolução Pet on topic GoogleBaseXML error
Thanks, description is ok now. But the dynamic XML shows the following error:

Erro: couldn't connect to host
Erro: Failed to retrieve the Currency Converter XML document.

As a simple text is working.

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

More
4 years 6 months ago #3217 by boggler
Replied by boggler on topic GoogleBaseXML error
As I said before,

Edit file: administrator/components/com_virtuemart/classes/currency/convertECB.php
and change the url: www.ecb.int/stats/eurofxref/eurofxref-daily.xml
to: www.ecb.europa.eu/stats/eurofxref/eurofxref-daily.xml


make sure you include http://
var $document_address = 'http://www.ecb.europa.eu/stats/eurofxref/eurofxref-daily.xml';

If you have already done this then it might just be a temporary problem with the ecb host, that is probably the most likely explanation if the text version works.

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

  • Evolução Pet
  • Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
More
4 years 6 months ago #3218 by Evolução Pet
Replied by Evolução Pet on topic GoogleBaseXML error
Yes I did change the url...might be a problem with the host. Why this ECB link is needed? My store is not multi-currencies, we only accept Brazilian Real (BRL)

Another problem, the product link is wrong...I think it's because I changed virtuemart router for SEF.

This is how the XML print the link:
mystore.com.br/component/virtuemart/aces...product_currency=BRL

But should be like this:
mystore.com.br/produtos/acessórios-para-...-8-curva/1-122?pop=0

What can I do to solve this?

Thanks in advance.

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

Moderators: boggler
Time to create page: 0.287 seconds

Donate to Us

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