nypwidget - Version 1.2.6

Version Notes

Bug Fixes:
- Fixed problem that allowed orders to be created without customer name..

Download this release

Release Info

Developer PriceWaiter
Extension nypwidget
Version 1.2.6
Comparing to
See all releases


Code changes from version 1.2.5 to 1.2.6

app/code/community/PriceWaiter/NYPWidget/Model/Callback.php CHANGED
@@ -80,9 +80,6 @@ class PriceWaiter_NYPWidget_Model_Callback
80
  $customer = Mage::getModel('customer/customer')
81
  ->setWebsiteId($this->_store->getWebsiteId());
82
  $customer->loadByEmail($request['buyer_email']);
83
- preg_match('#^(\w+\.)?\s*([\'\’\w]+)\s+([\'\’\w]+)\s*(\w+\.?)?$#',$request['buyer_name'] , $name);
84
- $request['buyer_first_name'] = $name[2];
85
- $request['buyer_last_name'] = $name[3];
86
 
87
  if (!$customer->getId()) {
88
  // Create a new customer with this email
@@ -159,6 +156,16 @@ class PriceWaiter_NYPWidget_Model_Callback
159
  ->setFax('');
160
  $order->setBillingAddress($billingAddress);
161
 
 
 
 
 
 
 
 
 
 
 
162
  // set Shipping Address
163
  $shipping = $customer->getDefaultShippingAddress();
164
  $shippingAddress = Mage::getModel('sales/order_address')
@@ -166,9 +173,9 @@ class PriceWaiter_NYPWidget_Model_Callback
166
  ->setAddressType(Mage_Sales_Model_Quote_Address::TYPE_BILLING)
167
  ->setCustomerId($customer->getId())
168
  ->setPrefix('')
169
- ->setFirstname($request['buyer_first_name'])
170
  ->setMiddlename('')
171
- ->setLastname($request['buyer_last_name'])
172
  ->setSuffix('')
173
  ->setCompany('')
174
  ->setStreet(array($request['buyer_shipping_address'],$request['buyer_shipping_address2']))
80
  $customer = Mage::getModel('customer/customer')
81
  ->setWebsiteId($this->_store->getWebsiteId());
82
  $customer->loadByEmail($request['buyer_email']);
 
 
 
83
 
84
  if (!$customer->getId()) {
85
  // Create a new customer with this email
156
  ->setFax('');
157
  $order->setBillingAddress($billingAddress);
158
 
159
+ // Try to get the shipping name. If we fail, fall back on the buyer_first/last_name fields
160
+ preg_match('#^(\w+\.)?\s*([\'\’\w]+)\s+([\'\’\w]+)\s*(\w+\.?)?$#',$request['buyer_shipping_name'] , $name);
161
+ $request['buyer_shipping_first_name'] = $name[2];
162
+ $request['buyer_shipping_last_name'] = $name[3];
163
+
164
+ if ($request['buyer_shipping_first_name'] == '') {
165
+ $request['buyer_shipping_first_name'] = $request['buyer_first_name'];
166
+ $request['buyer_shipping_last_name'] = $request['buyer_last_name'];
167
+ }
168
+
169
  // set Shipping Address
170
  $shipping = $customer->getDefaultShippingAddress();
171
  $shippingAddress = Mage::getModel('sales/order_address')
173
  ->setAddressType(Mage_Sales_Model_Quote_Address::TYPE_BILLING)
174
  ->setCustomerId($customer->getId())
175
  ->setPrefix('')
176
+ ->setFirstname($request['buyer_shipping_first_name'])
177
  ->setMiddlename('')
178
+ ->setLastname($request['buyer_shipping_last_name'])
179
  ->setSuffix('')
180
  ->setCompany('')
181
  ->setStreet(array($request['buyer_shipping_address'],$request['buyer_shipping_address2']))
app/code/community/PriceWaiter/NYPWidget/etc/config.xml CHANGED
@@ -18,7 +18,7 @@
18
 
19
  <modules>
20
  <PriceWaiter_NYPWidget>
21
- <version>1.2.5</version>
22
  </PriceWaiter_NYPWidget>
23
  </modules>
24
 
18
 
19
  <modules>
20
  <PriceWaiter_NYPWidget>
21
+ <version>1.2.6</version>
22
  </PriceWaiter_NYPWidget>
23
  </modules>
24
 
package.xml CHANGED
@@ -1,7 +1,7 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>nypwidget</name>
4
- <version>1.2.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>
@@ -9,13 +9,12 @@
9
  <summary>PriceWaiter&#xAE; let's buyers make offers on your products that you can easily accept, counter offer or reject.</summary>
10
  <description>Sell more, immediately, with the PriceWaiter&#xAE; 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;
11
  PriceWaiter&#xAE; 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&#xAE; in your Magento admin control panel.</description>
12
- <notes>New Features:&#xD;
13
- - Added new "Custom CSS" field in the admin to allow you to make CSS changes to the PriceWaiter button more easily.&#xD;
14
- - Newly received orders now use the status "Processing - PriceWaiter" to more closely mirror Magento's Order Statuses.&#xD;
15
  </notes>
16
  <authors><author><name>PriceWaiter</name><user>pricewaiter</user><email>bobby.b@pricewaiter.com</email></author></authors>
17
- <date>2014-01-12</date>
18
- <time>01:54:37</time>
19
  <contents><target name="magecommunity"><dir name="PriceWaiter"><dir name="NYPWidget"><dir name="Block"><dir name="Adminhtml"><file name="Widget.php" hash="cffdba25dabdb8f9b6a2eac21c0e82e0"/></dir><file name="Category.php" hash="ba5bcfb87399356266eb2874bf691d6e"/><file name="Widget.php" hash="25489ee6ae666d91db98b70dd6adbf40"/></dir><dir name="Helper"><file name="Data.php" hash="e2d7bf749fa77e436b4166411c807487"/><file name=".Data.php.un~" hash="ebf997909064b973c4bb0720e63a48c0"/></dir><dir name="Model"><file name="Callback.php" hash="8f9b7fcc444a2b8edb13f76cfce2b670"/><dir name="Carrier"><file name="ShippingMethod.php" hash="1df7b75009a6e6e8e41b554fecb813db"/></dir><file name="Category.php" hash="55588e458cacb778b92fdacd8edeb22a"/><dir name="Display"><file name="Phrase.php" hash="ad605b93302ec648c5a7d3e3401f47b5"/><file name="Size.php" hash="42c2917e730811b78fd12e7591cb9159"/></dir><dir name="Mysql4"><dir name="Category"><file name="Collection.php" hash="adbbb19ccafb1498bb0d4c5d20abddd1"/></dir><file name="Category.php" hash="ba6b693541711d91edc5b7edae799a97"/><dir name="Order"><file name="Collection.php" hash="de7e92559722c9735b32a6d30862087e"/></dir><file name="Order.php" hash="237302190fa65833b5ff187dd0bbe71a"/></dir><file name="Observer.php" hash="a5b643d09e366068028dc1df1abee154"/><file name="Order.php" hash="c44f2d228a38e991843cee197abd397c"/><file name="PaymentMethod.php" hash="0106a5c193079d4cf07005fc9d22dd29"/><dir name="Resource"><dir name="Eav"><dir name="Mysql4"><file name="Setup.php" hash="da87eaa37fc5a09a5d5c38f9bbecabb1"/></dir></dir></dir></dir><dir name="controllers"><file name="CallbackController.php" hash="8b95003b06ebc0e1a05430655f2caacd"/></dir><dir name="etc"><file name="adminhtml.xml" hash="022f1761ba091c7e1f3e4901d40d5ce0"/><file name="config.xml" hash="5b75615e909d9f10b6c63af5c6488b21"/><file name="system.xml" hash="8b65aaf26f9bb75eee863e169b25a7ae"/><file name=".config.xml.un~" hash="dbeb241a6a168c330afedc248d5a8350"/></dir><dir name="sql"><dir name="nypwidget_setup"><file name="mysql4-install-1.0.0.php" hash="b30a0b38090a9c7aafb1a419b21755fe"/><file name="mysql4-upgrade-1.1.2-1.1.3.php" hash="8d4bd167694c277a0e8ab8034d87cb1b"/><file name="mysql4-upgrade-1.1.7-1.1.8.php" hash="2a8de13744724f647e23e612ecf1d196"/><file name="mysql4-upgrade-1.2.4-1.2.5.php" hash="4b0ef14d3e455afea1d966f8f1641d6b"/><file name=".mysql4-install-1.0.0.php.un~" hash="4ac3da846a54fea6461349a73b2a8a0b"/><file name=".mysql4-upgrade-1.2.4-1.2.5.php.un~" hash="38d59b3e5dd699ac95c81d747a1f5dcc"/></dir></dir></dir></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="pricewaiter.xml" hash="cc51462b56118a611be1a329b308d528"/></dir><dir name="template"><dir name="pricewaiter"><file name="admin_widget.phtml" hash="daae86cfa34fbe5e786715c0c579e398"/><file name="categorytab.phtml" hash="43f8af9feca6775e4a1e8a149a86268e"/></dir></dir></dir></dir></dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="pricewaiter.xml" hash="0da284d426574c7ae1f154b096f8b413"/></dir><dir name="template"><dir name="pricewaiter"><file name="widget.phtml" hash="d4e9f431922f843d5911a8b9ec2b814e"/></dir></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="PriceWaiter_NYPWidget.xml" hash="d3b86fa976b99e64df65f9e98d689257"/></dir></target><target name="mageweb"><dir name="js"><dir name="jscolor-pw"><file name="arrow.gif" hash="5034704a76cd55c1cbcbc58ea6bf523f"/><file name="cross.gif" hash="ba9a274b9323753cd95bc3b1eb2f4e5f"/><file name="hs.png" hash="fefa1a03d92ebad25c88dca94a0b63db"/><file name="hv.png" hash="990d71cada17da100653636cf8490884"/><file name="jscolor.js" hash="668050b57cb3ad59d0a56a16fddf1a91"/></dir><dir name="pricewaiter"><file name="product-pages.js" hash="13abcb256a75027c883c247af09392a3"/></dir></dir></target><target name="mageskin"><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"/></dir><file name="pricewaiter.css" hash="6a58cdaa35d8f61cbb305a6a1a206816"/></dir></dir></dir></target></contents>
20
  <compatible/>
21
  <dependencies><required><php><min>5.2.0</min><max>6.0.0</max></php></required></dependencies>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>nypwidget</name>
4
+ <version>1.2.6</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>
9
  <summary>PriceWaiter&#xAE; let's buyers make offers on your products that you can easily accept, counter offer or reject.</summary>
10
  <description>Sell more, immediately, with the PriceWaiter&#xAE; 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;
11
  PriceWaiter&#xAE; 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&#xAE; in your Magento admin control panel.</description>
12
+ <notes>Bug Fixes:&#xD;
13
+ - Fixed problem that allowed orders to be created without customer name..&#xD;
 
14
  </notes>
15
  <authors><author><name>PriceWaiter</name><user>pricewaiter</user><email>bobby.b@pricewaiter.com</email></author></authors>
16
+ <date>2014-02-03</date>
17
+ <time>09:33:00</time>
18
  <contents><target name="magecommunity"><dir name="PriceWaiter"><dir name="NYPWidget"><dir name="Block"><dir name="Adminhtml"><file name="Widget.php" hash="cffdba25dabdb8f9b6a2eac21c0e82e0"/></dir><file name="Category.php" hash="ba5bcfb87399356266eb2874bf691d6e"/><file name="Widget.php" hash="25489ee6ae666d91db98b70dd6adbf40"/></dir><dir name="Helper"><file name="Data.php" hash="e2d7bf749fa77e436b4166411c807487"/><file name=".Data.php.un~" hash="ebf997909064b973c4bb0720e63a48c0"/></dir><dir name="Model"><file name="Callback.php" hash="8f9b7fcc444a2b8edb13f76cfce2b670"/><dir name="Carrier"><file name="ShippingMethod.php" hash="1df7b75009a6e6e8e41b554fecb813db"/></dir><file name="Category.php" hash="55588e458cacb778b92fdacd8edeb22a"/><dir name="Display"><file name="Phrase.php" hash="ad605b93302ec648c5a7d3e3401f47b5"/><file name="Size.php" hash="42c2917e730811b78fd12e7591cb9159"/></dir><dir name="Mysql4"><dir name="Category"><file name="Collection.php" hash="adbbb19ccafb1498bb0d4c5d20abddd1"/></dir><file name="Category.php" hash="ba6b693541711d91edc5b7edae799a97"/><dir name="Order"><file name="Collection.php" hash="de7e92559722c9735b32a6d30862087e"/></dir><file name="Order.php" hash="237302190fa65833b5ff187dd0bbe71a"/></dir><file name="Observer.php" hash="a5b643d09e366068028dc1df1abee154"/><file name="Order.php" hash="c44f2d228a38e991843cee197abd397c"/><file name="PaymentMethod.php" hash="0106a5c193079d4cf07005fc9d22dd29"/><dir name="Resource"><dir name="Eav"><dir name="Mysql4"><file name="Setup.php" hash="da87eaa37fc5a09a5d5c38f9bbecabb1"/></dir></dir></dir></dir><dir name="controllers"><file name="CallbackController.php" hash="8b95003b06ebc0e1a05430655f2caacd"/></dir><dir name="etc"><file name="adminhtml.xml" hash="022f1761ba091c7e1f3e4901d40d5ce0"/><file name="config.xml" hash="5b75615e909d9f10b6c63af5c6488b21"/><file name="system.xml" hash="8b65aaf26f9bb75eee863e169b25a7ae"/><file name=".config.xml.un~" hash="dbeb241a6a168c330afedc248d5a8350"/></dir><dir name="sql"><dir name="nypwidget_setup"><file name="mysql4-install-1.0.0.php" hash="b30a0b38090a9c7aafb1a419b21755fe"/><file name="mysql4-upgrade-1.1.2-1.1.3.php" hash="8d4bd167694c277a0e8ab8034d87cb1b"/><file name="mysql4-upgrade-1.1.7-1.1.8.php" hash="2a8de13744724f647e23e612ecf1d196"/><file name="mysql4-upgrade-1.2.4-1.2.5.php" hash="4b0ef14d3e455afea1d966f8f1641d6b"/><file name=".mysql4-install-1.0.0.php.un~" hash="4ac3da846a54fea6461349a73b2a8a0b"/><file name=".mysql4-upgrade-1.2.4-1.2.5.php.un~" hash="38d59b3e5dd699ac95c81d747a1f5dcc"/></dir></dir></dir></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="pricewaiter.xml" hash="cc51462b56118a611be1a329b308d528"/></dir><dir name="template"><dir name="pricewaiter"><file name="admin_widget.phtml" hash="daae86cfa34fbe5e786715c0c579e398"/><file name="categorytab.phtml" hash="43f8af9feca6775e4a1e8a149a86268e"/></dir></dir></dir></dir></dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="pricewaiter.xml" hash="0da284d426574c7ae1f154b096f8b413"/></dir><dir name="template"><dir name="pricewaiter"><file name="widget.phtml" hash="d4e9f431922f843d5911a8b9ec2b814e"/></dir></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="PriceWaiter_NYPWidget.xml" hash="d3b86fa976b99e64df65f9e98d689257"/></dir></target><target name="mageweb"><dir name="js"><dir name="jscolor-pw"><file name="arrow.gif" hash="5034704a76cd55c1cbcbc58ea6bf523f"/><file name="cross.gif" hash="ba9a274b9323753cd95bc3b1eb2f4e5f"/><file name="hs.png" hash="fefa1a03d92ebad25c88dca94a0b63db"/><file name="hv.png" hash="990d71cada17da100653636cf8490884"/><file name="jscolor.js" hash="668050b57cb3ad59d0a56a16fddf1a91"/></dir><dir name="pricewaiter"><file name="product-pages.js" hash="13abcb256a75027c883c247af09392a3"/></dir></dir></target><target name="mageskin"><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"/></dir><file name="pricewaiter.css" hash="6a58cdaa35d8f61cbb305a6a1a206816"/></dir></dir></dir></target></contents>
19
  <compatible/>
20
  <dependencies><required><php><min>5.2.0</min><max>6.0.0</max></php></required></dependencies>