nypwidget - Version 2.1.1

Version Notes

Bug Fix:
- Resolved issue that caused Billing Address to be duplicate of Shipping Address.

Download this release

Release Info

Developer PriceWaiter
Extension nypwidget
Version 2.1.1
Comparing to
See all releases


Code changes from version 2.1.0 to 2.1.1

app/code/community/PriceWaiter/NYPWidget/Model/Callback.php CHANGED
@@ -134,16 +134,16 @@ class PriceWaiter_NYPWidget_Model_Callback
134
  ->setCustomer_is_guest(0)
135
  ->setCustomer($customer);
136
 
 
 
 
137
  //Get a phone number, or make a dummy one
138
- if ($request['buyer_shipping_phone']) {
139
- $telephone = $request['buyer_shipping_phone'];
140
  } else {
141
  $telephone = "000-000-0000";
142
  }
143
 
144
- // Find Region ID
145
- $regionModel = Mage::getModel('directory/region')->loadByCode($request['buyer_shipping_state'], $request['buyer_shipping_country']);
146
-
147
  // set Billing Address
148
  $billing = $customer->getDefaultBillingAddress();
149
  $billingAddress = Mage::getModel('sales/order_address')
@@ -151,30 +151,29 @@ class PriceWaiter_NYPWidget_Model_Callback
151
  ->setAddressType(Mage_Sales_Model_Quote_Address::TYPE_BILLING)
152
  ->setCustomerId($customer->getId())
153
  ->setPrefix('')
154
- ->setFirstname($request['buyer_first_name'])
155
  ->setMiddlename('')
156
- ->setLastname($request['buyer_last_name'])
157
  ->setSuffix('')
158
  ->setCompany('')
159
- ->setStreet(array($request['buyer_shipping_address'], $request['buyer_shipping_address2']))
160
- ->setCity($request['buyer_shipping_city'])
161
- ->setCountry_id($request['buyer_shipping_country'])
162
- ->setRegion($request['buyer_shipping_state'])
163
  ->setRegion_id($regionModel->getId())
164
- ->setPostcode($request['buyer_shipping_zip'])
165
  ->setTelephone($telephone)
166
  ->setFax('');
167
  $order->setBillingAddress($billingAddress);
168
 
169
- // Try to get the shipping name. If we fail, fall back on the buyer_first/last_name fields
170
- preg_match('#^(\w+\.)?\s*([\'\’\w]+)\s+([\'\’\w]+)\s*(\w+\.?)?$#', $request['buyer_shipping_name'], $name);
171
 
172
- if (array_key_exists(2, $name)) {
173
- $request['buyer_shipping_first_name'] = $name[2];
174
- $request['buyer_shipping_last_name'] = $name[3];
175
  } else {
176
- $request['buyer_shipping_first_name'] = $request['buyer_first_name'];
177
- $request['buyer_shipping_last_name'] = $request['buyer_last_name'];
178
  }
179
 
180
  // set Shipping Address
134
  ->setCustomer_is_guest(0)
135
  ->setCustomer($customer);
136
 
137
+ // Find billing Region ID
138
+ $regionModel = Mage::getModel('directory/region')->loadByCode($request['buyer_billing_state'], $request['buyer_billing_country']);
139
+
140
  //Get a phone number, or make a dummy one
141
+ if ($request['buyer_billing_phone']) {
142
+ $telephone = $request['buyer_billing_phone'];
143
  } else {
144
  $telephone = "000-000-0000";
145
  }
146
 
 
 
 
147
  // set Billing Address
148
  $billing = $customer->getDefaultBillingAddress();
149
  $billingAddress = Mage::getModel('sales/order_address')
151
  ->setAddressType(Mage_Sales_Model_Quote_Address::TYPE_BILLING)
152
  ->setCustomerId($customer->getId())
153
  ->setPrefix('')
154
+ ->setFirstname($request['buyer_billing_first_name'])
155
  ->setMiddlename('')
