New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Only cast as array when a product is returned #14

merged 1 commit into from Oct 1, 2018
File filter...
Filter file types
Jump to file or symbol
Failed to load files and symbols.
+4 −1
Diff settings


Just for now

Copy path View file
@@ -676,8 +676,11 @@ public function hookdisplayFooterProduct($params)
$controller_name = Tools::getValue('controller');
if ($controller_name == 'product')
if ($params['product'] instanceof Product) {
$params['product'] = (array) $params['product'];
// Add product view
$ga_product = $this->wrapProduct((array)$params['product'], null, 0, true);
$ga_product = $this->wrapProduct($params['product'], null, 0, true);
$js = 'MBG.addProductDetailView('.json_encode($ga_product).');';
if (isset($_SERVER['HTTP_REFERER']) && strpos($_SERVER['HTTP_REFERER'], $_SERVER['HTTP_HOST']) > 0) {
ProTip! Use n and p to navigate between commits in a pull request.