Magento Forum

   
Export Module for Google Base
 
seudo
Guru
 
Avatar
Total Posts:  344
Joined:  2008-04-21
 

@speedyss - Looks like the culprit is the brand code at line 34. By default Magentos “brand” attribute code is “manufacturer” so simply change it like so:

$brand $attributes['manufacturer']->getFrontend()->getValue($_product);
Worked for me!

 
Magento Community Magento Community
Magento Community
Magento Community
 
[db] DigitalBlueprint
Member
 
Avatar
Total Posts:  37
Joined:  2007-10-11
Eastbourne, UK
 

Thanks suedo, you got there just as I was typing my answer up!

I did a little testing using manufacturer the same way you described there but it’s bringing errors up in my store, probably due to manufacturer not always being used and not being displayed on the frontend of the site - something else to watch out for.

 
Magento Community Magento Community
Magento Community
Magento Community
 
seudo
Guru
 
Avatar
Total Posts:  344
Joined:  2008-04-21
 

@db - Thanks for the bit of code.

 
Magento Community Magento Community
Magento Community
Magento Community
 
ryanb
Sr. Member
 
Total Posts:  91
Joined:  2008-02-15
 

Hey everyone—after we installed 1.1.3 the image URLs and URL keys stopped working. Now the simple url indicated in the data feed http://www.lightingsale.com/s/a/savoyhouse-kpss116669.jpg does not seem to work anymore. It will load in Firefox but not internet explorer. It is like there is a URL redirect.

Another problem is the direct link to the product no longer works. http://www.lightingsale.com/savoy-house-kp-ss-116-6-69.html no longer takes you to the product for example. You have to goto http://www.lightingsale.com/catalog/product/view/id/44773/s/savoy-house-kp-ss-116-6-69/

There is no list of these URLs output when you export—so there is no way to generate links to the products. You can even build a list because the product ID numbers are also not exported.

This is a problem for us because all of our product data feeds will not work with new products. For some reason the old products that we already had in before the upgrade still work.

 
Magento Community Magento Community
Magento Community
Magento Community
 
speedyss
Jr. Member
 
Total Posts:  24
Joined:  2008-07-02
 

Thanks for the code. The first version is semi working.

I want to display all products regardless if they are enabled, disabled, or whatever the visibility. So, I deleted the

$products->addAttributeToFilter('status'1);
        
$products->addAttributeToFilter('visibility'4);

But then I only get 1 product which is displayed…

Any ideas why this might be the case?

EDIT:

Another problem. In my store when i filter the products which are set as ‘Catalog, Search’ and visibility set as ‘Enabled’ there are 62 records. But the script only seems to find 5 - and those 5 are the first five i added on the catalogue (when I started adding products to the store).

I am running only the main store and all configurations are as standard…

I am trying to look in the script where there might be a fault, in case some one else finds post it here!

 
Magento Community Magento Community
Magento Community
Magento Community
 
SP Gear
Jr. Member
 
Avatar
Total Posts:  10
Joined:  2008-05-30
Martinez, CA
 

Any word from the Magento team on this.  Google Base is pretty important for bringing in customers to my store.

Also, I tried using the code posted here but the PHP file doesn’t seem to work with 1.1.3 for some reason.  Anyone else experience the same problem?

-b

 
Magento Community Magento Community
Magento Community
Magento Community
 
wsj3
Guru
 
Avatar
Total Posts:  521
Joined:  2008-07-13
Portland, OR
 

Is it possible someone could outline a step-by-step instructions for the best way to export a feed for googlebase. I’ve read through this thread and there is quite a bit of jumping around. The community I’m sure would highly value a simple outline of steps.

Thanks.

 
Magento Community Magento Community
Magento Community
Magento Community
 
wsj3
Guru
 
Avatar
Total Posts:  521
Joined:  2008-07-13
Portland, OR
 

Can someone just confirm that these script does not work with 1.1.3? I have been exporting the .txt and it’s rejected every time by Googlebase. Any insight would be great.

Thanks.

 
Magento Community Magento Community
Magento Community
Magento Community
 
restos
Sr. Member
 
Total Posts:  79
Joined:  2008-05-10
 

I use 1.1.4 and script do not works

 
Magento Community Magento Community
Magento Community
Magento Community
 
seudo
Guru
 
Avatar
Total Posts:  344
Joined:  2008-04-21
 

@wsj3 - I am using 1.1.4 and it exports a tab delimited page, but I can only bring up a few products and its the same exact products each time even though I have a lot more. I have not got as far as creating a google base scheduled feed as I am trying to get the feed to export all my visible and instock products first.

@restos - have you changed ‘brand’ to ‘manufacturer’?

 
Magento Community Magento Community
Magento Community
Magento Community
 
wsj3
Guru
 
