Post by olstar » Fri Nov 04, 2011 8:59 pm

Hello,

Bloody google base and its constant changing!

A site we did running 1.5.1 had google base errors due to availability bit missing...

I simply went into;

/public_html/catalog/controller/feed/google_base.php

And added this in;

$output .= '<g:quantity>' . $product['quantity'] . '</g:quantity>';
$output .= '<g:upc>' . $product['upc'] . '</g:upc>';
$output .= '<g:weight>' . $this->weight->format($product['weight'], $product['weight_class_id']) . '</g:weight>';
$output .= '<g:availability>in stock</g:availability>'; <- this bit
$output .= '</item>';

Its not mega detailed, but it works!

HTH

Professional UK Based eCommerce - Our Free Opencart Mods - Our Premium Opencart Mods
Kashflow Integration


User avatar
New member

Posts

Joined
Tue Jul 05, 2011 3:53 pm


Post by Qphoria » Fri Nov 04, 2011 10:45 pm

Try
1. EDIT: catalog/controller/feed/google_base.php

2. FIND:

Code: Select all

$output .= '<g:weight>' . $this->weight->format($product['weight'], $product['weight_class_id']) . '</g:weight>'; 
3. AFTER, ADD:

Code: Select all

$output .= '<g:availability>' . ($product['quantity'] ? 'in stock' : 'out of stock') . '</g:availability>'; 
Added to the core

Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

User avatar
New member

Posts

Joined
Tue Jul 05, 2011 3:53 pm


Post by olstar » Wed Nov 09, 2011 1:08 am

You should totally make me a "contributer" to OC now 8)

O0

Professional UK Based eCommerce - Our Free Opencart Mods - Our Premium Opencart Mods
Kashflow Integration


User avatar
New member

Posts

Joined
Tue Jul 05, 2011 3:53 pm


Post by aaamusements » Sun Dec 11, 2011 4:36 am

Many thanks for this - works perfectly!
8)

Gamucci Electronic Cigarette Opencart Shop


New member

Posts

Joined
Fri Sep 23, 2011 4:14 am


Post by JArlington » Sat Dec 31, 2011 6:17 am

Works perfect - thanks for the quick fix.

User avatar
Newbie

Posts

Joined
Tue Mar 01, 2011 5:56 pm


Post by poolaidman » Tue Jan 03, 2012 8:49 am

I am a noob , what is the core code?? how would someone like me find it? Thank you so much I have the newest version also in case you needed to know

Newbie

Posts

Joined
Tue Jan 03, 2012 8:44 am

Post by aaamusements » Mon Jan 09, 2012 9:46 pm

I think it means it's been added into new Opencart versions (into the core files of the system).
So it will be included when there is an updated version, but may not be in the current one - someone else will need to confirm that.

Gamucci Electronic Cigarette Opencart Shop


New member

Posts

Joined
Fri Sep 23, 2011 4:14 am

Who is online

Users browsing this forum: No registered users and 1 guest