nypwidget - Version 2.5.5

Version Notes

Minor compatibility fixes.

Download this release

Release Info

Developer PriceWaiter
Extension nypwidget
Version 2.5.5
Comparing to
See all releases


Code changes from version 2.5.4 to 2.5.5

app/code/community/PriceWaiter/.DS_Store ADDED
Binary file
app/code/community/PriceWaiter/NYPWidget/.DS_Store ADDED
Binary file
app/code/community/PriceWaiter/NYPWidget/Model/Callback.php CHANGED
@@ -335,6 +335,34 @@ class PriceWaiter_NYPWidget_Model_Callback
335
  return $customer;
336
  }
337
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
338
  /**
339
  * @internal Either returns an existing customer (by email) or creates a new one.
340
  * @param Array $request
@@ -526,6 +554,11 @@ class PriceWaiter_NYPWidget_Model_Callback
526
  $orderPayment->setCcAvsStatus($request['avs_result']);
527
  }
528
 
 
 
 
 
 
529
  // Stash PW-specific stuff in "additional data"
530
  $additionalData = array(
531
  'pricewaiter_payment_method' => $request['payment_method'],
335
  return $customer;
336
  }
337
 
338
+ /**
339
+ * Examines an incoming request and returns values to set for credit
340
+ * card expiration date.
341
+ * @param array $request
342
+ * @return array Array in the format ($month, $year).
343
+ */
344
+ public function figureOutCcExpiryDate(array $request)
345
+ {
346
+ if (empty($request['cc_type'])) {
347
+ // No credit card used, so don't set expiration month/year
348
+ return array('', '');
349
+ }
350
+
351
+ $month = isset($request['cc_exp_month']) ? $request['cc_exp_month'] : '';
352
+ $year = isset($request['cc_exp_year']) ? $request['cc_exp_year'] : '';
353
+
354
+ if (!($month || $year)) {
355
+ // HACK: PriceWaiter did not actually send an expiry date, but
356
+ // we have to set *something*. Fill in "next month" as a
357
+ // placeholder. See issue #125 for details.
358
+ $nextMonth = strtotime('+1 month');
359
+ $month = date('m', $nextMonth);
360
+ $year = date('Y', $nextMonth);
361
+ }
362
+
363
+ return array($month, $year);
364
+ }
365
+
366
  /**
367
  * @internal Either returns an existing customer (by email) or creates a new one.
368
  * @param Array $request
554
  $orderPayment->setCcAvsStatus($request['avs_result']);
555
  }
556
 
557
+ list($expMonth, $expYear) = $this->figureOutCcExpiryDate($request);
558
+ $orderPayment
559
+ ->setCcExpYear($expYear)
560
+ ->setCcExpMonth($expMonth);
561
+
562
  // Stash PW-specific stuff in "additional data"
563
  $additionalData = array(
564
  'pricewaiter_payment_method' => $request['payment_method'],
app/code/community/PriceWaiter/NYPWidget/controllers/Adminhtml/PricewaiterController.php CHANGED
@@ -91,4 +91,18 @@ class PriceWaiter_NYPWidget_Adminhtml_PriceWaiterController extends Mage_Adminht
91
  'secret' => $secret
92
  )));
93
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
94
  }
91
  'secret' => $secret
92
  )));
93
  }
94
+
95
+ /**
96
+ * @internal
97
+ */
98
+ protected function _isAllowed()
99
+ {
100
+ // We have to override this method for Magento Technical Validation.
101
+ // The idea is that versions of Magento < 1.9.2 (or missing
102
+ // SUPEE-6285 patch) just return `true` here by default, which can
103
+ // inadvertently enable access to admin users w/o permissions.
104
+ // We don't really use ACLs, so this shouldn't matter much, but
105
+ // here we fill in what 1.9.2 does:
106
+ return Mage::getSingleton('admin/session')->isAllowed('admin');
107
+ }
108
  }
app/code/community/PriceWaiter/NYPWidget/etc/config.xml CHANGED
@@ -3,7 +3,7 @@
3
 
4
  <modules>
5
  <PriceWaiter_NYPWidget>
6
- <version>2.5.4</version>
7
  </PriceWaiter_NYPWidget>
8
  </modules>
9
 
3
 
4
  <modules>
5
  <PriceWaiter_NYPWidget>