Avatar
Total Posts:  521
Joined:  2008-07-13
Portland, OR
 

seudo?, Thanks for the reply. Can you clarify on these points

You are genearting the catalog for upload to Googlebase using the php script?
Do you run the script in a browser and then copy it to a .txt file? Do you have to do anything special to ensure that the tabs don’t get stripped?
You then import into googlebase wtihout any pre-formatting and no errors are generated?

It would be very helpful if you can just outline the steps that you go through.

Thanks.

 
Magento Community Magento Community
Magento Community
Magento Community
 
seudo
Guru
 
Avatar
Total Posts:  344
Joined:  2008-04-21
 

@wsj3

You are genearting the catalog for upload to Googlebase using the php script?
No, I am not uploading any files at this time. I am just trying to get the script to create feed with all the visible and in stock items in the store.

Do you run the script in a browser and then copy it to a .txt file? Do you have to do anything special to ensure that the tabs don’t get stripped?
No, I dont run the script. The script will be accessed by google via the URL to my file. This is set up as a scheduled feed in google, but currently I do not have the google scheduled feed set up. No I don’t have to do anything special as google looks at this file as a feed file and it should be seen as only text to it.

You then import into googlebase wtihout any pre-formatting and no errors are generated?
I don’t have the google feed setup yet. But there should be no importing once a scheduled google feed is setup. It should read it and apply it to its database.

See this link: Scheduling

I hope this helps.

 
Magento Community Magento Community
Magento Community
Magento Community
 
restos
Sr. Member
 
Total Posts:  79
Joined:  2008-05-10
 

I´ve created a new advance profile with this data:

</action>

<
action type="catalog/convert_parser_product" method="unparse">
    <var 
name="store"><![CDATA[0]]></var>
</
action>

<
action type="dataflow/convert_mapper_column" method="map">
    <var 
name="map">
        <
map name="sku"><![CDATA[id]]></map>
        <
map name="name"><![CDATA[title]]></map>
        <
map name="short_description"><![CDATA[description]]></map>
        <
map name="price"><![CDATA[price]]></map>
        <
map name="thumbnail"><![CDATA[image_link]]></map>
        <
map name="url_path"><![CDATA[link]]></map>
    </var>
    <var 
name="_only_specified">true</var>
</
action>

<
action type="dataflow/convert_parser_csv" method="unparse">
    <var 
name="delimiter"><![CDATA[\t]]></var>
    <var 
name="enclose"><![CDATA[]]></var>
    <var 
name="fieldnames">true</var>
</
action>

<
action type="dataflow/convert_adapter_io" method="save">
    <var 
name="type">file</var>
    <var 
name="path">var/export</var>
    <var 
name="filename"><![CDATA[google_products.tsv]]></var>
</
action>

I use Magento 1.1.4 and not works for me.

When I run this profile I get:

There has been an error processing your request.

Notice: Undefined index:  default in
/chroot/home/xxxxxxxxxxxxx/html/app/code/core/Mage/Dataflow/Model/Convert/Profile/Collection.php on line 79

#0 /chroot/home/xxxxxxxx/html/app/code/core/Mage/Dataflow/Model/Convert/Profile/Collection.php(79): mageCoreErrorHandler(8, ‘Undefined index...’, ‘/chroot/home/me...’, 79, Array)
#1 /chroot/home/xxxxxxx/html/app/code/core/Mage/Dataflow/Model/Profile.php(132): Mage_Dataflow_Model_Convert_Profile_Collection->getProfile(’default’)
#2 /chroot/home/xxxxxx/html/app/code/core/Mage/Adminhtml/Block/System/Convert/Profile/Run.php(75): Mage_Dataflow_Model_Profile->run()
#3 /chroot/home/xxxxxxx/html/app/code/core/Mage/Core/Block/Abstract.php(636): Mage_Adminhtml_Block_System_Convert_Profile_Run->_toHtml()

etc.

 
Magento Community Magento Community
Magento Community
Magento Community
 
turbo1
Sr. Member
 
Avatar
Total Posts:  296
Joined:  2008-08-19
Los Angeles, CA
 

Thanks to everyone who posted their code samples. You’ve been a lot more helpful than hyteckit. Sorry, but he doesn’t seem to understand the concept of open source and community.  oh oh

 
Magento Community Magento Community
Magento Community
Magento Community
 
turbo1
Sr. Member
 
Avatar
Total Posts:  296
Joined:  2008-08-19
Los Angeles, CA
 

LOL  point taken. I do truly believe that if you know how to do something & are taking advantage of other people’s free help, you should also contribute for free to the community. I believe in freedom of information.  I’m actually in the process of hiring a developer to write a Google Base PHP script for me, and I will post it for free. Why? Because that’s the right thing to do.. because it will help others.. because I would be an ass to keep it secret for myself.  grin

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
    Back to top