156
+ ->setLastname($request['buyer_billing_last_name'])
157
  ->setSuffix('')
158
  ->setCompany('')
159
+ ->setStreet(array($request['buyer_billing_address'], $request['buyer_billing_address2']))
160
+ ->setCity($request['buyer_billing_city'])
161
+ ->setCountry_id($request['buyer_billing_country'])
162
+ ->setRegion($request['buyer_billing_state'])
163
  ->setRegion_id($regionModel->getId())
164
+ ->setPostcode($request['buyer_billing_zip'])
165
  ->setTelephone($telephone)
166
  ->setFax('');
167
  $order->setBillingAddress($billingAddress);
168
 
169
+ // Find shipping Region ID
170
+ $regionModel = Mage::getModel('directory/region')->loadByCode($request['buyer_shipping_state'], $request['buyer_shipping_country']);
171
 
172
+ //Get a phone number, or make a dummy one
173
+ if ($request['buyer_shipping_phone']) {
174
+ $telephone = $request['buyer_shipping_phone'];
175
  } else {
176
+ $telephone = "000-000-0000";
 
177
  }
178
 
179
  // set Shipping Address
app/code/community/PriceWaiter/NYPWidget/etc/config.xml CHANGED
@@ -18,7 +18,7 @@
18
 
19
  <modules>
20
  <PriceWaiter_NYPWidget>
21
- <version>2.1.0</version>
22
  </PriceWaiter_NYPWidget>
23
  </modules>
24
 
18
 
19
  <modules>
20
  <PriceWaiter_NYPWidget>
21
+ <version>2.1.1</version>
22
  </PriceWaiter_NYPWidget>
23
  </modules>
24
 
package.xml CHANGED
@@ -1,14 +1,14 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>nypwidget</name>
4
- <version>2.1.0</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&#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;&#xD; 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>
11
- <notes>Bug Fix:&#xD;- Added additional check for generated API Secret, now generating automatically if one isn't set.</notes>
12
  <authors>
13
  <author>
14
  <name>PriceWaiter</name>
@@ -16,9 +16,9 @@
16
  <email>bobby.b@pricewaiter.com</email>
17
  </author>
18
  </authors>
