Version Notes
Did we add new features?
Yes
Did you fix a bunch of Bugs?
Yes
Well then, what in funkytown did you do?
Added a fix for logged in users when forceguest checkout was enabled.
You can now enable a Registration form on the order success page to convert those guest checkout people.
Download this release
Release Info
Developer | Gareth Price |
Extension | Clearandfizzy_Reducedcheckout |
Version | 1.5.1 |
Comparing to | |
See all releases |
Code changes from version 1.4.0 to 1.5.1
- app/code/community/Clearandfizzy/Reducedcheckout/Helper/Data.php +12 -1
- app/code/community/Clearandfizzy/Reducedcheckout/Helper/Order.php +39 -0
- app/code/community/Clearandfizzy/Reducedcheckout/Model/Observer.php +47 -2
- app/code/community/Clearandfizzy/Reducedcheckout/Model/Resource/Setup.php +22 -0
- app/code/community/Clearandfizzy/Reducedcheckout/Model/Signup/Observer.php +74 -0
- app/code/community/Clearandfizzy/Reducedcheckout/Model/System/Config/Source/Cms/Block.php +48 -0
- app/code/community/Clearandfizzy/Reducedcheckout/controllers/SignupController.php +47 -0
- app/code/community/Clearandfizzy/Reducedcheckout/etc/config.xml +29 -8
- app/code/community/Clearandfizzy/Reducedcheckout/etc/system.xml +43 -2
- app/code/community/Clearandfizzy/Reducedcheckout/sql/reducedcheckout_setup/install-1.5.1.php +20 -0
- app/design/frontend/base/default/layout/clearandfizzy/reducedcheckout/reducedcheckout.xml +15 -0
- app/design/frontend/base/default/template/clearandfizzy/reducedcheckout/success/wrapper.phtml +3 -0
- app/design/frontend/base/default/template/clearandfizzy/reducedcheckout/success/wrapper/signup.phtml +53 -0
- package.xml +17 -9
- skin/frontend/base/default/css/clearandfizzy/reducedcheckout.css +18 -0
app/code/community/Clearandfizzy/Reducedcheckout/Helper/Data.php
CHANGED
@@ -21,12 +21,23 @@ class Clearandfizzy_Reducedcheckout_Helper_Data extends Mage_Core_Helper_Abstrac
|
|
21 |
$value = Mage::getStoreConfig('clearandfizzy_reducedcheckout_settings/reducedcheckout/enable28112fix');
|
22 |
return $value;
|
23 |
} // end
|
24 |
-
|
25 |
public function getCustomerGroupsEnabled() {
|
26 |
$value = Mage::getStoreConfig('clearandfizzy_reducedcheckout_settings/reducedcheckout_customergroups/customergroups_enabled');
|
27 |
return $value;
|
28 |
}
|
29 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
30 |
public function getShippingCustomerGroups() {
|
31 |
|
32 |
if ($this->getCustomerGroupsEnabled() == 0) {
|
21 |
$value = Mage::getStoreConfig('clearandfizzy_reducedcheckout_settings/reducedcheckout/enable28112fix');
|
22 |
return $value;
|
23 |
} // end
|
24 |
+
|
25 |
public function getCustomerGroupsEnabled() {
|
26 |
$value = Mage::getStoreConfig('clearandfizzy_reducedcheckout_settings/reducedcheckout_customergroups/customergroups_enabled');
|
27 |
return $value;
|
28 |
}
|
29 |
|
30 |
+
public function guestsCanRegisterOnOrderSuccess() {
|
31 |
+
$value = Mage::getStoreConfig('clearandfizzy_reducedcheckout_settings/reducedcheckout_order_success/register_on_order_success');
|
32 |
+
return $value;
|
33 |
+
} // end
|
34 |
+
|
35 |
+
public function getCMSBlockIdForOrderSuccessForm() {
|
36 |
+
$value = Mage::getStoreConfig('clearandfizzy_reducedcheckout_settings/reducedcheckout_order_success/register_on_order_success_cms_block');
|
37 |
+
return $value;
|
38 |
+
} // end
|
39 |
+
|
40 |
+
|
41 |
public function getShippingCustomerGroups() {
|
42 |
|
43 |
if ($this->getCustomerGroupsEnabled() == 0) {
|
app/code/community/Clearandfizzy/Reducedcheckout/Helper/Order.php
ADDED
@@ -0,0 +1,39 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class Clearandfizzy_Reducedcheckout_Helper_Order extends Mage_Core_Helper_Abstract {
|
4 |
+
|
5 |
+
/**
|
6 |
+
* We use this during the user signup phase.
|
7 |
+
* @var string
|
8 |
+
*/
|
9 |
+
public $_session_key = 'reducedcheckout_register_key';
|
10 |
+
|
11 |
+
public function getSessionKey() {
|
12 |
+
return $this->_session_key;
|
13 |
+
} // end
|
14 |
+
|
15 |
+
public function getOrder() {
|
16 |
+
//get the order id from the session
|
17 |
+
$session = Mage::getSingleton('checkout/session');
|
18 |
+
$lastOrderId = $session->getLastOrderId();
|
19 |
+
|
20 |
+
// load the order
|
21 |
+
$order = Mage::getSingleton('sales/order');
|
22 |
+
$order->load($lastOrderId);
|
23 |
+
|
24 |
+
return $order;
|
25 |
+
} // end
|
26 |
+
|
27 |
+
/**
|
28 |
+
*
|
29 |
+
* @return Ambigous <mixed, unknown, multitype:>
|
30 |
+
*/
|
31 |
+
public function getEmail() {
|
32 |
+
$order = $this->getOrder();
|
33 |
+
|
34 |
+
// get the orders email address
|
35 |
+
$email = $order->getCustomerEmail();
|
36 |
+
return $email;
|
37 |
+
} // end
|
38 |
+
|
39 |
+
}
|
app/code/community/Clearandfizzy/Reducedcheckout/Model/Observer.php
CHANGED
@@ -16,7 +16,6 @@ class Clearandfizzy_Reducedcheckout_Model_Observer extends Mage_Core_Model_Obser
|
|
16 |
// find the handle we're looking for
|
17 |
if ( array_search('checkout_onepage_index', $handles) == true ) {
|
18 |
|
19 |
-
// add our own
|
20 |
$update = $observer->getEvent()->getLayout()->getUpdate();
|
21 |
$update->addHandle('clearandfizzy_checkout_reduced');
|
22 |
|
@@ -36,12 +35,58 @@ class Clearandfizzy_Reducedcheckout_Model_Observer extends Mage_Core_Model_Obser
|
|
36 |
} // end
|
37 |
|
38 |
} // end
|
39 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
40 |
|
41 |
return;
|
42 |
|
43 |
} // end
|
44 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
45 |
|
46 |
} // end
|
47 |
|
16 |
// find the handle we're looking for
|
17 |
if ( array_search('checkout_onepage_index', $handles) == true ) {
|
18 |
|
|
|
19 |
$update = $observer->getEvent()->getLayout()->getUpdate();
|
20 |
$update->addHandle('clearandfizzy_checkout_reduced');
|
21 |
|
35 |
} // end
|
36 |
|
37 |
} // end
|
38 |
+
|
39 |
+
|
40 |
+
##checkout_onepage_success
|
41 |
+
if ( array_search('checkout_onepage_success', $handles) == true ) {
|
42 |
+
|
43 |
+
$update = $observer->getEvent()->getLayout()->getUpdate();
|
44 |
+
$update->addHandle('clearandfizzy_checkout_reduced');
|
45 |
+
|
46 |
+
// enable register on order success..
|
47 |
+
// only change the handle
|
48 |
+
if ( $this->_isValidGuest() && Mage::helper('clearandfizzy_reducedcheckout/data')->guestsCanRegisterOnOrderSuccess() == true) {
|
49 |
+
$update->addHandle('clearandfizzy_checkout_reduced_success_register');
|
50 |
+
} // end
|
51 |
+
|
52 |
+
} // end if
|
53 |
|
54 |
return;
|
55 |
|
56 |
} // end
|
57 |
|
58 |
+
/**
|
59 |
+
* Returns true if the the user is not logged in and email doesn't already exist.
|
60 |
+
* @return boolean
|
61 |
+
*/
|
62 |
+
protected function _isValidGuest() {
|
63 |
+
if (Mage::getSingleton('customer/session')->isLoggedIn() || $this->_customerExists() ) {
|
64 |
+
return false;
|
65 |
+
} // end
|
66 |
+
|
67 |
+
return true;
|
68 |
+
} // end
|
69 |
+
|
70 |
+
/**
|
71 |
+
* Returns true if the last order's email address already exists
|
72 |
+
* @return boolean
|
73 |
+
*/
|
74 |
+
protected function _customerExists() {
|
75 |
+
$helper = Mage::helper('clearandfizzy_reducedcheckout/order');
|
76 |
+
$email = $helper->getEmail();
|
77 |
+
|
78 |
+
$customer = Mage::getSingleton('customer/customer')
|
79 |
+
->setStore(Mage::app()->getStore())
|
80 |
+
->loadByEmail($email);
|
81 |
+
|
82 |
+
if ($customer->getId()) {
|
83 |
+
return true;
|
84 |
+
} // end
|
85 |
+
|
86 |
+
return false;
|
87 |
+
|
88 |
+
}
|
89 |
+
|
90 |
|
91 |
} // end
|
92 |
|
app/code/community/Clearandfizzy/Reducedcheckout/Model/Resource/Setup.php
ADDED
@@ -0,0 +1,22 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
*
|
4 |
+
* @author Gareth
|
5 |
+
*
|
6 |
+
*/
|
7 |
+
class Clearandfizzy_Reducedcheckout_Model_Resource_Setup extends Mage_Core_Model_Resource_Setup
|
8 |
+
{
|
9 |
+
|
10 |
+
public function addBlock($string) {
|
11 |
+
|
12 |
+
$cms_block = Mage::getModel('cms/block');
|
13 |
+
|
14 |
+
$cms_block->setData('title', 'ReducedCheckout - Order Success Page - Customer Registration Form');
|
15 |
+
$cms_block->setData('identifier', 'reducedcheckout_success_form_register');
|
16 |
+
$cms_block->setData('content', $string );
|
17 |
+
$cms_block->setData('is_active', '1');
|
18 |
+
$cms_block->save();
|
19 |
+
|
20 |
+
} // end
|
21 |
+
|
22 |
+
}
|
app/code/community/Clearandfizzy/Reducedcheckout/Model/Signup/Observer.php
ADDED
@@ -0,0 +1,74 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class Clearandfizzy_Reducedcheckout_Model_Signup_Observer extends Mage_Core_Model_Observer {
|
4 |
+
|
5 |
+
protected $_helper;
|
6 |
+
|
7 |
+
public function __construct() {
|
8 |
+
$this->_helper = Mage::helper('clearandfizzy_reducedcheckout/order');
|
9 |
+
} // end
|
10 |
+
|
11 |
+
/**
|
12 |
+
* Observes the user register event.
|
13 |
+
* @param Varien_Event_Observer $observer
|
14 |
+
*/
|
15 |
+
public function checkCustomerCreated(Varien_Event_Observer $observer) {
|
16 |
+
$helper = $this->_helper;
|
17 |
+
|
18 |
+
// if this session key does not exist then we have nothing to do
|
19 |
+
if (Mage::registry($helper->getSessionKey()) == false) {
|
20 |
+
return;
|
21 |
+
} // end if
|
22 |
+
|
23 |
+
$customer = $observer->getCustomer();
|
24 |
+
$order = $helper->getOrder();
|
25 |
+
|
26 |
+
$address = Mage::getModel('customer/address');
|
27 |
+
$billing = $order->getBillingAddress();
|
28 |
+
$shipping = $order->getShippingAddress();
|
29 |
+
|
30 |
+
// assign this order to the current customer
|
31 |
+
$order = $this->_assignCustomerToOrder($order, $customer);
|
32 |
+
|
33 |
+
// assign bill and shipping to the customer
|
34 |
+
$billing = $this->_prepareAddress($billing, $customer);
|
35 |
+
$address->setData($billing->getData());
|
36 |
+
$customer->addAddress($address);
|
37 |
+
$customer->save();
|
38 |
+
|
39 |
+
// un-register this key
|
40 |
+
Mage::unregister($helper->getSessionKey());
|
41 |
+
|
42 |
+
return true;
|
43 |
+
} // end
|
44 |
+
|
45 |
+
/**
|
46 |
+
* Assign a customer to an order
|
47 |
+
* @param unknown $order
|
48 |
+
* @param unknown $customer
|
49 |
+
* @return unknown
|
50 |
+
*/
|
51 |
+
protected function _assignCustomerToOrder($order, $customer) {
|
52 |
+
|
53 |
+
// assign the customer to the order
|
54 |
+
$order->setCustomerId($customer->getId());
|
55 |
+
$order->save();
|
56 |
+
|
57 |
+
return $order;
|
58 |
+
}
|
59 |
+
|
60 |
+
/**
|
61 |
+
* Remove some values from the address
|
62 |
+
* @param unknown $address
|
63 |
+
* @param unknown $customer
|
64 |
+
* @return unknown
|
65 |
+
*/
|
66 |
+
protected function _prepareAddress($address, $customer) {
|
67 |
+
$address->unsetData('entity_id');
|
68 |
+
$address->setCustomerId($customer->getId());
|
69 |
+
$address->setIsDefaultBilling(true);
|
70 |
+
|
71 |
+
return $address;
|
72 |
+
} // end
|
73 |
+
|
74 |
+
} // end
|
app/code/community/Clearandfizzy/Reducedcheckout/Model/System/Config/Source/Cms/Block.php
ADDED
@@ -0,0 +1,48 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
class Clearandfizzy_Reducedcheckout_Model_System_Config_Source_Cms_Block
|
3 |
+
{
|
4 |
+
|
5 |
+
protected $_options;
|
6 |
+
|
7 |
+
public function toOptionArray()
|
8 |
+
{
|
9 |
+
return $this->toOptionIdArray();
|
10 |
+
}
|
11 |
+
|
12 |
+
/**
|
13 |
+
* Returns pairs identifier - title for unique identifiers
|
14 |
+
* and pairs identifier|block_id - title for non-unique after first
|
15 |
+
*
|
16 |
+
* @return array
|
17 |
+
*/
|
18 |
+
public function toOptionIdArray()
|
19 |
+
{
|
20 |
+
|
21 |
+
if (!$this->_options) {
|
22 |
+
$collection = Mage::getResourceModel('cms/block_collection')->load();
|
23 |
+
|
24 |
+
$this->_options = array();
|
25 |
+
$existingIdentifiers = array();
|
26 |
+
|
27 |
+
// look though collection
|
28 |
+
foreach ($collection as $item) {
|
29 |
+
$identifier = $item->getData('identifier');
|
30 |
+
|
31 |
+
$data['value'] = $identifier;
|
32 |
+
$data['label'] = $item->getData('title');
|
33 |
+
|
34 |
+
if (in_array($identifier, $existingIdentifiers)) {
|
35 |
+
$data['value'] .= '|' . $item->getData('block_id');
|
36 |
+
} else {
|
37 |
+
$existingIdentifiers[] = $identifier;
|
38 |
+
} // end if
|
39 |
+
|
40 |
+
$this->_options[] = $data;
|
41 |
+
} // end for
|
42 |
+
} // end if
|
43 |
+
|
44 |
+
return $this->_options;
|
45 |
+
} // end fun
|
46 |
+
|
47 |
+
|
48 |
+
}
|
app/code/community/Clearandfizzy/Reducedcheckout/controllers/SignupController.php
ADDED
@@ -0,0 +1,47 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
*
|
4 |
+
* @author Gareth
|
5 |
+
*
|
6 |
+
*/
|
7 |
+
class Clearandfizzy_Reducedcheckout_SignupController extends Mage_Core_Controller_Front_Action
|
8 |
+
{
|
9 |
+
|
10 |
+
/**
|
11 |
+
* Grab the form submission, inject needed data into the form post before forwarding onto the magento create account controller.
|
12 |
+
*
|
13 |
+
*/
|
14 |
+
public function indexAction() {
|
15 |
+
$helper = Mage::helper('clearandfizzy_reducedcheckout/order');
|
16 |
+
|
17 |
+
//get the current order
|
18 |
+
$order = $helper->getOrder();
|
19 |
+
|
20 |
+
// grab the details we need from the order
|
21 |
+
$firstname = $order->getCustomerFirstname();
|
22 |
+
$lastname = $order->getCustomerLastname();
|
23 |
+
$email = $order->getCustomerEmail();
|
24 |
+
$password = $this->getRequest()->getParam('password');
|
25 |
+
$confirmation = $this->getRequest()->getParam('password');
|
26 |
+
|
27 |
+
// put them in the form submission
|
28 |
+
$this->getRequest()->setPost('firstname', $firstname);
|
29 |
+
$this->getRequest()->setPost('lastname', $lastname);
|
30 |
+
$this->getRequest()->setPost('email', $email);
|
31 |
+
$this->getRequest()->setPost('password', $password);
|
32 |
+
$this->getRequest()->setPost('confirmation', $password);
|
33 |
+
$this->getRequest()->setPost('success_url', Mage::getUrl('customer/account/*'));
|
34 |
+
|
35 |
+
// there are two parts to this process..
|
36 |
+
// Once the customer account is created we observe the "customer_register_success" event
|
37 |
+
// and add the addresses / order etc in there.
|
38 |
+
|
39 |
+
// set this before any observers fire
|
40 |
+
Mage::register($helper->getSessionKey(), true);
|
41 |
+
|
42 |
+
// forward onto the account creation action
|
43 |
+
$this->_forward('createpost','account','customer');
|
44 |
+
|
45 |
+
} // end
|
46 |
+
|
47 |
+
} // end class
|
app/code/community/Clearandfizzy/Reducedcheckout/etc/config.xml
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
|
4 |
<modules>
|
5 |
<Clearandfizzy_Reducedcheckout>
|
6 |
-
<version>1.
|
7 |
</Clearandfizzy_Reducedcheckout>
|
8 |
</modules>
|
9 |
|
@@ -23,17 +23,21 @@
|
|
23 |
|
24 |
<shipping_resource>
|
25 |
<rewrite>
|
26 |
-
|
27 |
-
|
28 |
<carrier_tablerate>Clearandfizzy_ReducedCheckout_Model_Resource_Carrier_TablerateFix</carrier_tablerate>
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
</rewrite>
|
33 |
</shipping_resource>
|
34 |
|
35 |
-
|
36 |
</models>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
37 |
|
38 |
<helpers>
|
39 |
<clearandfizzy_reducedcheckout>
|
@@ -42,6 +46,16 @@
|
|
42 |
</helpers>
|
43 |
|
44 |
<events>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
45 |
<controller_action_layout_load_before>
|
46 |
<observers>
|
47 |
<checkReducedCheckout>
|
@@ -87,15 +101,22 @@
|
|
87 |
|
88 |
<reducedcheckout>
|
89 |
<isenabled>0</isenabled>
|
|
|
90 |
<guestcheckoutonly>0</guestcheckoutonly>
|
91 |
<default_shipping>noskip</default_shipping>
|
92 |
-
<default_payment>noskip</default_payment>
|
|
|
93 |
</reducedcheckout>
|
94 |
|
95 |
<reducedcheckout_customergroups>
|
96 |
<customergroups_enabled>0</customergroups_enabled>
|
97 |
</reducedcheckout_customergroups>
|
98 |
|
|
|
|
|
|
|
|
|
|
|
99 |
</clearandfizzy_reducedcheckout_settings>
|
100 |
</default>
|
101 |
|
3 |
|
4 |
<modules>
|
5 |
<Clearandfizzy_Reducedcheckout>
|
6 |
+
<version>1.5.1</version>
|
7 |
</Clearandfizzy_Reducedcheckout>
|
8 |
</modules>
|
9 |
|
23 |
|
24 |
<shipping_resource>
|
25 |
<rewrite>
|
|
|
|
|
26 |
<carrier_tablerate>Clearandfizzy_ReducedCheckout_Model_Resource_Carrier_TablerateFix</carrier_tablerate>
|
|
|
|
|
|
|
27 |
</rewrite>
|
28 |
</shipping_resource>
|
29 |
|
|
|
30 |
</models>
|
31 |
+
|
32 |
+
<resources>
|
33 |
+
<reducedcheckout_setup>
|
34 |
+
<setup>
|
35 |
+
<module>Clearandfizzy_Reducedcheckout</module>
|
36 |
+
<class>Clearandfizzy_Reducedcheckout_Model_Resource_Setup</class>
|
37 |
+
</setup>
|
38 |
+
</reducedcheckout_setup>
|
39 |
+
</resources>
|
40 |
+
|
41 |
|
42 |
<helpers>
|
43 |
<clearandfizzy_reducedcheckout>
|
46 |
</helpers>
|
47 |
|
48 |
<events>
|
49 |
+
<customer_register_success>
|
50 |
+
<observers>
|
51 |
+
<checkCustomerCreated>
|
52 |
+
<class>Clearandfizzy_Reducedcheckout_Model_Signup_Observer</class>
|
53 |
+
<method>checkCustomerCreated</method>
|
54 |
+
</checkCustomerCreated>
|
55 |
+
</observers>
|
56 |
+
|
57 |
+
</customer_register_success>
|
58 |
+
|
59 |
<controller_action_layout_load_before>
|
60 |
<observers>
|
61 |
<checkReducedCheckout>
|
101 |
|
102 |
<reducedcheckout>
|
103 |
<isenabled>0</isenabled>
|
104 |
+
<enable28112fix>0</enable28112fix>
|
105 |
<guestcheckoutonly>0</guestcheckoutonly>
|
106 |
<default_shipping>noskip</default_shipping>
|
107 |
+
<default_payment>noskip</default_payment>
|
108 |
+
|
109 |
</reducedcheckout>
|
110 |
|
111 |
<reducedcheckout_customergroups>
|
112 |
<customergroups_enabled>0</customergroups_enabled>
|
113 |
</reducedcheckout_customergroups>
|
114 |
|
115 |
+
<reducedcheckout_order_success>
|
116 |
+
<register_on_order_success>0</register_on_order_success>
|
117 |
+
<register_on_order_success_cms_block>reducedcheckout_success_form_register</register_on_order_success_cms_block>
|
118 |
+
</reducedcheckout_order_success>
|
119 |
+
|
120 |
</clearandfizzy_reducedcheckout_settings>
|
121 |
</default>
|
122 |
|
app/code/community/Clearandfizzy/Reducedcheckout/etc/system.xml
CHANGED
@@ -126,14 +126,55 @@
|
|
126 |
<show_in_default>1</show_in_default>
|
127 |
<show_in_website>1</show_in_website>
|
128 |
<show_in_store>1</show_in_store>
|
129 |
-
</default_payment>
|
|
|
|
|
130 |
|
131 |
</fields>
|
132 |
</reducedcheckout>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
133 |
|
134 |
<reducedcheckout_customergroups>
|
135 |
<label>Reduced Checkout Customer Group Settings </label>
|
136 |
-
<sort_order>
|
137 |
<show_in_default>1</show_in_default>
|
138 |
<show_in_website>1</show_in_website>
|
139 |
<show_in_store>1</show_in_store>
|
126 |
<show_in_default>1</show_in_default>
|
127 |
<show_in_website>1</show_in_website>
|
128 |
<show_in_store>1</show_in_store>
|
129 |
+
</default_payment>
|
130 |
+
|
131 |
+
|
132 |
|
133 |
</fields>
|
134 |
</reducedcheckout>
|
135 |
+
|
136 |
+
<reducedcheckout_order_success>
|
137 |
+
<label>Reduced Checkout Order Success page Settings </label>
|
138 |
+
<sort_order>30</sort_order>
|
139 |
+
<show_in_default>1</show_in_default>
|
140 |
+
<show_in_website>1</show_in_website>
|
141 |
+
<show_in_store>1</show_in_store>
|
142 |
+
<expanded>1</expanded>
|
143 |
+
<comment><![CDATA[ <ol>
|
144 |
+
|
145 |
+
</ol> ]]></comment>
|
146 |
+
|
147 |
+
<fields>
|
148 |
+
|
149 |
+
<register_on_order_success>
|
150 |
+
<label>Enable "Register now" Form on Order Success page</label>
|
151 |
+
<frontend_type>select</frontend_type>
|
152 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
153 |
+
<comment>Displays a form encouraging guest users to register</comment>
|
154 |
+
<sort_order>4</sort_order>
|
155 |
+
<show_in_default>1</show_in_default>
|
156 |
+
<show_in_website>1</show_in_website>
|
157 |
+
<show_in_store>1</show_in_store>
|
158 |
+
</register_on_order_success>
|
159 |
+
|
160 |
+
<register_on_order_success_cms_block>
|
161 |
+
<label>CMS Static Block</label>
|
162 |
+
<frontend_type>select</frontend_type>
|
163 |
+
<source_model>clearandfizzy_reducedcheckout/system_config_source_cms_block</source_model>
|
164 |
+
<comment></comment>
|
165 |
+
<depends><register_on_order_success>1</register_on_order_success></depends>
|
166 |
+
<sort_order>5</sort_order>
|
167 |
+
<show_in_default>1</show_in_default>
|
168 |
+
<show_in_website>1</show_in_website>
|
169 |
+
<show_in_store>1</show_in_store>
|
170 |
+
</register_on_order_success_cms_block>
|
171 |
+
</fields>
|
172 |
+
|
173 |
+
</reducedcheckout_order_success>
|
174 |
|
175 |
<reducedcheckout_customergroups>
|
176 |
<label>Reduced Checkout Customer Group Settings </label>
|
177 |
+
<sort_order>40</sort_order>
|
178 |
<show_in_default>1</show_in_default>
|
179 |
<show_in_website>1</show_in_website>
|
180 |
<show_in_store>1</show_in_store>
|
app/code/community/Clearandfizzy/Reducedcheckout/sql/reducedcheckout_setup/install-1.5.1.php
ADDED
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
|
4 |
+
$installer = $this;
|
5 |
+
/* @var $installer Mage_Core_Model_Resource_Setup */
|
6 |
+
|
7 |
+
$installer->startSetup();
|
8 |
+
|
9 |
+
$installer->addBlock("<h3>That's great!</h3>
|
10 |
+
<p>Thanks for making a purchase - we recommend you confirm your email address and enter a password so we can create a new account from the details you've given during your checkout.</p>
|
11 |
+
<h4>Benefits</h4>
|
12 |
+
<ul>
|
13 |
+
<ul>
|
14 |
+
<li>Make it easier for you to track your order & get customer support.</li>
|
15 |
+
<li>You won't need to enter all your details again next-time you visit.</li>
|
16 |
+
</ul>
|
17 |
+
</ul>");
|
18 |
+
|
19 |
+
|
20 |
+
$installer->endSetup();
|
app/design/frontend/base/default/layout/clearandfizzy/reducedcheckout/reducedcheckout.xml
CHANGED
@@ -37,4 +37,19 @@
|
|
37 |
|
38 |
</clearandfizzy_checkout_reduced_skip_shippingmethod>
|
39 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
40 |
</layout>
|
37 |
|
38 |
</clearandfizzy_checkout_reduced_skip_shippingmethod>
|
39 |
|
40 |
+
<clearandfizzy_checkout_reduced_success_register translate="label">
|
41 |
+
<reference name="head">
|
42 |
+
<action method="addCss"><stylesheet>css/clearandfizzy/reducedcheckout.css</stylesheet></action>
|
43 |
+
</reference>
|
44 |
+
|
45 |
+
<reference name="content">
|
46 |
+
<remove name="checkout.success" />
|
47 |
+
<block type="core/template" name="checkout.success.wrapper" template="clearandfizzy/reducedcheckout/success/wrapper.phtml">
|
48 |
+
<block type="checkout/onepage_success" name="checkout.success.2" template="checkout/success.phtml"/>
|
49 |
+
<block type="core/template" name="checkout.success.form.register" template="clearandfizzy/reducedcheckout/success/wrapper/signup.phtml"/>
|
50 |
+
</block>
|
51 |
+
</reference>
|
52 |
+
|
53 |
+
</clearandfizzy_checkout_reduced_success_register>
|
54 |
+
|
55 |
</layout>
|
app/design/frontend/base/default/template/clearandfizzy/reducedcheckout/success/wrapper.phtml
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
1 |
+
<div id="clearandfizzy_reducedcheckout_wrapper">
|
2 |
+
<?php echo $this->getChildHtml('',true, true); ?>
|
3 |
+
</div>
|
app/design/frontend/base/default/template/clearandfizzy/reducedcheckout/success/wrapper/signup.phtml
ADDED
@@ -0,0 +1,53 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/*
|
3 |
+
|
4 |
+
<h3>That's great!</h3>
|
5 |
+
<p>Thanks for making a purchase - we recommend you confirm your email address and enter a password so we can create a new account from the details you've given during your checkout.</p>
|
6 |
+
<h4>Benefits</h4>
|
7 |
+
<ul>
|
8 |
+
<ul>
|
9 |
+
<li>Make it easier for you to track your order & get customer support.</li>
|
10 |
+
<li>You won't need to enter all your details again next-time you visit.</li>
|
11 |
+
</ul>
|
12 |
+
</ul>
|
13 |
+
|
14 |
+
*/
|
15 |
+
|
16 |
+
$email = Mage::helper('clearandfizzy_reducedcheckout/order')->getEmail();
|
17 |
+
$cms_block_id = Mage::helper('clearandfizzy_reducedcheckout/data')->getCMSBlockIdForOrderSuccessForm();
|
18 |
+
|
19 |
+
?>
|
20 |
+
<div id="reducedcheckout_success_form_register">
|
21 |
+
<form action="/reducedcheckout/signup" method="post" name="reducedcheckout_success_form">
|
22 |
+
|
23 |
+
<div class="fieldset">
|
24 |
+
<h2 class="legend">Create Account</h2>
|
25 |
+
<?php echo $this->getLayout()->createBlock('cms/block')->setBlockId($cms_block_id)->toHtml() ?>
|
26 |
+
|
27 |
+
<ul class="form-list">
|
28 |
+
<li class="fields">
|
29 |
+
<div class="field">
|
30 |
+
<label for="email" class="required"><?php echo $this->__('Email Address');?></label>
|
31 |
+
<div class="input-box">
|
32 |
+
<strong><?php echo $email; ?></strong>
|
33 |
+
</div>
|
34 |
+
</div>
|
35 |
+
|
36 |
+
<div class="field">
|
37 |
+
<label for="pass" class="required"><em>*</em><?php echo $this->__('Password');?></label>
|
38 |
+
<div class="input-box">
|
39 |
+
<input type="password" name="password" class="input-text required-entry validate-password" id="password" title="Password" value="" />
|
40 |
+
</div>
|
41 |
+
</div>
|
42 |
+
|
43 |
+
</li>
|
44 |
+
</ul>
|
45 |
+
|
46 |
+
<div class="buttons-set show">
|
47 |
+
<p class="required">* Required Fields</p>
|
48 |
+
<button type="submit" title="Submit" class="button"><span><span>Create Account</span></span></button>
|
49 |
+
</div>
|
50 |
+
|
51 |
+
</div>
|
52 |
+
</form>
|
53 |
+
</div>
|
package.xml
CHANGED
@@ -1,17 +1,22 @@
|
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>Clearandfizzy_Reducedcheckout</name>
|
4 |
-
<version>1.
|
5 |
<stability>stable</stability>
|
6 |
<license uri="http://creativecommons.org/licenses/by-nd/3.0/">CC BY-ND 3.0</license>
|
7 |
<channel>community</channel>
|
8 |
<extends/>
|
9 |
-
<summary>
|
10 |
-
<description>Extending the standard Magento checkout
|
|
|
|
|
11 |

|
12 |
Integration with 3rd-party payment and shipping extensions should be easy as this extension makes no modifications to the base templates.
|
13 |

|
14 |
-
|
|
|
|
|
|
|
15 |
<notes>Did we add new features?<br />
|
16 |
Yes<br />
|
17 |
<br />
|
@@ -19,12 +24,15 @@ Did you fix a bunch of Bugs?<br />
|
|
19 |
Yes<br />
|
20 |
<br />
|
21 |
Well then, what in funkytown did you do?<br />
|
22 |
-
Added a fix for
|
23 |
-
You can enable
|
|
|
|
|
|
|
24 |
<authors><author><name>Gareth Price</name><user>clearandfizzy</user><email>gareth@clearandfizzy.com</email></author></authors>
|
25 |
-
<date>2013-09-
|
26 |
-
<time>
|
27 |
-
<contents><target name="magecommunity"><dir name="Clearandfizzy"><dir name="Reducedcheckout"><dir name="Helper"><file name="Data.php" hash="
|
28 |
<compatible/>
|
29 |
<dependencies><required><php><min>5.2.0</min><max>6.0.0</max></php></required></dependencies>
|
30 |
</package>
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>Clearandfizzy_Reducedcheckout</name>
|
4 |
+
<version>1.5.1</version>
|
5 |
<stability>stable</stability>
|
6 |
<license uri="http://creativecommons.org/licenses/by-nd/3.0/">CC BY-ND 3.0</license>
|
7 |
<channel>community</channel>
|
8 |
<extends/>
|
9 |
+
<summary>Reduce the checkout process by force shipping & payment methods, adds "register" form to order success page.</summary>
|
10 |
+
<description>Extending the standard Magento onepage checkout this ReducedCheckout extension gives you the ability to reduce the number of steps a customer takes to a minimum. 
|
11 |
+

|
12 |
+
Configure it to remove the login step by forcing guest checkout, force payment and shipping methods to your choosing. Even convert guest users to registered uses on the checkout success page.
|
13 |

|
14 |
Integration with 3rd-party payment and shipping extensions should be easy as this extension makes no modifications to the base templates.
|
15 |

|
16 |
+
Also
|
17 |
+
* Options to change checkout process based on Customer Group
|
18 |
+
* Contains a fix for Magento bug #28112 with regards to Shipping Tablerates.
|
19 |
+
</description>
|
20 |
<notes>Did we add new features?<br />
|
21 |
Yes<br />
|
22 |
<br />
|
24 |
Yes<br />
|
25 |
<br />
|
26 |
Well then, what in funkytown did you do?<br />
|
27 |
+
Added a fix for logged in users when forceguest checkout was enabled.<br /><br />
|
28 |
+
You can now enable a Registration form on the order success page to convert those guest checkout people.<br />
|
29 |
+
<br />
|
30 |
+

|
31 |
+
</notes>
|
32 |
<authors><author><name>Gareth Price</name><user>clearandfizzy</user><email>gareth@clearandfizzy.com</email></author></authors>
|
33 |
+
<date>2013-09-16</date>
|
34 |
+
<time>18:42:02</time>
|
35 |
+
<contents><target name="magecommunity"><dir name="Clearandfizzy"><dir name="Reducedcheckout"><dir name="Helper"><file name="Data.php" hash="3d2c90f0621f5eaf5f83d4b2907bef1b"/><file name="Order.php" hash="7767797ecc49d77744772711edc34309"/></dir><dir name="Model"><file name="Observer.php" hash="0b45eae33ccdeca9c52d18ce98dde397"/><dir name="Resource"><dir name="Carrier"><file name="TablerateFix.php" hash="0a8685c145d95ae76b838d2af2b88638"/></dir><file name="Setup.php" hash="a61d7b6fc72e35a85b614adfa7bdb0de"/></dir><dir name="Signup"><file name="Observer.php" hash="dae40c461569f1d47032fa7490aea1e3"/></dir><dir name="System"><dir name="Config"><dir name="Source"><dir name="Cms"><file name="Block.php" hash="c81fc3cf02fe8eed1685c2db80c84198"/></dir><dir name="Payment"><file name="EnabledMethods.php" hash="f6b69e6fc6697870c53c6c86dbd68e98"/></dir><dir name="Shipping"><file name="EnabledMethods.php" hash="5cf16d02a105f9699e4258bb5bc57364"/></dir></dir></dir></dir></dir><dir name="controllers"><file name="OnepageController.php" hash="8d8d7ee733035d27a202cbd277041267"/><file name="SignupController.php" hash="aa5a86065a4722d069627635188b72e4"/></dir><dir name="etc"><file name="adminhtml.xml" hash="0bb1372118e88ad09fbd1b1d5113dea7"/><file name="config.xml" hash="dda64fe70a3a426b95b39b914cbbc0bb"/><file name="system.xml" hash="aaf0aa503322d55543ba741d07fa759b"/></dir><dir name="sql"><dir name="reducedcheckout_setup"><file name="install-1.5.1.php" hash="c938aa01bcb1c36461fb9f3e2145ec03"/></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Clearandfizzy_ReducedCheckout.xml" hash="9cb58e8121e0c0e294f10a3595b2be7d"/></dir></target><target name="magedesign"><dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><dir name="clearandfizzy"><dir name="reducedcheckout"><file name="reducedcheckout.xml" hash="7613031b17573e99fda0cdc79437d9f7"/></dir></dir></dir><dir name="template"><dir name="clearandfizzy"><dir name="reducedcheckout"><file name="onepage.phtml" hash="21921ab772ef02af217c49200619f2d5"/><dir name="success"><dir name="wrapper"><file name="signup.phtml" hash="e9268dd4f9857a78a50ccbab3a084cb0"/></dir><file name="wrapper.phtml" hash="5adda37a860234711644153b757ad53e"/></dir></dir></dir></dir></dir></dir></dir></dir></target><target name="mageskin"><dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="css"><dir name="clearandfizzy"><file name="reducedcheckout.css" hash="4a00abdcb804c0c08efec311acc320cb"/></dir></dir></dir></dir></dir></dir></target></contents>
|
36 |
<compatible/>
|
37 |
<dependencies><required><php><min>5.2.0</min><max>6.0.0</max></php></required></dependencies>
|
38 |
</package>
|
skin/frontend/base/default/css/clearandfizzy/reducedcheckout.css
ADDED
@@ -0,0 +1,18 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
body.checkout-onepage-success .buttons-set
|
2 |
+
{
|
3 |
+
display: none;
|
4 |
+
}
|
5 |
+
|
6 |
+
body.checkout-onepage-success .buttons-set.show
|
7 |
+
{
|
8 |
+
display: block;
|
9 |
+
}
|
10 |
+
|
11 |
+
|
12 |
+
body.checkout-onepage-success #reducedcheckout_success_form_register .form-list
|
13 |
+
{
|
14 |
+
clear: both;
|
15 |
+
margin: 1em 0 0;
|
16 |
+
padding: 8px 0 0;
|
17 |
+
}
|
18 |
+
|