Version Notes
Fixed Shipping Instruction saving problem during Order creation from the Admin Backend
Download this release
Release Info
Developer | George Plummer |
Extension | Rvtech_Starshipit |
Version | 1.6.2.4 |
Comparing to | |
See all releases |
Code changes from version 1.6.2.3 to 1.6.2.4
app/code/community/Rvtech/Starshipit/Block/Sales/Order/View.php
CHANGED
@@ -34,7 +34,7 @@
|
|
34 |
class Rvtech_Starshipit_Block_Sales_Order_View extends Mage_Adminhtml_Block_Widget_Form_Container
|
35 |
{
|
36 |
|
37 |
-
const STARSHIP_BASE = 'https://app.shipit.click/templates/admin4/
|
38 |
|
39 |
public function __construct()
|
40 |
{
|
@@ -202,8 +202,7 @@ class Rvtech_Starshipit_Block_Sales_Order_View extends Mage_Adminhtml_Block_Widg
|
|
202 |
// Starship Button
|
203 |
$this->_addButton('order_starship', array(
|
204 |
'label' => Mage::helper('sales')->__('ShipIt'),
|
205 |
-
|
206 |
-
//'onclick' => 'popWin(\'' . $this->getStarshipUrl() . '\', 'shipment info', 'width=300,height=300,left=100,top=0,location=no,status=yes,scrollbars=yes,resizable=yes'); return false;',
|
207 |
'class' => 'go'
|
208 |
));
|
209 |
}
|
34 |
class Rvtech_Starshipit_Block_Sales_Order_View extends Mage_Adminhtml_Block_Widget_Form_Container
|
35 |
{
|
36 |
|
37 |
+
const STARSHIP_BASE = 'https://app.shipit.click/templates/admin4/popupship.aspx';
|
38 |
|
39 |
public function __construct()
|
40 |
{
|
202 |
// Starship Button
|
203 |
$this->_addButton('order_starship', array(
|
204 |
'label' => Mage::helper('sales')->__('ShipIt'),
|
205 |
+
'onclick' => 'popWin(\'' . $this->getStarshipUrl() . '\', \'ShipIt\', \'width=840,height=630,top=150,left=300,location=no,status=no,scrollbars=yes,resizable=yes\')',
|
|
|
206 |
'class' => 'go'
|
207 |
));
|
208 |
}
|
app/code/community/Rvtech/Starshipit/Model/Adminhtml/Observer.php
CHANGED
@@ -8,10 +8,28 @@ class Rvtech_Starshipit_Model_Adminhtml_Observer
|
|
8 |
public function adminhtml_sales_order_create_process_data(Varien_Event_Observer $observer)
|
9 |
{
|
10 |
try {
|
11 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
12 |
if (isset($requestData['order']['ship_note'])) {
|
13 |
$observer->getEvent()->getOrderCreateModel()->getQuote()
|
14 |
-
|
15 |
->save();
|
16 |
}
|
17 |
} catch (Exception $e) {
|
@@ -29,13 +47,8 @@ class Rvtech_Starshipit_Model_Adminhtml_Observer
|
|
29 |
*/
|
30 |
public function sales_convert_quote_to_order(Varien_Event_Observer $observer)
|
31 |
{
|
32 |
-
if ($
|
33 |
try {
|
34 |
-
$shipNoteId = Mage::getModel('shipnote/note')
|
35 |
-
->setNote($shipNote)
|
36 |
-
->save()
|
37 |
-
->getId();
|
38 |
-
|
39 |
$observer->getEvent()->getOrder()
|
40 |
->setShipNoteId($shipNoteId);
|
41 |
|
8 |
public function adminhtml_sales_order_create_process_data(Varien_Event_Observer $observer)
|
9 |
{
|
10 |
try {
|
11 |
+
$requestData = $observer->getEvent()->getRequest();
|
12 |
+
$shipSignatureRequiredInt = $requestData['order']['ship_signature_required'];
|
13 |
+
$shipAuthorityToLeaveInt = 0;
|
14 |
+
$shipAuthorityToLeave = $requestData['order']['ship_authority_to_leave'];
|
15 |
+
$shipNote = $requestData['order']['ship_note'];
|
16 |
+
|
17 |
+
if (!empty($shipAuthorityToLeave)) {
|
18 |
+
if ($shipAuthorityToLeave == 'on') {
|
19 |
+
$shipAuthorityToLeaveInt = 1;
|
20 |
+
}
|
21 |
+
}
|
22 |
+
|
23 |
+
$shipNoteId = Mage::getModel('shipnote/note')
|
24 |
+
->setDeliveryInstructions($shipNote)
|
25 |
+
->setSignatureRequired($shipSignatureRequiredInt)
|
26 |
+
->setAuthorityToLeave($shipAuthorityToLeaveInt)
|
27 |
+
->save()
|
28 |
+
->getId();
|
29 |
+
|
30 |
if (isset($requestData['order']['ship_note'])) {
|
31 |
$observer->getEvent()->getOrderCreateModel()->getQuote()
|
32 |
+
->setShipNote($shipNoteId)
|
33 |
->save();
|
34 |
}
|
35 |
} catch (Exception $e) {
|
47 |
*/
|
48 |
public function sales_convert_quote_to_order(Varien_Event_Observer $observer)
|
49 |
{
|
50 |
+
if ($shipNoteId = $observer->getEvent()->getQuote()->getShipNote()) {
|
51 |
try {
|
|
|
|
|
|
|
|
|
|
|
52 |
$observer->getEvent()->getOrder()
|
53 |
->setShipNoteId($shipNoteId);
|
54 |
|
app/design/adminhtml/default/default/template/shipnote/sales/order/create/shipnote.phtml
CHANGED
@@ -7,6 +7,13 @@
|
|
7 |
<textarea style="width:98%; height:8em;" id="shipnote-note" name="order[ship_note]" rows="2"
|
8 |
cols="15"><?php echo $this->__($this->getShipNote()) ?></textarea>
|
9 |
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
10 |
<script type="text/javascript">
|
11 |
AdminOrder.addMethods({
|
12 |
shipnoteFieldsBind:function (container) {
|
@@ -24,3 +31,4 @@
|
|
24 |
</script>
|
25 |
</div>
|
26 |
</div>
|
|
7 |
<textarea style="width:98%; height:8em;" id="shipnote-note" name="order[ship_note]" rows="2"
|
8 |
cols="15"><?php echo $this->__($this->getShipNote()) ?></textarea>
|
9 |
</div>
|
10 |
+
<div style="width: 160px; float: left">Signature Required:</div>
|
11 |
+
<div style="padding-top: 2px">
|
12 |
+
<input type="radio" name='order[ship_signature_required]' value="1" /> Yes
|
13 |
+
<input type="radio" name='order[ship_signature_required]' value="0" checked /> No
|
14 |
+
</div>
|
15 |
+
<div style="width: 160px; float: left">Authority to Leave:</div>
|
16 |
+
<div style="padding-top: 2px"><input type="checkbox" id="authorityToLeaveCheckBox" name='order[ship_authority_to_leave]' /></div>
|
17 |
<script type="text/javascript">
|
18 |
AdminOrder.addMethods({
|
19 |
shipnoteFieldsBind:function (container) {
|
31 |
</script>
|
32 |
</div>
|
33 |
</div>
|
34 |
+
|
package.xml
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>Rvtech_Starshipit</name>
|
4 |
-
<version>1.6.2.
|
5 |
<stability>stable</stability>
|
6 |
<license uri="http://opensource.org/licenses/osl-3.0.php">Open Software License (OSL)</license>
|
7 |
<channel>community</channel>
|
@@ -18,14 +18,11 @@ From ShipIT shipping labels can be produced, tracking of orders is supported, qu
|
|
18 |
DHL Express Worldwide is supported as well 
|
19 |

|
20 |
Australia Post eParcel, CourierPost, Fastways, and more.</description>
|
21 |
-
<notes>
|
22 |
-
- Shipping Rates at Checkout
|
23 |
-
- Address Lookup
|
24 |
-
- Shipment Tracking</notes>
|
25 |
<authors><author><name>George Plummer</name><user>GeorgeSPlummer</user><email>george@shipit.click</email></author></authors>
|
26 |
-
<date>2015-09-
|
27 |
-
<time>
|
28 |
-
<contents><target name="mageetc"><dir name="modules"><file name="Rvtech_Starshipit.xml" hash="5f957b335ffd3ef220188acc0a4261c2"/></dir></target><target name="magecommunity"><dir name="Rvtech"><dir name="Starshipit"><dir name="Block"><dir name="Adminhtml"><dir name="Sales"><dir name="Order"><dir name="Create"><file name="Shipnote.php" hash="e3978a998056ca01f2c1eecadad492f9"/></dir><file name="Note.php" hash="b176725ad1d11312fc9b2e6da10300a3"/></dir></dir><dir name="System"><dir name="Config"><dir name="Form"><file name="Button.php" hash="bef51209ace24c39e1d0933c4695665c"/><file name="Syncbutton.php" hash="1b90bc1d0ce6f8fd85783771ffc3720b"/></dir></dir></dir></dir><file name="Note.php" hash="d89159b063408b3496b5a7c1238b9f90"/><dir name="Sales"><dir name="Order"><file name="Grid.php" hash="bcec9d256397a5c39879eba37520370e"/><file name="View.php" hash="
|
29 |
<compatible/>
|
30 |
<dependencies><required><php><min>5.1.0</min><max>5.6.8</max></php></required></dependencies>
|
31 |
</package>
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>Rvtech_Starshipit</name>
|
4 |
+
<version>1.6.2.4</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>
|
18 |
DHL Express Worldwide is supported as well 
|
19 |

|
20 |
Australia Post eParcel, CourierPost, Fastways, and more.</description>
|
21 |
+
<notes>Fixed Shipping Instruction saving problem during Order creation from the Admin Backend</notes>
|
|
|
|
|
|
|
22 |
<authors><author><name>George Plummer</name><user>GeorgeSPlummer</user><email>george@shipit.click</email></author></authors>
|
23 |
+
<date>2015-09-28</date>
|
24 |
+
<time>01:33:26</time>
|
25 |
+
<contents><target name="mageetc"><dir name="modules"><file name="Rvtech_Starshipit.xml" hash="5f957b335ffd3ef220188acc0a4261c2"/></dir></target><target name="magecommunity"><dir name="Rvtech"><dir name="Starshipit"><dir name="Block"><dir name="Adminhtml"><dir name="Sales"><dir name="Order"><dir name="Create"><file name="Shipnote.php" hash="e3978a998056ca01f2c1eecadad492f9"/></dir><file name="Note.php" hash="b176725ad1d11312fc9b2e6da10300a3"/></dir></dir><dir name="System"><dir name="Config"><dir name="Form"><file name="Button.php" hash="bef51209ace24c39e1d0933c4695665c"/><file name="Syncbutton.php" hash="1b90bc1d0ce6f8fd85783771ffc3720b"/></dir></dir></dir></dir><file name="Note.php" hash="d89159b063408b3496b5a7c1238b9f90"/><dir name="Sales"><dir name="Order"><file name="Grid.php" hash="bcec9d256397a5c39879eba37520370e"/><file name="View.php" hash="bee1026715c9a99d4d0ab31c2cb58325"/></dir></dir><file name="Ship.php" hash="19080a45c06dc07b7991dd694d83708a"/><file name="Shiptracking.php" hash="a64dbb626cb60a3f62994564e0d3e288"/></dir><dir name="Helper"><file name="Data.php" hash="09a753bbbc36ce95a6222587d53cd1c1"/><file name="Starship.php" hash="ebc879a96df5c80ffae9744d11a6cac5"/></dir><dir name="Model"><dir name="Adminhtml"><file name="Observer.php" hash="2956099cbc3109242139fb0b8e07ba47"/></dir><file name="Api.php" hash="9c0c7ad4df68db05f5caf2970b91a542"/><dir name="Carrier"><file name="Auspost.php" hash="73507c7a8e26ec0cd7f6a2583b0e4a4e"/><file name="Courierpost.php" hash="7b750c7eadbdc40a26cc791bfce21ad5"/><file name="Dhlexpress.php" hash="452cfcfcea46248ba5ea6d588fbbc701"/><file name="Fastway.php" hash="dd239c7f46e2af1d6ed567e9dc27c5f1"/><file name="Nzpost.php" hash="fae6c459c4c4354f3ecf6813b068b454"/><file name="Shipit.php" hash="4885844bdc91ed748a1a458f7372f7eb"/></dir><file name="Note.php" hash="91fdbf3caa65797d8050e999a487c4ae"/><file name="Observer.php" hash="166765c2ce65079f10ae2b52f3f78c1d"/><file name="Orders.php" hash="5e6d34681f4ffde9b8b0fcad9f898481"/><dir name="Resource"><dir name="Note"><file name="Collection.php" hash="2526c09006bf6a74b1ddcf2d94b85bd1"/></dir><file name="Note.php" hash="188639765c95bb03abf24785bbcfabbe"/></dir></dir><dir name="controllers"><dir name="Adminhtml"><file name="ShipItController.php" hash="7a82038aa1b2e9fd8bc543b402dcbf9a"/></dir><file name="IndexController.php" hash="20b9637c3eb1a5e7c6a97faa72a0a3fb"/></dir><dir name="etc"><file name="adminhtml.xml" hash="02121bfdaabeb4aa30733462d532b211"/><file name="api.xml" hash="03ba9d58ced7f06da747006e8ddf6861"/><file name="config.xml" hash="e5e23503bb4ec8068f3b6a33beed2749"/><file name="system.xml" hash="94072e20e090868a734e32c8dfbd46b4"/></dir><dir name="sql"><dir name="shipnote_setup"><file name="install-1.6.2.0.php" hash="3440e960c4ae3a4036c797c02703f025"/></dir></dir></dir></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="shipit.xml" hash="61408954f82f5ac2edcf77d859fd4591"/><file name="shipnote.xml" hash="b30f8ced0fa77550a09c3ab5ee03f28d"/></dir><dir name="template"><dir name="shipit"><dir name="system"><dir name="config"><file name="button.phtml" hash="064f053f67fc7b749d1aec40cd352ce1"/><file name="syncbutton.phtml" hash="3e67731254d4d0298891cd2598471dc9"/></dir></dir></dir><dir name="shipnote"><file name="note-create.phtml" hash="218318453338adb8a43d01dcf3aa74f3"/><file name="note.phtml" hash="dc72f98a11c955181a3d4706e9cfd297"/><dir name="sales"><dir name="order"><dir name="create"><file name="data.phtml" hash="63aa7c2343f1d801b92e61b8497b99cb"/><file name="shipnote.phtml" hash="101f8cbd09937b1c9b232a94592e72dd"/></dir><dir name="creditmemo"><dir name="create"><file name="form.phtml" hash="95b2ca2ff1b2d48519cc9f0302179804"/></dir><dir name="view"><file name="form.phtml" hash="0b851bb2da3a68d6b21195cc88d9c3a3"/></dir></dir><dir name="invoice"><dir name="create"><file name="form.phtml" hash="00a1d471675697ff345fb8744b337a54"/></dir><dir name="view"><file name="form.phtml" hash="eb85ea9873900429a859f31585ecb93b"/></dir></dir><dir name="shipment"><dir name="create"><file name="form.phtml" hash="6655a2814e346290ebefce2d45225127"/></dir><dir name="view"><file name="form.phtml" hash="1f5790819a38b162f76a32ec725a0b77"/></dir></dir><dir name="view"><dir name="tab"><file name="info.phtml" hash="66fd085aa3d4e985f914e61ef4ca6748"/></dir></dir></dir></dir></dir></dir></dir></dir></dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="shipnote.xml" hash="4662d0b069083e71689f79ad5ce0102e"/><file name="addressautocomplete.xml" hash="88a6cbeb5077d85cac0e98632b467b2a"/><file name="shiptracking.xml" hash="cd598d60854e00759d7e201a9b819a65"/></dir><dir name="template"><dir name="shipnote"><file name="note.phtml" hash="f6199bbe2739b4689cadd2a854a3d753"/></dir><dir name="shiptracking"><file name="shiptracking.phtml" hash="dc155a0bf7d2d83579492d432de1a6f9"/><file name="trackdetail.phtml" hash="1e6967f50a922088ec1aaf9d23910163"/></dir></dir></dir></dir></dir></target><target name="magelocale"><dir><dir name="en_GB"><file name="Rvtech_StarshipitNote.csv" hash="45582b181cd95563d26e516d9dc5efe4"/></dir></dir></target><target name="mageskin"><dir name="frontend"><dir name="base"><dir name="default"><dir name="css"><file name="shipnote.css" hash="1cd880ba6ee2ae963fd8b6208d9e6fd8"/></dir><dir name="js"><dir name="shipit"><file name="jquery-1.10.2.min.js" hash="628072e7212db1e8cdacb22b21752cda"/><file name="noconflict.js" hash="3179f2255b046d5f2e9a71e365287bef"/><file name="onstepcheckout.js" hash="67f1b1d859c79bc9465ca33a7b9f2e5d"/><file name="onstepcheckout_shipping.js" hash="b63dda070bdc41f68623a3168b19c485"/></dir></dir><dir name="shiptracking"><dir name="css"><file name="shiptracking.css" hash="71583b99e56b8cc1ebd9b575e17e9414"/></dir><dir name="images"><file name="ajax-loader-tr.gif" hash="01a95f2b5387dfec28b58bab64aa32ae"/></dir></dir></dir></dir></dir></target><target name="mageweb"><dir name="js"><dir name="shipit"><dir name="adminhtml"><file name="grid.js" hash="dbf45931948c6c611e1af954ae2430e5"/></dir></dir></dir></target></contents>
|
26 |
<compatible/>
|
27 |
<dependencies><required><php><min>5.1.0</min><max>5.6.8</max></php></required></dependencies>
|
28 |
</package>
|