[Module] Froogle Static export

Modules, Add-ons and custom code that's more than just a quick hack or Mod.
sina3136
Posts: 1
Joined: Sun Nov 15, 2009 3:38 pm

Re: [Module] Froogle Static export

Post by sina3136 »

Hi

Do it support Google Merchant Center ? Have any update for it ? Thanks.
Martin
Site Admin
Site Admin
Posts: 1854
Joined: Wed Jun 17, 2009 6:30 pm
Location: South Yorkshire UK
Contact:

Re: [Module] Froogle Static export

Post by Martin »

sina3136 wrote:Hi

Do it support Google Merchant Center ? Have any update for it ? Thanks.
It should work with Google Merchant center (it's the same ruddy thing as Froogle, Google Base, etc... bloody name changing marketing idiots @ Google).

No time to provide updates at the moment but from looking at my own google feed it seems to be fine...
ryanSF
Posts: 2
Joined: Tue Dec 15, 2009 10:11 pm

Re: [Module] Froogle Static export

Post by ryanSF »

Hi Martin - Great contribution here. I'm looking to see if I can get some help with an export similar to this one, but that spits out a CSV file. Can you PM/email me?
Martin
Site Admin
Site Admin
Posts: 1854
Joined: Wed Jun 17, 2009 6:30 pm
Location: South Yorkshire UK
Contact:

Re: [Module] Froogle Static export

Post by Martin »

ryanSF wrote:Hi Martin - Great contribution here. I'm looking to see if I can get some help with an export similar to this one, but that spits out a CSV file. Can you PM/email me?
Hi Ryan,

I'd love to be able to help but my time is currently incredibly limited due to a newborn, lack of sleep and too many other jobs that need doing.. A CSV should be relatively simple to achieve though if you simply remove the headers and footers and implode the item values (without headers/labels) into single lines with a line return \n or \r at the end...

Hope that helps...
ryanSF
Posts: 2
Joined: Tue Dec 15, 2009 10:11 pm

Re: [Module] Froogle Static export

Post by ryanSF »

Martin wrote:
ryanSF wrote:Hi Martin - Great contribution here. I'm looking to see if I can get some help with an export similar to this one, but that spits out a CSV file. Can you PM/email me?
Hi Ryan,

I'd love to be able to help but my time is currently incredibly limited due to a newborn, lack of sleep and too many other jobs that need doing.. A CSV should be relatively simple to achieve though if you simply remove the headers and footers and implode the item values (without headers/labels) into single lines with a line return \n or \r at the end...

Hope that helps...

Thanks for the reply. You lost me as I'm not a developer. I'm trying to find someone (like yourself) who is well versed exports for ISC.


EDIT - I'm giving your code to one of my developers to see if he can figure it out. Thanks!
grantg
Posts: 112
Joined: Thu Oct 08, 2009 11:01 am

Re: [Module] Froogle Static export

Post by grantg »

Anyone having problems with their Google Base feed intermittently missing out product images? Here's an example:

Shop for MGM Ascot Coffee Table - Google Base

The Coffee Table has an image, the Suite does NOT have an image. BUT...

MGM Ascot Conservatory Furniture - all products DO have images.

I looked at the Google Base export file...the Ascot suite doesn't even have an image referenced?!
Cupar Garden Centre: CS-Cart Professional 2.2.5 (Converted from ISC 6.0.14 Ultimate)
Online Garden Centre: ISC 6.0.14 Professional
grantg
Posts: 112
Joined: Thu Oct 08, 2009 11:01 am

Re: [Module] Froogle Static export

Post by grantg »

Update: I have found the fix.

I have no idea why this broke - the feed worked perfectly in 5.0.6. I have compared a 5.0.6 to a 5.5.2 database...

In 5.0.6, where the product only had one image, the 'imagesort' value (isc_product_images) would be '1' - for some strange reason (completely randomly!), the upgrade to 5.5.2 has changed some values (imagesort) to '0' - so although the product shows an image, the feed must be looking for '1' as the base product image.

This is the pattern I have determined - I have just run the SQL to update to '1', and have scheduled Google Base to have a bash at the new feed at 2pm - hopefully this will now show images for every product now.

I have also noticed Google Base reports a lot of errors on products where the ability to buy online has been disabled (these products are still in the feed - why?!) or the product fields contains a £ sign (except the price fields)...I thought these character issues had been fixed in 5.0.6 :shock:
Cupar Garden Centre: CS-Cart Professional 2.2.5 (Converted from ISC 6.0.14 Ultimate)
Online Garden Centre: ISC 6.0.14 Professional
CharlieFoxtrot
Confirmed
Confirmed
Posts: 413
Joined: Sun Aug 09, 2009 1:23 pm

Re: [Module] Froogle Static export

Post by CharlieFoxtrot »

One quick mod that I made to this module:

In line 135:

Code: Select all

$desc = strip_tags($row['proddesc']);
I changed it to:

Code: Select all

$desc = strip_tags($row['prodmetadesc']);
The reason for this is because the description field for MANY (if not most) of my items do not include any human-readable descriptive text. Instead the "proddesc" field contains an "include" statement that causes ISC to automatically fetch-and-insert an external html document that is displayed to customers as the product description.

For example... my product description would be:

Code: Select all

%%Include._myvendors/vendorName/productDetails.html%%
Somtimes the included html file is the ONLY description for the product. Other times, the included html is just some commonly-used introduction text. ~~ For my purposes, this allows me to have a neatly formatted description that can be easily changed or updated (and any changes will apply globally to every product that uses it as an "include" file).

The disadvantage of using "includes" in this manner is that the %%Include...%% command that appears in the "proddesc" field also appears in the exported file. This information is not appropriate for a product feed.

I did not want to give up the convenience of using %%Include.%%" statements, so I edited the module to retrieve a plain-text human-readable description from the "prodmetadesc" field instead.

Drawbacks: You have to remember to type in a concise but complete description in the MetaDescription field. But after you get into a routine, it shouldn't be too difficult. ~~ Or, you'll have to edit any existing Meta Description info so that it's more appropriate to be used as the primary description in the product feed.

To make things easier for me, I plan on rearranging some fields on the ISC "Edit Product" page. I'd like to move the "MetaDescription" field from the "Other Details" tab, and put it right up front on the "Product Details" tab.

Moving this field to the first tab will give me quick access with less clicking, and I can easily glance at the field to make sure something is there. (For now, this is a low-priority project, so I'll just continue to click the "Other Details" whenever I need to edit the MetaDescription data.)

Okay, that's all. Just thought I'd share...

Charlie

PS: Martin, thank you very much for this!
ISC 4.0.7

"... and let's be honest that whole "by design" thing is getting old too."
CharlieFoxtrot
Confirmed
Confirmed
Posts: 413
Joined: Sun Aug 09, 2009 1:23 pm

Re: [Module] Froogle Static export

Post by CharlieFoxtrot »

Some Mods/Hacks I Recently Added:

UPDATE SUPPORT INFO
IN FILE: Readme.txt

Search For:

Code: Select all

Support:
========
http://www.interspired.net/forum/viewtopic.php?f=12&t=46
Replace With:

Code: Select all

Support:
========
http://www.shoppingcartcommunity.net/forum/viewtopic.php?f=12&t=46

WEIGHT UNITS

Google assumes "pounds" unless you specify differently. If your cart is configured to indicate an item's weight in ounces, then you need to include the weight unit in the <g:weight> XML tag.

IN FILE: class.froogle.php
Search For:

Code: Select all

/* ==== Configurable variables ==== */
Insert AFTER that:

Code: Select all

// The site's the default weight unit 
$weightUnit = "ounces";
Next... Search For:

Code: Select all

// Addition of weight variable if available
if($row['prodweight'] > 0) {
	$entry[] = sprintf("<g:weight>%s</g:weight>", floatval($row['prodweight']));
}
EDIT TO BE:

Code: Select all

// Addition of weight variable if available
if($row['prodweight'] > 0) {
	$entry[] = sprintf("<g:weight>%s $weightUnit</g:weight>", floatval($row['prodweight']));
}

PAYMENT TYPES ACCEPTED

A (new?) attribute allows you to specify the type of payment/s you accept. You'll make two changes.

IN FILE: class.froogle.php
Search For:

Code: Select all

/* ==== Configurable variables ==== */
Insert AFTER that:

Code: Select all

// Accepted payment types array. Edit as needed.
$paymentAccepted = array("Visa", "MasterCard", "Discover", "American Express", "Cash", "Checks", "Cheques", "Money Orders");
Search For:

Code: Select all

$entry[] = sprintf("<g:condition>new</g:condition>");
Insert AFTER that:

Code: Select all

// Payment methods accepted
foreach($paymentAccepted as $payType) {
	$entry[] = sprintf("<g:payment_accepted>$payType</g:payment_accepted>");
}

CUSTOM ATTRIBUTE

The following link shows a complete list of all valid Google product attributes. It appears that "<g:department>" is no longer used. http://www.google.com/support/merchants ... wer=160085

However, the "<g:department>" attribute can be edited slightly so that it becomes as a valid *custom* attribute. Here is a link with more information about custom attributes: http://www.google.com/support/merchants ... 0602&hl=en

IN FILE: class.froogle.php
Search For:

Code: Select all

$entry []= sprintf("<g:department><![CDATA[%s]]></g:department>", isc_html_escape($row['catname']));
Replace With:

Code: Select all

$entry []= sprintf("<c:department:string><![CDATA[%s]]></c:department:string>", isc_html_escape($row['catname']));

edit: formatting/clarity
Last edited by CharlieFoxtrot on Wed Sep 08, 2010 2:46 pm, edited 1 time in total.
ISC 4.0.7

"... and let's be honest that whole "by design" thing is getting old too."
Martin
Site Admin
Site Admin
Posts: 1854
Joined: Wed Jun 17, 2009 6:30 pm
Location: South Yorkshire UK
Contact:

Re: [Module] Froogle Static export

Post by Martin »

Nice... Particularly like the first edit ;)
Post Reply