Sinabs_Directcheckout - Version 0.1.3

Version Notes

Release 0.1.3 Fix Customer Register Magento CE 1.4+

Download this release

Release Info

Developer Magento Core Team
Extension Sinabs_Directcheckout
Version 0.1.3
Comparing to
See all releases


Code changes from version 0.1.2 to 0.1.3

app/code/community/Sinabs/Directcheckout/controllers/AjaxController.php CHANGED
@@ -179,9 +179,9 @@ class Sinabs_Directcheckout_AjaxController extends Mage_Core_Controller_Front_Ac
179
  throw new Exception($this->__('Please agree to all the terms and conditions before placing the order.'));
180
  }
181
  }
182
-
183
  if ($registered !== false) {
184
- $this->_createCustomer($dataBilling, $isSubscribed);
185
  }
186
 
187
  $this->_getOnepage()->saveOrder();
@@ -193,7 +193,8 @@ class Sinabs_Directcheckout_AjaxController extends Mage_Core_Controller_Front_Ac
193
  if (isset($redirectUrl)) {
194
  $result['redirect'] = $redirectUrl;
195
  }
196
- Mage::getSingleton('checkout/cart')->truncate()->save();
 
197
  $this->getResponse()->setBody(Zend_Json::encode($result));
198
  } catch (Exception $e) {
199
  $result['error'] = true;
@@ -249,39 +250,4 @@ class Sinabs_Directcheckout_AjaxController extends Mage_Core_Controller_Front_Ac
249
  return;
250
  }
251
  }
252
-
253
- /**
254
- * Create Customer
255
- *
256
- * @param array $data
257
- * @return Mage_Customer_Model_Customer_Session
258
- */
259
- private function _createCustomer($data, $isSubscribed = false)
260
- {
261
- $customer = Mage::getModel('customer/customer');
262
- $email = $data['email'];
263
-
264
- $customer->setWebsiteId(Mage::app()->getWebsite()->getId());
265
- $customer->loadByEmail($email);
266
-
267
- if(!$customer->getId()) {
268
- $customer->setEmail($email);
269
- $customer->setFirstname($data['firstname']);
270
- $customer->setLastname($data['lastname']);
271
- $customer->setPassword($data['customer_password']);
272
- }
273
- $customer->save();
274
- $customer->setConfirmation(null);
275
- $customer->save();
276
-
277
- if ($customer->getId()) {
278
- if ($isSubscribed !== false) {
279
- Mage::getModel('newsletter/subscriber')->subscribe($customer->getEmail());
280
- }
281
- } else {
282
- throw new Exception("Unable to create customer account");
283
- }
284
-
285
- return Mage::getSingleton('customer/session')->loginById($customer->getId());
286
- }
287
  }
179
  throw new Exception($this->__('Please agree to all the terms and conditions before placing the order.'));
180
  }
181
  }
182
+
183
  if ($registered !== false) {
184
+ $this->_getOnepage()->getQuote()->setCheckoutMethod(Mage_Checkout_Model_Type_Onepage::METHOD_REGISTER);
185
  }
186
 
187
  $this->_getOnepage()->saveOrder();
193
  if (isset($redirectUrl)) {
194
  $result['redirect'] = $redirectUrl;
195
  }
196
+ Mage::getSingleton('checkout/cart')->truncate();
197
+ Mage::getSingleton('checkout/cart')->save();
198
  $this->getResponse()->setBody(Zend_Json::encode($result));
199
  } catch (Exception $e) {
200
  $result['error'] = true;
250
  return;
251
  }
252
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
253
  }
app/code/community/Sinabs/Directcheckout/etc/config.xml CHANGED
@@ -23,7 +23,7 @@
23
  <config>
24
  <modules>
25
  <Sinabs_Directcheckout>
26
- <version>0.1.1</version>
27
  </Sinabs_Directcheckout>
28
  </modules>
29
  <global>
23
  <config>
24
  <modules>
25
  <Sinabs_Directcheckout>
26
+ <version>0.1.3</version>
27
  </Sinabs_Directcheckout>
28
  </modules>
29
  <global>
package.xml CHANGED
@@ -1,18 +1,18 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Sinabs_Directcheckout</name>
4
- <version>0.1.2</version>
5
  <stability>stable</stability>