19
- <date>2015-05-07</date>
20
- <time>13:44:40</time>
21
- <contents><target name="mageweb"><dir name="app"><dir name="etc"><dir name="modules"><file name="PriceWaiter_NYPWidget.xml" hash="72be18d9a8a741abc8926866449619cd"/></dir></dir><dir name="code"><dir name="community"><dir name="PriceWaiter"><dir name="NYPWidget"><dir name="Block"><dir name="Adminhtml"><file name="Link.php" hash="848a4e3813a3d238cacdd812334bb780"/><file name="Signup.php" hash="35a2739246307b5c7a3b69780a7f31fd"/><file name="Widget.php" hash="b781daf1de34d7856de7faba65afe414"/></dir><file name="Category.php" hash="de6397a45d7deabc803bef83a83d6b9a"/><file name="Widget.php" hash="193d694c4acc2133d8402f1e59d4dc25"/></dir><dir name="controllers"><dir name="Adminhtml"><file name="PricewaiterController.php" hash="27e17f05c8e2b2edcc28230185334f35"/></dir><file name="CallbackController.php" hash="d16b43353b74924298ff4cf7cf989f33"/><file name="ProductinfoController.php" hash="116869b03b42e93c66fde077aeec22ce"/></dir><dir name="etc"><file name="adminhtml.xml" hash="dff2f6de0dacaf5a933048fa4a347f2f"/><file name="config.xml" hash="6e7c11b1df196d5c4e74bf0bae93d5fd"/><file name="system.xml" hash="82bb83cf7eb6a1d0ebf6bb774cd24414"/></dir><dir name="Helper"><file name="Data.php" hash="49a7fdd4928b3c0d358ad7e1d240d874"/></dir><dir name="Model"><file name="Callback.php" hash="65f978209a660f847954795c6a8525e8"/><file name="Category.php" hash="884685769be745cb273833ab7d691593"/><file name="Observer.php" hash="2399e210dd82633091570483f144bf12"/><file name="Order.php" hash="080844dcc4cf55d516abe27175a3a62a"/><file name="PaymentMethod.php" hash="386134e1ac803580222263523f0ced31"/><dir name="Carrier"><file name="ShippingMethod.php" hash="43a6ec1ad462797a5359238dcf9a749d"/></dir><dir name="Display"><file name="Phrase.php" hash="5b595a42b487930154c505a8e9a1301c"/><file name="Size.php" hash="8a596164268f48c3c034274550b13b96"/></dir><dir name="Mysql4"><dir name="Category"><file name="Collection.php" hash="45eaa532cd5935b69102b8969da848fa"/></dir><file name="Category.php" hash="f4e761813ec4bb81d919f30895ce3578"/><file name="Order.php" hash="c08b340cec16bf774a7c178726dee0ac"/><dir name="Order"><file name="Collection.php" hash="4dc5b344274c0e5a391a24864fd1c003"/></dir></dir><dir name="Resource"><dir name="Eav"><dir name="Mysql4"><file name="Setup.php" hash="d63678e9cc718ee87e8db3ca5163a8fd"/></dir></dir></dir></dir><dir name="sql"><dir name="nypwidget_setup"><file name="mysql4-install-1.0.0.php" hash="cd1b7892e75e4452ee94afbbefb4de6e"/><file name="mysql4-upgrade-1.1.2-1.1.3.php" hash="d1ae05f5cbe4a8f833e92b9f49d395db"/><file name="mysql4-upgrade-1.1.7-1.1.8.php" hash="bd342c802f6c91de6f9f51b0a4a25414"/><file name="mysql4-upgrade-1.2.4-1.2.5.php" hash="b1ced0226bef6e950e026402b933872f"/><file name="mysql4-upgrade-1.3.0-1.3.1.php" hash="106b36065c125be31fc67424d80acdd4"/></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="9e06026a8a820224336de4c9a7dde3fd"/></dir><dir name="template"><dir name="pricewaiter"><file name="categorytab.phtml" hash="d1d2c333cc9b18c909a44d333d8ab077"/><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="cbaa61566545d46740d2e9b6078d1874"/></dir><dir name="template"><dir name="pricewaiter"><file name="widget.phtml" hash="3b85120aaa222082063f464f1d11debb"/></dir></dir></dir></dir></dir></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="c4061169f3e505c28bd09924108ca0ad"/></dir></dir></dir></dir><dir name="js"><dir name="pricewaiter"><file name="product-pages.js" hash="db4c96a2186bda2754d80fab21139503"/><file name="token.js" hash="dbaedb04a60982743949e16096ed7f58"/></dir></dir></target></contents>
22
  <compatible/>
23
  <dependencies>
24
  <required>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>nypwidget</name>
4
+ <version>2.1.1</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&#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;&#xD; 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>
11
+ <notes>Bug Fix:&#xD;- Resolved issue that caused Billing Address to be duplicate of Shipping Address.</notes>
12
  <authors>
13
  <author>
14
  <name>PriceWaiter</name>
16
  <email>bobby.b@pricewaiter.com</email>
17
  </author>
18
  </authors>
