[PAID] Google Merchant Static Feed

Modules, Add-ons and custom code that's more than just a quick hack or Mod.
Martin
Site Admin
Site Admin
Posts: 1854
Joined: Wed Jun 17, 2009 6:30 pm
Location: South Yorkshire UK
Contact:

Re: [PAID] Google Merchant Static Feed

Post by Martin »

busi6292 wrote:Anyhow, I wonder if you can help with the following? Perhaps you can add this to your next revision. I'm quite confident that the more optional fields that are added, the better your rank within Google Shopping.

We had a developer add the following to the admin/includes/classes/class.froggle.php file:

Find:

Code: Select all

private $brandExceptShow = array();
After, Add:

Code: Select all

	private $accepted_payment_types;
	private $location;
	private $pickup;

Find:

Code: Select all

		$this->defaultCondition = 'new';
		//$this->defaultCondition = 'used';
After, Add:

Code: Select all

		$this->accepted_payment_types = array('Visa','Mastercard','Check','Discover','Wire Transfer','Cash');
		$this->location = 'Our address, United Kingdom';
		$this->pickup = 'true';

Find:

Code: Select all

				$this_product['data'] = $entry;
Before, Add:

Code: Select all

		foreach($this->accepted_payment_types as $pt_key=>$pt_value){
			$entry[]= "<g:payment_accepted><![CDATA[".$pt_value."]]></g:payment_accepted>";
		}

		array_merge($entry, array(
				'g:location' => $this->location,
				'g:pickup' => $this->pickup)
			);
Would you be able to tell me/us where we can add the above to your class.froogle.php file please?
See the above... :)

It's untested, but I believe that would work, or at least give your developer a clue as to how to impliment it.

Few other issues we have. GBP is our main currency, so the UK file exports fine but with the US and Australia feed the URL becomes:

http://www.domain.co.uk/[b]products.php ... rrencyId=4

Is it possible for it to become the following like the original ISC one:

http://www.domain.co.uk/product-url-her ... rrencyId=3
At present, no... Interspires SEO code rewriting is frankly, cr*p and causes problems with Google when it tries to spider/check the links. The fudge in the current code is the only way to stop it failing at present.

