Olark_Chatbox - Version 1.0.10

Version Notes

Fixes a bug where price formatting could cause errors in some circumstances.

Download this release

Release Info

Developer Olark Live Chat
Extension Olark_Chatbox
Version 1.0.10
Comparing to
See all releases


Code changes from version 1.0.9 to 1.0.10

app/code/community/Olark/Chatbox/.DS_Store CHANGED
File without changes
app/code/community/Olark/Chatbox/Block/.Chatbox.php.swp CHANGED
File without changes
app/code/community/Olark/Chatbox/Block/Chatbox.php CHANGED
@@ -45,6 +45,19 @@ class Olark_Chatbox_Block_Chatbox
45
  return $session->getData('olark_chatbox_events', true);
46
  }
47
 
 
 
 
 
 
 
 
 
 
 
 
 
 
48
  /**
49
  * Produces Olark Chatbox html
50
  *
@@ -52,13 +65,6 @@ class Olark_Chatbox_Block_Chatbox
52
  */
53
  protected function _toHtml()
54
  {
55
- function formatPrice($value) {
56
- return Mage::helper('core')->currency(
57
- $value,
58
- true, // Format the value for the localized currency.
59
- false // Do not HTMLize the value.
60
- );
61
- }
62
 
63
  $customer = array();
64
  $products = array();
@@ -104,7 +110,7 @@ class Olark_Chatbox_Block_Chatbox
104
  // more information in the future without updating
105
  // our Magento app.
106
  $magentoItem = $item->getData();
107
- $magentoItem['formatted_price'] = formatPrice($item->getPrice());
108
 
109
  $product = array(
110
  'name' => $item->getName(),
@@ -125,7 +131,7 @@ class Olark_Chatbox_Block_Chatbox
125
  $extraItems[] = array(
126
  'name' => $name,
127
  'price' => $total->getValue(),
128
- 'formatted_price' => formatPrice($total->getValue())
129
  );
130
  if ('subtotal' == $name) {
131
  $totalValueOfItems = $total->getValue();
@@ -136,7 +142,7 @@ class Olark_Chatbox_Block_Chatbox
136
  $recentEvents = $this->_popRecentEvents();
137
  $magentoData = array(
138
  'total' => $totalValueOfItems,
139
- 'formatted_total' => formatPrice($totalValueOfItems),
140
  'extra_items' => $extraItems,
141
  'recent_events' => $recentEvents
142
  );
45
  return $session->getData('olark_chatbox_events', true);
46
  }
47
 
48
+ /**
49
+ * Formats the price using Magento's localized currency helper.
50
+ *
51
+ * @return string
52
+ */
53
+ protected function _formatPrice($value) {
54
+ return Mage::helper('core')->currency(
55
+ $value,
56
+ true, // Format the value for the localized currency.
57
+ false // Do not HTMLize the value.
58
+ );
59
+ }
60
+
61
  /**
62
  * Produces Olark Chatbox html
63
  *
65
  */
66
  protected function _toHtml()
67
  {
 
 
 
 
 
 
 
68
 
69
  $customer = array();
70
  $products = array();
110
  // more information in the future without updating
111
  // our Magento app.
112
  $magentoItem = $item->getData();
113
+ $magentoItem['formatted_price'] = $this->_formatPrice($item->getPrice());
114
 
115
  $product = array(
116
  'name' => $item->getName(),
131
  $extraItems[] = array(
132
  'name' => $name,
133
  'price' => $total->getValue(),
134
+ 'formatted_price' => $this->_formatPrice($total->getValue())
135
  );
136
  if ('subtotal' == $name) {
137
  $totalValueOfItems = $total->getValue();
142
  $recentEvents = $this->_popRecentEvents();
143
  $magentoData = array(
144
  'total' => $totalValueOfItems,
145
+ 'formatted_total' => $this->_formatPrice($totalValueOfItems),
146
  'extra_items' => $extraItems,
147
  'recent_events' => $recentEvents
148
  );
app/code/community/Olark/Chatbox/Helper/Data.php CHANGED
File without changes
app/code/community/Olark/Chatbox/Model/Observer.php CHANGED
File without changes
app/code/community/Olark/Chatbox/etc/config.sunir CHANGED
File without changes
app/code/community/Olark/Chatbox/etc/config.xml CHANGED
@@ -22,7 +22,7 @@
22
  <config>
23
  <modules>
24
  <Olark_Chatbox>
25
- <version>1.0.9</version>
26
  <cache_lifetime>0</cache_lifetime>
27
  </Olark_Chatbox>
28
  </modules>
22
  <config>
23
  <modules>
24
  <Olark_Chatbox>
25
+ <version>1.0.10</version>
26
  <cache_lifetime>0</cache_lifetime>
27
  </Olark_Chatbox>
28
  </modules>
app/code/community/Olark/Chatbox/etc/widget.xml CHANGED
@@ -35,22 +35,22 @@
35
  </h3>
36
  <ol style="list-style: decimal; margin-left: 30px; font-size: 1.5em; line-height: 1.5em;">
37
  <li>
38
- <a target="_blank" href="https://olark.com/signup/create_new_account?cartsaver=magento&amp;version=1.0.7&amp;rid=magento-connect">
39
  Create an Olark account</a>
40
  if you don't have one.
41
  </li>
42
  <li>
43
- <a target="_blank" href="https://olark.com/settings/site-id?cartsaver=magento&amp;version=1.0.7&amp;rid=magento-connect">
44
  Find your Site ID</a>
45
  and type it above.
46
  </li>
47
  <li>
48
- <a target="_blank" href="https://olark.com/extensions/cartsaver?cartsaver=magento&amp;version=1.0.7&amp;rid=magento-connect">
49
  Configure CartSaver notifications</a>
50
  in your Olark account.
51
  </li>
52
  <li>
53
- <a target="_blank" href="https://chat.olark.com/?cartsaver=magento&amp;version=1.0.7&amp;rid=magento-connect">
54
  Start chatting with your customers.</a>
55
  That's it!
56
  </li>
@@ -58,10 +58,10 @@
58
 
59
  <p style="margin-top: 1em">
60
  <strong>Need help?</strong> You can
61
- <a target="_blank" href="http://olark.com/help/magento-connect?cartsaver=magento&amp;version=1.0.7&amp;rid=magento-connect">
62
  read our tutorial</a>,
63
  or contact us by
64
- <a target="_blank" href="http://olark.com/help/magento-connect?cartsaver=magento&amp;version=1.0.7&amp;intent=chat&amp;rid=magento-connect">
65
  live chat</a>
66
  or
67
  <a target="_blank" href="mailto:support+magento@olark.com">
@@ -88,7 +88,7 @@
88
  </p>
89
 
90
  <p style="margin-top: 1em">
91
- <strong><a target="_blank" href="http://olark.com/redirect/magento-connect?cartsaver=magento&amp;version=1.0.7&amp;rid=magento-connect">
92
 
93
  Learn more and give us a good review in Magento Connect</a></strong>
94
  </p>
@@ -102,7 +102,7 @@
102
  <p style="margin-top: 1em">
103
  Olark has an extensive Javascript API which developers
104
  can use to change the behavior of how Olark works.
105
- <a target="_blank" href="http://olark.com/documentation?cartsaver=magento&amp;version=1.0.7&amp;rid=magento-connect">
106
  Read our documentation for more information</a>.</p>
107
 
108
  <p style="margin-top: 1em">To include your own HTML or Javascript, just paste it below. Please <a target="_blank" href="mailto:support+magento@olark.com">get in touch</a> if you run into any problems.</p>
35
  </h3>
36
  <ol style="list-style: decimal; margin-left: 30px; font-size: 1.5em; line-height: 1.5em;">
37
  <li>
38
+ <a target="_blank" href="https://olark.com/signup/create_new_account?cartsaver=magento&amp;version=1.0.10&amp;rid=magento-connect">
39
  Create an Olark account</a>
40
  if you don't have one.
41
  </li>
42
  <li>
43
+ <a target="_blank" href="https://olark.com/settings/site-id?cartsaver=magento&amp;version=1.0.10&amp;rid=magento-connect">
44
  Find your Site ID</a>
45
  and type it above.
46
  </li>
47
  <li>
48
+ <a target="_blank" href="https://olark.com/extensions/cartsaver?cartsaver=magento&amp;version=1.0.10&amp;rid=magento-connect">
49
  Configure CartSaver notifications</a>
50
  in your Olark account.
51
  </li>
52
  <li>
53
+ <a target="_blank" href="https://chat.olark.com/?cartsaver=magento&amp;version=1.0.10&amp;rid=magento-connect">
54
  Start chatting with your customers.</a>
55
  That's it!
56
  </li>
58
 
59
  <p style="margin-top: 1em">
60
  <strong>Need help?</strong> You can
61
+ <a target="_blank" href="http://olark.com/help/magento-connect?cartsaver=magento&amp;version=1.0.10&amp;rid=magento-connect">
62
  read our tutorial</a>,
63
  or contact us by
64
+ <a target="_blank" href="http://olark.com/help/magento-connect?cartsaver=magento&amp;version=1.0.10&amp;intent=chat&amp;rid=magento-connect">
65
  live chat</a>
66
  or
67
  <a target="_blank" href="mailto:support+magento@olark.com">
88
  </p>
89
 
90
  <p style="margin-top: 1em">
91
+ <strong><a target="_blank" href="http://olark.com/redirect/magento-connect?cartsaver=magento&amp;version=1.0.10&amp;rid=magento-connect">
92
 
93
  Learn more and give us a good review in Magento Connect</a></strong>
94
  </p>
102
  <p style="margin-top: 1em">
103
  Olark has an extensive Javascript API which developers
104
  can use to change the behavior of how Olark works.
105
+ <a target="_blank" href="http://olark.com/documentation?cartsaver=magento&amp;version=1.0.10&amp;rid=magento-connect">
106
  Read our documentation for more information</a>.</p>
107
 
108
  <p style="margin-top: 1em">To include your own HTML or Javascript, just paste it below. Please <a target="_blank" href="mailto:support+magento@olark.com">get in touch</a> if you run into any problems.</p>
app/etc/modules/Olark_Chatbox.xml CHANGED
File without changes
package.xml CHANGED
@@ -1,25 +1,24 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Olark_Chatbox</name>
4
- <version>1.0.9</version>
5
  <stability>stable</stability>
6
  <license uri="http://opensource.org/licenses/afl-3.0.php">Academic Free License (AFL 3.0)</license>
7
  <channel>community</channel>
8
  <extends/>
9
  <summary>Olark Live Chat with CartSaver for Magento</summary>
10
- <description>Be your customers' hero. Nothing answers customers or saves the sale faster than Olark live chat. &#xD;
11
  &#xD;
12
- With CartSaver for Magento, see in real-time exactly what your customer do on your Magento store and then take action. End abandoned shopping carts. &#xD;
13
  &#xD;
14
- Be their favorite salesperson as you can follow along as your customers add and remove items from their shopping carts, so you can talk to them about what they are buying. &#xD;
15
  &#xD;
16
- Over 5,000 customers rely on Olark to make their customers happier and buying more.&#xD;
17
- </description>
18
- <notes>Fixes bug with Magento compiler</notes>
19
  <authors><author><name>Olark Live Chat</name><user>olark</user><email>support@olark.com</email></author></authors>
20
- <date>2013-06-04</date>
21
- <time>21:24:21</time>
22
- <contents><target name="mageetc"><dir name="modules"><file name="Olark_Chatbox.xml" hash="220e124817be0b67876250efca078b83"/></dir></target><target name="magecommunity"><dir name="Olark"><dir name="Chatbox"><dir name="Block"><file name="Chatbox.php" hash="d0a62cece258d792d63a89fb4f46378b"/><file name=".Chatbox.php.swp" hash="c8e6a26700cdc554b0093bf6127eedb2"/></dir><dir name="Helper"><file name="Data.php" hash="6d1e1005a4c4f22ccdd7af419a2ed28a"/></dir><dir name="Model"><file name="Observer.php" hash="e179b730ccc182588dc819d4a44355ba"/></dir><dir name="etc"><file name="config.sunir" hash="3c2ea255f957e37b176ae9e2aaa64a5e"/><file name="config.xml" hash="607b866c3b054789bd403cd54d2f6185"/><file name="widget.xml" hash="e0dd79dcf207489b3067b256b7000377"/></dir><file name=".DS_Store" hash="f41f525169d6272ff2c77dc5440285c6"/></dir></dir></target></contents>
23
  <compatible/>
24
  <dependencies><required><php><min>5.1.0</min><max>6.0.0</max></php></required></dependencies>
25
  </package>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Olark_Chatbox</name>
4
+ <version>1.0.10</version>
5
  <stability>stable</stability>
6
  <license uri="http://opensource.org/licenses/afl-3.0.php">Academic Free License (AFL 3.0)</license>
7
  <channel>community</channel>
8
  <extends/>
9
  <summary>Olark Live Chat with CartSaver for Magento</summary>
10
+ <description>Be your customers' hero. Nothing answers customers or saves the sale faster than Olark live chat.&#xD;
11
  &#xD;
12
+ With CartSaver for Magento, see in real-time exactly what your customer do on your Magento store and then take action. End abandoned shopping carts.&#xD;
13
  &#xD;
14
+ Be their favorite salesperson as you can follow along as your customers add and remove items from their shopping carts, so you can talk to them about what they are buying.&#xD;
15
  &#xD;
16
+ Over 10,000 customers rely on Olark to make their customers happier and buying more.</description>
17
+ <notes>Fixes a bug where price formatting could cause errors in some circumstances.</notes>
 
18
  <authors><author><name>Olark Live Chat</name><user>olark</user><email>support@olark.com</email></author></authors>
19
+ <date>2015-05-11</date>
20
+ <time>23:08:53</time>
21
+ <contents><target name="mageetc"><dir name="modules"><file name="Olark_Chatbox.xml" hash="220e124817be0b67876250efca078b83"/></dir></target><target name="magecommunity"><dir name="Olark"><dir name="Chatbox"><dir name="Block"><file name="Chatbox.php" hash="2485700d7b66e999736f661b4c316916"/><file name=".Chatbox.php.swp" hash="c8e6a26700cdc554b0093bf6127eedb2"/></dir><dir name="Helper"><file name="Data.php" hash="6d1e1005a4c4f22ccdd7af419a2ed28a"/></dir><dir name="Model"><file name="Observer.php" hash="e179b730ccc182588dc819d4a44355ba"/></dir><dir name="etc"><file name="config.sunir" hash="3c2ea255f957e37b176ae9e2aaa64a5e"/><file name="config.xml" hash="890fb7e1e1155bc2898b840be082865f"/><file name="widget.xml" hash="ea835f7e81d6335ee0932a731c79d85f"/></dir><file name=".DS_Store" hash="f41f525169d6272ff2c77dc5440285c6"/></dir></dir></target></contents>
22
  <compatible/>
23
  <dependencies><required><php><min>5.1.0</min><max>6.0.0</max></php></required></dependencies>
24
  </package>