19
+ <date>2015-07-28</date>
20
+ <time>19:24:34</time>
21
+ <contents><target name="mageweb"><dir name="app"><dir name="etc"><dir name="modules"><file name="PriceWaiter_NYPWidget.xml" hash="72be18d9a8a741abc8926866449619cd"/></dir></dir><dir name="code"><dir name="community"><dir name="PriceWaiter"><dir name="NYPWidget"><dir name="Block"><dir name="Adminhtml"><file name="Link.php" hash="848a4e3813a3d238cacdd812334bb780"/><file name="Signup.php" hash="35a2739246307b5c7a3b69780a7f31fd"/><file name="Widget.php" hash="b781daf1de34d7856de7faba65afe414"/></dir><file name="Category.php" hash="de6397a45d7deabc803bef83a83d6b9a"/><file name="Widget.php" hash="193d694c4acc2133d8402f1e59d4dc25"/></dir><dir name="controllers"><dir name="Adminhtml"><file name="PricewaiterController.php" hash="27e17f05c8e2b2edcc28230185334f35"/></dir><file name="CallbackController.php" hash="d16b43353b74924298ff4cf7cf989f33"/><file name="ProductinfoController.php" hash="116869b03b42e93c66fde077aeec22ce"/></dir><dir name="etc"><file name="adminhtml.xml" hash="dff2f6de0dacaf5a933048fa4a347f2f"/><file name="config.xml" hash="739770ab608f83b7625f8059f3050957"/><file name="system.xml" hash="82bb83cf7eb6a1d0ebf6bb774cd24414"/></dir><dir name="Helper"><file name="Data.php" hash="49a7fdd4928b3c0d358ad7e1d240d874"/></dir><dir name="Model"><file name="Callback.php" hash="09f595909362ceed82b4361bdc609048"/><file name="Category.php" hash="884685769be745cb273833ab7d691593"/><file name="Observer.php" hash="2399e210dd82633091570483f144bf12"/><file name="Order.php" hash="080844dcc4cf55d516abe27175a3a62a"/><file name="PaymentMethod.php" hash="386134e1ac803580222263523f0ced31"/><dir name="Carrier"><file name="ShippingMethod.php" hash="43a6ec1ad462797a5359238dcf9a749d"/></dir><dir name="Display"><file name="Phrase.php" hash="5b595a42b487930154c505a8e9a1301c"/><file name="Size.php" hash="8a596164268f48c3c034274550b13b96"/></dir><dir name="Mysql4"><dir name="Category"><file name="Collection.php" hash="45eaa532cd5935b69102b8969da848fa"/></dir><file name="Category.php" hash="f4e761813ec4bb81d919f30895ce3578"/><file name="Order.php" hash="c08b340cec16bf774a7c178726dee0ac"/><dir name="Order"><file name="Collection.php" hash="4dc5b344274c0e5a391a24864fd1c003"/></dir></dir><dir name="Resource"><dir name="Eav"><dir name="Mysql4"><file name="Setup.php" hash="d63678e9cc718ee87e8db3ca5163a8fd"/></dir></dir></dir></dir><dir name="sql"><dir name="nypwidget_setup"><file name="mysql4-install-1.0.0.php" hash="cd1b7892e75e4452ee94afbbefb4de6e"/><file name="mysql4-upgrade-1.1.2-1.1.3.php" hash="d1ae05f5cbe4a8f833e92b9f49d395db"/><file name="mysql4-upgrade-1.1.7-1.1.8.php" hash="bd342c802f6c91de6f9f51b0a4a25414"/><file name="mysql4-upgrade-1.2.4-1.2.5.php" hash="b1ced0226bef6e950e026402b933872f"/><file name="mysql4-upgrade-1.3.0-1.3.1.php" hash="106b36065c125be31fc67424d80acdd4"/></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="9e06026a8a820224336de4c9a7dde3fd"/></dir><dir name="template"><dir name="pricewaiter"><file name="categorytab.phtml" hash="d1d2c333cc9b18c909a44d333d8ab077"/><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="cbaa61566545d46740d2e9b6078d1874"/></dir><dir name="template"><dir name="pricewaiter"><file name="widget.phtml" hash="3b85120aaa222082063f464f1d11debb"/></dir></dir></dir></dir></dir></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="c4061169f3e505c28bd09924108ca0ad"/></dir></dir></dir></dir><dir name="js"><dir name="pricewaiter"><file name="product-pages.js" hash="db4c96a2186bda2754d80fab21139503"/><file name="token.js" hash="dbaedb04a60982743949e16096ed7f58"/></dir></dir></target></contents>
22
  <compatible/>
23
  <dependencies>
24
  <required>