6
  <license uri="http://opensource.org/licenses/osl-3.0.php">OSL</license>
7
  <channel>community</channel>
8
  <extends/>
9
- <summary>Directcheckout Release 0.1.2</summary>
10
  <description>Increase your conversion rate through our one step checkout module.</description>
11
- <notes>Release 0.1.2 Fix bugs Magento CE 1.4+</notes>
12
  <authors><author><name>Sinabs</name><user>auto-converted</user><email>tech@sinabs.fr</email></author></authors>
13
  <date>2014-01-23</date>
14
- <time>09:49:38</time>
15
- <contents><target name="magecommunity"><dir name="Sinabs"><dir name="Directcheckout"><dir name="Block"><dir name="Checkout"><dir name="Onepage"><file name="Link.php" hash="e2c99a8ad1b2ff0c0e46779e8e781a38"/></dir><file name="Billing.php" hash="3566196fe02cfd6b6302a7c55dc0f4cb"/><file name="Coupon.php" hash="c3ece6a9e8c798034a964e06f021692c"/><file name="Gift.php" hash="bb9fb6d9e99f6e48f8e318ab15d92f27"/><file name="Links.php" hash="0e3348a234cccd82d04f33741b7914f3"/><file name="Newsletter.php" hash="ff4f476b8a62459ada10ada97b072876"/><file name="Shipping.php" hash="222ab5cb49fb254b0b798de4a69b9044"/></dir></dir><dir name="Helper"><file name="Address.php" hash="b8da94d8debe553a12a50368a153475c"/><file name="Data.php" hash="cf1d3e23eb8471d817ba616835b3c7bf"/><file name="Url.php" hash="d7f4da682505d1eed6c06d63458bdb24"/></dir><dir name="controllers"><dir name="Customer"><file name="AjaxController.php" hash="a29445ad4907034af82dbfc736991b0a"/></dir><file name="AjaxController.php" hash="fca216a1a1093278469abd3b9fd5594a"/><file name="IndexController.php" hash="5e3bb2ef6a37f8d57275587e5fd8b684"/></dir><dir name="etc"><file name="config.xml" hash="487569e0fe5836c65534d7be0c79b973"/><file name="system.xml" hash="09ed5ce446e4a564bc82dea994bc86a4"/></dir></dir></dir></target><target name="magedesign"><dir name="frontend"><dir name="default"><dir name="default"><dir name="template"><dir name="directcheckout"><dir name="checkout"><dir name="additional"><file name="agreements.phtml" hash="d4a63588cb46492263fb1dc934b8b2aa"/><file name="coupon.phtml" hash="708dffbebd44559974e089674dfad28d"/><file name="newsletter.phtml" hash="909a0084e07a83827df47ae04f531ab6"/></dir><dir name="gift"><file name="options.phtml" hash="945c0f916729b864b879a6f5f4a0dad4"/></dir><dir name="payment"><file name="methods.phtml" hash="a764824070152cbfd8965f54de04fbef"/></dir><file name="additional.phtml" hash="0a99c4ce5270b4ec6b0991eb833e93dc"/><file name="billing.phtml" hash="38c0fd17d763e1b30b30067ff6685722"/><file name="gift.phtml" hash="d7ab7ceb3424149f7cb3dae9c00c22b6"/><file name="review.phtml" hash="b834c89a12e1ee5353f5286db796ef55"/><file name="shipping.phtml" hash="c26c65eb137e8cadde1471f90308b159"/><file name="shipping_method.phtml" hash="333b3a89be3454746fe0343f3eafea94"/><file name="spo.phtml" hash="8c17c38c710394e6378926ba8107bb22"/><file name="summary.phtml" hash="ffdef5b2d1054cfb6a4b14b28e547cbe"/></dir><dir name="customer"><dir name="widget"><file name="name.phtml" hash="c2f0baf4cc8ac175dd7f3b5ac53d2fc6"/></dir><file name="forget.phtml" hash="a437f709a6e711668a2a2564be96a0ab"/><file name="login.phtml" hash="3585445d31384c5c88f65849ae4219c4"/></dir><file name="checkout.phtml" hash="7e78913b9f90fcf67cf65b7d8c7e6830"/></dir></dir><dir name="layout"><file name="directcheckout.xml" hash="eef64b48c7d222dcead72195e67cdbb8"/></dir></dir></dir></dir></target><target name="mageskin"><dir name="frontend"><dir name="default"><dir name="default"><dir name="directcheckout"><dir name="css"><file name="modal.css" hash="ff14481d15d473063ccbc1158867cf43"/><file name="styles.css" hash="af3e0051c28e12c38a943b57abf0b3a2"/></dir><dir name="images"><file name="button-loader.gif" hash="9a9cfbeae93874aa92295baf21ace29c"/><file name="directcheckout-step1.png" hash="fee760a1d5f3b0ea2b92afb78027a750"/><file name="directcheckout-step2.png" hash="b78af68848930f1be94ef4ed7afd9c9b"/><file name="directcheckout-step3.png" hash="59d0cdcad1de0cdf0141bcd2275f0bc8"/><file name="directcheckout-step4.png" hash="48060ab23605daa5dadd34be3eb35ae6"/><file name="directcheckout-stepfinal.png" hash="b03cf8ea88e987ceb42d966b234d7a1c"/><file name="line-gradient.gif" hash="bef9df2d426124dbe3d496407219190b"/><file name="spinner.gif" hash="add667817f25bce331a213ab3cc9621f"/></dir></dir></dir></dir></dir></target><target name="mage"><dir name="js"><dir name="directcheckout"><file name="directcheckout.js" hash="44785d164857b2c572c2daffee7efab3"/><file name="modal.js" hash="c3b77dc52bba63e273e21414df4f0f77"/></dir></dir></target><target name="magelocale"><dir name="en_US"><file name="Sinabs_Directcheckout.csv" hash="a105fd3a42d9c12d57b137cc043b4f32"/></dir><dir name="fr_FR"><file name="Sinabs_Directcheckout.csv" hash="b820881ac64f310db71ee7da470abfb8"/></dir></target><target name="mageetc"><dir name="modules"><file name="Sinabs_Directcheckout.xml" hash="8dfc7b08d0b331930caf63b6963f0356"/></dir></target></contents>
16
  <compatible/>