Finally, can we add the MPN (manufacture's part number) into the file too? Code we have is:

Code: Select all

		if($row['prodcode']) {
			$entry['g:mpn'] = isc_html_escape($row['prodcode']);
		}
It's already in there...

The code will look for a custom field called "mpn" (lowercase) and use that if it exists
If it doesn't exist it then checks for a ProdCode (SKU) value and uses that IF ShowProductSKU is enabled in the ISC > Admin > Display configuration.

If you want to override the latter to show the ProdCode irrespective of the Admin setting then you currently need to edit this line as follows:

Find:

Code: Select all

elseif($row['prodcode'] && $GLOBALS['ISC_CFG']['ShowProductSKU']) {
Replace with:

Code: Select all

//elseif($row['prodcode'] && $GLOBALS['ISC_CFG']['ShowProductSKU']) {
elseif($row['prodcode']) {
You might already have some of these features on the agenda for the next several months but these I'm sure would help us and others, though I'm sure would be time consuming:

- Shipping cost added (as weights are exported, perhaps you could integrate your Royal Mail module into the feed too?)
This is already in the current development code and is waiting for the tax information to be included before it goes for a release.
- Variations added (as Google now seem to support them)
This will depend entirely on how feasible it will be to redirect to a specific variation combination using a URL.
- Google product category added and a way in admin to apply Google's taxonomy to each of our products
As it's going to be a requirement I'll be looking at how to achieve this one... No idea on ETA though.
- Additional images added to feed, if applicable
- 'online_only;' attribute added
Will look at these.



Hope that helps with your various queries... Let me know how the code gets on above though.
busi6292
Posts: 54
Joined: Thu Aug 13, 2009 1:27 am

Re: [PAID] Google Merchant Static Feed

Post by busi6292 »

Thanks for the reply Martin.

We managed to fix the URL issue by doing the following:

Changing...

Code: Select all

			if(isset($curID) && !empty($curID)) {
				$currencyTag = "setCurrencyId=".$curID;
			}
To:

Code: Select all

			if(isset($curID) && !empty($curID)) {
				$currencyTag = ".html?setCurrencyId=".$curID;
			}
And also changing:

Code: Select all

										$link = sprintf("%s/products.php?product=%s", GetConfig('ShopPathNormal'), MakeURLSafe($row['prodname']));
					$link .= "&".$currencyTag;
To:

Code: Select all

										$link = sprintf("%s/products/%s", GetConfig('ShopPathNormal'), MakeURLSafe($row['prodname']));
					$link .= "".$currencyTag;
We tried the code changes you recommended and it has worked.

All ready to pass it over to Google now for the automation! Thanks again for your help.
Martin
Site Admin
Site Admin
Posts: 1854
Joined: Wed Jun 17, 2009 6:30 pm
Location: South Yorkshire UK
Contact:

Re: [PAID] Google Merchant Static Feed

Post by Martin »

Thanks for sharing that solution back... unfortunately it doesn't account for those folks who don't have SEO enabled so I'll need to adapt it slightly but still a useful pointer to fixing the issue.

EDIT:
Actually having looked at the code and what should be going on in there I'm a bit confused as to how your solution is working... From what I can see the system should be outputting a .html already on the URl so using your solution would end up breaking it.

Can I ask which version of ISC you are using? That might have some bearing in there somewhere.
Martin
Site Admin
Site Admin
Posts: 1854
Joined: Wed Jun 17, 2009 6:30 pm
Location: South Yorkshire UK
Contact:

Re: [PAID] Google Merchant Static Feed

Post by Martin »

Ok... had a look at your fix and my code and messed about a bit and came up with this:

Ignoring your fix, dial back to the original version of class.froogle.php and modify as follows:

Find:

Code: Select all

					// Force a non-SEO link
					$link = sprintf("%s/products.php?product=%s", GetConfig('ShopPathNormal'), MakeURLSafe($row['prodname']));
					$link .= "&".$currencyTag;
Replace with:

Code: Select all

					if(@$this->force_nonseo) {
						// Force a non-SEO link
						$link = sprintf("%s/products.php?product=%s", GetConfig('ShopPathNormal'), MakeURLSafe($row['prodname']));
						$link .= "&".$currencyTag;
					}
					else {
						if(!preg_match("/\.htm(l)?$/", $link)) {
							$link .= ".html";
						}
						$plink = parse_url($link);
						// Non SEO
						if(array_key_exists('query', $plink) && !empty($plink['query'])) {
							$link .= "&".$currencyTag;
						}
						else {
							$link .= "?".$currencyTag;
						}
					}

Let me know if this provides a fix that works instead of the one you were using before...
busi6292
Posts: 54
Joined: Thu Aug 13, 2009 1:27 am

Re: [PAID] Google Merchant Static Feed

Post by busi6292 »

I don't believe it works as I've just tried it and the feeds don't generate. I revert back to my change and they do generate. I did of course change the cron times.
Martin
Site Admin
Site Admin
Posts: 1854
Joined: Wed Jun 17, 2009 6:30 pm
Location: South Yorkshire UK
Contact:

Re: [PAID] Google Merchant Static Feed

Post by Martin »

busi6292 wrote:I don't believe it works as I've just tried it and the feeds don't generate. I revert back to my change and they do generate. I did of course change the cron times.
Hmm... If you could generate me a couple of feeds using the "fix" and then a couple without and then zip them up, pop them on a download link and fire over the link (by PM obviously) then I can take a peek and see what might be going on..

Some FTP access would be a plus too if possible... I suspect it's one of those "Have to be there to see it happening (or not)" type deals.
Martin
Site Admin
Site Admin
Posts: 1854
Joined: Wed Jun 17, 2009 6:30 pm
Location: South Yorkshire UK
Contact:

Re: [PAID] Google Merchant Static Feed

Post by Martin »

Getting a lot of questions about September 22nd compliance, via email, so rather than mess about here's a quick FAQ that I'll direct everyone to.

Compliance:
  • Shipping
    This is included in the current development code for 6.1.1 but has not been thoroughly tested, or checked against other ISC versions
    .
  • Category /Google Taxonomy
    The GM <Type> is covered but currently there is no link/selection against the GM type taxonomy which is required for September.
    .
  • Availability
    This is included
    .
  • Brand
    Brand information is included but relies on your Admin CP > Store Settings > Display Brand value.
    Overriding is possible using the $brand_exception variables to show or hide regardless of the setting but due to overwhelming demand I'm going to be including an option to show/hide all brands on GM feed only
    .
  • GTIN/UPC
    This uses:
    - the "upc" field provided (version 5.5.1 ->)
    - any custom field value with the name "upc" (lowercase only) (version 5.5.0 or earlier)
    .
  • MPN
    This has been covered with various mods in the last few pages on this thread but much like GTIN/UPC the MPN uses the following approach:
    - any custom field value with the name "mpn" (lowercase only)
    - the product code (SKU) for any product where "Show product Code/SKU" is set to show, in Admin CP and a code actually exists
    .
  • Product Images
    At present only one image is supported
    .
  • Tax
    This has been looked at VERY briefly and some rough code has been incorporated in, but as yet it's not properly supported.
    .
  • Variations Support
    Because Interspire's own code simply doesn't support direct linking to Variations it requires a massive rethink on how variations can be output and I'm only now starting to get my head around the possible ways to resolve the issue. It is not a small task by any means and will require some careful thought to resolve.
In terms of getting things written in..

It's important to note that the Google Type Taxonomy and Variations requirements will require a complete rewrite of core Interspire functionality to get it included. As you can imagine I never envisaged such a need when I started writing this module and if I had it would have priced considerably higher than it currently is.

I also never envisaged the amount of changes that Google would suddenly decide must be implimented, the timeframe that they would do it in or indeed the complete apathy that Interspire have shown to releasing version 7.x (yes, I should have seen the last one at least!).

Then you add in that my primary eCommerce business, on my own ISC retail site, has been booming way beyond the sensible or expected and this has resulted in a bold move to shift operations to a workshop in late August.

If that wasn't enough I have to cope with a little one who has hit the terrible twos (22 months is apparently the new terrible two's!), and the realisation that my energy reserves are thoroughly depleted. Then there's the usual summer visits to/from family and... well... you get the idea.

The bottom line is that I am looking at spending some time on the code in about 10 days time but I cannot and will not make rash promises about having everything in place in time for the September deadline. I'm going to seriously try because this affects me as much as it does any of the existing customer base but I see no sense in doing an Interspire and promising the moon on a stick, then delivering a toffee apple instead.
Martin
Site Admin
Site Admin
Posts: 1854
Joined: Wed Jun 17, 2009 6:30 pm
Location: South Yorkshire UK
Contact:

Re: [PAID] Google Merchant Static Feed

Post by Martin »

Just to note my grandfather passed away a few days ago and I've had to massively overhaul my plans for visiting family, as well as expansion/move plans so I'm expecting some delays on things.

At this point I'm in a "wait and see" mode for when I've got back to base and sorted out pending order from the retail side of things but the enforced extra stay with family may mean I get my coding work done sooner rather than later so watch this space.
pitorian
Posts: 31
Joined: Mon Aug 17, 2009 9:55 am

Re: [PAID] Google Merchant Static Feed

Post by pitorian »

Hi Martin,

i hope all is well, and you have managed to get back on track.

I have a follow up question if you or one of the other chaps could assist.

In my feed for some reason, its missing tax of the the products, i.e. a product that is taxable, at a price of £20.99 but the feed is reporting the price at 17.49, which is the price if you take the VAT of it, any idea why this is happening?

I never noticed it before, but since Google has identified it on the analysis page, i best try and figure out why its exporting the price without the VAT added.

Thanks

Chris
brian1
Posts: 3
Joined: Fri Apr 29, 2011 5:15 pm

Re: [PAID] Google Merchant Static Feed

Post by brian1 »

Hi Martin,

I hope things are going better for you.

I was wondering if you had any plans to modify this. We could pay for the changes as it seems like a lot of work (paying for a new download or sending an amount via paypal). It looks like the only thing we need added that's required is the "image_link" since taxes can be added in the merchant center I think (I'm not the one who deals with this feed so I could be wrong).

Some other issues I notice from looking at the feed are that there is a <summary> field whereas Google asks for a <description> field. The other issue is that the feed says <link href=""> whereas Google says it should be <link></link>. I don't know if the client is modifying this but I think it's wrong if this is what this program is generating.

Thanks,
Brian.
Post Reply