QuBit_UniversalVariable - Version 1.0.9

Version Notes

output user_id and store language code correctly

Download this release

Release Info

Developer Jing Dong
Extension QuBit_UniversalVariable
Version 1.0.9
Comparing to
See all releases


Code changes from version 1.0.8 to 1.0.9

app/code/local/QuBit/UniversalVariable/Model/Page/Observer.php CHANGED
@@ -231,15 +231,19 @@ class QuBit_UniversalVariable_Model_Page_Observer {
231
 
232
  // Set the user info
233
  public function _setUser() {
234
- $user = $this->_getCustomer();
235
  $this->_user = array();
236
- $email = $user->getEmail();
237
- if ($email) $this->_user['email'] = $email;
238
  $user_id = $user->getEntityId();
239
- if ($user_id) $this->_user['user_id'] = $user_id;
240
- $this->_user['returning'] = $this->_user['id'] ? true : false;
241
- // Buggy - doesn't update
242
- //$this->_user['language'] = Mage::app()->getLocale()->getLocaleCode();
 
 
 
 
 
243
  }
244
 
245
  public function _getAddress($address) {
231
 
232
  // Set the user info
233
  public function _setUser() {
 
234
  $this->_user = array();
235
+ $user = $this->_getCustomer();
236
+ $email = $user->getEmail();
237
  $user_id = $user->getEntityId();
238
+ if ($email) {
239
+ $this->_user['email'] = $email;
240
+ }
241
+ if ($user_id) {
242
+ $this->_user['user_id'] = $user_id;
243
+ }
244
+ $this->_user['returning'] = $user_id ? true : false;
245
+ $this->_user['language'] = Mage::getStoreConfig('general/locale/code', Mage::app()->getStore()->getId());;
246
+
247
  }
248
 
249
  public function _getAddress($address) {
package.xml CHANGED
@@ -1,7 +1,7 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>QuBit_UniversalVariable</name>
4
- <version>1.0.8</version>
5
  <stability>stable</stability>
6
  <license uri="http://www.opensource.org/licenses/osl-3.0.php">Extension license name (OSL v3.0)</license>
7
  <channel>community</channel>
@@ -12,11 +12,11 @@
12
  <description>QuBit OpenTag recommends creating the releavant JavaScript object on your page prior to the OpenTag container script. This will assure the values are present on the page when a script tries to access them.&#xD;
13
  &#xD;
14
  If a page does not have the variables of an object that are mentioned below, simply do not even declare them. For example, if your pages only have category and no subcategory, just declare your category. Likewise, if you feel the need to extend the objects below or feel like renaming them, please do so. However, please take a note of the new variable names or the edited ones, because in order to access them from your scripts in your OpenTag container, you will need to use the new variable names.</description>
15
- <notes>Rename page categroy from controller/view naming to correct page category inclueding home, checkout, basket, confirmation, product, category pages; Added listing variable for category pages</notes>
16
  <authors><author><name>Jing Dong</name><user>qubitproducts</user><email>jing@qubitdigital.com</email></author></authors>
17
- <date>2013-01-21</date>
18
- <time>11:55:03</time>
19
- <contents><target name="magelocal"><dir name="QuBit"><dir name="UniversalVariable"><dir name="Block"><file name="Uv.php" hash="9b5cd71bebc9576b5d0714b3fe5c13bb"/></dir><dir name="Helper"><file name="Data.php" hash="b05ea847c16520d5e6eec91e9f604886"/></dir><dir name="Model"><dir name="Page"><file name="Observer.php" hash="2bf5aea3119698a5b7382d894b3e3a6a"/></dir><file name=".DS_Store" hash="194577a7e20bdcc7afbb718f502c134c"/></dir><dir name="etc"><file name="config.xml" hash="fd936ed3360902482e81d86b6747543c"/><file name="system.xml" hash="944a9a1ca7984eae63f1e2e0800404f9"/><file name=".DS_Store" hash="194577a7e20bdcc7afbb718f502c134c"/></dir><file name=".DS_Store" hash="194577a7e20bdcc7afbb718f502c134c"/></dir></dir></target><target name="magedesign"><dir name="frontend"><dir name="default"><dir name="default"><dir name="layout"><dir name="qubit"><file name="universal_variable.xml" hash="f568ad884f941850720324d35868c45c"/><file name=".DS_Store" hash="2632898af4a7dd21eb81072ff8eb1f04"/></dir></dir><dir name="template"><dir name="qubit"><file name="universal_variable.phtml" hash="a335515fd0cf17010f281246ae884821"/><file name=".DS_Store" hash="194577a7e20bdcc7afbb718f502c134c"/></dir></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="QuBit_all.xml" hash="549545c1cf35f87658a129ad5093d13f"/></dir></target></contents>
20
  <compatible/>
21
  <dependencies><required><php><min>5.2.0</min><max>6.0.0</max></php></required></dependencies>
22
  </package>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>QuBit_UniversalVariable</name>
4
+ <version>1.0.9</version>
5
  <stability>stable</stability>
6
  <license uri="http://www.opensource.org/licenses/osl-3.0.php">Extension license name (OSL v3.0)</license>
7
  <channel>community</channel>
12
  <description>QuBit OpenTag recommends creating the releavant JavaScript object on your page prior to the OpenTag container script. This will assure the values are present on the page when a script tries to access them.&#xD;
13
  &#xD;
14
  If a page does not have the variables of an object that are mentioned below, simply do not even declare them. For example, if your pages only have category and no subcategory, just declare your category. Likewise, if you feel the need to extend the objects below or feel like renaming them, please do so. However, please take a note of the new variable names or the edited ones, because in order to access them from your scripts in your OpenTag container, you will need to use the new variable names.</description>
15
+ <notes>output user_id and store language code correctly</notes>
16
  <authors><author><name>Jing Dong</name><user>qubitproducts</user><email>jing@qubitdigital.com</email></author></authors>
17
+ <date>2013-01-23</date>
18
+ <time>22:33:03</time>
19
+ <contents><target name="magelocal"><dir name="QuBit"><dir name="UniversalVariable"><dir name="Block"><file name="Uv.php" hash="9b5cd71bebc9576b5d0714b3fe5c13bb"/></dir><dir name="Helper"><file name="Data.php" hash="b05ea847c16520d5e6eec91e9f604886"/></dir><dir name="Model"><dir name="Page"><file name="Observer.php" hash="ec1630d61f81f0a52668191c744f111a"/></dir><file name=".DS_Store" hash="194577a7e20bdcc7afbb718f502c134c"/></dir><dir name="etc"><file name="config.xml" hash="fd936ed3360902482e81d86b6747543c"/><file name="system.xml" hash="944a9a1ca7984eae63f1e2e0800404f9"/><file name=".DS_Store" hash="194577a7e20bdcc7afbb718f502c134c"/></dir><file name=".DS_Store" hash="194577a7e20bdcc7afbb718f502c134c"/></dir></dir></target><target name="magedesign"><dir name="frontend"><dir name="default"><dir name="default"><dir name="layout"><dir name="qubit"><file name="universal_variable.xml" hash="f568ad884f941850720324d35868c45c"/><file name=".DS_Store" hash="2632898af4a7dd21eb81072ff8eb1f04"/></dir></dir><dir name="template"><dir name="qubit"><file name="universal_variable.phtml" hash="a335515fd0cf17010f281246ae884821"/><file name=".DS_Store" hash="194577a7e20bdcc7afbb718f502c134c"/></dir></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="QuBit_all.xml" hash="549545c1cf35f87658a129ad5093d13f"/></dir></target></contents>
20
  <compatible/>
21
  <dependencies><required><php><min>5.2.0</min><max>6.0.0</max></php></required></dependencies>
22
  </package>