17
  <dependencies/>
18
  </package>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Sinabs_Directcheckout</name>
4
+ <version>0.1.3</version>
5
  <stability>stable</stability>
6
  <license uri="http://opensource.org/licenses/osl-3.0.php">OSL</license>
7
  <channel>community</channel>
8
  <extends/>
9
+ <summary>Directcheckout Release 0.1.3</summary>
10
  <description>Increase your conversion rate through our one step checkout module.</description>
11
+ <notes>Release 0.1.3 Fix Customer Register Magento CE 1.4+</notes>
12
  <authors><author><name>Sinabs</name><user>auto-converted</user><email>tech@sinabs.fr</email></author></authors>
13
  <date>2014-01-23</date>
14
+ <time>10:47:40</time>
15
+ <contents><target name="magecommunity"><dir name="Sinabs"><dir name="Directcheckout"><dir name="Block"><dir name="Checkout"><dir name="Onepage"><file name="Link.php" hash="e2c99a8ad1b2ff0c0e46779e8e781a38"/></dir><file name="Billing.php" hash="3566196fe02cfd6b6302a7c55dc0f4cb"/><file name="Coupon.php" hash="c3ece6a9e8c798034a964e06f021692c"/><file name="Gift.php" hash="bb9fb6d9e99f6e48f8e318ab15d92f27"/><file name="Links.php" hash="0e3348a234cccd82d04f33741b7914f3"/><file name="Newsletter.php" hash="ff4f476b8a62459ada10ada97b072876"/><file name="Shipping.php" hash="222ab5cb49fb254b0b798de4a69b9044"/></dir></dir><dir name="Helper"><file name="Address.php" hash="b8da94d8debe553a12a50368a153475c"/><file name="Data.php" hash="cf1d3e23eb8471d817ba616835b3c7bf"/><file name="Url.php" hash="d7f4da682505d1eed6c06d63458bdb24"/></dir><dir name="controllers"><dir name="Customer"><file name="AjaxController.php" hash="a29445ad4907034af82dbfc736991b0a"/></dir><file name="AjaxController.php" hash="80c9975bcc56d3b83e508f204a95141c"/><file name="IndexController.php" hash="5e3bb2ef6a37f8d57275587e5fd8b684"/></dir><dir name="etc"><file name="config.xml" hash="4e167773976c289ec0e6e2a01c26c7a3"/><file name="system.xml" hash="09ed5ce446e4a564bc82dea994bc86a4"/></dir></dir></dir></target><target name="magedesign"><dir name="frontend"><dir name="default"><dir name="default"><dir name="template"><dir name="directcheckout"><dir name="checkout"><dir name="additional"><file name="agreements.phtml" hash="d4a63588cb46492263fb1dc934b8b2aa"/><file name="coupon.phtml" hash="708dffbebd44559974e089674dfad28d"/><file name="newsletter.phtml" hash="909a0084e07a83827df47ae04f531ab6"/></dir><dir name="gift"><file name="options.phtml" hash="945c0f916729b864b879a6f5f4a0dad4"/></dir><dir name="payment"><file name="methods.phtml" hash="a764824070152cbfd8965f54de04fbef"/></dir><file name="additional.phtml" hash="0a99c4ce5270b4ec6b0991eb833e93dc"/><file name="billing.phtml" hash="38c0fd17d763e1b30b30067ff6685722"/><file name="gift.phtml" hash="d7ab7ceb3424149f7cb3dae9c00c22b6"/><file name="review.phtml" hash="b834c89a12e1ee5353f5286db796ef55"/><file name="shipping.phtml" hash="c26c65eb137e8cadde1471f90308b159"/><file name="shipping_method.phtml" hash="333b3a89be3454746fe0343f3eafea94"/><file name="spo.phtml" hash="8c17c38c710394e6378926ba8107bb22"/><file name="summary.phtml" hash="ffdef5b2d1054cfb6a4b14b28e547cbe"/></dir><dir name="customer"><dir name="widget"><file name="name.phtml" hash="c2f0baf4cc8ac175dd7f3b5ac53d2fc6"/></dir><file name="forget.phtml" hash="a437f709a6e711668a2a2564be96a0ab"/><file name="login.phtml" hash="3585445d31384c5c88f65849ae4219c4"/></dir><file name="checkout.phtml" hash="7e78913b9f90fcf67cf65b7d8c7e6830"/></dir></dir><dir name="layout"><file name="directcheckout.xml" hash="eef64b48c7d222dcead72195e67cdbb8"/></dir></dir></dir></dir></target><target name="mageskin"><dir name="frontend"><dir name="default"><dir name="default"><dir name="directcheckout"><dir name="css"><file name="modal.css" hash="ff14481d15d473063ccbc1158867cf43"/><file name="styles.css" hash="af3e0051c28e12c38a943b57abf0b3a2"/></dir><dir name="images"><file name="button-loader.gif" hash="9a9cfbeae93874aa92295baf21ace29c"/><file name="directcheckout-step1.png" hash="fee760a1d5f3b0ea2b92afb78027a750"/><file name="directcheckout-step2.png" hash="b78af68848930f1be94ef4ed7afd9c9b"/><file name="directcheckout-step3.png" hash="59d0cdcad1de0cdf0141bcd2275f0bc8"/><file name="directcheckout-step4.png" hash="48060ab23605daa5dadd34be3eb35ae6"/><file name="directcheckout-stepfinal.png" hash="b03cf8ea88e987ceb42d966b234d7a1c"/><file name="line-gradient.gif" hash="bef9df2d426124dbe3d496407219190b"/><file name="spinner.gif" hash="add667817f25bce331a213ab3cc9621f"/></dir></dir></dir></dir></dir></target><target name="mage"><dir name="js"><dir name="directcheckout"><file name="directcheckout.js" hash="44785d164857b2c572c2daffee7efab3"/><file name="modal.js" hash="c3b77dc52bba63e273e21414df4f0f77"/></dir></dir></target><target name="magelocale"><dir name="en_US"><file name="Sinabs_Directcheckout.csv" hash="a105fd3a42d9c12d57b137cc043b4f32"/></dir><dir name="fr_FR"><file name="Sinabs_Directcheckout.csv" hash="b820881ac64f310db71ee7da470abfb8"/></dir></target><target name="mageetc"><dir name="modules"><file name="Sinabs_Directcheckout.xml" hash="8dfc7b08d0b331930caf63b6963f0356"/></dir></target></contents>
16
  <compatible/>
17
  <dependencies/>
18
  </package>