security update link,module_filters,search_api_solr,ubercart,views
This commit is contained in:
@@ -1,15 +1,14 @@
|
||||
name = Google Analytics for Ubercart
|
||||
description = Adds e-commerce tracking to the Google Analytics module.
|
||||
dependencies[] = googleanalytics
|
||||
dependencies[] = googleanalytics (!=7.x-2.4)
|
||||
dependencies[] = uc_cart
|
||||
dependencies[] = uc_order
|
||||
dependencies[] = uc_store
|
||||
package = Ubercart - extra
|
||||
core = 7.x
|
||||
|
||||
; Information added by Drupal.org packaging script on 2016-07-16
|
||||
version = "7.x-3.10"
|
||||
; Information added by Drupal.org packaging script on 2019-03-06
|
||||
version = "7.x-3.12"
|
||||
core = "7.x"
|
||||
project = "ubercart"
|
||||
datestamp = "1468644909"
|
||||
|
||||
datestamp = "1551862392"
|
||||
|
@@ -0,0 +1,21 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Install, update and uninstall functions for the uc_googleanalytics module.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Implements hook_enable().
|
||||
*/
|
||||
function uc_googleanalytics_enable() {
|
||||
// Get the weight of the Google Analytics module.
|
||||
$weight = db_query("SELECT weight FROM {system} WHERE name = :module", array(':module' => 'googleanalytics'))->fetchField();
|
||||
|
||||
// Update the weight of the UC Google Analytics module so its hooks get called
|
||||
// after the actual Google Analytics module.
|
||||
db_update('system')
|
||||
->fields(array('weight' => max(1000, $weight + 1)))
|
||||
->condition('name', 'uc_googleanalytics')
|
||||
->execute();
|
||||
}
|
@@ -2,6 +2,8 @@
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Adds Google Analytics Javascript to the checkout completion page.
|
||||
*
|
||||
* Adds the required Javascript to the checkout completion page to allow
|
||||
* e-commerce statistics tracking through Google Analytics.
|
||||
*
|
||||
@@ -10,21 +12,6 @@
|
||||
* Google Analytics.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Implements hook_enable().
|
||||
*/
|
||||
function uc_googleanalytics_enable() {
|
||||
// Get the weight of the Google Analytics module.
|
||||
$weight = db_query("SELECT weight FROM {system} WHERE name = :module", array(':module' => 'googleanalytics'))->fetchField();
|
||||
|
||||
// Update the weight of the UC Google Analytics module so its hooks get called
|
||||
// after the actual Google Analytics module.
|
||||
db_update('system')
|
||||
->fields(array('weight' => max(1000, $weight + 1)))
|
||||
->condition('name', 'uc_googleanalytics')
|
||||
->execute();
|
||||
}
|
||||
|
||||
/**
|
||||
* Check which version of google analytics code is used on the site.
|
||||
*/
|
||||
@@ -74,7 +61,7 @@ function uc_googleanalytics_uc_order($op, $order, $arg2) {
|
||||
/**
|
||||
* Determine whether or not to display the e-commerce related JS through GA.
|
||||
*
|
||||
* @return
|
||||
* @return bool
|
||||
* TRUE or FALSE indicating whether or not to display the GA e-commerce JS.
|
||||
*/
|
||||
function uc_googleanalytics_display() {
|
||||
@@ -107,7 +94,7 @@ function uc_googleanalytics_display() {
|
||||
* @param $order
|
||||
* The fully loaded order object to convert into GA JS.
|
||||
*
|
||||
* @return
|
||||
* @return string
|
||||
* The JS that should be added to the page footer.
|
||||
*/
|
||||
function uc_googleanalytics_ecommerce_js($order) {
|
||||
|
Reference in New Issue
Block a user