Version Notes
+ Add auto shipping on/off configuration.
Download this release
Release Info
Developer | Fermo!Point |
Extension | fermopoint |
Version | 1.1.0 |
Comparing to | |
See all releases |
Code changes from version 1.0.6 to 1.1.0
- app/code/community/FermoPoint/StorePickup/Helper/Config.php +6 -0
- app/code/community/FermoPoint/StorePickup/Model/Observer.php +54 -0
- app/code/community/FermoPoint/StorePickup/etc/config.xml +20 -1
- app/code/community/FermoPoint/StorePickup/etc/system.xml +12 -0
- app/locale/it_IT/FermoPoint_StorePickup.csv +3 -1
- package.xml +5 -6
app/code/community/FermoPoint/StorePickup/Helper/Config.php
CHANGED
@@ -18,6 +18,12 @@ class FermoPoint_StorePickup_Helper_Config extends Mage_Core_Helper_Abstract
|
|
18 |
const XML_PATH_GMAPSKEY = 'carriers/fpstorepickup/gmaps_key';
|
19 |
const XML_PATH_ALLOWSPECIFIC = 'carriers/fpstorepickup/allowspecific_payment';
|
20 |
const XML_PATH_SPECIFICPAYMENTS = 'carriers/fpstorepickup/specificpayment';
|
|
|
|
|
|
|
|
|
|
|
|
|
21 |
|
22 |
public function getTosAccepted()
|
23 |
{
|
18 |
const XML_PATH_GMAPSKEY = 'carriers/fpstorepickup/gmaps_key';
|
19 |
const XML_PATH_ALLOWSPECIFIC = 'carriers/fpstorepickup/allowspecific_payment';
|
20 |
const XML_PATH_SPECIFICPAYMENTS = 'carriers/fpstorepickup/specificpayment';
|
21 |
+
const XML_PATH_AUTOSHIP = 'carriers/fpstorepickup/auto_ship';
|
22 |
+
|
23 |
+
public function getAutoShip()
|
24 |
+
{
|
25 |
+
return Mage::getStoreConfigFlag(self::XML_PATH_AUTOSHIP);
|
26 |
+
}
|
27 |
|
28 |
public function getTosAccepted()
|
29 |
{
|
app/code/community/FermoPoint/StorePickup/Model/Observer.php
CHANGED
@@ -164,6 +164,9 @@ class FermoPoint_StorePickup_Model_Observer
|
|
164 |
|
165 |
public function onOrderInvoicePay($event)
|
166 |
{
|
|
|
|
|
|
|
167 |
$invoice = $event->getInvoice();
|
168 |
$order = $invoice->getOrder();
|
169 |
|
@@ -215,6 +218,57 @@ class FermoPoint_StorePickup_Model_Observer
|
|
215 |
}
|
216 |
}
|
217 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
218 |
public function onOrderCancel($event)
|
219 |
{
|
220 |
$order = $event->getOrder();
|
164 |
|
165 |
public function onOrderInvoicePay($event)
|
166 |
{
|
167 |
+
if ( ! Mage::helper('fpstorepickup/config')->getAutoShip())
|
168 |
+
return;
|
169 |
+
|
170 |
$invoice = $event->getInvoice();
|
171 |
$order = $invoice->getOrder();
|
172 |
|
218 |
}
|
219 |
}
|
220 |
|
221 |
+
public function onShipmentSaveBefore($event)
|
222 |
+
{
|
223 |
+
if (Mage::helper('fpstorepickup/config')->getAutoShip())
|
224 |
+
return;
|
225 |
+
|
226 |
+
$shipment = $event->getShipment();
|
227 |
+
$order = $shipment->getOrder();
|
228 |
+
|
229 |
+
$orderId = $order->getId();
|
230 |
+
$orderPoint = Mage::getModel('fpstorepickup/order_point')->load($orderId, 'order_id');
|
231 |
+
if ( ! $orderPoint->getId() || $orderPoint->getIsApproved() || ! $orderPoint->getTicketId())
|
232 |
+
return;
|
233 |
+
|
234 |
+
$ticketId = $orderPoint->getTicketId();
|
235 |
+
try {
|
236 |
+
Mage::getSingleton('fpstorepickup/api')->approveOrderByTicketId($ticketId);
|
237 |
+
} catch (FermoPoint_StorePickup_Exception $e) {
|
238 |
+
Mage::logException($e);
|
239 |
+
throw $e;
|
240 |
+
}
|
241 |
+
|
242 |
+
$orderPoint
|
243 |
+
->setIsApproved(true)
|
244 |
+
->save()
|
245 |
+
;
|
246 |
+
}
|
247 |
+
|
248 |
+
public function onShipmentSaveAfter($event)
|
249 |
+
{
|
250 |
+
if (Mage::helper('fpstorepickup/config')->getAutoShip())
|
251 |
+
return;
|
252 |
+
|
253 |
+
$shipment = $event->getShipment();
|
254 |
+
$order = $shipment->getOrder();
|
255 |
+
|
256 |
+
$orderId = $order->getId();
|
257 |
+
$orderPoint = Mage::getModel('fpstorepickup/order_point')->load($orderId, 'order_id');
|
258 |
+
if ( ! $orderPoint->getId() || ! $orderPoint->getTicketId())
|
259 |
+
return;
|
260 |
+
|
261 |
+
$ticketId = $orderPoint->getTicketId();
|
262 |
+
$track = Mage::getModel('sales/order_shipment_track')
|
263 |
+
->setShipment($shipment)
|
264 |
+
->setData('title', Mage::helper('fpstorepickup')->__('Fermo!Point'))
|
265 |
+
->setData('number', $ticketId)
|
266 |
+
->setData('carrier_code', 'fpstorepickup')
|
267 |
+
->setData('order_id', $shipment->getData('order_id'))
|
268 |
+
;
|
269 |
+
$track->save();
|
270 |
+
}
|
271 |
+
|
272 |
public function onOrderCancel($event)
|
273 |
{
|
274 |
$order = $event->getOrder();
|
app/code/community/FermoPoint/StorePickup/etc/config.xml
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
<config>
|
3 |
<modules>
|
4 |
<FermoPoint_StorePickup>
|
5 |
-
<version>1.0
|
6 |
</FermoPoint_StorePickup>
|
7 |
</modules>
|
8 |
<global>
|
@@ -60,6 +60,24 @@
|
|
60 |
</fpstorepickup_read>
|
61 |
</resources>
|
62 |
<events>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
63 |
<sales_order_invoice_pay>
|
64 |
<observers>
|
65 |
<fermopoint_storepickup_observer>
|
@@ -187,6 +205,7 @@
|
|
187 |
<active>0</active>
|
188 |
<model>fpstorepickup/carrier_storepickup</model>
|
189 |
<title>Corriere con Consegna presso Fermo!Point</title>
|
|
|
190 |
<sandbox>1</sandbox>
|
191 |
<debug>1</debug>
|
192 |
<cost>0</cost>
|
2 |
<config>
|
3 |
<modules>
|
4 |
<FermoPoint_StorePickup>
|
5 |
+
<version>1.1.0</version>
|
6 |
</FermoPoint_StorePickup>
|
7 |
</modules>
|
8 |
<global>
|
60 |
</fpstorepickup_read>
|
61 |
</resources>
|
62 |
<events>
|
63 |
+
<sales_order_shipment_save_before>
|
64 |
+
<observers>
|
65 |
+
<fermopoint_storepickup_observer>
|
66 |
+
<type>singleton</type>
|
67 |
+
<class>fpstorepickup/observer</class>
|
68 |
+
<method>onShipmentSaveBefore</method>
|
69 |
+
</fermopoint_storepickup_observer>
|
70 |
+
</observers>
|
71 |
+
</sales_order_shipment_save_before>
|
72 |
+
<sales_order_shipment_save_after>
|
73 |
+
<observers>
|
74 |
+
<fermopoint_storepickup_observer>
|
75 |
+
<type>singleton</type>
|
76 |
+
<class>fpstorepickup/observer</class>
|
77 |
+
<method>onShipmentSaveAfter</method>
|
78 |
+
</fermopoint_storepickup_observer>
|
79 |
+
</observers>
|
80 |
+
</sales_order_shipment_save_after>
|
81 |
<sales_order_invoice_pay>
|
82 |
<observers>
|
83 |
<fermopoint_storepickup_observer>
|
205 |
<active>0</active>
|
206 |
<model>fpstorepickup/carrier_storepickup</model>
|
207 |
<title>Corriere con Consegna presso Fermo!Point</title>
|
208 |
+
<auto_ship>1</auto_ship>
|
209 |
<sandbox>1</sandbox>
|
210 |
<debug>1</debug>
|
211 |
<cost>0</cost>
|
app/code/community/FermoPoint/StorePickup/etc/system.xml
CHANGED
@@ -89,6 +89,18 @@
|
|
89 |
<depends><accept>1</accept></depends>
|
90 |
</debug>
|
91 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
92 |
<cost translate="label">
|
93 |
<label>Cost</label>
|
94 |
<frontend_type>text</frontend_type>
|
89 |
<depends><accept>1</accept></depends>
|
90 |
</debug>
|
91 |
|
92 |
+
<auto_ship translate="label comment">
|
93 |
+
<label>Auto Ship</label>
|
94 |
+
<frontend_type>select</frontend_type>
|
95 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
96 |
+
<sort_order>24</sort_order>
|
97 |
+
<show_in_default>1</show_in_default>
|
98 |
+
<show_in_website>1</show_in_website>
|
99 |
+
<show_in_store>0</show_in_store>
|
100 |
+
<depends><accept>1</accept></depends>
|
101 |
+
<comment>Create shipments automatically after invoicing</comment>
|
102 |
+
</auto_ship>
|
103 |
+
|
104 |
<cost translate="label">
|
105 |
<label>Cost</label>
|
106 |
<frontend_type>text</frontend_type>
|
app/locale/it_IT/FermoPoint_StorePickup.csv
CHANGED
@@ -50,4 +50,6 @@ There is no user with this nickname,Il Nickname inserito non risulta associato a
|
|
50 |
All Orders,Tutte le Transazioni
|
51 |
"Service is not available at the moment, please try again later","Servizio al momento non disponibile"
|
52 |
"The billing information will be disclosed to Fermo!Point to register the new account and the user will be used in the future on any other site that integrates eCommerce service Fermo!Point","I dati di fatturazione saranno comunicati a Fermo!Point per la registrazione del nuovo account e l'utenza potrà essere utilizzata in futuro su qualsiasi altro sito eCommerce che integra il servizio Fermo!Point"
|
53 |
-
"To the email address specified in the billing information <b>%s</ b> will receive an email with your login credentials to the portal Fermo!Point","All’indirizzo email specificato nei dati di fatturazione <b>%s</b> riceverete un’email con le credenziali di accesso al portale Fermo!Point"
|
|
|
|
50 |
All Orders,Tutte le Transazioni
|
51 |
"Service is not available at the moment, please try again later","Servizio al momento non disponibile"
|
52 |
"The billing information will be disclosed to Fermo!Point to register the new account and the user will be used in the future on any other site that integrates eCommerce service Fermo!Point","I dati di fatturazione saranno comunicati a Fermo!Point per la registrazione del nuovo account e l'utenza potrà essere utilizzata in futuro su qualsiasi altro sito eCommerce che integra il servizio Fermo!Point"
|
53 |
+
"To the email address specified in the billing information <b>%s</ b> will receive an email with your login credentials to the portal Fermo!Point","All’indirizzo email specificato nei dati di fatturazione <b>%s</b> riceverete un’email con le credenziali di accesso al portale Fermo!Point"
|
54 |
+
"Auto Ship","Spedizione automatica"
|
55 |
+
"Create shipments automatically after invoicing","Crea automaticamente la spedizione a seguito della fatturazione"
|
package.xml
CHANGED
@@ -1,19 +1,18 @@
|
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>fermopoint</name>
|
4 |
-
<version>1.0
|
5 |
<stability>stable</stability>
|
6 |
<license uri="http://www.opensource.org/licenses/osl-3.0.php">OSL v3.0</license>
|
7 |
<channel>community</channel>
|
8 |
<extends/>
|
9 |
<summary>Fermo!Points</summary>
|
10 |
<description>Module for integrating Fermo!Points collecting points system.</description>
|
11 |
-
<notes
|
12 |
-
* Fix search criteria.</notes>
|
13 |
<authors><author><name>Fermo!Point</name><user>fermopoint</user><email>support@fermopoint.it</email></author></authors>
|
14 |
-
<date>2015-07-
|
15 |
-
<time>
|
16 |
-
<contents><target name="magecommunity"><dir name="FermoPoint"><dir name="StorePickup"><dir><dir name="Block"><dir name="Adminhtml"><dir name="Configuration"><file name="Disabled.php" hash="27fc2af187259bddd66552c84231f5f5"/><file name="Manual.php" hash="132e7c4a9f89ad71dccb4ce1b2c4c242"/></dir><dir name="Remote"><dir name="Grid"><dir name="Renderer"><file name="Notes.php" hash="0d3427070e683a438abdabc1926cf316"/></dir></dir><file name="Grid.php" hash="9dcea09a45c0dabe2931380a20a97b9b"/></dir><file name="Remote.php" hash="71367be2fb6723af4ff91b8207209ab0"/><file name="Stats.php" hash="e5f884c631ab63546570ab35e0a8336c"/></dir><dir name="Checkout"><dir name="Billing"><file name="Js.php" hash="6be3156e2bb484852a9d5b0e9aa7eee2"/><file name="Radio.php" hash="6839fed605f95a79537e09467a578e58"/></dir><dir name="Onepage"><dir name="Payment"><file name="Methods.php" hash="aa8e5a31eb2ce85672e0f8aa290b4759"/></dir><dir name="Shipping"><dir name="Method"><file name="Available.php" hash="dc6592a6ed82b51a6eb8e44272a6248d"/></dir></dir></dir></dir><file name="Map.php" hash="e33785f62dce4e3615c33337746d5a3b"/></dir><dir name="Helper"><file name="Config.php" hash="
|
17 |
<compatible/>
|
18 |
<dependencies><required><php><min>5.2.0</min><max>6.0.0</max></php></required></dependencies>
|
19 |
</package>
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>fermopoint</name>
|
4 |
+
<version>1.1.0</version>
|
5 |
<stability>stable</stability>
|
6 |
<license uri="http://www.opensource.org/licenses/osl-3.0.php">OSL v3.0</license>
|
7 |
<channel>community</channel>
|
8 |
<extends/>
|
9 |
<summary>Fermo!Points</summary>
|
10 |
<description>Module for integrating Fermo!Points collecting points system.</description>
|
11 |
+
<notes>+ Add auto shipping on/off configuration.</notes>
|
|
|
12 |
<authors><author><name>Fermo!Point</name><user>fermopoint</user><email>support@fermopoint.it</email></author></authors>
|
13 |
+
<date>2015-07-16</date>
|
14 |
+
<time>09:53:50</time>
|
15 |
+
<contents><target name="magecommunity"><dir name="FermoPoint"><dir name="StorePickup"><dir><dir name="Block"><dir name="Adminhtml"><dir name="Configuration"><file name="Disabled.php" hash="27fc2af187259bddd66552c84231f5f5"/><file name="Manual.php" hash="132e7c4a9f89ad71dccb4ce1b2c4c242"/></dir><dir name="Remote"><dir name="Grid"><dir name="Renderer"><file name="Notes.php" hash="0d3427070e683a438abdabc1926cf316"/></dir></dir><file name="Grid.php" hash="9dcea09a45c0dabe2931380a20a97b9b"/></dir><file name="Remote.php" hash="71367be2fb6723af4ff91b8207209ab0"/><file name="Stats.php" hash="e5f884c631ab63546570ab35e0a8336c"/></dir><dir name="Checkout"><dir name="Billing"><file name="Js.php" hash="6be3156e2bb484852a9d5b0e9aa7eee2"/><file name="Radio.php" hash="6839fed605f95a79537e09467a578e58"/></dir><dir name="Onepage"><dir name="Payment"><file name="Methods.php" hash="aa8e5a31eb2ce85672e0f8aa290b4759"/></dir><dir name="Shipping"><dir name="Method"><file name="Available.php" hash="dc6592a6ed82b51a6eb8e44272a6248d"/></dir></dir></dir></dir><file name="Map.php" hash="e33785f62dce4e3615c33337746d5a3b"/></dir><dir name="Helper"><file name="Config.php" hash="38287409e0a02e22bf8fd30aa9bd7903"/><file name="Data.php" hash="404e3de5e4995e8a4d6d0f04774dcd4f"/></dir><dir name="Model"><dir name="Api"><file name="OrderCollection.php" hash="f0e4e89e60b4a383eb0d74dda0d03e08"/><file name="SearchData.php" hash="97543705dfb6ff16c64761d566ff30f7"/></dir><file name="Api.php" hash="8fcde9799d8583e5f41302d4741972c4"/><dir name="Carrier"><file name="Storepickup.php" hash="fe1eba536223f737c90b6ee1019d89e8"/></dir><file name="GoogleMaps.php" hash="57e207c865f97f5eb7c2832862a052d1"/><file name="Observer.php" hash="dce797744abc41cd9ce08d7642adaad2"/><dir name="Order"><file name="Point.php" hash="e5d033a2ee6add18f52bd0068102b22f"/></dir><file name="Point.php" hash="b5924ba282ad76dffc269b9c13b823f9"/><file name="Points.php" hash="37f236eabd20c5f91dc6958b600d5d21"/><dir name="Resource"><dir name="Order"><dir name="Point"><file name="Collection.php" hash="294427a66e6588ec4a5ef9af18eecd01"/></dir><file name="Point.php" hash="6c02668768be696fa833bab39fe3f9db"/></dir><dir name="Point"><file name="Collection.php" hash="9745e0182402f72ee43ce6cd7834afce"/></dir><file name="Point.php" hash="6b8e4a20dbda96bdf1c71bf56fcf8c31"/></dir><dir name="Source"><file name="Payment.php" hash="2a2213f3b7832f8891d147015c0361cd"/><file name="Selectorpayment.php" hash="8448ba93eb8ebe2c25eeeef100ff47f9"/><file name="State.php" hash="6a3f558509964600aa9491fbc7b5a15d"/></dir></dir><dir name="controllers"><dir name="Adminhtml"><file name="RemoteController.php" hash="1572704560ae35965d184bfa25fef23c"/></dir><file name="IndexController.php" hash="339258a7f63260b5dfa7706058d08c5d"/></dir><dir name="etc"><file name="adminhtml.xml" hash="f790d0329024eba67a9018fd782a763a"/><file name="config.xml" hash="cae0ae080d23964ae8492b239c897194"/><file name="jstranslator.xml" hash="44a3cd6cc3518a3509ecc2d2593e63ac"/><file name="system.xml" hash="203367496c80839b10a6027d29a16bd1"/></dir><dir name="sql"><dir name="fpstorepickup_setup"><file name="mysql4-install-1.0.0.php" hash="c48472469c87f9975c4b203715e0137c"/><file name="mysql4-upgrade-1.0.0-1.0.1.php" hash="4801c11b1c8698ecbf9b4d857b055c33"/><file name="mysql4-upgrade-1.0.1-1.0.2.php" hash="21b100d87f0d3820e6317774c5ed273d"/></dir></dir></dir><file name="Exception.php" hash="5d30b0aa037248c2709775c8485d5fff"/></dir></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="fpstorepickup.xml" hash="e753271157b0dfbba46396a5046efdee"/></dir><dir name="template"><dir name="fpstorepickup"><file name="stats.phtml" hash="977cf97e8e340abdc86825c4e853195c"/></dir></dir></dir></dir></dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="fpstorepickup.xml" hash="9a951988461226c665b439589defee66"/></dir><dir name="template"><dir name="fpstorepickup"><dir><dir name="checkout"><dir name="onepage"><dir name="billing"><file name="js.phtml" hash="0d0d4fa1a2a807ececff43ffad03e322"/><file name="radio.phtml" hash="81b42a465c90ad88a6a68042d74de09a"/></dir></dir></dir></dir><file name="map.phtml" hash="998cf2616be4853fc2690effb21bba61"/></dir></dir></dir></dir></dir></target><target name="mage"><dir name="app"><dir name="etc"><dir name="modules"><file name="FermoPoint_StorePickup.xml" hash="88569786925f04dade3952d7951f0fca"/></dir></dir></dir><dir name="js"><dir name="fermopoint"><file name="markerclusterer.js" hash="b623ac6d39ea8ed99d179db49b7b0bab"/><file name="storepickup.js" hash="cb22503a09f4ffe48115a9b510aa3fa6"/></dir></dir></target><target name="magelocale"><dir name="it_IT"><file name="FermoPoint_StorePickup.csv" hash="2967acfe618f61f32044e06994ad1513"/></dir></target><target name="magemedia"><dir name="fermopoint"><file name="cluster1.png" hash="545e7decba75c26883195707a1caf453"/><file name="cluster2.png" hash="1a2554261502135f8699081f7b7dfc15"/><file name="cluster3.png" hash="381dc5802ac150d868bab1edee7cba6c"/><file name="cluster4.png" hash="5fad1a5d344e178f587c759d9466a937"/><file name="marker_location.png" hash="000a6513abbe2c9683b19f49873710c5"/><file name="marker_point.png" hash="9b4dd5a4dd6ace99004ee529a9097de8"/></dir></target><target name="mageskin"><dir name="frontend"><dir name="base"><dir name="default"><dir name="fermopoint"><dir name="css"><file name="storepickup.css" hash="8bc3fd15cad2e144f1ec3add9b09ce25"/></dir><dir name="images"><file name="opc-ajax-loader.gif" hash="e805ea7eca1f34c75ba0f93780d32d38"/></dir></dir></dir></dir></dir></target></contents>
|
16 |
<compatible/>
|
17 |
<dependencies><required><php><min>5.2.0</min><max>6.0.0</max></php></required></dependencies>
|
18 |
</package>
|