Skip to content

Commit f635297

Browse files
Merge pull request #81 from prestaforum/prestaforum-patch-2
Improve some comments in the code
2 parents d57d6a6 + cfba5b6 commit f635297

1 file changed

Lines changed: 21 additions & 13 deletions

File tree

ps_googleanalytics.php

Lines changed: 21 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ public function __construct()
6666
}
6767

6868
/**
69-
* back office module configuration page content
69+
* Back office module configuration page content
7070
*/
7171
public function getContent()
7272
{
@@ -91,7 +91,8 @@ public function hookDisplayHeader($params, $back_office = false)
9191
}
9292

9393
/**
94-
* To track transactions
94+
* Confirmation page hook.
95+
* This function is run to track transactions.
9596
*/
9697
public function hookDisplayOrderConfirmation($params)
9798
{
@@ -102,7 +103,8 @@ public function hookDisplayOrderConfirmation($params)
102103
}
103104

104105
/**
105-
* hook footer to load JS script for standards actions such as product clicks
106+
* Footer hook.
107+
* This function is run to load JS script for standards actions such as product clicks
106108
*/
107109
public function hookDisplayFooter()
108110
{
@@ -112,7 +114,8 @@ public function hookDisplayFooter()
112114
}
113115

114116
/**
115-
* hook home to display generate the product list associated to home featured, news products and best sellers Modules
117+
* Homepage hook.
118+
* This function is run to manage analytics for product list associated to home featured, news products and best sellers Modules
116119
*/
117120
public function hookDisplayHome()
118121
{
@@ -122,7 +125,8 @@ public function hookDisplayHome()
122125
}
123126

124127
/**
125-
* hook product page footer to load JS for product details view
128+
* Product page footer hook
129+
* This function is run to load JS for product details view
126130
*/
127131
public function hookDisplayFooterProduct($params)
128132
{
@@ -133,7 +137,8 @@ public function hookDisplayFooterProduct($params)
133137
}
134138

135139
/**
136-
* Hook admin order to send transactions and refunds details
140+
* Hook admin order.
141+
* This function is run to send transactions and refunds details
137142
*/
138143
public function hookDisplayAdminOrder()
139144
{
@@ -147,7 +152,8 @@ public function hookDisplayAdminOrder()
147152
}
148153

149154
/**
150-
* admin office header to add google analytics js
155+
* Admin office header hook.
156+
* This function is run to add Google Analytics JavaScript
151157
*/
152158
public function hookDisplayBackOfficeHeader()
153159
{
@@ -157,7 +163,8 @@ public function hookDisplayBackOfficeHeader()
157163
}
158164

159165
/**
160-
* Hook admin office header to add google analytics js
166+
* Product cancel action hook (in Back office).
167+
* This function is run to add Google Analytics JavaScript
161168
*/
162169
public function hookActionProductCancel($params)
163170
{
@@ -167,7 +174,8 @@ public function hookActionProductCancel($params)
167174
}
168175

169176
/**
170-
* hook save cart event to implement addtocart and remove from cart functionality
177+
* Save cart event hook.
178+
* This function is run to implement 'add to cart' and 'remove from cart' functionalities
171179
*/
172180
public function hookActionCartSave()
173181
{
@@ -196,9 +204,9 @@ protected function _debugLog($function, $log)
196204
}
197205

198206
/**
199-
* This method is trigger at the installation of the module
200-
* - install all module tables
201-
* - register hook used by the module.
207+
* This method is triggered at the installation of the module
208+
* - it installs all module tables
209+
* - it registers the hooks used by this module
202210
*
203211
* @return bool
204212
*/
@@ -216,7 +224,7 @@ public function install()
216224

217225
/**
218226
* Triggered at the uninstall of the module
219-
* - erase tables
227+
* - erases this module SQL tables
220228
*
221229
* @return bool
222230
*/

0 commit comments

Comments
 (0)