Jump to content
pitillas

Google Base 0.6.3.1 + external cron

Recommended Posts

I made a little modification over excelent module GoogleBase ver 0.6.3.1.
This allows you to launch the module from a cron, and automate the feed update.
It works similar to followup module: url + securekey can activate the execution.

First install normally the module: define file, path, etc....and generate first time feed.
In module configuration you can see a Secure key (XXXXXXXXX) , then you can invoke it like:

http://url_of_the_shop/modules/googlebase/cron.php?secure_key=XXXXXXXXXXX

and, if you have access to crontab (shell) you can create an entry like:

00 14 0 0 0 wget 'http://url_of_the_shop/modules/googlebase/cron.php?secure_key=XXXXXXXXXXX' > /dev/null 2 >&1;This launch it at 14:00 everyday and update the feed.

Enjoy it!!!

googlebase.zip

  • Like 1

Share this post


Link to post
Share on other sites

I installed it unfortunately it does not work on Prestashop 1.3
The xml file is properly created when I click on the button but when typing the url on my browser or using a cron the created xml is empty.
I also tried to remove the secure key but the result is the same.
Any idea?

Share this post


Link to post
Share on other sites
I installed it unfortunately it does not work on Prestashop 1.3
The xml file is properly created when I click on the button but when typing the url on my browser or using a cron the created xml is empty.
I also tried to remove the secure key but the result is the same.
Any idea?

The reason you don't see a file is because the code, as written, is only updating an existing file. If the file doesn't exist, the cron code does nothing. :( Try creating the file normally with the back office module configuration (or touch a file if you have shell access). This when you run the cron script it will update the file.

Share this post


Link to post
Share on other sites

Hi,

Thanks for your answer.
That exactly what I did. When I said:
The xml file is properly created when I click on the button but when typing the url on my browser or using a cron the created xml is empty.
I should have said:
The xml file is properly created when I click on the button (in the back office) but when typing the url on my browser or using a cron the updated xml is empty.

Share this post


Link to post
Share on other sites
Hi,

Thanks for your answer.
That exactly what I did. When I said:
The xml file is properly created when I click on the button but when typing the url on my browser or using a cron the created xml is empty.
I should have said:
The xml file is properly created when I click on the button (in the back office) but when typing the url on my browser or using a cron the updated xml is empty.


How do you fix that ?
I have the same error !
Rgds,
nadine

Share this post


Link to post
Share on other sites
Hi,

Thanks for your answer.
That exactly what I did. When I said:
The xml file is properly created when I click on the button but when typing the url on my browser or using a cron the created xml is empty.
I should have said:
The xml file is properly created when I click on the button (in the back office) but when typing the url on my browser or using a cron the updated xml is empty.


Finally, do you have found a solution ?
Regards,
Nadine

Share this post


Link to post
Share on other sites
I haven't found any solution so I just manually update every day


But how update ? how generate file ?
The first time is empty -> how you use the plugin ?

Share this post


Link to post
Share on other sites
I simply use the normal module not this one which has been modified


Where I can find it ?

Share this post


Link to post
Share on other sites

Hi!
Anybody found a solution for the cron job?!
Also, how can i create multiple feeds for different languages?

Thanks!

Share this post


Link to post
Share on other sites

Hi guys,

I got an email back from google telling me I had to modify the data feed
I had no quantities listed, products that are not avaliable a quantity must be allocated - http://www.google.com/support/merchants/bin/answer.py?answer=188494#quantity
My pictures had promotional graphics from the watermark, not allowed

my fix in googlebase.php

added after . "".$Product['ean13']."\n" (making sure ; is at the end of set)

. "".$Product['quantity']."\n"



changed

$items .= "".'http://'.$domain.$psdir.'img/p/'.$image[0]['id_product'].'-'.$image[0]['id_image'].'-large.jpg'."\n";


to

$items .= "".'http://'.$domain.$psdir.'img/p/'.$image[0]['id_product'].'-'.$image[0]['id_image'].'.jpg'."\n";



Cheers,
DT88

Share this post


Link to post
Share on other sites

Bonjour,
Message en Français et en Anglais

Merci beaucoup pour ces infos !
Cependant comment faire pour avoir plusieurs xml dans des langues différentes comme fr_xml , en_xml, de_xml etc
Je n'arrive pas à modifier pour obtenir une requête multiple.
J'ai bien changé la version dans la configuration mais tous les fichiers restent dans la langue par défaut.
comment modifier ces lignes pour obtenir les xml en langues différentes ?
$output_file = $output_dir.$dir_separator.strtolower(Language::getIsoById($this->_cookie->id_lang)).'_googlebase.xml';
return $output_file;
$category = new Category(intval($id_category), intval($this->_cookie->id_lang))

Sorry my english very bad

Hello,
Message in French and English

Thank you very much for the info!
But how to have multiple xml files in different languages ​​as fr_xml, en_xml, etc. de_xml
I can not change for a multiple request.
I have changed the version in the configuration but all files remain in the default language.
how to change these lines to get the xml in different languages​​?
$ output_file = $ output_dir. dir_separator.strtolower $ (Language: getIsoById ($ this-> _COOKIE-> id_lang )).'_ googlebase.xml ';
return $ output_file;
$ category = new Category (intval ($ id_category), intval ($ this-> _COOKIE-> id_lang))

Sorry my English very bad

Share this post


Link to post
Share on other sites

Hi !

It is very good that !

I wanted to have added a line id: reference and GTIN: Ean13 got error parsing?
What is my mistake?
Should I add another line in the script?
Thank you very much in advance as'm just an apprentice in php

if ($Product['active']) {
$image = Image::getImages(intval($this->id_lang=1), $Product['id_product']);
$expire_date = date('Y-m-d', strtotime("+30 days"));
$product_link = $link->getProductLink($Product['id_product'], $Product['link_rewrite']);
// Make 1.1 result look like 1.2
if (strpos( $product_link, 'http://' ) === false )
$product_link = 'http://'.$_SERVER['HTTP_HOST'].$product_link;
// remove the start to get a URI relative to __PS_BASE_URI__
$product_link = str_replace('http://'.$_SERVER['HTTP_HOST'].__PS_BASE_URI__,'',$product_link);
// Then build a full url according to the settings
$product_link = 'http://'.$domain.$psdir.$product_link;

$items .= "\n"
. "<title>".ucwords(strtolower(strtr($Product['name'],"&ÁÉÍÓÚ"," áéíóú")))."</title>\n"
. "".strtr($Product['manufacturer_name'],"&"," ")."\n"
. "new\n"
. "<![CDATA[".$Product['description']."]]>\n"
. "$expire_date\n"
. "".$Product['reference']."\n";
. "".$Product['ean13']."\n";

Thank very much for your help !
Gérard

Share this post


Link to post
Share on other sites

Thank you very much.

I use your cron script to my version 0.7.3.5 now, it's perfect very simple to install on php file.

Thank you again ;)

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.

×
×
  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More