Skip to content

Commit bfcc7fd

Browse files
PSR-2
1 parent 7bb2738 commit bfcc7fd

2 files changed

Lines changed: 11 additions & 7 deletions

File tree

controllers/admin/AdminGanalyticsAjax.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,8 @@ public function init()
3232
{
3333
$order = new Order((int)Tools::getValue('orderid'));
3434
$context = Context::getContext();
35-
if (Validate::isLoadedObject($order) && (isset($context->employee->id) && $context->employee->id)) {
35+
if (Validate::isLoadedObject($order) && (isset($context->employee->id) && $context->employee->id))
36+
{
3637
Db::getInstance()->execute('
3738
UPDATE `'._DB_PREFIX_.'ganalytics` SET sent = 1, date_add = NOW() WHERE id_order = '.(int)Tools::getValue('orderid')
3839
);

ps_googleanalytics.php

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -383,9 +383,12 @@ public function hookdisplayHome()
383383
if ($this->isModuleEnabled('ps_featuredproducts')) {
384384
$category = new Category($this->context->shop->getCategory(), $this->context->language->id);
385385
$home_featured_products = $this->wrapProducts(
386-
$category->getProducts((int)Context::getContext()->language->id,
387-
1,
388-
(Configuration::get('HOME_FEATURED_NBR') ? (int)Configuration::get('HOME_FEATURED_NBR') : 8), 'position'),
386+
$category->getProducts(
387+
(int)Context::getContext()->language->id,
388+
1,
389+
(Configuration::get('HOME_FEATURED_NBR') ? (int)Configuration::get('HOME_FEATURED_NBR') : 8),
390+
'position'
391+
),
389392
array(),
390393
true
391394
);
@@ -588,9 +591,8 @@ public function addProductFromCheckout($products)
588591
public function hookdisplayFooterProduct($params)
589592
{
590593
$controller_name = Tools::getValue('controller');
591-
if ($controller_name == 'product')
594+
if ($controller_name == 'product')
592595
{
593-
594596
// Add product view
595597
$ga_product = $this->wrapProduct((array)$params['product'], null, 0, true);
596598
$js = 'MBG.addProductDetailView('.Tools::jsonEncode($ga_product).');';
@@ -704,7 +706,8 @@ public function hookactionProductCancel($params)
704706
array(
705707
'id' => empty($order_detail->product_attribute_id)?$order_detail->product_id:$order_detail->product_id.'-'.$order_detail->product_attribute_id,
706708
'quantity' => $qty)
707-
).');';
709+
)
710+
.');';
708711
}
709712
$this->context->cookie->ga_admin_refund = $ga_scripts.'MBG.refundByProduct('.Tools::jsonEncode(array('id' => $params['order']->id)).');';
710713
}

0 commit comments

Comments
 (0)