News:

Looking for documentation? Take a look on our wiki

Main Menu

Integration of Google Certified Shop

Started by Holger, January 04, 2017, 15:03:34 PM

Previous topic - Next topic

Holger

Is anybody using Google Certified Shop with Virtuemart 2.0.22 and can give me the code snippet for integration?
I try it since hours, but with no success.
I tried to integrate in order_done.php. For example for the order number with
echo '<span id="gts-o-id">';
echo $order['details']['BT']->order_number;
echo '</span>';

but the resulting SPAN is empty.
Maybe anybody has a hint, what is wrong.

Thanks
Holger

Studio 42

Try a var_dump($order), i think it not exist, so perhaps $this->order work ?

Holger

Thanks for answer, but i'm sorry, i don't know what i have to change. My PHP knowledge is very weak.
Can you give a code snippet, please?

Thanks
Holger

Studio 42

Sorry, it's a little long to do it.
But here you have the way to do it : https://www.google.co.uk/intl/en/retail/certified-shops/get-started/
You need to implement the badge code and the  order confirmation module code
badge code is for your whole shop (easy way is to modify the template) and  order confirmation module code is in order_done.php file.
And remember that VM2.0.22 is a very old release so perhaps it's better for you to upgrade VM+Joomla to have no hacking problem in Vm and Joomla.

jenkinhill

Kelvyn
Lowestoft, Suffolk, UK

Retired from forum life November 2023

Please mention your VirtueMart, Joomla and PHP versions when asking a question in this forum

Holger

Thanks, i know the way for integration. The badge is working. The problem is only the filling of the order confirmation module...

Studio 42

Try
var_dump($order);
var_dump($this->order);
jexit();

to check what is correct and you get all values displayed in the order object

Holger

Thanks, i tried, but i only get NULL NULL as answer.

Studio 42

sorry, but i cannot check in vm2.0.22, perhaps this value only exist in vm 2.6+