Post by Zarco » Tue Mar 04, 2014 3:43 am

Hello !

I'm triying to do something but I can't... I hope somebody can help me !!

I've recibed an e-mail from Google where they tell me that the images I'm sending in the feed for Google Merchant Center, are inapropiated images...??? I call to Google support service and they tell me that they are wrong becouse I'm including the Product Brand in the image of the product and this is not allowed in google contitions policy.

I do not want to change this... becouse I want people in my shop can identify easy the brand of each of the products... but I also want to continue appearing in google shopping, becouse is a good deal, so the option I have thinked is to asign to the google feed, the second image of the product, and use the same image, totaly clean, without any brands, or marketing text...

I've been looking the file "google_base.php" and I think the code I have to modify is the following:

Code: Select all

   if ($product['image']) {
                      $output .= '<g:image_link>' . $this->model_tool_image->resize($product['image'], 500, 500) . '</g:image_link>';
Only need to know how to modify it... jajajaja... :laugh: please, anyone can help me !!!

Tanks a lot !!
Last edited by Zarco on Wed Mar 12, 2014 3:02 am, edited 1 time in total.

New member

Posts

Joined
Mon Jul 18, 2011 6:42 am

Post by jgsw » Tue Mar 04, 2014 4:05 am

Hellp Zarco,

you could try adding this before the code that you posted ...

Code: Select all

$additionalimages = $this->model_catalog_product->getProductImages($this->request->get[$product['product_id']]);

if (isset($additionalimages[0])) {
	$product['image'] = $additionalimages[0];
}
It's untested but is should be allong the right lines.

jgsw

Quick Edit Admin Panel (40% off!) - CSS Unique (only $10!)
Sticky Admin Menu (Free) - Add Scripts & Styles to head (Free)


Active Member

Posts

Joined
Sat Mar 16, 2013 3:13 am

Post by Zarco » Fri Mar 07, 2014 3:13 am

Many thanks jgsw !!

I've tried it but I'm afraid it doesn't work... Still appear the normal image to google shoopping products, not the second image as I want !!

Any idea what could be wrong ??

Thanks

New member

Posts

Joined
Mon Jul 18, 2011 6:42 am

Post by jgsw » Tue Mar 11, 2014 7:58 pm

Hi Zarco, It could e that google has cached your images. If you manually browse to your feed url are the file paths to the 2nd image?

jgsw

Quick Edit Admin Panel (40% off!) - CSS Unique (only $10!)
Sticky Admin Menu (Free) - Add Scripts & Styles to head (Free)


Active Member

Posts

Joined
Sat Mar 16, 2013 3:13 am

Post by Zarco » Tue Mar 11, 2014 9:24 pm

Hi jgsw !

No ... it still appear the main image... and if I change the main image, it really changes in the google feed, so I supose it still assign the main image istead of the second.

Thanks

New member

Posts

Joined
Mon Jul 18, 2011 6:42 am

Post by jgsw » Tue Mar 11, 2014 11:03 pm

Zarco,

this is what you need, tested and working :)

Code: Select all

			$additionalImages = $this->model_catalog_product->getProductImages($this->request->get['product_id']);
			
			if (isset($additionalImages[0]['image'])) {
				$product['image'] = $additionalImages[0]['image'];		
			}
paste it before

Code: Select all

			if ($product['image']) {
jgsw

Quick Edit Admin Panel (40% off!) - CSS Unique (only $10!)
Sticky Admin Menu (Free) - Add Scripts & Styles to head (Free)


Active Member

Posts

Joined
Sat Mar 16, 2013 3:13 am

Post by Zarco » Tue Mar 11, 2014 11:56 pm

I'm really sorry... but still doesn't work for me !
I changed the code and tried but the images do not change...
I try to change the main image to test, and it changes... so still is assigned the main image.

I think I should be doing something wrong !
The file I have modified is "catalog/controller/feed/google_base.php "
Is right ??
And I'm using Version 1.4.9.5 of opencart.

Thank you soo much for all your effort !

New member

Posts

Joined
Mon Jul 18, 2011 6:42 am

Post by jgsw » Wed Mar 12, 2014 1:11 am

How about this Zarco...

Code: Select all

$additionalImages = $this->model_catalog_product->getProductImages($product['product_id']);
         
if (isset($additionalImages[0]['image'])) {
   $product['image'] = $additionalImages[0]['image'];      
}
jgsw

Quick Edit Admin Panel (40% off!) - CSS Unique (only $10!)
Sticky Admin Menu (Free) - Add Scripts & Styles to head (Free)


Active Member

Posts

Joined
Sat Mar 16, 2013 3:13 am

Post by Zarco » Wed Mar 12, 2014 3:01 am

Yeeessss !!!

Is working good know !!

Soo many thanks jgsw... I've no words to thanks your help !!!!

Great job

New member

Posts

Joined
Mon Jul 18, 2011 6:42 am

Post by jgsw » Wed Mar 12, 2014 4:22 am

No problem man! good luck with google base...

jgsw

Quick Edit Admin Panel (40% off!) - CSS Unique (only $10!)
Sticky Admin Menu (Free) - Add Scripts & Styles to head (Free)


Active Member

Posts

Joined
Sat Mar 16, 2013 3:13 am
Who is online

Users browsing this forum: No registered users and 94 guests