6
+ <version>2.5.5</version>
7
  </PriceWaiter_NYPWidget>
8
  </modules>
9
 
app/code/community/PriceWaiter/NYPWidget/sql/nypwidget_setup/mysql4-install-1.0.0.php CHANGED
@@ -49,4 +49,3 @@ CREATE TABLE {$this->getTable('nypwidget_category')} (
49
  // ->updateAttributes(array($product->getId()), array('nypwidget_enabled' => 1), 0);
50
  // }
51
 
52
- ?>
49
  // ->updateAttributes(array($product->getId()), array('nypwidget_enabled' => 1), 0);
50
  // }
51
 
 
package.xml CHANGED
@@ -1,14 +1,14 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>nypwidget</name>
4
- <version>2.5.4</version>
5
  <stability>stable</stability>
6
  <license uri="http://www.apache.org/licenses/LICENSE-2.0.html">Apache License, Version 2.0</license>
7
  <channel>community</channel>
8
  <extends/>
9
  <summary>PriceWaiter lets buyers make offers on your products that you can easily accept, counter offer or reject.</summary>
10
  <description>Sell more, immediately, with the PriceWaiter widget. Convert comparison shoppers you might have lost, increase sales and conversions, and stop "minimum advertised price" from preventing sales before they even start.&#xD;&#xD; PriceWaiter lets customers make offers on products you sell-- offers you can accept, reject or counter. The widget embeds a simple Name Your Price button on any product page or category that you choose. Simply install the extension and you'll have full control over PriceWaiter in your Magento admin control panel.</description>
11
- <notes>Fixes PHP warnings seen in Magento 1.8</notes>
12
  <authors>
13
  <author>
14
  <name>PriceWaiter</name>
@@ -16,9 +16,9 @@
16
  <email>extensions@pricewaiter.com</email>
17
  </author>
18
  </authors>
19
- <date>2016-08-15</date>
20
- <time>16:52:41</time>
21
- <contents><target name="mageweb"><dir name="app"><dir name="code"><dir name="community"><dir name="PriceWaiter"><dir name="NYPWidget"><dir name="Block"><dir name="Adminhtml"><file name="Link.php" hash="f17d6461e82c76a3a49266aa6a6b23e4"/><file name="Signup.php" hash="f3464994c972a3f0dcc7747ed011bbff"/><file name="Widget.php" hash="a5a15261dae201aca09a8249fe7e8a81"/></dir><file name="Category.php" hash="1047b4af8b7e438964dff8d82e7d8cf6"/><file name="Widget.php" hash="b6b1d0eab14ccb31a06971d6b824ed45"/><dir name="Payment"><dir name="Info"><file name="Pricewaiter.php" hash="ea9b94211a536552689d95c1664894e7"/></dir></dir></dir><dir name="controllers"><dir name="Adminhtml"><file name="PricewaiterController.php" hash="29d6f14dc97fde5c5d1c5bb969692b9a"/></dir><file name="CallbackController.php" hash="efedef40a3b35220216eeabbd3ae3567"/><file name="ProductinfoController.php" hash="b3af2cdacd4c820bfa26f37377efc84d"/></dir><dir name="etc"><file name="adminhtml.xml" hash="57af207c7a6966d365ed41ebe6d88ecb"/><file name="config.xml" hash="21fe378b362de2c4151f0d3dba5705ea"/><file name="system.xml" hash="3d83e0edf292b6e653d30f05382f1d9b"/></dir><dir name="Exception"><file name="Abstract.php" hash="d19b842ccbefffb2132c957b7feaf3e1"/><file name="ApiKey.php" hash="0cb0715d3242092d5e1fbecb8d978f59"/><file name="DuplicateOrder.php" hash="91eb14444c1bb6e01ddf2a78b92419c9"/><file name="InvalidOrderData.php" hash="6bbb8a438f1464acae9077b7d00f197c"/><file name="InvalidRegion.php" hash="02b69fca49a6584999d979816afca19d"/><file name="OutOfStock.php" hash="767b26a3d548ad92d86048f42910af6f"/><file name="Signature.php" hash="5244f5902f9141a189df78f696814a63"/><dir name="Product"><file name="Abstract.php" hash="1cb077cd79f7185657efb09ff285c7e9"/><file name="NotFound.php" hash="8e1507ab1798d85ce722705c913da441"/></dir></dir><dir name="Helper"><file name="Data.php" hash="69ef8411e6f6b3ef2d5424c24b893fb8"/><file name="Product.php" hash="3b8109ecfd93ba1aafa04ea4e878e8dc"/></dir><dir name="Model"><dir name="Callback"><file name="Inventory.php" hash="0be9afd71ec20b87ba29321f9fdc3cb8"/></dir><file name="Callback.php" hash="286021440e702e3d66ead32adce767c3"/><file name="Category.php" hash="18826308eba00faaeffea8b473198ca4"/><file name="Observer.php" hash="0acd80de4ceb912ed8e7d48b017644a8"/><file name="Order.php" hash="86206e5678929e57b833f7ea4bc6bf96"/><file name="PaymentMethod.php" hash="0fa5e9a67512f578226e916b319052b7"/><dir name="Carrier"><file name="ShippingMethod.php" hash="93baf3d128481be22154b103cdf5d627"/></dir><dir name="Display"><file name="Phrase.php" hash="54339c37d5d88f0b2e68dfbe814af2e2"/><file name="Size.php" hash="2a70f37e54202f4a8de5a3f0b376f090"/></dir><dir name="Mysql4"><dir name="Category"><file name="Collection.php" hash="a5113a9db28d82cedcc8eb2c9b609a88"/></dir><file name="Category.php" hash="656c556879e61bbb20733ffc1dbe38d0"/><file name="Order.php" hash="ebecab2ef597171207ae787b0ddb68df"/><dir name="Order"><file name="Collection.php" hash="07773d6ca5bdf74d14e2d3290466b28f"/></dir></dir><dir name="Resource"><dir name="Eav"><dir name="Mysql4"><file name="Setup.php" hash="c23a03f23524957235bb3cbd1363551b"/></dir></dir></dir></dir><dir name="sql"><dir name="nypwidget_setup"><file name="mysql4-install-1.0.0.php" hash="b977c3a62af93441d115650b543ff858"/><file name="mysql4-upgrade-1.1.2-1.1.3.php" hash="df453265b32071329de809aa750dd31f"/><file name="mysql4-upgrade-1.1.7-1.1.8.php" hash="9b18e12698cbdc6896666b26362a7ddb"/><file name="mysql4-upgrade-1.2.4-1.2.5.php" hash="5e501f27bf223c34e19443923e998021"/><file name="mysql4-upgrade-1.3.0-1.3.1.php" hash="4cd7633a027696aa74668c61c58a83e2"/><file name="mysql4-upgrade-2.1.5-2.2.0.php" hash="be3f748105ff6bf61d4329b967c09c94"/><file name="mysql4-upgrade-2.2.0-2.5.0.php" hash="c02dacf91e070d7274daeda881e68f2a"/></dir></dir></dir></dir></dir></dir><dir name="design"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="pricewaiter.xml" hash="646560535c94bf42ed75438ec9cc6b9f"/></dir><dir name="template"><dir name="pricewaiter"><file name="categorytab.phtml" hash="703fcf0daa0fb71bef23987a9896bd29"/><file name="signup.phtml" hash="fc18c669c18c55cccdf2c66c96199dec"/></dir></dir></dir></dir></dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="pricewaiter.xml" hash="d578d936a726cca4837d5f2e58c5ca45"/></dir><dir name="template"><dir name="pricewaiter"><file name="widget.phtml" hash="1035d7df739b2a80a581b13684f95b39"/></dir></dir></dir></dir></dir></dir><dir name="etc"><dir name="modules"><file name="PriceWaiter_NYPWidget.xml" hash="7649918eb71009656f956a077f0cf6a8"/></dir></dir></dir><dir name="js"><dir name="pricewaiter"><file name="product-pages.js" hash="775a2c04db1f58c50f204ed7e15aef76"/><file name="token.js" hash="79ce2bdf4d9ae33fb4ef38c298f2dffe"/></dir></dir><dir name="skin"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="images"><file name="pricewaiter_logo.png" hash="becb9713a561131ff69eabb7503d3e74"/><file name="pricewaiter_tab.png" hash="1bab71be6b1a93aee2ae7aeae3807484"/><file name="pricewaiter_logo.png" hash="becb9713a561131ff69eabb7503d3e74"/><file name="pricewaiter_tab.png" hash="1bab71be6b1a93aee2ae7aeae3807484"/></dir><file name="pricewaiter.css" hash="cbda20d51ec4c1505962c1e79007d7f7"/></dir></dir></dir></dir></target></contents>
22
  <compatible/>
23
  <dependencies>
24
  <required>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>nypwidget</name>
4
+ <version>2.5.5</version>
5
  <stability>stable</stability>
6
  <license uri="http://www.apache.org/licenses/LICENSE-2.0.html">Apache License, Version 2.0</license>
7
  <channel>community</channel>
8
  <extends/>
9
  <summary>PriceWaiter lets buyers make offers on your products that you can easily accept, counter offer or reject.</summary>
10
  <description>Sell more, immediately, with the PriceWaiter widget. Convert comparison shoppers you might have lost, increase sales and conversions, and stop "minimum advertised price" from preventing sales before they even start.&#xD;&#xD; PriceWaiter lets customers make offers on products you sell-- offers you can accept, reject or counter. The widget embeds a simple Name Your Price button on any product page or category that you choose. Simply install the extension and you'll have full control over PriceWaiter in your Magento admin control panel.</description>
11
+ <notes>Minor compatibility fixes.</notes>
12
  <authors>
13
  <author>
14
  <name>PriceWaiter</name>
16
  <email>extensions@pricewaiter.com</email>
17
  </author>
18
  </authors>
19
+ <date>2016-10-21</date>
20
+ <time>21:52:52</time>
21
+ <contents><target name="mageweb"><dir name="app"><dir name="code"><dir name="community"><dir name="PriceWaiter"><file name=".DS_Store" hash="2a209fa87a026f2f0ca9c35ac878a3c6"/><dir name="NYPWidget"><file name=".DS_Store" hash="4b6f2307f11e3f2f15c48e055cb7c96a"/><dir name="Block"><dir name="Adminhtml"><file name="Link.php" hash="f17d6461e82c76a3a49266aa6a6b23e4"/><file name="Signup.php" hash="f3464994c972a3f0dcc7747ed011bbff"/><file name="Widget.php" hash="a5a15261dae201aca09a8249fe7e8a81"/></dir><file name="Category.php" hash="1047b4af8b7e438964dff8d82e7d8cf6"/><file name="Widget.php" hash="b6b1d0eab14ccb31a06971d6b824ed45"/><dir name="Payment"><dir name="Info"><file name="Pricewaiter.php" hash="ea9b94211a536552689d95c1664894e7"/></dir></dir></dir><dir name="controllers"><dir name="Adminhtml"><file name="PricewaiterController.php" hash="2caeb61607d9f0b7f873f1825c23e21f"/></dir><file name="CallbackController.php" hash="efedef40a3b35220216eeabbd3ae3567"/><file name="ProductinfoController.php" hash="b3af2cdacd4c820bfa26f37377efc84d"/></dir><dir name="etc"><file name="adminhtml.xml" hash="57af207c7a6966d365ed41ebe6d88ecb"/><file name="config.xml" hash="57a3919940380b71244556bcf7fc12a8"/><file name="system.xml" hash="3d83e0edf292b6e653d30f05382f1d9b"/></dir><dir name="Exception"><file name="Abstract.php" hash="d19b842ccbefffb2132c957b7feaf3e1"/><file name="ApiKey.php" hash="0cb0715d3242092d5e1fbecb8d978f59"/><file name="DuplicateOrder.php" hash="91eb14444c1bb6e01ddf2a78b92419c9"/><file name="InvalidOrderData.php" hash="6bbb8a438f1464acae9077b7d00f197c"/><file name="InvalidRegion.php" hash="02b69fca49a6584999d979816afca19d"/><file name="OutOfStock.php" hash="767b26a3d548ad92d86048f42910af6f"/><file name="Signature.php" hash="5244f5902f9141a189df78f696814a63"/><dir name="Product"><file name="Abstract.php" hash="1cb077cd79f7185657efb09ff285c7e9"/><file name="NotFound.php" hash="8e1507ab1798d85ce722705c913da441"/></dir></dir><dir name="Helper"><file name="Data.php" hash="69ef8411e6f6b3ef2d5424c24b893fb8"/><file name="Product.php" hash="3b8109ecfd93ba1aafa04ea4e878e8dc"/></dir><dir name="Model"><dir name="Callback"><file name="Inventory.php" hash="0be9afd71ec20b87ba29321f9fdc3cb8"/></dir><file name="Callback.php" hash="30a7cd95663d12f85bce4941c27ed5bb"/><file name="Category.php" hash="18826308eba00faaeffea8b473198ca4"/><file name="Observer.php" hash="0acd80de4ceb912ed8e7d48b017644a8"/><file name="Order.php" hash="86206e5678929e57b833f7ea4bc6bf96"/><file name="PaymentMethod.php" hash="0fa5e9a67512f578226e916b319052b7"/><dir name="Carrier"><file name="ShippingMethod.php" hash="93baf3d128481be22154b103cdf5d627"/></dir><dir name="Display"><file name="Phrase.php" hash="54339c37d5d88f0b2e68dfbe814af2e2"/><file name="Size.php" hash="2a70f37e54202f4a8de5a3f0b376f090"/></dir><dir name="Mysql4"><dir name="Category"><file name="Collection.php" hash="a5113a9db28d82cedcc8eb2c9b609a88"/></dir><file name="Category.php" hash="656c556879e61bbb20733ffc1dbe38d0"/><file name="Order.php" hash="ebecab2ef597171207ae787b0ddb68df"/><dir name="Order"><file name="Collection.php" hash="07773d6ca5bdf74d14e2d3290466b28f"/></dir></dir><dir name="Resource"><dir name="Eav"><dir name="Mysql4"><file name="Setup.php" hash="c23a03f23524957235bb3cbd1363551b"/></dir></dir></dir></dir><dir name="sql"><dir name="nypwidget_setup"><file name="mysql4-install-1.0.0.php" hash="95804a9cbe9a668ffd0d67517bdaa240"/><file name="mysql4-upgrade-1.1.2-1.1.3.php" hash="df453265b32071329de809aa750dd31f"/><file name="mysql4-upgrade-1.1.7-1.1.8.php" hash="9b18e12698cbdc6896666b26362a7ddb"/><file name="mysql4-upgrade-1.2.4-1.2.5.php" hash="5e501f27bf223c34e19443923e998021"/><file name="mysql4-upgrade-1.3.0-1.3.1.php" hash="4cd7633a027696aa74668c61c58a83e2"/><file name="mysql4-upgrade-2.1.5-2.2.0.php" hash="be3f748105ff6bf61d4329b967c09c94"/><file name="mysql4-upgrade-2.2.0-2.5.0.php" hash="c02dacf91e070d7274daeda881e68f2a"/></dir></dir></dir></dir></dir></dir><dir name="design"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="pricewaiter.xml" hash="646560535c94bf42ed75438ec9cc6b9f"/></dir><dir name="template"><dir name="pricewaiter"><file name="categorytab.phtml" hash="703fcf0daa0fb71bef23987a9896bd29"/><file name="signup.phtml" hash="fc18c669c18c55cccdf2c66c96199dec"/></dir></dir></dir></dir></dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="pricewaiter.xml" hash="d578d936a726cca4837d5f2e58c5ca45"/></dir><dir name="template"><dir name="pricewaiter"><file name="widget.phtml" hash="1035d7df739b2a80a581b13684f95b39"/></dir></dir></dir></dir></dir></dir><dir name="etc"><dir name="modules"><file name="PriceWaiter_NYPWidget.xml" hash="7649918eb71009656f956a077f0cf6a8"/></dir></dir></dir><dir name="js"><dir name="pricewaiter"><file name="product-pages.js" hash="775a2c04db1f58c50f204ed7e15aef76"/><file name="token.js" hash="79ce2bdf4d9ae33fb4ef38c298f2dffe"/></dir></dir><dir name="skin"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="images"><file name="pricewaiter_logo.png" hash="becb9713a561131ff69eabb7503d3e74"/><file name="pricewaiter_tab.png" hash="1bab71be6b1a93aee2ae7aeae3807484"/><file name="pricewaiter_logo.png" hash="becb9713a561131ff69eabb7503d3e74"/><file name="pricewaiter_tab.png" hash="1bab71be6b1a93aee2ae7aeae3807484"/></dir><file name="pricewaiter.css" hash="cbda20d51ec4c1505962c1e79007d7f7"/></dir></dir></dir></dir></target></contents>
22
  <compatible/>
23
  <dependencies>
24
  <required>