Version Notes
Allows your unregistered visitors to print orders on order confirmation page.
Download this release
Release Info
Developer | Plumrocket Team |
Extension | Plumrocket_Print_Order_Confirmation_As_Guest |
Version | 1.0.0 |
Comparing to | |
See all releases |
Version 1.0.0
- app/code/community/Plumrocket/GuestPrintOrder/Block/System/Config/Version.php +36 -0
- app/code/community/Plumrocket/GuestPrintOrder/Helper/Data.php +29 -0
- app/code/community/Plumrocket/GuestPrintOrder/controllers/Sales/OrderController.php +99 -0
- app/code/community/Plumrocket/GuestPrintOrder/etc/adminhtml.xml +45 -0
- app/code/community/Plumrocket/GuestPrintOrder/etc/config.xml +39 -0
- app/code/community/Plumrocket/GuestPrintOrder/etc/system.xml +64 -0
- app/design/frontend/base/default/layout/guestprintorder.xml +11 -0
- app/design/frontend/base/default/template/guestprintorder/checkout/success.phtml +68 -0
- app/etc/modules/Plumrocket_GuestPrintOrder.xml +14 -0
- package.xml +18 -0
app/code/community/Plumrocket/GuestPrintOrder/Block/System/Config/Version.php
ADDED
@@ -0,0 +1,36 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Plumrocket Inc.
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the End-user License Agreement
|
8 |
+
* that is available through the world-wide-web at this URL:
|
9 |
+
* http://wiki.plumrocket.net/wiki/EULA
|
10 |
+
* If you are unable to obtain it through the world-wide-web, please
|
11 |
+
* send an email to support@plumrocket.com so we can send you a copy immediately.
|
12 |
+
*
|
13 |
+
* @package Plumrocket_Guest_Print_Order
|
14 |
+
* @copyright Copyright (c) 2013 Plumrocket Inc. (http://www.plumrocket.com)
|
15 |
+
* @license http://wiki.plumrocket.net/wiki/EULA End-user License Agreement
|
16 |
+
*/
|
17 |
+
?>
|
18 |
+
<?php
|
19 |
+
|
20 |
+
class Plumrocket_GuestPrintOrder_Block_System_Config_Version extends Mage_Adminhtml_Block_System_Config_Form_Field
|
21 |
+
{
|
22 |
+
|
23 |
+
public function render(Varien_Data_Form_Element_Abstract $element)
|
24 |
+
{
|
25 |
+
$moduleNode = Mage::getConfig()->getNode('modules/Plumrocket_GuestPrintOrder');
|
26 |
+
$name = $moduleNode->name;
|
27 |
+
$version = $moduleNode->version;
|
28 |
+
$wiki_url = $moduleNode->wiki;
|
29 |
+
|
30 |
+
return '<div style="padding:10px;background-color:#fff;border:1px solid #ddd;margin-bottom:7px;">
|
31 |
+
' . $name . ' v' . $version . ' was developed by <a href="http://www.plumrocket.com" target="_blank">Plumrocket Inc</a>.
|
32 |
+
For manual & video tutorials please refer to <a href="' . $wiki_url . '" target="_blank">our online documentation<a/>.
|
33 |
+
</div>';
|
34 |
+
}
|
35 |
+
|
36 |
+
}
|
app/code/community/Plumrocket/GuestPrintOrder/Helper/Data.php
ADDED
@@ -0,0 +1,29 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Plumrocket Inc.
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the End-user License Agreement
|
8 |
+
* that is available through the world-wide-web at this URL:
|
9 |
+
* http://wiki.plumrocket.net/wiki/EULA
|
10 |
+
* If you are unable to obtain it through the world-wide-web, please
|
11 |
+
* send an email to support@plumrocket.com so we can send you a copy immediately.
|
12 |
+
*
|
13 |
+
* @package Plumrocket_Guest_Print_Order
|
14 |
+
* @copyright Copyright (c) 2013 Plumrocket Inc. (http://www.plumrocket.com)
|
15 |
+
* @license http://wiki.plumrocket.net/wiki/EULA End-user License Agreement
|
16 |
+
*/
|
17 |
+
?>
|
18 |
+
<?php
|
19 |
+
|
20 |
+
class Plumrocket_GuestPrintOrder_Helper_Data extends Mage_Core_Helper_Abstract
|
21 |
+
{
|
22 |
+
|
23 |
+
public function moduleEnabled()
|
24 |
+
{
|
25 |
+
return (bool)Mage::getStoreConfig('guestprintorder/general/enable');
|
26 |
+
}
|
27 |
+
|
28 |
+
}
|
29 |
+
|
app/code/community/Plumrocket/GuestPrintOrder/controllers/Sales/OrderController.php
ADDED
@@ -0,0 +1,99 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Plumrocket Inc.
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the End-user License Agreement
|
8 |
+
* that is available through the world-wide-web at this URL:
|
9 |
+
* http://wiki.plumrocket.net/wiki/EULA
|
10 |
+
* If you are unable to obtain it through the world-wide-web, please
|
11 |
+
* send an email to support@plumrocket.com so we can send you a copy immediately.
|
12 |
+
*
|
13 |
+
* @package Plumrocket_Guest_Print_Order
|
14 |
+
* @copyright Copyright (c) 2013 Plumrocket Inc. (http://www.plumrocket.com)
|
15 |
+
* @license http://wiki.plumrocket.net/wiki/EULA End-user License Agreement
|
16 |
+
*/
|
17 |
+
?>
|
18 |
+
|
19 |
+
<?php
|
20 |
+
|
21 |
+
require_once(Mage::getModuleDir('controllers', 'Mage_Sales').DS.'OrderController.php');
|
22 |
+
|
23 |
+
class Plumrocket_GuestPrintOrder_Sales_OrderController extends Mage_Sales_OrderController
|
24 |
+
{
|
25 |
+
|
26 |
+
public function preDispatch()
|
27 |
+
{
|
28 |
+
|
29 |
+
$action = $this->getRequest()->getActionName();
|
30 |
+
if ($action == 'print'){
|
31 |
+
return $this;
|
32 |
+
}
|
33 |
+
|
34 |
+
parent::preDispatch();
|
35 |
+
$loginUrl = Mage::helper('customer')->getLoginUrl();
|
36 |
+
|
37 |
+
if (!Mage::getSingleton('customer/session')->authenticate($this, $loginUrl)) {
|
38 |
+
$this->setFlag('', self::FLAG_NO_DISPATCH, true);
|
39 |
+
}
|
40 |
+
}
|
41 |
+
|
42 |
+
public function printAction()
|
43 |
+
{
|
44 |
+
if (Mage::helper('guestprintorder')->moduleEnabled()){
|
45 |
+
if (!$this->_loadPrintValidOrder()) {
|
46 |
+
return;
|
47 |
+
}
|
48 |
+
} else {
|
49 |
+
if (!$this->_loadValidOrder()) {
|
50 |
+
return;
|
51 |
+
}
|
52 |
+
}
|
53 |
+
$this->loadLayout('print');
|
54 |
+
$this->renderLayout();
|
55 |
+
}
|
56 |
+
|
57 |
+
protected function _loadPrintValidOrder($orderId = null)
|
58 |
+
{
|
59 |
+
if (null === $orderId) {
|
60 |
+
$orderId = (int) $this->getRequest()->getParam('order_id');
|
61 |
+
}
|
62 |
+
if (!$orderId) {
|
63 |
+
$this->_forward('noRoute');
|
64 |
+
return false;
|
65 |
+
}
|
66 |
+
|
67 |
+
$order = Mage::getModel('sales/order')->load($orderId);
|
68 |
+
|
69 |
+
if ($this->_canPrintOrder($order)) {
|
70 |
+
Mage::register('current_order', $order);
|
71 |
+
return true;
|
72 |
+
} else {
|
73 |
+
$this->_redirect('*/*/history');
|
74 |
+
}
|
75 |
+
return false;
|
76 |
+
}
|
77 |
+
|
78 |
+
|
79 |
+
protected function _canPrintOrder($order)
|
80 |
+
{
|
81 |
+
$availableStates = Mage::getSingleton('sales/order_config')->getVisibleOnFrontStates();
|
82 |
+
|
83 |
+
if ($order->getId() && in_array($order->getState(), $availableStates, $strict = true)){
|
84 |
+
if ($order->getCustomerId()){
|
85 |
+
$customerId = Mage::getSingleton('customer/session')->getCustomerId();
|
86 |
+
|
87 |
+
return ($order->getCustomerId() == $customerId);
|
88 |
+
|
89 |
+
} else {
|
90 |
+
$remoteIP = Mage::helper('core/http')->getRemoteAddr();
|
91 |
+
$time = Mage::getModel('core/date')->timestamp() - 86400;
|
92 |
+
|
93 |
+
return ($order->getRemoteIP() == $remoteIP && $order->getCreatedAt() > date('Y-m-d H:i:s', $time));
|
94 |
+
}
|
95 |
+
}
|
96 |
+
|
97 |
+
return false;
|
98 |
+
}
|
99 |
+
}
|
app/code/community/Plumrocket/GuestPrintOrder/etc/adminhtml.xml
ADDED
@@ -0,0 +1,45 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<config>
|
3 |
+
<menu>
|
4 |
+
<plumrocket>
|
5 |
+
<title>Plumrocket</title>
|
6 |
+
<sort_order>80</sort_order>
|
7 |
+
<children>
|
8 |
+
<guestprintorder>
|
9 |
+
<title>Print Order Confirmation as Guest</title>
|
10 |
+
<sort_order>290</sort_order>
|
11 |
+
<action>adminhtml/system_config/edit/section/guestprintorder</action>
|
12 |
+
</guestprintorder>
|
13 |
+
</children>
|
14 |
+
</plumrocket>
|
15 |
+
</menu>
|
16 |
+
<acl>
|
17 |
+
<resources>
|
18 |
+
<admin>
|
19 |
+
<children>
|
20 |
+
<system>
|
21 |
+
<children>
|
22 |
+
<config>
|
23 |
+
<children>
|
24 |
+
<guestprintorder translate="title">
|
25 |
+
<title>Print Order Confirmation as Guest</title>
|
26 |
+
</guestprintorder>
|
27 |
+
</children>
|
28 |
+
</config>
|
29 |
+
</children>
|
30 |
+
</system>
|
31 |
+
<plumrocket>
|
32 |
+
<title>Plumrocket</title>
|
33 |
+
<sort_order>80</sort_order>
|
34 |
+
<children>
|
35 |
+
<guestprintorder translate="title">
|
36 |
+
<title>Print Order Confirmation as Guest Configuration</title>
|
37 |
+
<sort_order>290</sort_order>
|
38 |
+
</guestprintorder>
|
39 |
+
</children>
|
40 |
+
</plumrocket>
|
41 |
+
</children>
|
42 |
+
</admin>
|
43 |
+
</resources>
|
44 |
+
</acl>
|
45 |
+
</config>
|
app/code/community/Plumrocket/GuestPrintOrder/etc/config.xml
ADDED
@@ -0,0 +1,39 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<config>
|
3 |
+
<modules>
|
4 |
+
<Plumrocket_GuestPrintOrder>
|
5 |
+
<wiki>http://wiki.plumrocket.com/wiki/Magento_Print_Order_Confirmation_as_Guest_v1.x_Extension</wiki>
|
6 |
+
<version>1.0.0</version>
|
7 |
+
</Plumrocket_GuestPrintOrder>
|
8 |
+
</modules>
|
9 |
+
<frontend>
|
10 |
+
<routers>
|
11 |
+
<sales>
|
12 |
+
<args>
|
13 |
+
<modules>
|
14 |
+
<Plumrocket_GuestPrintOrder before="Mage_Sales">Plumrocket_GuestPrintOrder_Sales</Plumrocket_GuestPrintOrder>
|
15 |
+
</modules>
|
16 |
+
</args>
|
17 |
+
</sales>
|
18 |
+
</routers>
|
19 |
+
<layout>
|
20 |
+
<updates>
|
21 |
+
<guestprintorder>
|
22 |
+
<file>guestprintorder.xml</file>
|
23 |
+
</guestprintorder>
|
24 |
+
</updates>
|
25 |
+
</layout>
|
26 |
+
</frontend>
|
27 |
+
<global>
|
28 |
+
<helpers>
|
29 |
+
<guestprintorder>
|
30 |
+
<class>Plumrocket_GuestPrintOrder_Helper</class>
|
31 |
+
</guestprintorder>
|
32 |
+
</helpers>
|
33 |
+
<blocks>
|
34 |
+
<guestprintorder>
|
35 |
+
<class>Plumrocket_GuestPrintOrder_Block</class>
|
36 |
+
</guestprintorder>
|
37 |
+
</blocks>
|
38 |
+
</global>
|
39 |
+
</config>
|
app/code/community/Plumrocket/GuestPrintOrder/etc/system.xml
ADDED
@@ -0,0 +1,64 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<config>
|
3 |
+
<tabs>
|
4 |
+
<plumrocket>
|
5 |
+
<label>
|
6 |
+
<![CDATA[
|
7 |
+
<div style="padding-left:22px; background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMy1jMDExIDY2LjE0NTY2MSwgMjAxMi8wMi8wNi0xNDo1NjoyNyAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNiAoV2luZG93cykiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6NEIxMEIyRkRCOTg1MTFFMkI4Qjg5OEZGNjcwRUQ4MDciIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6NEIxMEIyRkVCOTg1MTFFMkI4Qjg5OEZGNjcwRUQ4MDciPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo0QjEwQjJGQkI5ODUxMUUyQjhCODk4RkY2NzBFRDgwNyIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDo0QjEwQjJGQ0I5ODUxMUUyQjhCODk4RkY2NzBFRDgwNyIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PoBY2kYAAAJCSURBVHjaJFJNaxVBEOzu2cfDZPflkSgkfsSP5CKBoBeDigeRgIgk4MWDePemqJHgBwgiCEFB9C94CkYMEuK/iF4CXgJ6UCOikBCyb6a7rVmX3WVmt6e6qrr49VppHknYXYMFFcfFzUXmRCROxmzsbPguhVpPqYcjLGSm7oRCIzo1fP/XztrG1grhlJMzBSUTKkyBnYFQDCCs8HRbB6aG539s7nz9ewhgaEa5hZuKqFtMFBvw5JyUcHBqdGFnW4Pb8b031HJHM6+N8Fc0Zky8NbFGVyv2FScmBq9CSNnfnmg/6vOhVKOUHVhqYi7RoAfA7oZ1ujD+kkk6AwPGUva3Th95nARlnBENHmhuB4IEk9QmB6+NVuegcmt7izVA2367MrJn0jOzrASQDoopgr0Gqc6PPYNNuNFPgmViZd/02Cs1VvWknm2HdkhXpWPdS2bRLcE2WILGkk3mQTk5NnS5hwYGl2CRwqPwZNo//3z74cu937sb5Fp1ugz7g3vA2d7s0TeSigTFWYOKJX2w2vKYrk8urq7P/6m/gVfV6ZRl2alKzznws4fnUnKpQcms0zf+9GKtKvdWik/flz6uP9ze3QQdwTBJBqouBnpmZL5qH+S7y232XiIOTguzemc5PJ+p5963VCjAGP6fJWlCZXkLeDR6MYPR2c13jO3tpZZmniE2M04IRcKAPCKYiQrKFtGtRc4YjIApkkmBJGqCR9lG48B1s0JR0dMaAc3posaBPIM8daMsVBpmMLiwHPhI/k+AAQDYqY0eXeLHAgAAAABJRU5ErkJggg==) left 50% no-repeat;">Plumrocket Inc.</div> ]]>
|
8 |
+
</label>
|
9 |
+
<class>plumrocket_section</class>
|
10 |
+
<sort_order>101</sort_order>
|
11 |
+
</plumrocket>
|
12 |
+
</tabs>
|
13 |
+
<sections>
|
14 |
+
<guestprintorder translate="label" >
|
15 |
+
<label>Print Order Confirmation as Guest</label>
|
16 |
+
<tab>plumrocket</tab>
|
17 |
+
<sort_order>1700</sort_order>
|
18 |
+
<show_in_default>1</show_in_default>
|
19 |
+
<show_in_website>1</show_in_website>
|
20 |
+
<show_in_store>1</show_in_store>
|
21 |
+
<groups>
|
22 |
+
<general translate="label">
|
23 |
+
<label>General</label>
|
24 |
+
<frontend_type>text</frontend_type>
|
25 |
+
<sort_order>10</sort_order>
|
26 |
+
<show_in_default>1</show_in_default>
|
27 |
+
<show_in_website>1</show_in_website>
|
28 |
+
<show_in_store>1</show_in_store>
|
29 |
+
<expanded>1</expanded>
|
30 |
+
<fields>
|
31 |
+
<version translate="label">
|
32 |
+
<frontend_type>text</frontend_type>
|
33 |
+
<frontend_model>guestprintorder/system_config_version</frontend_model>
|
34 |
+
<sort_order>10</sort_order>
|
35 |
+
<show_in_default>1</show_in_default>
|
36 |
+
<show_in_website>1</show_in_website>
|
37 |
+
<show_in_store>1</show_in_store>
|
38 |
+
</version>
|
39 |
+
<enable translate="label">
|
40 |
+
<label>Enable Extension</label>
|
41 |
+
<frontend_type>select</frontend_type>
|
42 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
43 |
+
<sort_order>20</sort_order>
|
44 |
+
<show_in_default>1</show_in_default>
|
45 |
+
<show_in_website>1</show_in_website>
|
46 |
+
<show_in_store>1</show_in_store>
|
47 |
+
</enable>
|
48 |
+
<replace_success_page_template translate="label">
|
49 |
+
<label>Replace Order Success Page Templates</label>
|
50 |
+
<frontend_type>select</frontend_type>
|
51 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
52 |
+
<sort_order>30</sort_order>
|
53 |
+
<show_in_default>1</show_in_default>
|
54 |
+
<show_in_website>1</show_in_website>
|
55 |
+
<show_in_store>1</show_in_store>
|
56 |
+
<comment><![CDATA[Set "Yes" to replace your order success page template with this extension template to display the "print" link for guests. Otherwise, if you want to keep your existing template - please refer to our online documentation for installation instructions.]]>
|
57 |
+
</comment>
|
58 |
+
</replace_success_page_template>
|
59 |
+
</fields>
|
60 |
+
</general>
|
61 |
+
</groups>
|
62 |
+
</guestprintorder>
|
63 |
+
</sections>
|
64 |
+
</config>
|
app/design/frontend/base/default/layout/guestprintorder.xml
ADDED
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<layout version="0.1.0">
|
3 |
+
<checkout_onepage_success translate="label">
|
4 |
+
<reference name="content">
|
5 |
+
<reference name="checkout.success">
|
6 |
+
<action method="setTemplate" ifconfig="guestprintorder/general/replace_success_page_template"><template>guestprintorder/checkout/success.phtml</template></action>
|
7 |
+
</reference>
|
8 |
+
</reference>
|
9 |
+
</checkout_onepage_success>
|
10 |
+
</layout>
|
11 |
+
|
app/design/frontend/base/default/template/guestprintorder/checkout/success.phtml
ADDED
@@ -0,0 +1,68 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Academic Free License (AFL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE_AFL.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/afl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* DISCLAIMER
|
16 |
+
*
|
17 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
+
* versions in the future. If you wish to customize Magento for your
|
19 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
+
*
|
21 |
+
* @category design
|
22 |
+
* @package base_default
|
23 |
+
* @copyright Copyright (c) 2014 Magento Inc. (http://www.magentocommerce.com)
|
24 |
+
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
25 |
+
*/
|
26 |
+
?>
|
27 |
+
<div class="page-title">
|
28 |
+
<h1><?php echo $this->__('Your order has been received.') ?></h1>
|
29 |
+
</div>
|
30 |
+
<?php echo $this->getMessagesBlock()->getGroupedHtml() ?>
|
31 |
+
<h2 class="sub-title"><?php echo $this->__('Thank you for your purchase!') ?></h2>
|
32 |
+
|
33 |
+
<?php if ($this->getOrderId()):?>
|
34 |
+
<?php if ($this->getCanViewOrder()) :?>
|
35 |
+
<p><?php echo $this->__('Your order # is: %s.', sprintf('<a href="%s">%s</a>', $this->escapeHtml($this->getViewOrderUrl()), $this->escapeHtml($this->getOrderId()))) ?></p>
|
36 |
+
<?php else :?>
|
37 |
+
<p><?php echo $this->__('Your order # is: %s.', $this->escapeHtml($this->getOrderId())) ?></p>
|
38 |
+
<?php endif;?>
|
39 |
+
<p><?php echo $this->__('You will receive an order confirmation email with details of your order and a link to track its progress.') ?></p>
|
40 |
+
<?php if ($this->getCanViewOrder() && $this->getCanPrintOrder() || $this->helper('guestprintorder')->moduleEnabled()) :?>
|
41 |
+
<p>
|
42 |
+
<?php echo $this->__('Click <a href="%s" onclick="this.target=\'_blank\'">here to print</a> a copy of your order confirmation.', $this->getPrintUrl()) ?>
|
43 |
+
</p>
|
44 |
+
<?php endif;?>
|
45 |
+
<?php if ($this->getCanViewOrder() && $this->getCanPrintOrder()) :?>
|
46 |
+
<p>
|
47 |
+
<?php echo $this->getChildHtml() ?>
|
48 |
+
</p>
|
49 |
+
<?php endif;?>
|
50 |
+
<?php endif;?>
|
51 |
+
|
52 |
+
<?php if ($this->getAgreementRefId()): ?>
|
53 |
+
<p><?php echo $this->__('Your billing agreement # is: %s.', sprintf('<a href="%s">%s</a>', $this->escapeHtml($this->getAgreementUrl()), $this->escapeHtml($this->getAgreementRefId())))?></p>
|
54 |
+
<?php endif;?>
|
55 |
+
|
56 |
+
<?php if ($profiles = $this->getRecurringProfiles()):?>
|
57 |
+
<p><?php echo $this->__('Your recurring payment profiles:'); ?></p>
|
58 |
+
<ul class="disc">
|
59 |
+
<?php foreach($profiles as $profile):?>
|
60 |
+
<?php $profileIdHtml = ($this->getCanViewProfiles() ? sprintf('<a href="%s">%s</a>', $this->escapeHtml($this->getProfileUrl($profile)), $this->escapeHtml($this->getObjectData($profile, 'reference_id'))) : $this->escapeHtml($this->getObjectData($profile, 'reference_id')));?>
|
61 |
+
<li><?php echo $this->__('Payment profile # %s: "%s".', $profileIdHtml, $this->escapeHtml($this->getObjectData($profile, 'schedule_description')))?></li>
|
62 |
+
<?php endforeach;?>
|
63 |
+
</ul>
|
64 |
+
<?php endif;?>
|
65 |
+
|
66 |
+
<div class="buttons-set">
|
67 |
+
<button type="button" class="button" title="<?php echo $this->__('Continue Shopping') ?>" onclick="window.location='<?php echo $this->getUrl() ?>'"><span><span><?php echo $this->__('Continue Shopping') ?></span></span></button>
|
68 |
+
</div>
|
app/etc/modules/Plumrocket_GuestPrintOrder.xml
ADDED
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<config>
|
3 |
+
<modules>
|
4 |
+
<Plumrocket_GuestPrintOrder>
|
5 |
+
<active>true</active>
|
6 |
+
<codePool>community</codePool>
|
7 |
+
<version>1.0.0</version>
|
8 |
+
<name>Plumrocket Print Order Confirmation as Guest</name>
|
9 |
+
<depends>
|
10 |
+
<Plumrocket_Base />
|
11 |
+
</depends>
|
12 |
+
</Plumrocket_GuestPrintOrder>
|
13 |
+
</modules>
|
14 |
+
</config>
|
package.xml
ADDED
@@ -0,0 +1,18 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<package>
|
3 |
+
<name>Plumrocket_Print_Order_Confirmation_As_Guest</name>
|
4 |
+
<version>1.0.0</version>
|
5 |
+
<stability>stable</stability>
|
6 |
+
<license uri="http://wiki.plumrocket.net/wiki/EULA">End-user License Agreement</license>
|
7 |
+
<channel>community</channel>
|
8 |
+
<extends/>
|
9 |
+
<summary>The functionality of Print order confirmation receipt as guest allows your unregistered visitors to print orders on order confirmation page.</summary>
|
10 |
+
<description>The functionality of Print order confirmation receipt as guest allows your unregistered visitors to print orders on order confirmation page. It is a totally free, open source extension that was created to attract more visitors to your store, encourage purchases and increase customers’ loyalty. This magento print order plugin is a great way to open the door to your magento site for new customers.</description>
|
11 |
+
<notes>Allows your unregistered visitors to print orders on order confirmation page.</notes>
|
12 |
+
<authors><author><name>Plumrocket Team</name><user>plumrocket</user><email>support@plumrocket.com</email></author></authors>
|
13 |
+
<date>2014-07-09</date>
|
14 |
+
<time>12:36:07</time>
|
15 |
+
<contents><target name="magecommunity"><dir name="Plumrocket"><dir name="GuestPrintOrder"><dir name="Block"><dir name="System"><dir name="Config"><file name="Version.php" hash="bae0319c6c92a538fbe83b96a8dd1c3b"/></dir></dir></dir><dir name="Helper"><file name="Data.php" hash="b097ca8090d4b50afe17a11cc53adc09"/></dir><dir name="controllers"><dir name="Sales"><file name="OrderController.php" hash="3a1e9bac702df8c097a00d9383bdf798"/></dir></dir><dir name="etc"><file name="adminhtml.xml" hash="1c279d13b996c4d4ea4bd727ae79cb4d"/><file name="config.xml" hash="2d46ed915f0855dbed6fdb0b8e37a3fa"/><file name="system.xml" hash="1f8333447c950198f67da7f3ebd5d151"/></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Plumrocket_GuestPrintOrder.xml" hash="13cb6674f122a6b49d77552bf7632960"/></dir></target><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="template"><dir name="guestprintorder"><dir name="checkout"><file name="success.phtml" hash="265da8a33fbcba882adc08d8000acd0a"/></dir></dir></dir><dir name="layout"><file name="guestprintorder.xml" hash="eb1888e63fc96c71be97c160e09c14f4"/></dir></dir></dir></dir></target></contents>
|
16 |
+
<compatible/>
|
17 |
+
<dependencies><required><php><min>5.2.0</min><max>6.0.0</max></php><package><name>Plumrocket_Base</name><channel>community</channel><min></min><max></max></package></required></dependencies>
|
18 |
+
</package>
|