Version Notes
Pre-Order extension can increase your website's effectiveness by allowing customer to order products which is not in stock currently but would be in stock in future. This extension extends native Magento functionality with an ability to show available date of products in list and product detail page as well as cart page also. This extension gives you the flexibility to show details for another theme also.For magento ver 1.9, it would work for default package not for rwd package. You can set available date text and easily manage via admin therefore its fully flexible and useful for your website to increase your site's sale.
Download this release
Release Info
Developer | Anupam Tiwari |
Extension | Pre_Order |
Version | 1.0.1 |
Comparing to | |
See all releases |
Code changes from version 1.0.0 to 1.0.1
- app/code/community/Vishwasnature/Preorder/Block/Adminhtml/Sales/Order/Grid.php +0 -206
- app/code/community/Vishwasnature/Preorder/Model/Observer.php +0 -76
- app/code/community/Vishwasnature/Preorder/controllers/IndexController.php +0 -39
- app/code/community/Vishwasnature/Preorder/etc/config.xml +0 -129
- app/code/community/Vishwasnature/Preorder/sql/vishwasnature_preorder_setup/mysql4-install-0.0.1.php +0 -74
- package.xml +4 -4
- skin/frontend/base/default/preorder/css/custom.css +1 -0
app/code/community/Vishwasnature/Preorder/Block/Adminhtml/Sales/Order/Grid.php
DELETED
@@ -1,206 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
class Vishwasnature_Preorder_Block_Adminhtml_Sales_Order_Grid extends Mage_Adminhtml_Block_Widget_Grid {
|
4 |
-
|
5 |
-
public function __construct()
|
6 |
-
{
|
7 |
-
parent::__construct();
|
8 |
-
$this->setId('sales_order_grid');
|
9 |
-
$this->setUseAjax(true);
|
10 |
-
$this->setDefaultSort('created_at');
|
11 |
-
$this->setDefaultDir('DESC');
|
12 |
-
$this->setSaveParametersInSession(true);
|
13 |
-
}
|
14 |
-
|
15 |
-
/**
|
16 |
-
* Retrieve collection class
|
17 |
-
*
|
18 |
-
* @return string
|
19 |
-
*/
|
20 |
-
protected function _getCollectionClass()
|
21 |
-
{
|
22 |
-
return 'sales/order_grid_collection';
|
23 |
-
}
|
24 |
-
|
25 |
-
protected function _prepareCollection()
|
26 |
-
{
|
27 |
-
$collection = Mage::getResourceModel($this->_getCollectionClass());
|
28 |
-
$collection->getSelect()->joinleft(array('salesorder'=>'sales_flat_order'),'salesorder.entity_id=main_table.entity_id',array('pre_order' => 'salesorder.pre_order'));
|
29 |
-
$this->setCollection($collection);
|
30 |
-
return parent::_prepareCollection();
|
31 |
-
}
|
32 |
-
|
33 |
-
protected function _prepareColumns()
|
34 |
-
{
|
35 |
-
|
36 |
-
$this->addColumn('real_order_id', array(
|
37 |
-
'header'=> Mage::helper('sales')->__('Order #'),
|
38 |
-
'width' => '80px',
|
39 |
-
'type' => 'text',
|
40 |
-
'index' => 'increment_id',
|
41 |
-
'filter_index' => 'main_table.increment_id',
|
42 |
-
));
|
43 |
-
|
44 |
-
if (!Mage::app()->isSingleStoreMode()) {
|
45 |
-
$this->addColumn('store_id', array(
|
46 |
-
'header' => Mage::helper('sales')->__('Purchased From (Store)'),
|
47 |
-
'index' => 'store_id',
|
48 |
-
'type' => 'store',
|
49 |
-
'store_view'=> true,
|
50 |
-
'display_deleted' => true,
|
51 |
-
'filter_index' => 'main_table.store_id',
|
52 |
-
));
|
53 |
-
}
|
54 |
-
|
55 |
-
$this->addColumn('created_at', array(
|
56 |
-
'header' => Mage::helper('sales')->__('Purchased On'),
|
57 |
-
'index' => 'created_at',
|
58 |
-
'type' => 'datetime',
|
59 |
-
'width' => '100px',
|
60 |
-
'filter_index' => 'main_table.created_at',
|
61 |
-
));
|
62 |
-
|
63 |
-
$this->addColumn('billing_name', array(
|
64 |
-
'header' => Mage::helper('sales')->__('Bill to Name'),
|
65 |
-
'index' => 'billing_name',
|
66 |
-
'filter_index' => 'main_table.billing_name',
|
67 |
-
));
|
68 |
-
|
69 |
-
$this->addColumn('shipping_name', array(
|
70 |
-
'header' => Mage::helper('sales')->__('Ship to Name'),
|
71 |
-
'index' => 'shipping_name',
|
72 |
-
'filter_index' => 'main_table.shipping_name',
|
73 |
-
));
|
74 |
-
|
75 |
-
$this->addColumn('base_grand_total', array(
|
76 |
-
'header' => Mage::helper('sales')->__('G.T. (Base)'),
|
77 |
-
'index' => 'base_grand_total',
|
78 |
-
'type' => 'currency',
|
79 |
-
'currency' => 'base_currency_code',
|
80 |
-
'filter_index' => 'main_table.base_grand_total',
|
81 |
-
));
|
82 |
-
|
83 |
-
$this->addColumn('grand_total', array(
|
84 |
-
'header' => Mage::helper('sales')->__('G.T. (Purchased)'),
|
85 |
-
'index' => 'grand_total',
|
86 |
-
'type' => 'currency',
|
87 |
-
'currency' => 'order_currency_code',
|
88 |
-
'filter_index' => 'main_table.grand_total',
|
89 |
-
));
|
90 |
-
$this->addColumn('pre_order', array(
|
91 |
-
'header' => Mage::helper('sales')->__('Order Type'),
|
92 |
-
'index' => 'pre_order',
|
93 |
-
'filter_index' => 'salesorder.pre_order',
|
94 |
-
'type' => 'options',
|
95 |
-
'width' => '70px',
|
96 |
-
'options' => Mage::getSingleton('preorder/observer')->getOrderTypes(),
|
97 |
-
));
|
98 |
-
|
99 |
-
$this->addColumn('status', array(
|
100 |
-
'header' => Mage::helper('sales')->__('Status'),
|
101 |
-
'index' => 'status',
|
102 |
-
'type' => 'options',
|
103 |
-
'width' => '70px',
|
104 |
-
'filter_index' => 'main_table.status',
|
105 |
-
'options' => Mage::getSingleton('sales/order_config')->getStatuses(),
|
106 |
-
));
|
107 |
-
|
108 |
-
if (Mage::getSingleton('admin/session')->isAllowed('sales/order/actions/view')) {
|
109 |
-
$this->addColumn('action',
|
110 |
-
array(
|
111 |
-
'header' => Mage::helper('sales')->__('Action'),
|
112 |
-
'width' => '50px',
|
113 |
-
'type' => 'action',
|
114 |
-
'getter' => 'getId',
|
115 |
-
'actions' => array(
|
116 |
-
array(
|
117 |
-
'caption' => Mage::helper('sales')->__('View'),
|
118 |
-
'url' => array('base'=>'*/sales_order/view'),
|
119 |
-
'field' => 'order_id'
|
120 |
-
)
|
121 |
-
),
|
122 |
-
'filter' => false,
|
123 |
-
'sortable' => false,
|
124 |
-
'index' => 'stores',
|
125 |
-
'is_system' => true,
|
126 |
-
));
|
127 |
-
}
|
128 |
-
$this->addRssList('rss/order/new', Mage::helper('sales')->__('New Order RSS'));
|
129 |
-
|
130 |
-
$this->addExportType('*/*/exportCsv', Mage::helper('sales')->__('CSV'));
|
131 |
-
$this->addExportType('*/*/exportExcel', Mage::helper('sales')->__('Excel XML'));
|
132 |
-
|
133 |
-
return parent::_prepareColumns();
|
134 |
-
}
|
135 |
-
|
136 |
-
protected function _prepareMassaction()
|
137 |
-
{
|
138 |
-
$this->setMassactionIdField('entity_id');
|
139 |
-
$this->getMassactionBlock()->setFormFieldName('order_ids');
|
140 |
-
$this->getMassactionBlock()->setUseSelectAll(false);
|
141 |
-
|
142 |
-
if (Mage::getSingleton('admin/session')->isAllowed('sales/order/actions/cancel')) {
|
143 |
-
$this->getMassactionBlock()->addItem('cancel_order', array(
|
144 |
-
'label'=> Mage::helper('sales')->__('Cancel'),
|
145 |
-
'url' => $this->getUrl('*/sales_order/massCancel'),
|
146 |
-
));
|
147 |
-
}
|
148 |
-
|
149 |
-
if (Mage::getSingleton('admin/session')->isAllowed('sales/order/actions/hold')) {
|
150 |
-
$this->getMassactionBlock()->addItem('hold_order', array(
|
151 |
-
'label'=> Mage::helper('sales')->__('Hold'),
|
152 |
-
'url' => $this->getUrl('*/sales_order/massHold'),
|
153 |
-
));
|
154 |
-
}
|
155 |
-
|
156 |
-
if (Mage::getSingleton('admin/session')->isAllowed('sales/order/actions/unhold')) {
|
157 |
-
$this->getMassactionBlock()->addItem('unhold_order', array(
|
158 |
-
'label'=> Mage::helper('sales')->__('Unhold'),
|
159 |
-
'url' => $this->getUrl('*/sales_order/massUnhold'),
|
160 |
-
));
|
161 |
-
}
|
162 |
-
|
163 |
-
$this->getMassactionBlock()->addItem('pdfinvoices_order', array(
|
164 |
-
'label'=> Mage::helper('sales')->__('Print Invoices'),
|
165 |
-
'url' => $this->getUrl('*/sales_order/pdfinvoices'),
|
166 |
-
));
|
167 |
-
|
168 |
-
$this->getMassactionBlock()->addItem('pdfshipments_order', array(
|
169 |
-
'label'=> Mage::helper('sales')->__('Print Packingslips'),
|
170 |
-
'url' => $this->getUrl('*/sales_order/pdfshipments'),
|
171 |
-
));
|
172 |
-
|
173 |
-
$this->getMassactionBlock()->addItem('pdfcreditmemos_order', array(
|
174 |
-
'label'=> Mage::helper('sales')->__('Print Credit Memos'),
|
175 |
-
'url' => $this->getUrl('*/sales_order/pdfcreditmemos'),
|
176 |
-
));
|
177 |
-
|
178 |
-
$this->getMassactionBlock()->addItem('pdfdocs_order', array(
|
179 |
-
'label'=> Mage::helper('sales')->__('Print All'),
|
180 |
-
'url' => $this->getUrl('*/sales_order/pdfdocs'),
|
181 |
-
));
|
182 |
-
|
183 |
-
$this->getMassactionBlock()->addItem('print_shipping_label', array(
|
184 |
-
'label'=> Mage::helper('sales')->__('Print Shipping Labels'),
|
185 |
-
'url' => $this->getUrl('*/sales_order_shipment/massPrintShippingLabel'),
|
186 |
-
));
|
187 |
-
|
188 |
-
return $this;
|
189 |
-
}
|
190 |
-
|
191 |
-
public function getRowUrl($row)
|
192 |
-
{
|
193 |
-
if (Mage::getSingleton('admin/session')->isAllowed('sales/order/actions/view')) {
|
194 |
-
return $this->getUrl('*/sales_order/view', array('order_id' => $row->getId()));
|
195 |
-
}
|
196 |
-
return false;
|
197 |
-
}
|
198 |
-
|
199 |
-
public function getGridUrl()
|
200 |
-
{
|
201 |
-
return $this->getUrl('*/*/grid', array('_current'=>true));
|
202 |
-
}
|
203 |
-
|
204 |
-
}
|
205 |
-
|
206 |
-
?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/community/Vishwasnature/Preorder/Model/Observer.php
DELETED
@@ -1,76 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
class Vishwasnature_Preorder_Model_Observer {
|
4 |
-
|
5 |
-
const PRE_ORDER_EXIST_TRUE = 1;
|
6 |
-
const PRE_ORDER_EXIST_FALSE = 0;
|
7 |
-
const STATE_PENDING_PREORDER = 'pending_pre_order';
|
8 |
-
|
9 |
-
public function checkProductType(Varien_Event_Observer $observer) {
|
10 |
-
$mainProductId = Mage::app()->getRequest()->getParam('product');
|
11 |
-
$newItem = $observer->getEvent()->getQuoteItem();
|
12 |
-
$ispreOrder = false;
|
13 |
-
$cart = Mage::getModel('checkout/cart')->getQuote();
|
14 |
-
$items = $cart->getAllItems();
|
15 |
-
$countItem = 0;
|
16 |
-
foreach ($items as $item) {
|
17 |
-
if ($item->getId()) {
|
18 |
-
$countItem++;
|
19 |
-
if ($item->getProduct()->getPreOrder()) {
|
20 |
-
$ispreOrder = true;
|
21 |
-
}
|
22 |
-
}
|
23 |
-
}
|
24 |
-
if ($countItem > 0) {
|
25 |
-
if($mainProductId != $newItem->getProduct()->getId()){
|
26 |
-
$mainProductPreOrderExist = Mage::getModel('catalog/product')->load($mainProductId)->getPreOrder();
|
27 |
-
if($mainProductPreOrderExist != $ispreOrder){
|
28 |
-
$response['status'] = 'ERROR';
|
29 |
-
$response['flag'] = 1;
|
30 |
-
$response['message'] = '<p>Sorry, cannot mix regular & pre-order order products.</p>';
|
31 |
-
|
32 |
-
Mage::getSingleton('core/session')->addError('<p>Sorry, cannot mix regular & pre-order order products.</p>');
|
33 |
-
$url = Mage::getModel('core/url')->getUrl('checkout/cart/index');
|
34 |
-
Mage::app()->getResponse()->setRedirect($url);
|
35 |
-
Mage::app()->getResponse()->sendResponse();
|
36 |
-
exit;
|
37 |
-
}
|
38 |
-
}else{
|
39 |
-
if ($newItem->getProduct()->getPreOrder() != $ispreOrder) {
|
40 |
-
$response['status'] = 'ERROR';
|
41 |
-
$response['flag'] = 1;
|
42 |
-
$response['message'] = '<p>Sorry, cannot mix regular & pre-order order products.</p>';
|
43 |
-
|
44 |
-
Mage::getSingleton('core/session')->addError('<p>Sorry, cannot mix regular & pre-order order products.</p>');
|
45 |
-
$url = Mage::getModel('core/url')->getUrl('checkout/cart/index');
|
46 |
-
Mage::app()->getResponse()->setRedirect($url);
|
47 |
-
Mage::app()->getResponse()->sendResponse();
|
48 |
-
exit;
|
49 |
-
}
|
50 |
-
}
|
51 |
-
}
|
52 |
-
}
|
53 |
-
|
54 |
-
// public function setCustomOrderStatus($observer) {
|
55 |
-
// $order = $observer->getEvent()->getOrder();
|
56 |
-
// if($order->getPreOrder() == self::PRE_ORDER_EXIST_TRUE){
|
57 |
-
// $order->setState('new', true);
|
58 |
-
// $order->setStatus(self::STATE_PENDING_PREORDER, true);
|
59 |
-
// $order->save();
|
60 |
-
// }
|
61 |
-
// }
|
62 |
-
public function getOrderTypes() {
|
63 |
-
return array(0 => 'Regular', 1 => 'Pre-Order');
|
64 |
-
}
|
65 |
-
|
66 |
-
public function salesQuoteItemSetCustomAttribute($observer) {
|
67 |
-
$quoteItem = $observer->getQuoteItem();
|
68 |
-
$product = $observer->getProduct();
|
69 |
-
|
70 |
-
$quoteItem->setPreOrder($product->getPreOrder());
|
71 |
-
$quoteItem->setPreOrderNote($product->getPreOrderNote());
|
72 |
-
}
|
73 |
-
|
74 |
-
}
|
75 |
-
|
76 |
-
?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/community/Vishwasnature/Preorder/controllers/IndexController.php
DELETED
@@ -1,39 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
require_once 'Mage/Checkout/controllers/OnepageController.php';
|
4 |
-
|
5 |
-
class Vishwasnature_Preorder_IndexController extends Mage_Checkout_OnepageController {
|
6 |
-
|
7 |
-
public function indexAction() {
|
8 |
-
Mage::getSingleton('checkout/session')->setIsPreOrder(false);
|
9 |
-
$cart = Mage::getModel('checkout/cart')->getQuote();
|
10 |
-
$items = $cart->getAllItems();
|
11 |
-
$ispreOrder = false;
|
12 |
-
$isRegularOrder = false;
|
13 |
-
foreach ($items as $item) {
|
14 |
-
if($item->getParentItemId() == ''){
|
15 |
-
if ($item->getProduct()->getPreOrder()) {
|
16 |
-
$ispreOrder = true;
|
17 |
-
Mage::getSingleton('checkout/session')->setIsPreOrder(true);
|
18 |
-
}else{
|
19 |
-
$isRegularOrder = true;
|
20 |
-
}
|
21 |
-
}
|
22 |
-
}
|
23 |
-
if($ispreOrder){
|
24 |
-
$cart->setData('pre_order',Vishwasnature_Preorder_Model_Observer::PRE_ORDER_EXIST_TRUE)->save();
|
25 |
-
}else{
|
26 |
-
$cart->setData('pre_order',Vishwasnature_Preorder_Model_Observer::PRE_ORDER_EXIST_FALSE)->save();
|
27 |
-
}
|
28 |
-
if($ispreOrder && $isRegularOrder){
|
29 |
-
Mage::getSingleton('checkout/session')->addError("Orders cannot be mixed");
|
30 |
-
$this->_redirect('checkout/cart');
|
31 |
-
return;
|
32 |
-
}
|
33 |
-
parent::indexAction();
|
34 |
-
|
35 |
-
}
|
36 |
-
|
37 |
-
}
|
38 |
-
|
39 |
-
?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/community/Vishwasnature/Preorder/etc/config.xml
DELETED
@@ -1,129 +0,0 @@
|
|
1 |
-
<?xml version="1.0"?>
|
2 |
-
<config>
|
3 |
-
<modules>
|
4 |
-
<Vishwasnature_Preorder>
|
5 |
-
<version>0.0.1</version>
|
6 |
-
</Vishwasnature_Preorder>
|
7 |
-
</modules>
|
8 |
-
<adminhtml>
|
9 |
-
<layout>
|
10 |
-
<updates>
|
11 |
-
<preorder>
|
12 |
-
<file>preorder.xml</file>
|
13 |
-
</preorder>
|
14 |
-
</updates>
|
15 |
-
</layout>
|
16 |
-
</adminhtml>
|
17 |
-
<frontend>
|
18 |
-
<routers>
|
19 |
-
<preorder>
|
20 |
-
<use>standard</use>
|
21 |
-
<args>
|
22 |
-
<module>Vishwasnature_Preorder</module>
|
23 |
-
<frontName>preorder</frontName>
|
24 |
-
</args>
|
25 |
-
</preorder>
|
26 |
-
</routers>
|
27 |
-
<events>
|
28 |
-
<checkout_cart_product_add_after>
|
29 |
-
<observers>
|
30 |
-
<check_product_type>
|
31 |
-
<type>singleton</type>
|
32 |
-
<class>Vishwasnature_Preorder_Model_Observer</class>
|
33 |
-
<method>checkProductType</method>
|
34 |
-
</check_product_type>
|
35 |
-
</observers>
|
36 |
-
</checkout_cart_product_add_after>
|
37 |
-
<!-- <sales_order_place_after>
|
38 |
-
<observers>
|
39 |
-
<preorder_order_observer>
|
40 |
-
<type>singleton</type>
|
41 |
-
<class>Vishwasnature_Preorder_Model_Observer</class>
|
42 |
-
<method>setCustomOrderStatus</method>
|
43 |
-
</preorder_order_observer>
|
44 |
-
</observers>
|
45 |
-
</sales_order_place_after>-->
|
46 |
-
</events>
|
47 |
-
<layout>
|
48 |
-
<updates>
|
49 |
-
<preorder>
|
50 |
-
<file>preorder.xml</file>
|
51 |
-
</preorder>
|
52 |
-
</updates>
|
53 |
-
</layout>
|
54 |
-
</frontend>
|
55 |
-
<global>
|
56 |
-
<blocks>
|
57 |
-
<preorder>
|
58 |
-
<class>Vishwasnature_Preorder_Block</class>
|
59 |
-
</preorder>
|
60 |
-
<adminhtml>
|
61 |
-
<rewrite>
|
62 |
-
<sales_order_grid>Vishwasnature_Preorder_Block_Adminhtml_Sales_Order_Grid</sales_order_grid>
|
63 |
-
</rewrite>
|
64 |
-
</adminhtml>
|
65 |
-
</blocks>
|
66 |
-
<models>
|
67 |
-
<preorder>
|
68 |
-
<class>Vishwasnature_Preorder_Model</class>
|
69 |
-
</preorder>
|
70 |
-
</models>
|
71 |
-
<resources>
|
72 |
-
<vishwasnature_preorder_setup>
|
73 |
-
<setup>
|
74 |
-
<module>Vishwasnature_Preorder</module>
|
75 |
-
<class>Mage_Catalog_Model_Resource_Setup</class>
|
76 |
-
</setup>
|
77 |
-
</vishwasnature_preorder_setup>
|
78 |
-
</resources>
|
79 |
-
<events>
|
80 |
-
<sales_quote_item_set_product>
|
81 |
-
<observers>
|
82 |
-
<vishwasnature_preorder>
|
83 |
-
<type>singleton</type>
|
84 |
-
<class>Vishwasnature_Preorder_Model_Observer</class>
|
85 |
-
<method>salesQuoteItemSetCustomAttribute</method>
|
86 |
-
</vishwasnature_preorder>
|
87 |
-
</observers>
|
88 |
-
</sales_quote_item_set_product>
|
89 |
-
</events>
|
90 |
-
<rewrite>
|
91 |
-
<vishwasnature_preorder_index>
|
92 |
-
<from><![CDATA[#^/checkout/onepage/#]]></from>
|
93 |
-
<to>/preorder/index/</to>
|
94 |
-
</vishwasnature_preorder_index>
|
95 |
-
</rewrite>
|
96 |
-
|
97 |
-
<sales>
|
98 |
-
<quote>
|
99 |
-
<item>
|
100 |
-
<product_attributes>
|
101 |
-
<pre_order/>
|
102 |
-
<pre_order_note/>
|
103 |
-
</product_attributes>
|
104 |
-
</item>
|
105 |
-
</quote>
|
106 |
-
</sales>
|
107 |
-
<fieldsets>
|
108 |
-
<sales_convert_quote_item>
|
109 |
-
<pre_order>
|
110 |
-
<to_order_item>*</to_order_item>
|
111 |
-
</pre_order>
|
112 |
-
<pre_order_note>
|
113 |
-
<to_order_item>*</to_order_item>
|
114 |
-
</pre_order_note>
|
115 |
-
</sales_convert_quote_item>
|
116 |
-
|
117 |
-
<sales_convert_quote>
|
118 |
-
<pre_order>
|
119 |
-
<to_order>*</to_order>
|
120 |
-
</pre_order>
|
121 |
-
</sales_convert_quote>
|
122 |
-
<sales_convert_order>
|
123 |
-
<pre_order>
|
124 |
-
<to_quote>*</to_quote>
|
125 |
-
</pre_order>
|
126 |
-
</sales_convert_order>
|
127 |
-
</fieldsets>
|
128 |
-
</global>
|
129 |
-
</config>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/community/Vishwasnature/Preorder/sql/vishwasnature_preorder_setup/mysql4-install-0.0.1.php
DELETED
@@ -1,74 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
$this->startSetup();
|
4 |
-
$this->addAttribute('catalog_product', 'pre_order', array(
|
5 |
-
'group' => 'General',
|
6 |
-
'type' => 'int', // can be int, varchar, decimal, text, datetime
|
7 |
-
'backend' => '', // If you're making an image attribute you'll need to add : catalog/category_attribute_backend_image
|
8 |
-
'frontend_input' => '',
|
9 |
-
'frontend' => '',
|
10 |
-
'label' => 'Is Pre Order',
|
11 |
-
'input' => 'boolean', //text, textarea, select, file, image, multiselect
|
12 |
-
'class' => '',
|
13 |
-
'global' => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_GLOBAL, // Scope can be SCOPE_STORE, SCOPE_GLOBAL or SCOPE_WEBSITE
|
14 |
-
'visible' => true,
|
15 |
-
'frontend_class' => '',
|
16 |
-
'required' => false, // or true
|
17 |
-
'user_defined' => true, // or false
|
18 |
-
'used_in_product_listing' => '1',
|
19 |
-
'default' => '',
|
20 |
-
'apply_to' => 'simple,configurable,virtual,bundle,downloadable',
|
21 |
-
));
|
22 |
-
$this->addAttribute('catalog_product', 'pre_order_note', array(
|
23 |
-
'group' => 'General',
|
24 |
-
'type' => 'varchar', // can be int, varchar, decimal, text, datetime
|
25 |
-
'backend' => '', // If you're making an image attribute you'll need to add : catalog/category_attribute_backend_image
|
26 |
-
'frontend_input' => '',
|
27 |
-
'frontend' => '',
|
28 |
-
'label' => 'Pre Order Note',
|
29 |
-
'input' => 'text', //text, textarea, select, file, image, multiselect
|
30 |
-
'class' => '',
|
31 |
-
'global' => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_GLOBAL, // Scope can be SCOPE_STORE, SCOPE_GLOBAL or SCOPE_WEBSITE
|
32 |
-
'visible' => true,
|
33 |
-
'frontend_class' => '',
|
34 |
-
'required' => false, // or true
|
35 |
-
'user_defined' => true, // or false
|
36 |
-
'used_in_product_listing' => '1',
|
37 |
-
'default' => '',
|
38 |
-
'apply_to' => 'simple,configurable,virtual,bundle,downloadable',
|
39 |
-
));
|
40 |
-
$this->endSetup();
|
41 |
-
|
42 |
-
$installer = new Mage_Sales_Model_Resource_Setup('core_setup');
|
43 |
-
/**
|
44 |
-
* Add 'custom_attribute' attribute for entities
|
45 |
-
*/
|
46 |
-
$entities = array(
|
47 |
-
'quote',
|
48 |
-
'quote_item',
|
49 |
-
'order',
|
50 |
-
'order_item'
|
51 |
-
);
|
52 |
-
$entitiesnew = array(
|
53 |
-
'quote_item',
|
54 |
-
'order_item'
|
55 |
-
);
|
56 |
-
$options = array(
|
57 |
-
'type' => Varien_Db_Ddl_Table::TYPE_BOOLEAN,
|
58 |
-
'visible' => true,
|
59 |
-
'required' => false,
|
60 |
-
'default' => 0
|
61 |
-
);
|
62 |
-
$options2 = array(
|
63 |
-
'type' => Varien_Db_Ddl_Table::TYPE_VARCHAR,
|
64 |
-
'visible' => true,
|
65 |
-
'required' => false
|
66 |
-
);
|
67 |
-
foreach ($entities as $entity) {
|
68 |
-
$installer->addAttribute($entity, 'pre_order', $options);
|
69 |
-
}
|
70 |
-
foreach ($entitiesnew as $entitynew) {
|
71 |
-
$installer->addAttribute($entitynew, 'pre_order_note', $options2);
|
72 |
-
}
|
73 |
-
$installer->endSetup();
|
74 |
-
?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
package.xml
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>Pre_Order</name>
|
4 |
-
<version>1.0.
|
5 |
<stability>stable</stability>
|
6 |
<license uri="http://opensource.org/licenses/osl-3.0.php">Open Software License (OSL)</license>
|
7 |
<channel>community</channel>
|
@@ -10,9 +10,9 @@
|
|
10 |
<description>Pre-Order extension can increase your website's effectiveness by allowing customer to order products which is not in stock currently but would be in stock in future. This extension extends native Magento functionality with an ability to show available date of products in list and product detail page as well as cart page also. This extension gives you the flexibility to show details for another theme also.For magento ver 1.9, it would work for default package not for rwd package. You can set available date text and easily manage via admin therefore its fully flexible and useful for your website to increase your site's sale.</description>
|
11 |
<notes>Pre-Order extension can increase your website's effectiveness by allowing customer to order products which is not in stock currently but would be in stock in future. This extension extends native Magento functionality with an ability to show available date of products in list and product detail page as well as cart page also. This extension gives you the flexibility to show details for another theme also.For magento ver 1.9, it would work for default package not for rwd package. You can set available date text and easily manage via admin therefore its fully flexible and useful for your website to increase your site's sale.</notes>
|
12 |
<authors><author><name>Anupam Tiwari</name><user>MAG002574387</user><email>vishwasnature30@gmail.com</email></author></authors>
|
13 |
-
<date>2015-02-
|
14 |
-
<time>05:
|
15 |
-
<contents><target name="magecommunity"><dir name="
|
16 |
<compatible/>
|
17 |
<dependencies><required><php><min>5.2.0</min><max>6.0.0</max></php></required></dependencies>
|
18 |
</package>
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>Pre_Order</name>
|
4 |
+
<version>1.0.1</version>
|
5 |
<stability>stable</stability>
|
6 |
<license uri="http://opensource.org/licenses/osl-3.0.php">Open Software License (OSL)</license>
|
7 |
<channel>community</channel>
|
10 |
<description>Pre-Order extension can increase your website's effectiveness by allowing customer to order products which is not in stock currently but would be in stock in future. This extension extends native Magento functionality with an ability to show available date of products in list and product detail page as well as cart page also. This extension gives you the flexibility to show details for another theme also.For magento ver 1.9, it would work for default package not for rwd package. You can set available date text and easily manage via admin therefore its fully flexible and useful for your website to increase your site's sale.</description>
|
11 |
<notes>Pre-Order extension can increase your website's effectiveness by allowing customer to order products which is not in stock currently but would be in stock in future. This extension extends native Magento functionality with an ability to show available date of products in list and product detail page as well as cart page also. This extension gives you the flexibility to show details for another theme also.For magento ver 1.9, it would work for default package not for rwd package. You can set available date text and easily manage via admin therefore its fully flexible and useful for your website to increase your site's sale.</notes>
|
12 |
<authors><author><name>Anupam Tiwari</name><user>MAG002574387</user><email>vishwasnature30@gmail.com</email></author></authors>
|
13 |
+
<date>2015-02-24</date>
|
14 |
+
<time>05:30:16</time>
|
15 |
+
<contents><target name="magecommunity"><dir name="."><file name="Vishwasnature" hash="d41d8cd98f00b204e9800998ecf8427e"/></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="preorder.xml" hash="9564221debc1659b6e85598f5b92076b"/></dir><dir name="template"><dir name="preorder"><dir name="sales"><dir name="order"><dir name="view"><dir name="info"><file name="info14.phtml" hash="3b648f3614c44d23aff8dc441040902c"/><file name="info15.phtml" hash="ebf9e3a11e422bfda35d7fd0a77c2228"/><file name="info17.phtml" hash="e68e0d2b214ffbc4262798087ea2285e"/><file name="info18.phtml" hash="0ca9803d835a920839fcdc6b74f6e754"/></dir><file name="info.phtml" hash="e31836166aa130ce4556a766291571af"/></dir></dir></dir></dir></dir></dir></dir></dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="preorder.xml" hash="c29eb73b4ac8377e83f1ab8ee46126d5"/></dir><dir name="template"><dir name="preorder"><dir name="cart"><dir name="item"><file name="default.phtml" hash="2a003c5400e11b9fddfd38f30eaf82aa"/></dir></dir><dir name="product"><file name="all-list.phtml" hash="05d1fdf2983d4685621d083de3d15b89"/><file name="all-view.phtml" hash="87db342808a4ae34730d7247a91fd5ad"/><dir name="list"><file name="list14.phtml" hash="953d1224590eb6a70e53b685971d25c7"/><file name="list15.phtml" hash="953d1224590eb6a70e53b685971d25c7"/><file name="list16.phtml" hash="c42b8c640153b53b846566f8422153f7"/><file name="list17.phtml" hash="c9f4d7d4f586a44039bda13b7142d3a0"/></dir><dir name="view"><file name="addtocart14.phtml" hash="e218e949dec92c2a545bea61d721956b"/><file name="addtocart17.phtml" hash="dd6f95236df3adcd3c306861d6a93a96"/></dir></dir></dir></dir></dir></dir></dir></target><target name="mageskin"><dir name="frontend"><dir name="base"><dir name="default"><dir name="preorder"><dir name="css"><file name="custom.css" hash="225129aac029563506c974863166e2b7"/></dir></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Vishwasnature_Preorder.xml" hash="b596bae3461a9ba5472e5e9e62cb7db1"/></dir></target></contents>
|
16 |
<compatible/>
|
17 |
<dependencies><required><php><min>5.2.0</min><max>6.0.0</max></php></required></dependencies>
|
18 |
</package>
|
skin/frontend/base/default/preorder/css/custom.css
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
.view_pre_order_note{font-weight: bold;}
|