Version Notes
The first release of ShopGo Core module.
Download this release
Release Info
Developer | Moe Ghashim |
Extension | Shopgo_ShippingCore |
Version | 1.3.6 |
Comparing to | |
See all releases |
Version 1.3.6
- app/design/adminhtml/default/default/layout/shopgo/shipping_core.xml +28 -0
- app/design/adminhtml/default/default/template/shopgo/shipping_core/sales/order/shipment/create/form.phtml +113 -0
- app/design/adminhtml/default/default/template/shopgo/shipping_core/sales/order/shipment/create/items.phtml +160 -0
- app/design/adminhtml/default/default/template/shopgo/shipping_core/system/config/dwa_button.phtml +92 -0
- app/design/frontend/base/default/layout/shopgo/shipping_core.xml +26 -0
- app/etc/modules/Shopgo_ShippingCore.xml +30 -0
- package.xml +20 -0
app/design/adminhtml/default/default/layout/shopgo/shipping_core.xml
ADDED
@@ -0,0 +1,28 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<!--
|
3 |
+
/**
|
4 |
+
* ShopGo
|
5 |
+
*
|
6 |
+
* NOTICE OF LICENSE
|
7 |
+
*
|
8 |
+
* This source file is subject to the Academic Free License (AFL 3.0)
|
9 |
+
* that is bundled with this package in the file LICENSE_AFL.txt.
|
10 |
+
* It is also available through the world-wide-web at this URL:
|
11 |
+
* http://opensource.org/licenses/afl-3.0.php
|
12 |
+
*
|
13 |
+
* @category Shopgo
|
14 |
+
* @package Shopgo_ShippingCore
|
15 |
+
* @author Ammar <ammar@shopgo.me>
|
16 |
+
* @copyright Copyright (c) 2014 Shopgo. (http://www.shopgo.me)
|
17 |
+
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
18 |
+
*/
|
19 |
+
-->
|
20 |
+
<layout version="0.1.0">
|
21 |
+
<adminhtml_sales_order_shipment_new>
|
22 |
+
<reference name="form">
|
23 |
+
<action method="setTemplate">
|
24 |
+
<file>shopgo/shipping_core/sales/order/shipment/create/form.phtml</file>
|
25 |
+
</action>
|
26 |
+
</reference>
|
27 |
+
</adminhtml_sales_order_shipment_new>
|
28 |
+
</layout>
|
app/design/adminhtml/default/default/template/shopgo/shipping_core/sales/order/shipment/create/form.phtml
ADDED
@@ -0,0 +1,113 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* ShopGo
|
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 |
+
*
|
12 |
+
* @category Shopgo
|
13 |
+
* @package Shopgo_ShippingCore
|
14 |
+
* @author Ammar <ammar@shopgo.me>
|
15 |
+
* @copyright Copyright (c) 2014 Shopgo. (http://www.shopgo.me)
|
16 |
+
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
17 |
+
*/
|
18 |
+
?>
|
19 |
+
<form id="edit_form" method="post" action="<?php echo $this->getSaveUrl() ?>">
|
20 |
+
<?php echo $this->getBlockHtml('formkey')?>
|
21 |
+
<?php $_order = $this->getShipment()->getOrder() ?>
|
22 |
+
<?php echo $this->getChildHtml('order_info') ?>
|
23 |
+
|
24 |
+
|
25 |
+
<div class="box-left">
|
26 |
+
<!--Billing Address-->
|
27 |
+
<div class="entry-edit">
|
28 |
+
<div class="entry-edit-head">
|
29 |
+
<h4 class="icon-head head-payment-method"><?php echo Mage::helper('sales')->__('Payment Information') ?></h4>
|
30 |
+
</div>
|
31 |
+
<fieldset>
|
32 |
+
<div><?php echo $this->getPaymentHtml() ?></div>
|
33 |
+
<div><?php echo Mage::helper('sales')->__('The order was placed using %s', $_order->getOrderCurrencyCode()) ?></div>
|
34 |
+
</fieldset>
|
35 |
+
</div>
|
36 |
+
</div>
|
37 |
+
<div class="box-right">
|
38 |
+
<!--Shipping Address-->
|
39 |
+
<div class="entry-edit">
|
40 |
+
<div class="entry-edit-head">
|
41 |
+
<h4 class="icon-head head-shipping-method"><?php echo Mage::helper('sales')->__('Shipping Information') ?></h4>
|
42 |
+
</div>
|
43 |
+
<fieldset>
|
44 |
+
<div>
|
45 |
+
<strong><?php echo $this->escapeHtml($_order->getShippingDescription()) ?></strong>
|
46 |
+
<?php echo $this->helper('sales')->__('Total Shipping Charges'); ?>:
|
47 |
+
|
48 |
+
<?php if ($this->helper('tax')->displayShippingPriceIncludingTax()): ?>
|
49 |
+
<?php $_excl = $this->displayShippingPriceInclTax($_order); ?>
|
50 |
+
<?php else: ?>
|
51 |
+
<?php $_excl = $this->displayPriceAttribute('shipping_amount', false, ' '); ?>
|
52 |
+
<?php endif; ?>
|
53 |
+
<?php $_incl = $this->displayShippingPriceInclTax($_order); ?>
|
54 |
+
|
55 |
+
<?php echo $_excl; ?>
|
56 |
+
<?php if ($this->helper('tax')->displayShippingBothPrices() && $_incl != $_excl): ?>
|
57 |
+
(<?php echo $this->__('Incl. Tax'); ?> <?php echo $_incl; ?>)
|
58 |
+
<?php endif; ?>
|
59 |
+
</div>
|
60 |
+
<div><?php echo $this->getChildHtml('shipment_tracking') ?></div>
|
61 |
+
</fieldset>
|
62 |
+
</div>
|
63 |
+
</div>
|
64 |
+
<div class="clear"></div>
|
65 |
+
|
66 |
+
<?php
|
67 |
+
echo Mage::helper('shippingcore')->getAdminhtmlShipmentForms(
|
68 |
+
$_order->getShippingCarrier()->getCarrierCode(),
|
69 |
+
$this
|
70 |
+
);
|
71 |
+
?>
|
72 |
+
|
73 |
+
<div class="entry-edit">
|
74 |
+
<div class="entry-edit-head">
|
75 |
+
<h4 class="icon-head head-products"><?php echo Mage::helper('sales')->__('Items to Ship') ?></h4>
|
76 |
+
</div>
|
77 |
+
</div>
|
78 |
+
<div id="ship_items_container">
|
79 |
+
<?php echo $this->getItemsHtml() ?>
|
80 |
+
</div>
|
81 |
+
</form>
|
82 |
+
<?php echo $this->getChildHtml('shipment_packaging') ?>
|
83 |
+
<script type="text/javascript">
|
84 |
+
//<![CDATA[
|
85 |
+
document.observe("dom:loaded", function() {
|
86 |
+
setTimeout(function(){
|
87 |
+
packaging.setConfirmPackagingCallback(function(){
|
88 |
+
packaging.setParamsCreateLabelRequest($('edit_form').serialize(true));
|
89 |
+
packaging.sendCreateLabelRequest();
|
90 |
+
});
|
91 |
+
packaging.setLabelCreatedCallback(function(response){
|
92 |
+
setLocation("<?php echo $this->getUrl(
|
93 |
+
'*/sales_order/view',
|
94 |
+
array('order_id' => $this->getShipment()->getOrderId())
|
95 |
+
); ?>");
|
96 |
+
});
|
97 |
+
packaging.setCancelCallback(function() {
|
98 |
+
packaging.cleanPackages();
|
99 |
+
$('create_shipping_label').checked = false;
|
100 |
+
toggleCreateLabelCheckbox();
|
101 |
+
});
|
102 |
+
packaging.setItemQtyCallback(function(itemId){
|
103 |
+
var item = $$('[name="shipment[items]['+itemId+']"]')[0];
|
104 |
+
if (item && !isNaN(item.value)) {
|
105 |
+
return item.value;
|
106 |
+
}
|
107 |
+
});
|
108 |
+
}, 500);
|
109 |
+
});
|
110 |
+
|
111 |
+
editForm = new varienForm('edit_form');
|
112 |
+
//]]>
|
113 |
+
</script>
|
app/design/adminhtml/default/default/template/shopgo/shipping_core/sales/order/shipment/create/items.phtml
ADDED
@@ -0,0 +1,160 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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@magento.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.magento.com for more information.
|
20 |
+
*
|
21 |
+
* @category design
|
22 |
+
* @package default_default
|
23 |
+
* @copyright Copyright (c) 2006-2014 X.commerce, Inc. (http://www.magento.com)
|
24 |
+
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
25 |
+
*/
|
26 |
+
?>
|
27 |
+
<div class="grid np">
|
28 |
+
<div class="hor-scroll">
|
29 |
+
<table cellspacing="0" class="data order-tables">
|
30 |
+
<col />
|
31 |
+
<col width="1" />
|
32 |
+
<col width="1" />
|
33 |
+
<?php if (!$this->canShipPartiallyItem()): ?>
|
34 |
+
<col width="20" />
|
35 |
+
<?php endif; ?>
|
36 |
+
<thead>
|
37 |
+
<tr class="headings">
|
38 |
+
<th><?php echo $this->helper('sales')->__('Product') ?></th>
|
39 |
+
<th class="a-center"><?php echo $this->helper('sales')->__('Qty') ?></th>
|
40 |
+
<th<?php if ($this->isShipmentRegular()): ?> class="last"<?php endif; ?>><span class="nobr"><?php echo $this->helper('sales')->__('Qty to Ship') ?></span></th>
|
41 |
+
|
42 |
+
<?php if (!$this->canShipPartiallyItem()): ?>
|
43 |
+
<th class="a-center last"><span class="nobr"><?php echo $this->helper('sales')->__('Ship') ?></span></th>
|
44 |
+
<?php endif; ?>
|
45 |
+
|
46 |
+
</tr>
|
47 |
+
</thead>
|
48 |
+
<?php $_items = $this->getShipment()->getAllItems() ?>
|
49 |
+
<?php $_i=0;foreach ($_items as $_item): if ($_item->getOrderItem()->getIsVirtual() || $_item->getOrderItem()->getParentItem()): continue; endif; $_i++ ?>
|
50 |
+
<tbody class="<?php echo $_i%2?'odd':'even' ?>">
|
51 |
+
<?php echo $this->getItemHtml($_item) ?>
|
52 |
+
<?php echo $this->getItemExtraInfoHtml($_item->getOrderItem()) ?>
|
53 |
+
</tbody>
|
54 |
+
<?php endforeach; ?>
|
55 |
+
</table>
|
56 |
+
</div>
|
57 |
+
</div>
|
58 |
+
<br />
|
59 |
+
<div class="box-left entry-edit">
|
60 |
+
<div class="entry-edit-head"><h4><?php echo $this->__('Shipment Comments') ?></h4></div>
|
61 |
+
<fieldset>
|
62 |
+
<div id="order-history_form">
|
63 |
+
<span class="field-row">
|
64 |
+
<label class="normal" for="shipment_comment_text"><?php echo Mage::helper('sales')->__('Shipment Comments') ?></label>
|
65 |
+
<textarea id="shipment_comment_text" name="shipment[comment_text]" rows="3" cols="5" style="height:6em; width:99%;"><?php echo $this->getShipment()->getCommentText(); ?></textarea>
|
66 |
+
</span>
|
67 |
+
<div class="clear"></div>
|
68 |
+
</div>
|
69 |
+
</fieldset>
|
70 |
+
</div>
|
71 |
+
|
72 |
+
<div class="box-right entry-edit">
|
73 |
+
<div class="order-totals">
|
74 |
+
<div class="order-totals-bottom">
|
75 |
+
<?php if ($this->canCreateShippingLabel()): ?>
|
76 |
+
<p>
|
77 |
+
<label class="normal" for="create_shipping_label"><?php echo Mage::helper('sales')->__('Create Shipping Label') ?></label>
|
78 |
+
<input id="create_shipping_label" name="shipment[create_shipping_label]" value="1" type="checkbox" onclick="toggleCreateLabelCheckbox();" />
|
79 |
+
</p>
|
80 |
+
<?php endif ?>
|
81 |
+
<p>
|
82 |
+
<label class="normal" for="notify_customer"><?php echo Mage::helper('sales')->__('Append Comments') ?></label>
|
83 |
+
<input id="notify_customer" name="shipment[comment_customer_notify]" value="1" type="checkbox" />
|
84 |
+
</p>
|
85 |
+
<?php if ($this->canSendShipmentEmail()): ?>
|
86 |
+
<p>
|
87 |
+
<label class="normal" for="send_email"><?php echo Mage::helper('sales')->__('Email Copy of Shipment') ?></label>
|
88 |
+
<input id="send_email" name="shipment[send_email]" value="1" type="checkbox" />
|
89 |
+
</p>
|
90 |
+
<?php endif; ?>
|
91 |
+
<?php if ($this->skipCarrierShipment()): ?>
|
92 |
+
<p>
|
93 |
+
<label class="normal" for="send_email"><?php echo Mage::helper('sales')->__('Email Copy of Shipment') ?></label>
|
94 |
+
<input id="send_email" name="shipment[send_email]" value="1" type="checkbox" />
|
95 |
+
</p>
|
96 |
+
<?php endif; ?>
|
97 |
+
<div class="a-right">
|
98 |
+
<?php echo $this->getChildHtml('submit_button') ?>
|
99 |
+
</div>
|
100 |
+
</div>
|
101 |
+
</div>
|
102 |
+
</div>
|
103 |
+
<div class="clear"></div>
|
104 |
+
<script type="text/javascript">
|
105 |
+
//<![CDATA[
|
106 |
+
var sendEmailCheckbox = $('send_email');
|
107 |
+
if (sendEmailCheckbox) {
|
108 |
+
var notifyCustomerCheckbox = $('notify_customer');
|
109 |
+
var shipmentCommentText = $('shipment_comment_text');
|
110 |
+
Event.observe(sendEmailCheckbox, 'change', bindSendEmail);
|
111 |
+
bindSendEmail();
|
112 |
+
}
|
113 |
+
function bindSendEmail() {
|
114 |
+
if (sendEmailCheckbox.checked == true) {
|
115 |
+
notifyCustomerCheckbox.disabled = false;
|
116 |
+
//shipmentCommentText.disabled = false;
|
117 |
+
}
|
118 |
+
else {
|
119 |
+
notifyCustomerCheckbox.disabled = true;
|
120 |
+
//shipmentCommentText.disabled = true;
|
121 |
+
}
|
122 |
+
}
|
123 |
+
function toggleCreateLabelCheckbox() {
|
124 |
+
var checkbox = $('create_shipping_label');
|
125 |
+
var submitButton = checkbox.up('.order-totals').select('.submit-button span')[0];
|
126 |
+
if (checkbox.checked) {
|
127 |
+
submitButton.innerText += '...';
|
128 |
+
} else {
|
129 |
+
submitButton.innerText = submitButton.innerText.replace(/\.\.\.$/, '');
|
130 |
+
}
|
131 |
+
}
|
132 |
+
function submitShipment(btn) {
|
133 |
+
var checkbox = $(btn).up('.order-totals').select('#create_shipping_label')[0];
|
134 |
+
|
135 |
+
if (!validQtyItems()) {
|
136 |
+
return;
|
137 |
+
}
|
138 |
+
|
139 |
+
if (checkbox && checkbox.checked) {
|
140 |
+
packaging.showWindow();
|
141 |
+
} else if(editForm.submit()) {
|
142 |
+
disableElements('submit-button');
|
143 |
+
}
|
144 |
+
}
|
145 |
+
|
146 |
+
function validQtyItems() {
|
147 |
+
var valid = true;
|
148 |
+
var errorMessage = '<?php echo $this->helper('sales')->__('Invalid value(s) for Qty to Ship') ?>';
|
149 |
+
$$('.qty-item').each(function(item) {
|
150 |
+
var val = parseFloat(item.value);
|
151 |
+
if (isNaN(val) || val < 0) {
|
152 |
+
valid = false;
|
153 |
+
alert(errorMessage);
|
154 |
+
throw $break;
|
155 |
+
}
|
156 |
+
});
|
157 |
+
return valid;
|
158 |
+
}
|
159 |
+
//]]>
|
160 |
+
</script>
|
app/design/adminhtml/default/default/template/shopgo/shipping_core/system/config/dwa_button.phtml
ADDED
@@ -0,0 +1,92 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* ShopGo
|
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 |
+
*
|
12 |
+
* @category Shopgo
|
13 |
+
* @package Shopgo_ShippingCore
|
14 |
+
* @author Ammar <ammar@shopgo.me>
|
15 |
+
* @copyright Copyright (c) 2014 Shopgo. (http://www.shopgo.me)
|
16 |
+
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
17 |
+
*/
|
18 |
+
?>
|
19 |
+
<?php echo $this->getButtonHtml() ?>
|
20 |
+
<script type="text/javascript">//<![CDATA[
|
21 |
+
if (typeof shopgo == 'undefined') {
|
22 |
+
var shopgo = new Object();
|
23 |
+
}
|
24 |
+
if (typeof shopgo.shippingCore == 'undefined') {
|
25 |
+
shopgo.shippingCore = new Object();
|
26 |
+
}
|
27 |
+
|
28 |
+
shopgo.shippingCore.dwaButton = {
|
29 |
+
elmClassPrefix: 'shipping_dwa_',
|
30 |
+
setAttributes: function() {
|
31 |
+
var _params = {
|
32 |
+
attribute_set_value: $(this.elmClassPrefix + 'attribute_set').value,
|
33 |
+
attribute_set_text: $(this.elmClassPrefix + 'attribute_set')
|
34 |
+
.options[$(this.elmClassPrefix + 'attribute_set').selectedIndex].text,
|
35 |
+
attribute_set_group_value: $(this.elmClassPrefix + 'attribute_set_group').value,
|
36 |
+
attribute_set_group_text: $(this.elmClassPrefix + 'attribute_set_group')
|
37 |
+
.options[$(this.elmClassPrefix + 'attribute_set_group').selectedIndex].text
|
38 |
+
};
|
39 |
+
|
40 |
+
new Ajax.Request('<?php echo $this->getSetAttributesAjaxActionUrl() ?>', {
|
41 |
+
parameters: _params,
|
42 |
+
onSuccess: function(transport) {
|
43 |
+
if (transport.responseText) {
|
44 |
+
var response = transport.responseText.evalJSON(true);
|
45 |
+
|
46 |
+
if (response.status) {
|
47 |
+
location.reload();
|
48 |
+
} else {
|
49 |
+
alert(response.description);
|
50 |
+
}
|
51 |
+
}
|
52 |
+
}
|
53 |
+
});
|
54 |
+
},
|
55 |
+
getAttrSetGroups: function() {
|
56 |
+
var _params = {
|
57 |
+
attribute_set: $(this.elmClassPrefix + 'attribute_set').value
|
58 |
+
};
|
59 |
+
|
60 |
+
new Ajax.Request('<?php echo $this->getAsgAjaxActionUrl() ?>', {
|
61 |
+
parameters: _params,
|
62 |
+
onSuccess: function(transport) {
|
63 |
+
if (transport.responseText) {
|
64 |
+
var response = transport.responseText.evalJSON(true);
|
65 |
+
|
66 |
+
if (response.status) {
|
67 |
+
var groupsElm = $(shopgo.shippingCore.dwaButton.elmClassPrefix + 'attribute_set_group');
|
68 |
+
|
69 |
+
groupsElm.select('option').invoke('remove');
|
70 |
+
|
71 |
+
response.data.forEach(function(element, index, array) {
|
72 |
+
groupsElm.insert(
|
73 |
+
new Element('option', {value: element.value}).update(element.label)
|
74 |
+
);
|
75 |
+
});
|
76 |
+
} else {
|
77 |
+
alert(response.description);
|
78 |
+
}
|
79 |
+
}
|
80 |
+
}
|
81 |
+
});
|
82 |
+
}
|
83 |
+
};
|
84 |
+
|
85 |
+
document.observe("dom:loaded", function() {
|
86 |
+
$(shopgo.shippingCore.dwaButton.elmClassPrefix + 'attribute_set').observe(
|
87 |
+
'change', function(event) {
|
88 |
+
shopgo.shippingCore.dwaButton.getAttrSetGroups();
|
89 |
+
}
|
90 |
+
);
|
91 |
+
});
|
92 |
+
//]]></script>
|
app/design/frontend/base/default/layout/shopgo/shipping_core.xml
ADDED
@@ -0,0 +1,26 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<!--
|
3 |
+
/**
|
4 |
+
* ShopGo
|
5 |
+
*
|
6 |
+
* NOTICE OF LICENSE
|
7 |
+
*
|
8 |
+
* This source file is subject to the Academic Free License (AFL 3.0)
|
9 |
+
* that is bundled with this package in the file LICENSE_AFL.txt.
|
10 |
+
* It is also available through the world-wide-web at this URL:
|
11 |
+
* http://opensource.org/licenses/afl-3.0.php
|
12 |
+
*
|
13 |
+
* @category Shopgo
|
14 |
+
* @package Shopgo_ShippingCore
|
15 |
+
* @author Ammar <ammar@shopgo.me>
|
16 |
+
* @copyright Copyright (c) 2014 Shopgo. (http://www.shopgo.me)
|
17 |
+
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
18 |
+
*/
|
19 |
+
-->
|
20 |
+
<layout version="0.1.0">
|
21 |
+
<checkout_cart_index>
|
22 |
+
<reference name="checkout.cart.shipping">
|
23 |
+
<action method="setTemplate"><template>shopgo/shipping_core/checkout/cart/shipping.phtml</template></action>
|
24 |
+
</reference>
|
25 |
+
</checkout_cart_index>
|
26 |
+
</layout>
|
app/etc/modules/Shopgo_ShippingCore.xml
ADDED
@@ -0,0 +1,30 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<!--
|
3 |
+
/**
|
4 |
+
* ShopGo
|
5 |
+
*
|
6 |
+
* NOTICE OF LICENSE
|
7 |
+
*
|
8 |
+
* This source file is subject to the Academic Free License (AFL 3.0)
|
9 |
+
* that is bundled with this package in the file LICENSE_AFL.txt.
|
10 |
+
* It is also available through the world-wide-web at this URL:
|
11 |
+
* http://opensource.org/licenses/afl-3.0.php
|
12 |
+
*
|
13 |
+
* @category Shopgo
|
14 |
+
* @package Shopgo_ShippingCore
|
15 |
+
* @author Ammar <ammar@shopgo.me>
|
16 |
+
* @copyright Copyright (c) 2014 Shopgo. (http://www.shopgo.me)
|
17 |
+
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
18 |
+
*/
|
19 |
+
-->
|
20 |
+
<config>
|
21 |
+
<modules>
|
22 |
+
<Shopgo_ShippingCore>
|
23 |
+
<active>true</active>
|
24 |
+
<codePool>community</codePool>
|
25 |
+
<depends>
|
26 |
+
<Shopgo_Core/>
|
27 |
+
</depends>
|
28 |
+
</Shopgo_ShippingCore>
|
29 |
+
</modules>
|
30 |
+
</config>
|
package.xml
ADDED
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<package>
|
3 |
+
<name>Shopgo_ShippingCore</name>
|
4 |
+
<version>1.3.6</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>A shipping core module that other ShopGo shipping modules depend on.</summary>
|
10 |
+
<description><p>ShopGo Shipping Core is a utility module that contains functions used by other ShopGo shipping modules.</p>
|
11 |
+
You could also get the latest version of the module from:
|
12 |
+
<a href="https://github.com/shopgo-me/shipping-core">https://github.com/shopgo-me/shipping-core</a></description>
|
13 |
+
<notes>The first release of ShopGo Core module.</notes>
|
14 |
+
<authors><author><name>ShopGo</name><user>ShopGo</user><email>support@shopgo.me</email></author></authors>
|
15 |
+
<date>2015-07-08</date>
|
16 |
+
<time>14:20:13</time>
|
17 |
+
<contents><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><dir name="shopgo"><file name="shipping_core.xml" hash="be6da9a49309d76666e521f5f9838a96"/></dir></dir><dir name="template"><dir name="shopgo"><dir name="shipping_core"><dir name="sales"><dir name="order"><dir name="shipment"><dir name="create"><file name="form.phtml" hash="f5ab96dfcd5996b66a89a059882a596e"/><file name="items.phtml" hash="4a00a29303c47c91fa83afcbb29935c7"/></dir></dir></dir></dir><dir name="system"><dir name="config"><file name="dwa_button.phtml" hash="706179d3120c218faf9a1e815642394b"/></dir></dir></dir></dir></dir></dir></dir></dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><dir name="shopgo"><file name="shipping_core.xml" hash="fe05da7d61e0d6392654981524b3c91e"/></dir></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Shopgo_ShippingCore.xml" hash="74b12adf823de62e688e8452525304f7"/></dir></target></contents>
|
18 |
+
<compatible/>
|
19 |
+
<dependencies><required><php><min>5.3.0</min><max>7.0.0</max></php><package><name>Shopgo_Core</name><channel>community</channel><min>1.0.6</min><max/></package><package><name>Shopgo_AdvIfconfig</name><channel>community</channel><min>1.0.3</min><max/></package></required></dependencies>
|
20 |
+
</package>
|