Version Notes
Click&Collect implementation and bugfixes
Download this release
Release Info
Developer | PHPro |
Extension | bpost |
Version | 1.2.0 |
Comparing to | |
See all releases |
Code changes from version 1.1.3 to 1.2.0
- app/code/community/Bpost/ShM/Block/Adminhtml/Shipping/Carrier/Bpost/Tablerate/Clickcollect/Grid.php +119 -0
- app/code/community/Bpost/ShM/Block/Adminhtml/System/Config/Form/Field/Cacheinfo.php +18 -0
- app/code/community/Bpost/ShM/Block/Adminhtml/System/Config/Form/Field/Clickcollect.php +21 -0
- app/code/community/Bpost/ShM/Block/Adminhtml/System/Config/Form/Field/Logo.php +1 -1
- app/code/community/Bpost/ShM/Block/Adminhtml/System/Config/Form/Field/Subheader.php +2 -1
- app/code/community/Bpost/ShM/Block/Adminhtml/System/Config/Form/Tablerates/Export/Clickcollect.php +30 -0
- app/code/community/Bpost/ShM/Block/Carrier/Bpost.php +5 -0
- app/code/community/Bpost/ShM/Helper/Data.php +15 -2
- app/code/community/Bpost/ShM/Model/Adminhtml/Observer.php +39 -1
- app/code/community/Bpost/ShM/Model/Adminhtml/System/Config/Backend/Shipping/Tablerates/Clickcollect.php +11 -0
- app/code/community/Bpost/ShM/Model/Api.php +3 -1
- app/code/community/Bpost/ShM/Model/Api/Abstract.php +4 -6
- app/code/community/Bpost/ShM/Model/Api/Domcreator.php +85 -12
- app/code/community/Bpost/ShM/Model/Observer.php +16 -8
- app/code/community/Bpost/ShM/Model/Resource/Tablerates/Clickcollect.php +421 -0
- app/code/community/Bpost/ShM/Model/Resource/Tablerates/Clickcollect/Collection.php +95 -0
- app/code/community/Bpost/ShM/Model/Shipping/Carrier/BpostShM.php +7 -4
- app/code/community/Bpost/ShM/Model/Shipping/Geocode.php +1 -1
- app/code/community/Bpost/ShM/Model/Tablerates/Clickcollect.php +9 -0
- app/code/community/Bpost/ShM/controllers/Adminhtml/Bpost/ShM/AllOrdersController.php +1 -1
- app/code/community/Bpost/ShM/controllers/Adminhtml/Bpost/ShM/ConfigController.php +1 -1
- app/code/community/Bpost/ShM/controllers/Adminhtml/Bpost/ShM/DownloadController.php +1 -1
- app/code/community/Bpost/ShM/controllers/Adminhtml/Bpost/ShM/PendingOrdersController.php +1 -1
- app/code/community/Bpost/ShM/controllers/AjaxController.php +1 -2
- app/code/community/Bpost/ShM/etc/config.xml +26 -9
- app/code/community/Bpost/ShM/etc/system.xml +269 -0
- app/code/community/Bpost/ShM/sql/bpost_shm_setup/upgrade-0.1.8-1.1.3.php +27 -0
- app/design/frontend/base/default/template/bpost/shm/append_bpost_shippingmethod.phtml +12 -1
- app/locale/en_US/Bpost_ShM.csv +18 -1
- app/locale/fr_FR/Bpost_ShM.csv +17 -1
- app/locale/nl_NL/Bpost_ShM.csv +17 -1
- js/bpost/shm/checkout.js +51 -13
- js/bpost/shm/onestepcheckout_shipping.js +21 -0
- package.xml +5 -5
- skin/adminhtml/default/default/css/bpost/informationpopup.css +4 -0
- skin/frontend/base/default/images/bpost/location_clickcollect_default.png +0 -0
app/code/community/Bpost/ShM/Block/Adminhtml/Shipping/Carrier/Bpost/Tablerate/Clickcollect/Grid.php
ADDED
@@ -0,0 +1,119 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
class Bpost_ShM_Block_Adminhtml_Shipping_Carrier_Bpost_Tablerate_Clickcollect_Grid extends Mage_Adminhtml_Block_Widget_Grid
|
3 |
+
{
|
4 |
+
/**
|
5 |
+
* Website filter
|
6 |
+
*
|
7 |
+
* @var int
|
8 |
+
*/
|
9 |
+
protected $_websiteId;
|
10 |
+
|
11 |
+
/**
|
12 |
+
* Condition filter
|
13 |
+
*
|
14 |
+
* @var string
|
15 |
+
*/
|
16 |
+
protected $_conditionName;
|
17 |
+
|
18 |
+
|
19 |
+
/**
|
20 |
+
*
|
21 |
+
*/
|
22 |
+
public function __construct()
|
23 |
+
{
|
24 |
+
parent::__construct();
|
25 |
+
$this->setId('shippingClickcollectTablerateGrid');
|
26 |
+
$this->_exportPageSize = 10000;
|
27 |
+
}
|
28 |
+
|
29 |
+
/**
|
30 |
+
* @return Mage_Adminhtml_Block_Widget_Grid
|
31 |
+
*/
|
32 |
+
protected function _prepareCollection()
|
33 |
+
{
|
34 |
+
$collection = Mage::getResourceModel('bpost_shm/tablerates_clickcollect_collection');
|
35 |
+
$collection->setConditionFilter($this->getConditionName())
|
36 |
+
->setWebsiteFilter($this->getWebsiteId());
|
37 |
+
|
38 |
+
$this->setCollection($collection);
|
39 |
+
|
40 |
+
return parent::_prepareCollection();
|
41 |
+
}
|
42 |
+
|
43 |
+
/**
|
44 |
+
* @return string
|
45 |
+
*/
|
46 |
+
public function getConditionName()
|
47 |
+
{
|
48 |
+
return $this->_conditionName;
|
49 |
+
}
|
50 |
+
|
51 |
+
/**
|
52 |
+
* @param $name
|
53 |
+
* @return $this
|
54 |
+
*/
|
55 |
+
public function setConditionName($name)
|
56 |
+
{
|
57 |
+
$this->_conditionName = $name;
|
58 |
+
return $this;
|
59 |
+
}
|
60 |
+
|
61 |
+
/**
|
62 |
+
* @return int|mixed
|
63 |
+
*/
|
64 |
+
public function getWebsiteId()
|
65 |
+
{
|
66 |
+
if (is_null($this->_websiteId)) {
|
67 |
+
$this->_websiteId = Mage::app()->getWebsite()->getId();
|
68 |
+
}
|
69 |
+
return $this->_websiteId;
|
70 |
+
}
|
71 |
+
|
72 |
+
/**
|
73 |
+
* @param $websiteId
|
74 |
+
* @return $this
|
75 |
+
*/
|
76 |
+
public function setWebsiteId($websiteId)
|
77 |
+
{
|
78 |
+
$this->_websiteId = Mage::app()->getWebsite($websiteId)->getId();
|
79 |
+
return $this;
|
80 |
+
}
|
81 |
+
|
82 |
+
/**
|
83 |
+
* @return $this
|
84 |
+
*/
|
85 |
+
protected function _prepareColumns()
|
86 |
+
{
|
87 |
+
$this->addColumn('dest_country', array(
|
88 |
+
'header' => Mage::helper('bpost_shm')->__('Country'),
|
89 |
+
'index' => 'dest_country',
|
90 |
+
'default' => '*',
|
91 |
+
));
|
92 |
+
|
93 |
+
$this->addColumn('dest_region', array(
|
94 |
+
'header' => Mage::helper('bpost_shm')->__('Region/State'),
|
95 |
+
'index' => 'dest_region',
|
96 |
+
'default' => '*',
|
97 |
+
));
|
98 |
+
|
99 |
+
$this->addColumn('dest_zip', array(
|
100 |
+
'header' => Mage::helper('bpost_shm')->__('Zip/Postal Code'),
|
101 |
+
'index' => 'dest_zip',
|
102 |
+
'default' => '*',
|
103 |
+
));
|
104 |
+
|
105 |
+
$label = Mage::getSingleton('shipping/carrier_tablerate')
|
106 |
+
->getCode('condition_name_short', $this->getConditionName());
|
107 |
+
$this->addColumn('condition_value', array(
|
108 |
+
'header' => $label,
|
109 |
+
'index' => 'condition_value',
|
110 |
+
));
|
111 |
+
|
112 |
+
$this->addColumn('price', array(
|
113 |
+
'header' => Mage::helper('bpost_shm')->__('Shipping Price'),
|
114 |
+
'index' => 'price',
|
115 |
+
));
|
116 |
+
|
117 |
+
return parent::_prepareColumns();
|
118 |
+
}
|
119 |
+
}
|
app/code/community/Bpost/ShM/Block/Adminhtml/System/Config/Form/Field/Cacheinfo.php
ADDED
@@ -0,0 +1,18 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Class Bpost_ShM_Block_Adminhtml_System_Config_Form_Field_Clickcollect
|
5 |
+
*/
|
6 |
+
class Bpost_ShM_Block_Adminhtml_System_Config_Form_Field_Cacheinfo extends Mage_Adminhtml_Block_System_Config_Form_Field
|
7 |
+
{
|
8 |
+
|
9 |
+
public function render(Varien_Data_Form_Element_Abstract $element)
|
10 |
+
{
|
11 |
+
$text = Mage::helper('bpost_shm')->__('Please note that the Click & Collect points are updated once a day.') . '<br />';
|
12 |
+
$text .= Mage::helper('bpost_shm')->__('If you have added or removed Click & Collect points in Shipping Manager, be aware that it will take up to 24h to be operational in the bpost Magento plugin.') . '<br />';
|
13 |
+
$text .= Mage::helper('bpost_shm')->__('If the points don’t appear after 24h, make sure to have cleared the Magento cache.');
|
14 |
+
$html = '<tr><td colspan="4" class="value fulltext"><div id="' . $element->getHtmlId() . '" style="color:red;">' . $text . '</div></td></tr>';
|
15 |
+
|
16 |
+
return $html;
|
17 |
+
}
|
18 |
+
}
|
app/code/community/Bpost/ShM/Block/Adminhtml/System/Config/Form/Field/Clickcollect.php
ADDED
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Class Bpost_ShM_Block_Adminhtml_System_Config_Form_Field_Clickcollect
|
5 |
+
*/
|
6 |
+
class Bpost_ShM_Block_Adminhtml_System_Config_Form_Field_Clickcollect extends Mage_Adminhtml_Block_System_Config_Form_Field
|
7 |
+
{
|
8 |
+
|
9 |
+
public function render(Varien_Data_Form_Element_Abstract $element)
|
10 |
+
{
|
11 |
+
$text = Mage::helper('bpost_shm')->__('You would like to deliver your parcel in your own stores?');
|
12 |
+
$text .= " " . Mage::helper('bpost_shm')->__('Click & Collect is the most convenient option for you.');
|
13 |
+
$text .= " " . Mage::helper('bpost_shm')->__('Please find more information on %s.',
|
14 |
+
'<a href="http://www.bpost.be/site/en/business/send_post/parcels/clickandcollect.html">http://www.bpost.be/site/en/business/send_post/parcels/clickandcollect.html</a>' );
|
15 |
+
$text .= "<br /> " . Mage::helper('bpost_shm')->__('The delivery method Click & Collect is not activated by default on your contract.');
|
16 |
+
$text .= " " . Mage::helper('bpost_shm')->__('Please request an activation of the service in order to use it on your website.');
|
17 |
+
$html = '<tr><td colspan="4" class="value fulltext"><div id="' . $element->getHtmlId() . '">' . $text . '</div></td></tr>';
|
18 |
+
|
19 |
+
return $html;
|
20 |
+
}
|
21 |
+
}
|
app/code/community/Bpost/ShM/Block/Adminhtml/System/Config/Form/Field/Logo.php
CHANGED
@@ -14,7 +14,7 @@ class Bpost_ShM_Block_Adminhtml_System_Config_Form_Field_Logo extends Mage_Admin
|
|
14 |
{
|
15 |
$bpostLogoMessage = Mage::helper('bpost_shm')->__('Click here for more information');
|
16 |
$popupUrl = "'" . $this->getUrl('adminhtml/bpost_shM_config/informationpopup') . "'";
|
17 |
-
$html = '<a class="bpostInfo" href="#" onclick="openPopup(' . $popupUrl . ',600,400);">';
|
18 |
$html .= '<span>' . $bpostLogoMessage . '</span> ';
|
19 |
$html .= '</a>';
|
20 |
return $html;
|
14 |
{
|
15 |
$bpostLogoMessage = Mage::helper('bpost_shm')->__('Click here for more information');
|
16 |
$popupUrl = "'" . $this->getUrl('adminhtml/bpost_shM_config/informationpopup') . "'";
|
17 |
+
$html = '<a id="' . $element->getHtmlId() . '" class="bpostInfo" href="#" onclick="openPopup(' . $popupUrl . ',600,400);">';
|
18 |
$html .= '<span>' . $bpostLogoMessage . '</span> ';
|
19 |
$html .= '</a>';
|
20 |
return $html;
|
app/code/community/Bpost/ShM/Block/Adminhtml/System/Config/Form/Field/Subheader.php
CHANGED
@@ -9,7 +9,8 @@ class Bpost_ShM_Block_Adminhtml_System_Config_Form_Field_Subheader extends Mage_
|
|
9 |
public function render(Varien_Data_Form_Element_Abstract $element)
|
10 |
{
|
11 |
$label = $element->getLabelHtml();
|
12 |
-
$html = '<tr><td colspan="4" class="subheader value"
|
|
|
13 |
|
14 |
return $html;
|
15 |
}
|
9 |
public function render(Varien_Data_Form_Element_Abstract $element)
|
10 |
{
|
11 |
$label = $element->getLabelHtml();
|
12 |
+
$html = '<tr><td colspan="4" class="subheader value"><div id="' . $element->getHtmlId() . '">' .
|
13 |
+
Mage::helper("bpost_shm")->__($label).'</div></td></tr>';
|
14 |
|
15 |
return $html;
|
16 |
}
|
app/code/community/Bpost/ShM/Block/Adminhtml/System/Config/Form/Tablerates/Export/Clickcollect.php
ADDED
@@ -0,0 +1,30 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
class Bpost_ShM_Block_Adminhtml_System_Config_Form_Tablerates_Export_Clickcollect
|
3 |
+
extends Mage_Adminhtml_Block_System_Config_Form_Field implements Varien_Data_Form_Element_Renderer_Interface
|
4 |
+
{
|
5 |
+
/**
|
6 |
+
* @param Varien_Data_Form_Element_Abstract $element
|
7 |
+
* @return mixed
|
8 |
+
*/
|
9 |
+
public function _getElementHtml(Varien_Data_Form_Element_Abstract $element)
|
10 |
+
{
|
11 |
+
$buttonBlock = Mage::app()->getLayout()->createBlock('adminhtml/widget_button');
|
12 |
+
|
13 |
+
$params = array(
|
14 |
+
'website' => $buttonBlock->getRequest()->getParam('website'),
|
15 |
+
'method' => 'clickcollect',
|
16 |
+
'filename' => 'bpost_clickcollect_tablerates.csv'
|
17 |
+
);
|
18 |
+
|
19 |
+
$data = array(
|
20 |
+
'label' => Mage::helper('adminhtml')->__('Export CSV'),
|
21 |
+
'onclick' => 'setLocation(\'' . Mage::helper('adminhtml')->getUrl("adminhtml/bpost_shM_config/exportTablerates", $params) . 'conditionName/\' + $(\'carriers_bpost_clickcollect_condition_name\').value + \'/bpost_clickcollect_tablerates.csv\' )',
|
22 |
+
'class' => '',
|
23 |
+
'id' => 'carriers_clickcollect_tablerates_export'
|
24 |
+
);
|
25 |
+
|
26 |
+
$html = $buttonBlock->setData($data)->toHtml();
|
27 |
+
|
28 |
+
return $html;
|
29 |
+
}
|
30 |
+
}
|
app/code/community/Bpost/ShM/Block/Carrier/Bpost.php
CHANGED
@@ -34,8 +34,10 @@ class Bpost_ShM_Block_Carrier_Bpost extends Mage_Core_Block_Template
|
|
34 |
"close_label" => $bpostHelper->__('Close'),
|
35 |
"select_text" => $bpostHelper->__('Click here to choose a bpost pick-up point.'),
|
36 |
"select_text_parcel_locker" => $bpostHelper->__('Click here to choose a bpost parcel locker point.'),
|
|
|
37 |
"change_text" => $bpostHelper->__('Click here to change the bpost pick-up point.'),
|
38 |
"change_text_parcel_locker" => $bpostHelper->__('Click here to change the bpost parcel locker point.'),
|
|
|
39 |
"label_filter" => $bpostHelper->__("Filter"),
|
40 |
"label_select" => $bpostHelper->__("Select"),
|
41 |
"label_postcode" => $bpostHelper->__("Type in a location"),
|
@@ -51,6 +53,8 @@ class Bpost_ShM_Block_Carrier_Bpost extends Mage_Core_Block_Template
|
|
51 |
"location_postoffice_default_image" => $this->getSkinUrl('images/bpost/location_postoffice_default.png'),
|
52 |
"location_postpoint_default_image" => $this->getSkinUrl('images/bpost/location_postpoint_default.png'),
|
53 |
"location_parcellocker_default_image" => $this->getSkinUrl('images/bpost/location_parcellocker_default.png'),
|
|
|
|
|
54 |
"base_url" => Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_LINK, Mage::app()->getStore()->isCurrentlySecure()),
|
55 |
"datepicker_display" => (bool)$configHelper->getBpostShippingConfig("display_delivery_date", Mage::app()->getStore()->getId()),
|
56 |
"datepicker_choose" => (bool)$configHelper->getBpostShippingConfig("choose_delivery_date", Mage::app()->getStore()->getId()),
|
@@ -61,6 +65,7 @@ class Bpost_ShM_Block_Carrier_Bpost extends Mage_Core_Block_Template
|
|
61 |
"datepicker_saturday_homedelivery" => (bool)$configHelper->getBpostCarriersConfig("saturday_delivery", "bpost_homedelivery", Mage::app()->getStore()->getId()),
|
62 |
"datepicker_saturday_pickuppoint" => (bool)$configHelper->getBpostCarriersConfig("saturday_delivery", "bpost_pickuppoint", Mage::app()->getStore()->getId()),
|
63 |
"datepicker_saturday_parcellocker" => (bool)$configHelper->getBpostCarriersConfig("saturday_delivery", "bpost_parcellocker", Mage::app()->getStore()->getId()),
|
|
|
64 |
"datepicker_days" => $this->getShippingDates(),
|
65 |
"onestepcheckout_active" => $bpostHelper->isOnestepCheckout(),
|
66 |
"onestepcheckout_shipping_address_error" => $bpostHelper->__("Please select a postcode or city first.")
|
34 |
"close_label" => $bpostHelper->__('Close'),
|
35 |
"select_text" => $bpostHelper->__('Click here to choose a bpost pick-up point.'),
|
36 |
"select_text_parcel_locker" => $bpostHelper->__('Click here to choose a bpost parcel locker point.'),
|
37 |
+
"select_text_clickcollect" => $bpostHelper->__('Click here to choose a bpost Click & Collect point.'),
|
38 |
"change_text" => $bpostHelper->__('Click here to change the bpost pick-up point.'),
|
39 |
"change_text_parcel_locker" => $bpostHelper->__('Click here to change the bpost parcel locker point.'),
|
40 |
+
"change_text_clickcollect" => $bpostHelper->__('Click here to change the bpost Click & Collect point.'),
|
41 |
"label_filter" => $bpostHelper->__("Filter"),
|
42 |
"label_select" => $bpostHelper->__("Select"),
|
43 |
"label_postcode" => $bpostHelper->__("Type in a location"),
|
53 |
"location_postoffice_default_image" => $this->getSkinUrl('images/bpost/location_postoffice_default.png'),
|
54 |
"location_postpoint_default_image" => $this->getSkinUrl('images/bpost/location_postpoint_default.png'),
|
55 |
"location_parcellocker_default_image" => $this->getSkinUrl('images/bpost/location_parcellocker_default.png'),
|
56 |
+
"location_clickcollect_default_image" => $this->getSkinUrl('images/bpost/location_clickcollect_default.png'),
|
57 |
+
"location_clickcollect_custom_image" => (Mage::getStoreConfig('carriers/bpost_clickcollect/marker') ? Mage::getBaseUrl('media') . "bpost/" . $configHelper->getBpostCarriersConfig("marker", "bpost_clickcollect", Mage::app()->getStore()->getId()) : ""),
|
58 |
"base_url" => Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_LINK, Mage::app()->getStore()->isCurrentlySecure()),
|
59 |
"datepicker_display" => (bool)$configHelper->getBpostShippingConfig("display_delivery_date", Mage::app()->getStore()->getId()),
|
60 |
"datepicker_choose" => (bool)$configHelper->getBpostShippingConfig("choose_delivery_date", Mage::app()->getStore()->getId()),
|
65 |
"datepicker_saturday_homedelivery" => (bool)$configHelper->getBpostCarriersConfig("saturday_delivery", "bpost_homedelivery", Mage::app()->getStore()->getId()),
|
66 |
"datepicker_saturday_pickuppoint" => (bool)$configHelper->getBpostCarriersConfig("saturday_delivery", "bpost_pickuppoint", Mage::app()->getStore()->getId()),
|
67 |
"datepicker_saturday_parcellocker" => (bool)$configHelper->getBpostCarriersConfig("saturday_delivery", "bpost_parcellocker", Mage::app()->getStore()->getId()),
|
68 |
+
"datepicker_saturday_clickcollect" => (bool)$configHelper->getBpostCarriersConfig("saturday_delivery", "bpost_clickcollect", Mage::app()->getStore()->getId()),
|
69 |
"datepicker_days" => $this->getShippingDates(),
|
70 |
"onestepcheckout_active" => $bpostHelper->isOnestepCheckout(),
|
71 |
"onestepcheckout_shipping_address_error" => $bpostHelper->__("Please select a postcode or city first.")
|
app/code/community/Bpost/ShM/Helper/Data.php
CHANGED
@@ -541,7 +541,8 @@ class Bpost_ShM_Helper_Data extends Mage_Core_Helper_Abstract
|
|
541 |
$shippingMethods = array(
|
542 |
'bpost_homedelivery' => false,
|
543 |
'bpost_pickuppoint' => false,
|
544 |
-
'bpost_parcellocker' => false
|
|
|
545 |
);
|
546 |
foreach ($shippingMethods as $method => $value) {
|
547 |
//get saturday delivery flags
|
@@ -683,6 +684,18 @@ class Bpost_ShM_Helper_Data extends Mage_Core_Helper_Abstract
|
|
683 |
}
|
684 |
}
|
685 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
686 |
return true;
|
687 |
}
|
688 |
|
@@ -799,7 +812,7 @@ class Bpost_ShM_Helper_Data extends Mage_Core_Helper_Abstract
|
|
799 |
public function processShipmentsWeight($order)
|
800 |
{
|
801 |
$bpostHelper = Mage::helper("bpost_shm/system_config");
|
802 |
-
$weightUnit = $bpostHelper->getBpostShippingConfig("weight_unit");
|
803 |
|
804 |
$totalShipmentsWeight = 0;
|
805 |
|
541 |
$shippingMethods = array(
|
542 |
'bpost_homedelivery' => false,
|
543 |
'bpost_pickuppoint' => false,
|
544 |
+
'bpost_parcellocker' => false,
|
545 |
+
'bpost_clickcollect' => false
|
546 |
);
|
547 |
foreach ($shippingMethods as $method => $value) {
|
548 |
//get saturday delivery flags
|
684 |
}
|
685 |
}
|
686 |
}
|
687 |
+
|
688 |
+
if($method == 'bpost_clickcollect') {
|
689 |
+
//check if pick-up point is open on this day
|
690 |
+
if(is_array($closedOn)) {
|
691 |
+
$day = $this->_formatDeliveryDate($deliveryDate, 'l');
|
692 |
+
|
693 |
+
if(in_array($day, $closedOn)) {
|
694 |
+
return false;
|
695 |
+
}
|
696 |
+
}
|
697 |
+
}
|
698 |
+
|
699 |
return true;
|
700 |
}
|
701 |
|
812 |
public function processShipmentsWeight($order)
|
813 |
{
|
814 |
$bpostHelper = Mage::helper("bpost_shm/system_config");
|
815 |
+
$weightUnit = $bpostHelper->getBpostShippingConfig("weight_unit", $order->getStoreId());
|
816 |
|
817 |
$totalShipmentsWeight = 0;
|
818 |
|
app/code/community/Bpost/ShM/Model/Adminhtml/Observer.php
CHANGED
@@ -155,6 +155,9 @@ class Bpost_ShM_Model_Adminhtml_Observer extends Varien_Event_Observer
|
|
155 |
Mage::throwException("Failed to authenticate with bpost, please check your credentials.");
|
156 |
}
|
157 |
|
|
|
|
|
|
|
158 |
$session->addSuccess($configHelper->__("Successfully authenticated with bpost."));
|
159 |
}catch(Exception $e){
|
160 |
$session->addError($configHelper->__($e->getMessage()));
|
@@ -163,6 +166,40 @@ class Bpost_ShM_Model_Adminhtml_Observer extends Varien_Event_Observer
|
|
163 |
return $this;
|
164 |
}
|
165 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
166 |
/**
|
167 |
* Calculate and set the weight on the shipping to pass it to the webservice after a standard shipment save.
|
168 |
*
|
@@ -176,4 +213,5 @@ class Bpost_ShM_Model_Adminhtml_Observer extends Varien_Event_Observer
|
|
176 |
$shipment->setTotalWeight($weight);
|
177 |
}
|
178 |
}
|
179 |
-
|
|
155 |
Mage::throwException("Failed to authenticate with bpost, please check your credentials.");
|
156 |
}
|
157 |
|
158 |
+
//check if click & collect is allowed and trigger
|
159 |
+
$this->_checkAndTriggerClickCollect($apiResponse->getBody());
|
160 |
+
|
161 |
$session->addSuccess($configHelper->__("Successfully authenticated with bpost."));
|
162 |
}catch(Exception $e){
|
163 |
$session->addError($configHelper->__($e->getMessage()));
|
166 |
return $this;
|
167 |
}
|
168 |
|
169 |
+
|
170 |
+
protected function _checkAndTriggerClickCollect($apiResponseBody){
|
171 |
+
$xml = simplexml_load_string($apiResponseBody);
|
172 |
+
foreach ($xml->deliveryMethod as $deliveryMethodData) {
|
173 |
+
if($deliveryMethodData['name'] == "Click & Collect" && $deliveryMethodData['visiblity'] == "VISIBLE"){
|
174 |
+
Mage::getConfig()->saveConfig('carriers/bpost_clickcollect/activated', '1');
|
175 |
+
Mage::getConfig()->saveConfig('carriers/bpost_clickcollect/active', '1');
|
176 |
+
if(Mage::getStoreConfig('carriers/bpost_clickcollect/marker') == ""){
|
177 |
+
|
178 |
+
$src = Mage::getBaseDir('skin') .
|
179 |
+
DS . 'frontend' .
|
180 |
+
DS . 'base' .
|
181 |
+
DS . 'default' .
|
182 |
+
DS . 'images' . DS . 'bpost' . DS . 'location_clickcollect_default.png';
|
183 |
+
|
184 |
+
$dest = Mage::getBaseDir('media') .
|
185 |
+
DS . 'bpost' . DS . 'default' . DS . 'location_clickcollect_default.png';
|
186 |
+
|
187 |
+
$io = new Varien_Io_File();
|
188 |
+
$io->cp($src, $dest);
|
189 |
+
Mage::getConfig()
|
190 |
+
->saveConfig('carriers/bpost_clickcollect/marker', 'default/location_clickcollect_default.png');
|
191 |
+
}
|
192 |
+
Mage::app()->getCacheInstance()->cleanType('config');
|
193 |
+
return $this;
|
194 |
+
}
|
195 |
+
elseif(Mage::getStoreConfig('carriers/bpost_clickcollect/activated') == 1){
|
196 |
+
Mage::getConfig()->saveConfig('carriers/bpost_clickcollect/activated', '0');
|
197 |
+
Mage::getConfig()->saveConfig('carriers/bpost_clickcollect/active', '0');
|
198 |
+
Mage::app()->getCacheInstance()->cleanType('config');
|
199 |
+
}
|
200 |
+
}
|
201 |
+
}
|
202 |
+
|
203 |
/**
|
204 |
* Calculate and set the weight on the shipping to pass it to the webservice after a standard shipment save.
|
205 |
*
|
213 |
$shipment->setTotalWeight($weight);
|
214 |
}
|
215 |
}
|
216 |
+
|
217 |
+
}
|
app/code/community/Bpost/ShM/Model/Adminhtml/System/Config/Backend/Shipping/Tablerates/Clickcollect.php
ADDED
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
class Bpost_ShM_Model_Adminhtml_System_Config_Backend_Shipping_Tablerates_Clickcollect extends Mage_Core_Model_Config_Data
|
3 |
+
{
|
4 |
+
/**
|
5 |
+
* Call the uploadAndImport function from the clickcollect tablerate recourcemodel.
|
6 |
+
*/
|
7 |
+
public function _afterSave()
|
8 |
+
{
|
9 |
+
Mage::getResourceModel('bpost_shm/tablerates_clickcollect')->uploadAndImport($this);
|
10 |
+
}
|
11 |
+
}
|
app/code/community/Bpost/ShM/Model/Api.php
CHANGED
@@ -187,8 +187,10 @@ class Bpost_ShM_Model_Api extends Bpost_ShM_Model_Api_Abstract
|
|
187 |
//$params["Street"] = $addressData["street"];
|
188 |
//$params["Number"] = $addressData["number"];
|
189 |
$params["Zone"] = $addressData["zone"];
|
|
|
|
|
|
|
190 |
$response = $this->_callTaxipostApi($params);
|
191 |
-
|
192 |
return $response->getBody();
|
193 |
}
|
194 |
|
187 |
//$params["Street"] = $addressData["street"];
|
188 |
//$params["Number"] = $addressData["number"];
|
189 |
$params["Zone"] = $addressData["zone"];
|
190 |
+
if($type == 8){
|
191 |
+
$params["CheckOpen"] = 0;
|
192 |
+
}
|
193 |
$response = $this->_callTaxipostApi($params);
|
|
|
194 |
return $response->getBody();
|
195 |
}
|
196 |
|
app/code/community/Bpost/ShM/Model/Api/Abstract.php
CHANGED
@@ -12,7 +12,6 @@ class Bpost_ShM_Model_Api_Abstract extends Mage_Core_Model_Abstract
|
|
12 |
const API_PATH_PREFIX = '/services/shm';
|
13 |
const API_URI_TAXIPOST_BASE = "http://taxipost.geo6.be";
|
14 |
const API_TAXIPOST_APPID = "A001";
|
15 |
-
const API_TAXIPOST_PARTNER = "999999";
|
16 |
|
17 |
protected $_apiUriBase;
|
18 |
protected $_accountId;
|
@@ -56,9 +55,9 @@ class Bpost_ShM_Model_Api_Abstract extends Mage_Core_Model_Abstract
|
|
56 |
public function initialize(){
|
57 |
$configHelper = Mage::helper("bpost_shm/system_config");
|
58 |
|
59 |
-
$this->_apiUriBase = $configHelper->getBpostShippingConfig("api_url");
|
60 |
-
$this->_accountId = $this->_bpostConfigHelper->getBpostShippingConfig("accountid");
|
61 |
-
$this->_passphrase = $this->_bpostConfigHelper->getBpostShippingConfig("passphrase");
|
62 |
$this->_authorization = base64_encode($this->_accountId . ':' . $this->_passphrase);
|
63 |
$this->_initialized = true;
|
64 |
}
|
@@ -192,13 +191,12 @@ class Bpost_ShM_Model_Api_Abstract extends Mage_Core_Model_Abstract
|
|
192 |
*/
|
193 |
protected function _callTaxipostApi($params){
|
194 |
$urlExtension = "Locator";
|
195 |
-
$params["Partner"] =
|
196 |
$params["AppId"] = self::API_TAXIPOST_APPID;
|
197 |
|
198 |
$httpClient = $this->_getTaxipostHttpClient($urlExtension);
|
199 |
$httpClient->setParameterGet($params);
|
200 |
$response = $httpClient->request('GET');
|
201 |
-
|
202 |
try{
|
203 |
$this->_checkApiResponse($httpClient->getLastRequest(), $response);
|
204 |
|
12 |
const API_PATH_PREFIX = '/services/shm';
|
13 |
const API_URI_TAXIPOST_BASE = "http://taxipost.geo6.be";
|
14 |
const API_TAXIPOST_APPID = "A001";
|
|
|
15 |
|
16 |
protected $_apiUriBase;
|
17 |
protected $_accountId;
|
55 |
public function initialize(){
|
56 |
$configHelper = Mage::helper("bpost_shm/system_config");
|
57 |
|
58 |
+
$this->_apiUriBase = $configHelper->getBpostShippingConfig("api_url", Mage::app()->getStore()->getId());
|
59 |
+
$this->_accountId = $this->_bpostConfigHelper->getBpostShippingConfig("accountid", Mage::app()->getStore()->getId());
|
60 |
+
$this->_passphrase = $this->_bpostConfigHelper->getBpostShippingConfig("passphrase", Mage::app()->getStore()->getId());
|
61 |
$this->_authorization = base64_encode($this->_accountId . ':' . $this->_passphrase);
|
62 |
$this->_initialized = true;
|
63 |
}
|
191 |
*/
|
192 |
protected function _callTaxipostApi($params){
|
193 |
$urlExtension = "Locator";
|
194 |
+
$params["Partner"] = Mage::getStoreConfig("shipping/bpost_shm/accountid");
|
195 |
$params["AppId"] = self::API_TAXIPOST_APPID;
|
196 |
|
197 |
$httpClient = $this->_getTaxipostHttpClient($urlExtension);
|
198 |
$httpClient->setParameterGet($params);
|
199 |
$response = $httpClient->request('GET');
|
|
|
200 |
try{
|
201 |
$this->_checkApiResponse($httpClient->getLastRequest(), $response);
|
202 |
|
app/code/community/Bpost/ShM/Model/Api/Domcreator.php
CHANGED
@@ -16,25 +16,27 @@ class Bpost_ShM_Model_Api_Domcreator extends Bpost_ShM_Model_Api_Abstract
|
|
16 |
* @param Mage_Sales_Model_Order $order
|
17 |
* function builds the necessary DOM document and returns it
|
18 |
* this result will be used in the API calls as post data
|
|
|
19 |
*/
|
20 |
public function getCreateOrderDomDocument($order, $returnOrder = false){
|
21 |
//initialize helper
|
22 |
$configHelper = Mage::helper("bpost_shm/system_config");
|
23 |
$bpostHelper = Mage::helper("bpost_shm");
|
24 |
$shippingMethod = $order->getShippingMethod();
|
|
|
25 |
|
26 |
//get sender
|
27 |
$senderData = new Varien_Object();
|
28 |
-
$senderData->setBpostName($configHelper->getBpostShippingConfig("sender_name"));
|
29 |
-
$senderData->setBpostCompany($configHelper->getBpostShippingConfig("sender_company"));
|
30 |
-
$senderData->setBpostStreet($configHelper->getBpostShippingConfig("sender_streetname"));
|
31 |
-
$senderData->setBpostHouseNumber($configHelper->getBpostShippingConfig("sender_streetnumber"));
|
32 |
-
$senderData->setBoxNumber($configHelper->getBpostShippingConfig("sender_boxnumber"));
|
33 |
-
$senderData->setPostcode($configHelper->getBpostShippingConfig("sender_postal_code"));
|
34 |
-
$senderData->setCity($configHelper->getBpostShippingConfig("sender_city"));
|
35 |
-
$senderData->setCountryId($configHelper->getBpostShippingConfig("sender_country"));
|
36 |
-
$senderData->setEmail($configHelper->getBpostShippingConfig("sender_email"));
|
37 |
-
$senderData->setTelephone(preg_replace('/[^0-9]/s', '',$configHelper->getBpostShippingConfig("sender_phonenumber")));
|
38 |
|
39 |
//get receiver
|
40 |
$this->_shippingAddress = $order->getShippingAddress();
|
@@ -129,7 +131,7 @@ class Bpost_ShM_Model_Api_Domcreator extends Bpost_ShM_Model_Api_Abstract
|
|
129 |
$weightInGrams = 1;
|
130 |
}
|
131 |
|
132 |
-
if(($shippingMethod == "bpostshm_bpost_parcellocker" || $shippingMethod == "bpostshm_bpost_international") && $weightInGrams < 10){
|
133 |
$weightInGrams = 10;
|
134 |
}
|
135 |
//end weight
|
@@ -147,7 +149,7 @@ class Bpost_ShM_Model_Api_Domcreator extends Bpost_ShM_Model_Api_Abstract
|
|
147 |
$addressNumber->appendChild($document->createTextNode($senderData->getBpostHouseNumber()));
|
148 |
|
149 |
//only add element if available
|
150 |
-
$boxNumber = $configHelper->getBpostShippingConfig($senderData->getBoxNumber());
|
151 |
|
152 |
if($boxNumber && $boxNumber != ''){
|
153 |
$addressBox = $document->createElement('common:box');
|
@@ -496,7 +498,78 @@ class Bpost_ShM_Model_Api_Domcreator extends Bpost_ShM_Model_Api_Abstract
|
|
496 |
|
497 |
$nationalBox->appendChild($atTwentyFourSeven);
|
498 |
break;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
499 |
}
|
|
|
500 |
return $nationalBox;
|
501 |
}
|
502 |
|
16 |
* @param Mage_Sales_Model_Order $order
|
17 |
* function builds the necessary DOM document and returns it
|
18 |
* this result will be used in the API calls as post data
|
19 |
+
* @return DOMDocument
|
20 |
*/
|
21 |
public function getCreateOrderDomDocument($order, $returnOrder = false){
|
22 |
//initialize helper
|
23 |
$configHelper = Mage::helper("bpost_shm/system_config");
|
24 |
$bpostHelper = Mage::helper("bpost_shm");
|
25 |
$shippingMethod = $order->getShippingMethod();
|
26 |
+
$storeId = $order->getStoreId();
|
27 |
|
28 |
//get sender
|
29 |
$senderData = new Varien_Object();
|
30 |
+
$senderData->setBpostName($configHelper->getBpostShippingConfig("sender_name", $storeId));
|
31 |
+
$senderData->setBpostCompany($configHelper->getBpostShippingConfig("sender_company", $storeId));
|
32 |
+
$senderData->setBpostStreet($configHelper->getBpostShippingConfig("sender_streetname", $storeId));
|
33 |
+
$senderData->setBpostHouseNumber($configHelper->getBpostShippingConfig("sender_streetnumber", $storeId));
|
34 |
+
$senderData->setBoxNumber($configHelper->getBpostShippingConfig("sender_boxnumber", $storeId));
|
35 |
+
$senderData->setPostcode($configHelper->getBpostShippingConfig("sender_postal_code", $storeId));
|
36 |
+
$senderData->setCity($configHelper->getBpostShippingConfig("sender_city", $storeId));
|
37 |
+
$senderData->setCountryId($configHelper->getBpostShippingConfig("sender_country", $storeId));
|
38 |
+
$senderData->setEmail($configHelper->getBpostShippingConfig("sender_email", $storeId));
|
39 |
+
$senderData->setTelephone(preg_replace('/[^0-9]/s', '',$configHelper->getBpostShippingConfig("sender_phonenumber", $storeId)));
|
40 |
|
41 |
//get receiver
|
42 |
$this->_shippingAddress = $order->getShippingAddress();
|
131 |
$weightInGrams = 1;
|
132 |
}
|
133 |
|
134 |
+
if(($shippingMethod == "bpostshm_bpost_parcellocker" || $shippingMethod == "bpostshm_bpost_international" || $shippingMethod == "bpostshm_bpost_clickcollect") && $weightInGrams < 10){
|
135 |
$weightInGrams = 10;
|
136 |
}
|
137 |
//end weight
|
149 |
$addressNumber->appendChild($document->createTextNode($senderData->getBpostHouseNumber()));
|
150 |
|
151 |
//only add element if available
|
152 |
+
$boxNumber = $configHelper->getBpostShippingConfig($senderData->getBoxNumber(), $storeId);
|
153 |
|
154 |
if($boxNumber && $boxNumber != ''){
|
155 |
$addressBox = $document->createElement('common:box');
|
498 |
|
499 |
$nationalBox->appendChild($atTwentyFourSeven);
|
500 |
break;
|
501 |
+
|
502 |
+
case "bpostshm_bpost_clickcollect":
|
503 |
+
if(!$order->getBpostPickuplocationId()){
|
504 |
+
//only throw error in backend
|
505 |
+
if($manageLabels){
|
506 |
+
Mage::throwException("No pickup location order data found.");
|
507 |
+
}
|
508 |
+
}
|
509 |
+
|
510 |
+
$product->appendChild($document->createTextNode("bpack Click & Collect"));
|
511 |
+
|
512 |
+
//add the notification options
|
513 |
+
//check if bpost notification sms or mail isset
|
514 |
+
if($order->getBpostNotificationSms() || $order->getBpostNotificationEmail()){
|
515 |
+
if($order->getBpostNotificationSms()){
|
516 |
+
$options->appendChild($this->_addNotificationMessageOption($document, $order, "keepMeInformed", "sms"));
|
517 |
+
}else{
|
518 |
+
$options->appendChild($this->_addNotificationMessageOption($document, $order, "keepMeInformed"));
|
519 |
+
}
|
520 |
+
}
|
521 |
+
|
522 |
+
//then get the config option settings
|
523 |
+
$options = $this->_checkIfOptionIsValid($document, $options, $order, "bpost_clickcollect", "insurance", "insured");
|
524 |
+
$options = $this->_checkIfOptionIsValid($document, $options, $order, "bpost_clickcollect", "saturday_delivery", "saturdayDelivery");
|
525 |
+
|
526 |
+
$formattedAddress = $bpostHelper->formatShippingAddress($this->_shippingAddress);
|
527 |
+
|
528 |
+
$pugoId = $document->createElement('pugoId');
|
529 |
+
$pugoId->appendChild($document->createTextNode($order->getBpostPickuplocationId()));
|
530 |
+
|
531 |
+
$pugoName = $document->createElement('pugoName');
|
532 |
+
$pugoName->appendChild($document->createTextNode($this->_shippingAddress->getLastname()));
|
533 |
+
|
534 |
+
//Address tags
|
535 |
+
$streetName->appendChild($document->createTextNode($formattedAddress["street"]));
|
536 |
+
$streetNumber->appendChild($document->createTextNode($formattedAddress["number"]));
|
537 |
+
|
538 |
+
$streetPostalCode->appendChild($document->createTextNode($formattedAddress["postcode"]));
|
539 |
+
$locality->appendChild($document->createTextNode($formattedAddress["city"]));
|
540 |
+
$countryCode->appendChild($document->createTextNode($this->_shippingAddress->getCountryId()));
|
541 |
+
|
542 |
+
$pugoAddress = $document->createElement('pugoAddress');
|
543 |
+
$pugoAddress->appendChild($streetName);
|
544 |
+
$pugoAddress->appendChild($streetNumber);
|
545 |
+
$pugoAddress->appendChild($streetPostalCode);
|
546 |
+
$pugoAddress->appendChild($locality);
|
547 |
+
$pugoAddress->appendChild($countryCode);
|
548 |
+
//end address tags
|
549 |
+
|
550 |
+
$atBpost = $document->createElement('atBpost');
|
551 |
+
$atBpost->appendChild($product);
|
552 |
+
|
553 |
+
if($options->hasChildNodes()){
|
554 |
+
$atBpost->appendChild($options);
|
555 |
+
}
|
556 |
+
|
557 |
+
$atBpost->appendChild($weight);
|
558 |
+
$atBpost->appendChild($pugoId);
|
559 |
+
$atBpost->appendChild($pugoName);
|
560 |
+
$atBpost->appendChild($pugoAddress);
|
561 |
+
$atBpost->appendChild($receiverName);
|
562 |
+
$atBpost->appendChild($receiverCompany);
|
563 |
+
|
564 |
+
if($reqDeliveryDate) {
|
565 |
+
$atBpost->appendChild($reqDeliveryDate);
|
566 |
+
}
|
567 |
+
|
568 |
+
$nationalBox->appendChild($atBpost);
|
569 |
+
|
570 |
+
break;
|
571 |
}
|
572 |
+
|
573 |
return $nationalBox;
|
574 |
}
|
575 |
|
app/code/community/Bpost/ShM/Model/Observer.php
CHANGED
@@ -68,8 +68,8 @@ class Bpost_ShM_Model_Observer extends Varien_Event_Observer
|
|
68 |
$checkoutSession = Mage::getSingleton('checkout/session');
|
69 |
$shippingAddress = $checkoutSession->getQuote()->getShippingAddress();
|
70 |
if (((bool)$shippingAddress->getSameAsBilling() &&
|
71 |
-
$observer->getEvent()->getName() == "controller_action_postdispatch_checkout_onepage_savebilling") ||
|
72 |
-
$observer->getEvent()->getName() == "controller_action_postdispatch_checkout_onepage_saveshipping") {
|
73 |
|
74 |
$originalAddress = new Varien_Object();
|
75 |
$street = $shippingAddress->getStreet(1);
|
@@ -129,7 +129,8 @@ class Bpost_ShM_Model_Observer extends Varien_Event_Observer
|
|
129 |
$params = Mage::app()->getRequest()->getPost();
|
130 |
|
131 |
//add notifications to quote
|
132 |
-
if($address->getShippingMethod() == "bpostshm_bpost_pickuppoint"
|
|
|
133 |
if(isset($params["notification"])){
|
134 |
if($params["notification"] == "email"){
|
135 |
$quote->setBpostNotificationEmail($address->getEmail());
|
@@ -170,7 +171,7 @@ class Bpost_ShM_Model_Observer extends Varien_Event_Observer
|
|
170 |
}
|
171 |
|
172 |
//if all necessary fields are filled in.
|
173 |
-
$validShippingMethods = array("bpostshm_bpost_pickuppoint", "bpostshm_bpost_parcellocker");
|
174 |
|
175 |
if (in_array($address->getShippingMethod(), $validShippingMethods) && $params["bpost"]["id"] && $params["bpost"]["name"] && $params["bpost"]["street"]
|
176 |
&& $params["bpost"]["city"] && $params["bpost"]["postcode"]
|
@@ -182,6 +183,8 @@ class Bpost_ShM_Model_Observer extends Varien_Event_Observer
|
|
182 |
$firstname = "bpost pick-up point: ";
|
183 |
} elseif($address->getShippingMethod() == "bpostshm_bpost_parcellocker") {
|
184 |
$firstname = "bpost parcel locker: ";
|
|
|
|
|
185 |
}
|
186 |
|
187 |
//now set the current address to the bpost-spot
|
@@ -274,10 +277,15 @@ class Bpost_ShM_Model_Observer extends Varien_Event_Observer
|
|
274 |
/**
|
275 |
* function sets default data on our quote
|
276 |
* we need to do this for the onestepcheckout
|
|
|
|
|
|
|
277 |
*/
|
278 |
-
public function sales_quote_collect_totals_before()
|
|
|
279 |
$checkoutSession = Mage::getSingleton('checkout/session');
|
280 |
-
$quote = $
|
|
|
281 |
$params = Mage::app()->getRequest()->getParams();
|
282 |
$originalRatePrices = $checkoutSession->getOriginalRatePrices();
|
283 |
|
@@ -290,7 +298,7 @@ class Bpost_ShM_Model_Observer extends Varien_Event_Observer
|
|
290 |
if($_rate->getCode() == $params["shipping_method"] && isset($originalRatePrices[$params["shipping_method"]])){
|
291 |
$saturdayDeliveryCost = $bpostHelper->formatSaturdayDeliveryCost($bpostConfigHelper->getBpostShippingConfig("saturday_delivery_cost", Mage::app()->getStore()->getId()));
|
292 |
|
293 |
-
if(isset($params["disable_saturday_delivery"]) && $params["disable_saturday_delivery"] == 1 && Mage::helper("bpost_shm/system_config")->getBpostShippingConfig("display_delivery_date")){
|
294 |
//check if the option saturday delivery is active for the current shipping method
|
295 |
if($bpostConfigHelper->getBpostCarriersConfig("saturday_delivery", $shippingMethod, Mage::app()->getStore()->getId())){
|
296 |
//remove extra cost
|
@@ -299,7 +307,7 @@ class Bpost_ShM_Model_Observer extends Varien_Event_Observer
|
|
299 |
$quote->setBpostDisableSaturdayDelivery(true);
|
300 |
}
|
301 |
|
302 |
-
}elseif(isset($params["disable_saturday_delivery"]) && $params["disable_saturday_delivery"] == 0 && Mage::helper("bpost_shm/system_config")->getBpostShippingConfig("display_delivery_date")){
|
303 |
//add extra cost
|
304 |
if($bpostConfigHelper->getBpostCarriersConfig("saturday_delivery", $shippingMethod, Mage::app()->getStore()->getId())){
|
305 |
$_rate->setPrice($originalRatePrices[$params["shipping_method"]]+$saturdayDeliveryCost);
|
68 |
$checkoutSession = Mage::getSingleton('checkout/session');
|
69 |
$shippingAddress = $checkoutSession->getQuote()->getShippingAddress();
|
70 |
if (((bool)$shippingAddress->getSameAsBilling() &&
|
71 |
+
strtolower($observer->getEvent()->getName()) == "controller_action_postdispatch_checkout_onepage_savebilling") ||
|
72 |
+
strtolower($observer->getEvent()->getName()) == "controller_action_postdispatch_checkout_onepage_saveshipping") {
|
73 |
|
74 |
$originalAddress = new Varien_Object();
|
75 |
$street = $shippingAddress->getStreet(1);
|
129 |
$params = Mage::app()->getRequest()->getPost();
|
130 |
|
131 |
//add notifications to quote
|
132 |
+
if($address->getShippingMethod() == "bpostshm_bpost_pickuppoint" ||
|
133 |
+
$address->getShippingMethod() == "bpostshm_bpost_clickcollect"){
|
134 |
if(isset($params["notification"])){
|
135 |
if($params["notification"] == "email"){
|
136 |
$quote->setBpostNotificationEmail($address->getEmail());
|
171 |
}
|
172 |
|
173 |
//if all necessary fields are filled in.
|
174 |
+
$validShippingMethods = array("bpostshm_bpost_pickuppoint", "bpostshm_bpost_parcellocker", "bpostshm_bpost_clickcollect");
|
175 |
|
176 |
if (in_array($address->getShippingMethod(), $validShippingMethods) && $params["bpost"]["id"] && $params["bpost"]["name"] && $params["bpost"]["street"]
|
177 |
&& $params["bpost"]["city"] && $params["bpost"]["postcode"]
|
183 |
$firstname = "bpost pick-up point: ";
|
184 |
} elseif($address->getShippingMethod() == "bpostshm_bpost_parcellocker") {
|
185 |
$firstname = "bpost parcel locker: ";
|
186 |
+
} elseif($address->getShippingMethod() == "bpostshm_bpost_clickcollect") {
|
187 |
+
$firstname = "bpost Click & Collect point: ";
|
188 |
}
|
189 |
|
190 |
//now set the current address to the bpost-spot
|
277 |
/**
|
278 |
* function sets default data on our quote
|
279 |
* we need to do this for the onestepcheckout
|
280 |
+
*
|
281 |
+
* @param $observer
|
282 |
+
* @return $this
|
283 |
*/
|
284 |
+
public function sales_quote_collect_totals_before($observer)
|
285 |
+
{
|
286 |
$checkoutSession = Mage::getSingleton('checkout/session');
|
287 |
+
$quote = $observer->getEvent()->getQuote();
|
288 |
+
|
289 |
$params = Mage::app()->getRequest()->getParams();
|
290 |
$originalRatePrices = $checkoutSession->getOriginalRatePrices();
|
291 |
|
298 |
if($_rate->getCode() == $params["shipping_method"] && isset($originalRatePrices[$params["shipping_method"]])){
|
299 |
$saturdayDeliveryCost = $bpostHelper->formatSaturdayDeliveryCost($bpostConfigHelper->getBpostShippingConfig("saturday_delivery_cost", Mage::app()->getStore()->getId()));
|
300 |
|
301 |
+
if(isset($params["disable_saturday_delivery"]) && $params["disable_saturday_delivery"] == 1 && Mage::helper("bpost_shm/system_config")->getBpostShippingConfig("display_delivery_date", Mage::app()->getStore()->getId())){
|
302 |
//check if the option saturday delivery is active for the current shipping method
|
303 |
if($bpostConfigHelper->getBpostCarriersConfig("saturday_delivery", $shippingMethod, Mage::app()->getStore()->getId())){
|
304 |
//remove extra cost
|
307 |
$quote->setBpostDisableSaturdayDelivery(true);
|
308 |
}
|
309 |
|
310 |
+
}elseif(isset($params["disable_saturday_delivery"]) && $params["disable_saturday_delivery"] == 0 && Mage::helper("bpost_shm/system_config")->getBpostShippingConfig("display_delivery_date", Mage::app()->getStore()->getId())){
|
311 |
//add extra cost
|
312 |
if($bpostConfigHelper->getBpostCarriersConfig("saturday_delivery", $shippingMethod, Mage::app()->getStore()->getId())){
|
313 |
$_rate->setPrice($originalRatePrices[$params["shipping_method"]]+$saturdayDeliveryCost);
|
app/code/community/Bpost/ShM/Model/Resource/Tablerates/Clickcollect.php
ADDED
@@ -0,0 +1,421 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
class Bpost_ShM_Model_Resource_Tablerates_Clickcollect extends Mage_Core_Model_Resource_Db_Abstract{
|
3 |
+
|
4 |
+
/**
|
5 |
+
* Website Id selected in scope.
|
6 |
+
*
|
7 |
+
* @var int
|
8 |
+
*/
|
9 |
+
protected $_importWebsiteId = 0;
|
10 |
+
|
11 |
+
/**
|
12 |
+
* Array to fill with possible errors.
|
13 |
+
*
|
14 |
+
* @var array
|
15 |
+
*/
|
16 |
+
protected $_importErrors = array();
|
17 |
+
|
18 |
+
/**
|
19 |
+
* Number of rows imported.
|
20 |
+
*
|
21 |
+
* @var int
|
22 |
+
*/
|
23 |
+
protected $_importedRows = 0;
|
24 |
+
|
25 |
+
/**
|
26 |
+
* Conversion.
|
27 |
+
*
|
28 |
+
* @var array
|
29 |
+
*/
|
30 |
+
protected $_importUniqueHash = array();
|
31 |
+
|
32 |
+
/**
|
33 |
+
* Conversion.
|
34 |
+
*
|
35 |
+
* @var
|
36 |
+
*/
|
37 |
+
protected $_importIso2Countries;
|
38 |
+
|
39 |
+
/**
|
40 |
+
* Conversion.
|
41 |
+
*
|
42 |
+
* @var
|
43 |
+
*/
|
44 |
+
protected $_importIso3Countries;
|
45 |
+
|
46 |
+
/**
|
47 |
+
* Regions to import.
|
48 |
+
*
|
49 |
+
* @var
|
50 |
+
*/
|
51 |
+
protected $_importRegions;
|
52 |
+
|
53 |
+
/**
|
54 |
+
* Condition name selected in sysconfig.
|
55 |
+
*
|
56 |
+
* @var
|
57 |
+
*/
|
58 |
+
protected $_importConditionName;
|
59 |
+
|
60 |
+
/**
|
61 |
+
* Full name of condition selected in sysconfig.
|
62 |
+
*
|
63 |
+
* @var array
|
64 |
+
*/
|
65 |
+
protected $_conditionFullNames = array();
|
66 |
+
|
67 |
+
|
68 |
+
/**
|
69 |
+
* Initialise the model.
|
70 |
+
*/
|
71 |
+
protected function _construct()
|
72 |
+
{
|
73 |
+
$this->_init("bpost_shm/bpost_tablerates_clickcollect", "pk");
|
74 |
+
}
|
75 |
+
|
76 |
+
|
77 |
+
/**
|
78 |
+
* Fetch rate from the table for selected shipping address.
|
79 |
+
*
|
80 |
+
* @param Mage_Shipping_Model_Rate_Request $request
|
81 |
+
* @return array
|
82 |
+
*/
|
83 |
+
public function getRate(Mage_Shipping_Model_Rate_Request $request)
|
84 |
+
{
|
85 |
+
$adapter = $this->_getReadAdapter();
|
86 |
+
$bind = array(
|
87 |
+
':website_id' => (int) $request->getWebsiteId(),
|
88 |
+
':country_id' => $request->getDestCountryId(),
|
89 |
+
':region_id' => (int) $request->getDestRegionId(),
|
90 |
+
':postcode' => $request->getDestPostcode()
|
91 |
+
);
|
92 |
+
$select = $adapter->select()
|
93 |
+
->from($this->getMainTable())
|
94 |
+
->where('website_id = :website_id')
|
95 |
+
->order(array('dest_country_id DESC', 'dest_region_id DESC', 'dest_zip DESC', 'condition_value DESC'))
|
96 |
+
->limit(1);
|
97 |
+
|
98 |
+
// Render destination condition
|
99 |
+
$orWhere = '(' . implode(') OR (', array(
|
100 |
+
"dest_country_id = :country_id AND dest_region_id = :region_id AND dest_zip = :postcode",
|
101 |
+
"dest_country_id = :country_id AND dest_region_id = :region_id AND dest_zip = ''",
|
102 |
+
|
103 |
+
// Handle asterix in dest_zip field
|
104 |
+
"dest_country_id = :country_id AND dest_region_id = :region_id AND dest_zip = '*'",
|
105 |
+
"dest_country_id = :country_id AND dest_region_id = 0 AND dest_zip = '*'",
|
106 |
+
"dest_country_id = '0' AND dest_region_id = :region_id AND dest_zip = '*'",
|
107 |
+
"dest_country_id = '0' AND dest_region_id = 0 AND dest_zip = '*'",
|
108 |
+
|
109 |
+
"dest_country_id = :country_id AND dest_region_id = 0 AND dest_zip = ''",
|
110 |
+
"dest_country_id = :country_id AND dest_region_id = 0 AND dest_zip = :postcode",
|
111 |
+
"dest_country_id = :country_id AND dest_region_id = 0 AND dest_zip = '*'",
|
112 |
+
)) . ')';
|
113 |
+
$select->where($orWhere);
|
114 |
+
|
115 |
+
// Render condition by condition name
|
116 |
+
if (is_array($request->getConditionName())) {
|
117 |
+
$orWhere = array();
|
118 |
+
$i = 0;
|
119 |
+
foreach ($request->getConditionName() as $conditionName) {
|
120 |
+
$bindNameKey = sprintf(':condition_name_%d', $i);
|
121 |
+
$bindValueKey = sprintf(':condition_value_%d', $i);
|
122 |
+
$orWhere[] = "(condition_name = {$bindNameKey} AND condition_value <= {$bindValueKey})";
|
123 |
+
$bind[$bindNameKey] = $conditionName;
|
124 |
+
$bind[$bindValueKey] = $request->getData($conditionName);
|
125 |
+
$i++;
|
126 |
+
}
|
127 |
+
|
128 |
+
if ($orWhere) {
|
129 |
+
$select->where(implode(' OR ', $orWhere));
|
130 |
+
}
|
131 |
+
} else {
|
132 |
+
$bind[':condition_name'] = $request->getConditionName();
|
133 |
+
$bind[':condition_value'] = $request->getData($request->getConditionName());
|
134 |
+
|
135 |
+
$select->where('condition_name = :condition_name');
|
136 |
+
$select->where('condition_value <= :condition_value');
|
137 |
+
}
|
138 |
+
|
139 |
+
$result = $adapter->fetchRow($select, $bind);
|
140 |
+
// Normalize destination zip code
|
141 |
+
if ($result && $result['dest_zip'] == '*') {
|
142 |
+
$result['dest_zip'] = '';
|
143 |
+
}
|
144 |
+
return $result;
|
145 |
+
}
|
146 |
+
|
147 |
+
|
148 |
+
/**
|
149 |
+
* Upload and import table rates csv.
|
150 |
+
*
|
151 |
+
* @param Varien_Object $object
|
152 |
+
* @return $this
|
153 |
+
*/
|
154 |
+
public function uploadAndImport(Varien_Object $object)
|
155 |
+
{
|
156 |
+
if (empty($_FILES['groups']['tmp_name']['bpost_clickcollect']['fields']['import_clickcollect']['value'])) {
|
157 |
+
return $this;
|
158 |
+
}
|
159 |
+
|
160 |
+
$csvFile = $_FILES['groups']['tmp_name']['bpost_clickcollect']['fields']['import_clickcollect']['value'];
|
161 |
+
$website = Mage::app()->getWebsite($object->getScopeId());
|
162 |
+
|
163 |
+
$this->_importWebsiteId = (int)$website->getId();
|
164 |
+
$this->_importUniqueHash = array();
|
165 |
+
$this->_importErrors = array();
|
166 |
+
$this->_importedRows = 0;
|
167 |
+
|
168 |
+
$io = new Varien_Io_File();
|
169 |
+
$info = pathinfo($csvFile);
|
170 |
+
$io->open(array('path' => $info['dirname']));
|
171 |
+
$io->streamOpen($info['basename'], 'r');
|
172 |
+
|
173 |
+
// check and skip headers
|
174 |
+
$headers = $io->streamReadCsv();
|
175 |
+
if ($headers === false || count($headers) < 5) {
|
176 |
+
$io->streamClose();
|
177 |
+
Mage::throwException(Mage::helper('bpost_shm')->__('Invalid Table Rates File Format'));
|
178 |
+
}
|
179 |
+
if ($object->getData('groups/bpost_clickcollect/fields/condition_name/inherit') == '1') {
|
180 |
+
$conditionName = (string)Mage::getConfig()->getNode('default/carriers/bpost_clickcollect/condition_name');
|
181 |
+
} else {
|
182 |
+
$conditionName = $object->getData('groups/bpost_clickcollect/fields/condition_name/value');
|
183 |
+
}
|
184 |
+
$this->_importConditionName = $conditionName;
|
185 |
+
$adapter = $this->_getWriteAdapter();
|
186 |
+
$adapter->beginTransaction();
|
187 |
+
|
188 |
+
try {
|
189 |
+
$rowNumber = 1;
|
190 |
+
$importData = array();
|
191 |
+
|
192 |
+
$this->_loadDirectoryCountries();
|
193 |
+
$this->_loadDirectoryRegions();
|
194 |
+
|
195 |
+
// delete old data by website and condition name
|
196 |
+
$condition = array(
|
197 |
+
'website_id = ?' => $this->_importWebsiteId,
|
198 |
+
'condition_name = ?' => $this->_importConditionName
|
199 |
+
);
|
200 |
+
$adapter->delete($this->getMainTable(), $condition);
|
201 |
+
|
202 |
+
while (false !== ($csvLine = $io->streamReadCsv())) {
|
203 |
+
$rowNumber ++;
|
204 |
+
|
205 |
+
if (empty($csvLine)) {
|
206 |
+
continue;
|
207 |
+
}
|
208 |
+
|
209 |
+
$row = $this->_getImportRow($csvLine, $rowNumber);
|
210 |
+
if ($row !== false) {
|
211 |
+
$importData[] = $row;
|
212 |
+
}
|
213 |
+
|
214 |
+
if (count($importData) == 5000) {
|
215 |
+
$this->_saveImportData($importData);
|
216 |
+
$importData = array();
|
217 |
+
}
|
218 |
+
}
|
219 |
+
$this->_saveImportData($importData);
|
220 |
+
$io->streamClose();
|
221 |
+
} catch (Mage_Core_Exception $e) {
|
222 |
+
$adapter->rollback();
|
223 |
+
$io->streamClose();
|
224 |
+
Mage::throwException($e->getMessage());
|
225 |
+
} catch (Exception $e) {
|
226 |
+
$adapter->rollback();
|
227 |
+
$io->streamClose();
|
228 |
+
Mage::helper('bpost_shm')->log($e,Zend_Log::ERR);
|
229 |
+
Mage::throwException(Mage::helper('bpost_shm')->__('An error occurred while importing table rates.'));
|
230 |
+
}
|
231 |
+
|
232 |
+
$adapter->commit();
|
233 |
+
|
234 |
+
if ($this->_importErrors) {
|
235 |
+
$error = Mage::helper('bpost_shm')->__('File has not been imported. See the following list of errors: %s', implode(" \n", $this->_importErrors));
|
236 |
+
Mage::throwException($error);
|
237 |
+
}
|
238 |
+
|
239 |
+
return $this;
|
240 |
+
}
|
241 |
+
|
242 |
+
/**
|
243 |
+
* Load directory countries.
|
244 |
+
*
|
245 |
+
* @return Mage_Shipping_Model_Resource_Carrier_Tablerate
|
246 |
+
*/
|
247 |
+
protected function _loadDirectoryCountries()
|
248 |
+
{
|
249 |
+
if (!is_null($this->_importIso2Countries) && !is_null($this->_importIso3Countries)) {
|
250 |
+
return $this;
|
251 |
+
}
|
252 |
+
|
253 |
+
$this->_importIso2Countries = array();
|
254 |
+
$this->_importIso3Countries = array();
|
255 |
+
|
256 |
+
/** @var $collection Mage_Directory_Model_Resource_Country_Collection */
|
257 |
+
$collection = Mage::getResourceModel('directory/country_collection');
|
258 |
+
foreach ($collection->getData() as $row) {
|
259 |
+
$this->_importIso2Countries[$row['iso2_code']] = $row['country_id'];
|
260 |
+
$this->_importIso3Countries[$row['iso3_code']] = $row['country_id'];
|
261 |
+
}
|
262 |
+
|
263 |
+
return $this;
|
264 |
+
}
|
265 |
+
|
266 |
+
/**
|
267 |
+
* Load directory regions.
|
268 |
+
*
|
269 |
+
* @return Mage_Shipping_Model_Resource_Carrier_Tablerate
|
270 |
+
*/
|
271 |
+
protected function _loadDirectoryRegions()
|
272 |
+
{
|
273 |
+
if (!is_null($this->_importRegions)) {
|
274 |
+
return $this;
|
275 |
+
}
|
276 |
+
|
277 |
+
$this->_importRegions = array();
|
278 |
+
|
279 |
+
/** @var $collection Mage_Directory_Model_Resource_Region_Collection */
|
280 |
+
$collection = Mage::getResourceModel('directory/region_collection');
|
281 |
+
foreach ($collection->getData() as $row) {
|
282 |
+
$this->_importRegions[$row['country_id']][$row['code']] = (int)$row['region_id'];
|
283 |
+
}
|
284 |
+
|
285 |
+
return $this;
|
286 |
+
}
|
287 |
+
|
288 |
+
/**
|
289 |
+
* Return import condition full name by condition name code.
|
290 |
+
*
|
291 |
+
* @param string $conditionName
|
292 |
+
* @return string
|
293 |
+
*/
|
294 |
+
protected function _getConditionFullName($conditionName)
|
295 |
+
{
|
296 |
+
if (!isset($this->_conditionFullNames[$conditionName])) {
|
297 |
+
$name = Mage::getSingleton('shipping/carrier_tablerate')->getCode('condition_name_short', $conditionName);
|
298 |
+
$this->_conditionFullNames[$conditionName] = $name;
|
299 |
+
}
|
300 |
+
return $this->_conditionFullNames[$conditionName];
|
301 |
+
}
|
302 |
+
|
303 |
+
/**
|
304 |
+
* Validate row for import and return table rate array or false.
|
305 |
+
* Error will be add to _importErrors array.
|
306 |
+
*
|
307 |
+
* @param array $row
|
308 |
+
* @param int $rowNumber
|
309 |
+
* @return array|false
|
310 |
+
*/
|
311 |
+
protected function _getImportRow($row, $rowNumber = 0)
|
312 |
+
{
|
313 |
+
// validate row
|
314 |
+
if (count($row) < 5) {
|
315 |
+
$this->_importErrors[] = Mage::helper('bpost_shm')->__('Invalid Table Rates format in the Row #%s', $rowNumber);
|
316 |
+
return false;
|
317 |
+
}
|
318 |
+
|
319 |
+
// strip whitespace from the beginning and end of each row
|
320 |
+
foreach ($row as $k => $v) {
|
321 |
+
$row[$k] = trim($v);
|
322 |
+
}
|
323 |
+
|
324 |
+
// validate country
|
325 |
+
if (isset($this->_importIso2Countries[$row[0]])){
|
326 |
+
$countryId = $this->_importIso2Countries[$row[0]];
|
327 |
+
} elseif (isset($this->_importIso3Countries[$row[0]])) {
|
328 |
+
$countryId = $this->_importIso3Countries[$row[0]];
|
329 |
+
} elseif ($row[0] == '*' || $row[0] == '') {
|
330 |
+
$countryId = '0';
|
331 |
+
} else {
|
332 |
+
$this->_importErrors[] = Mage::helper('bpost_shm')->__('Invalid Country "%s" in the Row #%s.', $row[0], $rowNumber);
|
333 |
+
return false;
|
334 |
+
}
|
335 |
+
|
336 |
+
// validate region
|
337 |
+
if ($countryId != '0' && isset($this->_importRegions[$countryId][$row[1]])) {
|
338 |
+
$regionId = $this->_importRegions[$countryId][$row[1]];
|
339 |
+
} elseif ($row[1] == '*' || $row[1] == '') {
|
340 |
+
$regionId = 0;
|
341 |
+
} else {
|
342 |
+
$this->_importErrors[] = Mage::helper('bpost_shm')->__('Invalid Region/State "%s" in the Row #%s.', $row[1], $rowNumber);
|
343 |
+
return false;
|
344 |
+
}
|
345 |
+
|
346 |
+
// detect zip code
|
347 |
+
if ($row[2] == '*' || $row[2] == '') {
|
348 |
+
$zipCode = '*';
|
349 |
+
} else {
|
350 |
+
$zipCode = $row[2];
|
351 |
+
}
|
352 |
+
|
353 |
+
// validate condition value
|
354 |
+
$value = $this->_parseDecimalValue($row[3]);
|
355 |
+
if ($value === false) {
|
356 |
+
$this->_importErrors[] = Mage::helper('bpost_shm')->__('Invalid %s "%s" in the Row #%s.', $this->_getConditionFullName($this->_importConditionName), $row[3], $rowNumber);
|
357 |
+
return false;
|
358 |
+
}
|
359 |
+
|
360 |
+
// validate price
|
361 |
+
$price = $this->_parseDecimalValue($row[4]);
|
362 |
+
if ($price === false) {
|
363 |
+
$this->_importErrors[] = Mage::helper('bpost_shm')->__('Invalid Shipping Price "%s" in the Row #%s.', $row[4], $rowNumber);
|
364 |
+
return false;
|
365 |
+
}
|
366 |
+
|
367 |
+
// protect from duplicate
|
368 |
+
$hash = sprintf("%s-%d-%s-%F", $countryId, $regionId, $zipCode, $value);
|
369 |
+
if (isset($this->_importUniqueHash[$hash])) {
|
370 |
+
$this->_importErrors[] = Mage::helper('bpost_shm')->__('Duplicate Row #%s (Country "%s", Region/State "%s", Zip "%s" and Value "%s").', $rowNumber, $row[0], $row[1], $zipCode, $value);
|
371 |
+
return false;
|
372 |
+
}
|
373 |
+
$this->_importUniqueHash[$hash] = true;
|
374 |
+
|
375 |
+
return array(
|
376 |
+
$this->_importWebsiteId, // website_id
|
377 |
+
$countryId, // dest_country_id
|
378 |
+
$regionId, // dest_region_id,
|
379 |
+
$zipCode, // dest_zip
|
380 |
+
$this->_importConditionName,// condition_name,
|
381 |
+
$value, // condition_value
|
382 |
+
$price // price
|
383 |
+
);
|
384 |
+
}
|
385 |
+
|
386 |
+
/**
|
387 |
+
* Save all import data.
|
388 |
+
*
|
389 |
+
* @param array $data
|
390 |
+
* @return $this
|
391 |
+
*/
|
392 |
+
protected function _saveImportData(array $data)
|
393 |
+
{
|
394 |
+
if (!empty($data)) {
|
395 |
+
$columns = array('website_id', 'dest_country_id', 'dest_region_id', 'dest_zip',
|
396 |
+
'condition_name', 'condition_value', 'price');
|
397 |
+
$this->_getWriteAdapter()->insertArray($this->getMainTable(), $columns, $data);
|
398 |
+
$this->_importedRows += count($data);
|
399 |
+
}
|
400 |
+
|
401 |
+
return $this;
|
402 |
+
}
|
403 |
+
|
404 |
+
/**
|
405 |
+
* Conversion.
|
406 |
+
*
|
407 |
+
* @param $value
|
408 |
+
* @return bool|float
|
409 |
+
*/
|
410 |
+
protected function _parseDecimalValue($value)
|
411 |
+
{
|
412 |
+
if (!is_numeric($value)) {
|
413 |
+
return false;
|
414 |
+
}
|
415 |
+
$value = (float)sprintf('%.4F', $value);
|
416 |
+
if ($value < 0.0000) {
|
417 |
+
return false;
|
418 |
+
}
|
419 |
+
return $value;
|
420 |
+
}
|
421 |
+
}
|
app/code/community/Bpost/ShM/Model/Resource/Tablerates/Clickcollect/Collection.php
ADDED
@@ -0,0 +1,95 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
class Bpost_ShM_Model_Resource_Tablerates_Clickcollect_Collection extends Mage_Core_Model_Resource_Db_Collection_Abstract
|
3 |
+
{
|
4 |
+
/**
|
5 |
+
* main table name
|
6 |
+
*
|
7 |
+
* @deprecated since 1.4.1.0
|
8 |
+
* @var string
|
9 |
+
*/
|
10 |
+
protected $_shipTable;
|
11 |
+
|
12 |
+
/**
|
13 |
+
* directory/country table name
|
14 |
+
*
|
15 |
+
* @var string
|
16 |
+
*/
|
17 |
+
protected $_countryTable;
|
18 |
+
|
19 |
+
/**
|
20 |
+
* directory/country_region table name
|
21 |
+
*
|
22 |
+
* @var string
|
23 |
+
*/
|
24 |
+
protected $_regionTable;
|
25 |
+
|
26 |
+
/**
|
27 |
+
* Define resource model and item
|
28 |
+
*
|
29 |
+
*/
|
30 |
+
protected function _construct()
|
31 |
+
{
|
32 |
+
$this->_init('bpost_shm/tablerates_clickcollect');
|
33 |
+
$this->_shipTable = $this->getMainTable();
|
34 |
+
$this->_countryTable = $this->getTable('directory/country');
|
35 |
+
$this->_regionTable = $this->getTable('directory/country_region');
|
36 |
+
}
|
37 |
+
|
38 |
+
/**
|
39 |
+
* Initialize select, add country iso3 code and region name
|
40 |
+
*
|
41 |
+
* @return void
|
42 |
+
*/
|
43 |
+
public function _initSelect()
|
44 |
+
{
|
45 |
+
parent::_initSelect();
|
46 |
+
|
47 |
+
$this->_select
|
48 |
+
->joinLeft(
|
49 |
+
array('country_table' => $this->_countryTable),
|
50 |
+
'country_table.country_id = main_table.dest_country_id',
|
51 |
+
array('dest_country' => 'iso3_code'))
|
52 |
+
->joinLeft(
|
53 |
+
array('region_table' => $this->_regionTable),
|
54 |
+
'region_table.region_id = main_table.dest_region_id',
|
55 |
+
array('dest_region' => 'code'));
|
56 |
+
|
57 |
+
$this->addOrder('dest_country', self::SORT_ORDER_ASC);
|
58 |
+
$this->addOrder('dest_region', self::SORT_ORDER_ASC);
|
59 |
+
$this->addOrder('dest_zip', self::SORT_ORDER_ASC);
|
60 |
+
$this->addOrder('condition_value', self::SORT_ORDER_ASC);
|
61 |
+
}
|
62 |
+
|
63 |
+
/**
|
64 |
+
* Add website filter to collection
|
65 |
+
*
|
66 |
+
* @param int $websiteId
|
67 |
+
* @return Mage_Shipping_Model_Resource_Carrier_Tablerate_Collection
|
68 |
+
*/
|
69 |
+
public function setWebsiteFilter($websiteId)
|
70 |
+
{
|
71 |
+
return $this->addFieldToFilter('website_id', $websiteId);
|
72 |
+
}
|
73 |
+
|
74 |
+
/**
|
75 |
+
* Add condition name (code) filter to collection
|
76 |
+
*
|
77 |
+
* @param string $conditionName
|
78 |
+
* @return Mage_Shipping_Model_Resource_Carrier_Tablerate_Collection
|
79 |
+
*/
|
80 |
+
public function setConditionFilter($conditionName)
|
81 |
+
{
|
82 |
+
return $this->addFieldToFilter('condition_name', $conditionName);
|
83 |
+
}
|
84 |
+
|
85 |
+
/**
|
86 |
+
* Add country filter to collection
|
87 |
+
*
|
88 |
+
* @param string $countryId
|
89 |
+
* @return Mage_Shipping_Model_Resource_Carrier_Tablerate_Collection
|
90 |
+
*/
|
91 |
+
public function setCountryFilter($countryId)
|
92 |
+
{
|
93 |
+
return $this->addFieldToFilter('dest_country_id', $countryId);
|
94 |
+
}
|
95 |
+
}
|
app/code/community/Bpost/ShM/Model/Shipping/Carrier/BpostShM.php
CHANGED
@@ -35,6 +35,7 @@ class Bpost_ShM_Model_Shipping_Carrier_BpostShM extends Mage_Shipping_Model_Carr
|
|
35 |
$checkoutSession = Mage::getSingleton('checkout/session');
|
36 |
|
37 |
$ratePriceByMethod = array();
|
|
|
38 |
|
39 |
foreach ($this->getAllowedMethods() as $shippingMethodCode => $shippingMethodName) {
|
40 |
if (!$this->getBpostConfigData('active', $shippingMethodCode) || !$this->checkAvailableBpostShipCountries($request, $shippingMethodCode)) {
|
@@ -134,7 +135,7 @@ class Bpost_ShM_Model_Shipping_Carrier_BpostShM extends Mage_Shipping_Model_Carr
|
|
134 |
$ratePriceByMethod[$this->_code . "_" . $shippingMethodCode] = $price;
|
135 |
|
136 |
if ((bool)$saturdayDelivery &&
|
137 |
-
(bool)Mage::helper("bpost_shm/system_config")->getBpostShippingConfig("display_delivery_date") &&
|
138 |
!(bool)$checkoutSession->getQuote()->getData("bpost_disable_saturday_delivery")
|
139 |
) {
|
140 |
$price = $price + $saturdayDeliveryCost;
|
@@ -149,7 +150,7 @@ class Bpost_ShM_Model_Shipping_Carrier_BpostShM extends Mage_Shipping_Model_Carr
|
|
149 |
$result->append($method);
|
150 |
}
|
151 |
|
152 |
-
if ($disabledShippingMethods ==
|
153 |
return false;
|
154 |
}
|
155 |
|
@@ -190,7 +191,8 @@ class Bpost_ShM_Model_Shipping_Carrier_BpostShM extends Mage_Shipping_Model_Carr
|
|
190 |
'bpost_homedelivery' => Mage::getStoreConfig('carriers/bpost_homedelivery/name', $this->getStore()),
|
191 |
'bpost_international' => Mage::getStoreConfig('carriers/bpost_international/name', $this->getStore()),
|
192 |
'bpost_parcellocker' => Mage::getStoreConfig('carriers/bpost_parcellocker/name', $this->getStore()),
|
193 |
-
'bpost_pickuppoint' => Mage::getStoreConfig('carriers/bpost_pickuppoint/name', $this->getStore())
|
|
|
194 |
);
|
195 |
|
196 |
return $allowedMethods;
|
@@ -309,7 +311,8 @@ class Bpost_ShM_Model_Shipping_Carrier_BpostShM extends Mage_Shipping_Model_Carr
|
|
309 |
//we check on national shipping country Belgium
|
310 |
if (($shippingMethodCode === "bpost_homedelivery" ||
|
311 |
$shippingMethodCode === "bpost_parcellocker" ||
|
312 |
-
$shippingMethodCode === "bpost_pickuppoint"
|
|
|
313 |
$countryId != "BE"
|
314 |
) {
|
315 |
return false;
|
35 |
$checkoutSession = Mage::getSingleton('checkout/session');
|
36 |
|
37 |
$ratePriceByMethod = array();
|
38 |
+
$totalAallowedShippingMethods = count($this->getAllowedMethods());
|
39 |
|
40 |
foreach ($this->getAllowedMethods() as $shippingMethodCode => $shippingMethodName) {
|
41 |
if (!$this->getBpostConfigData('active', $shippingMethodCode) || !$this->checkAvailableBpostShipCountries($request, $shippingMethodCode)) {
|
135 |
$ratePriceByMethod[$this->_code . "_" . $shippingMethodCode] = $price;
|
136 |
|
137 |
if ((bool)$saturdayDelivery &&
|
138 |
+
(bool)Mage::helper("bpost_shm/system_config")->getBpostShippingConfig("display_delivery_date", Mage::app()->getStore()->getId()) &&
|
139 |
!(bool)$checkoutSession->getQuote()->getData("bpost_disable_saturday_delivery")
|
140 |
) {
|
141 |
$price = $price + $saturdayDeliveryCost;
|
150 |
$result->append($method);
|
151 |
}
|
152 |
|
153 |
+
if ($disabledShippingMethods == $totalAallowedShippingMethods) {
|
154 |
return false;
|
155 |
}
|
156 |
|
191 |
'bpost_homedelivery' => Mage::getStoreConfig('carriers/bpost_homedelivery/name', $this->getStore()),
|
192 |
'bpost_international' => Mage::getStoreConfig('carriers/bpost_international/name', $this->getStore()),
|
193 |
'bpost_parcellocker' => Mage::getStoreConfig('carriers/bpost_parcellocker/name', $this->getStore()),
|
194 |
+
'bpost_pickuppoint' => Mage::getStoreConfig('carriers/bpost_pickuppoint/name', $this->getStore()),
|
195 |
+
'bpost_clickcollect' => Mage::getStoreConfig('carriers/bpost_clickcollect/name', $this->getStore())
|
196 |
);
|
197 |
|
198 |
return $allowedMethods;
|
311 |
//we check on national shipping country Belgium
|
312 |
if (($shippingMethodCode === "bpost_homedelivery" ||
|
313 |
$shippingMethodCode === "bpost_parcellocker" ||
|
314 |
+
$shippingMethodCode === "bpost_pickuppoint" ||
|
315 |
+
$shippingMethodCode === "bpost_clickcollect") &&
|
316 |
$countryId != "BE"
|
317 |
) {
|
318 |
return false;
|
app/code/community/Bpost/ShM/Model/Shipping/Geocode.php
CHANGED
@@ -30,7 +30,7 @@ class Bpost_ShM_Model_Shipping_Geocode
|
|
30 |
public function callGoogleMaps($gMapsAddress, $latitude = false, $longitude = false)
|
31 |
{
|
32 |
$configHelper = Mage::helper("bpost_shm/system_config");
|
33 |
-
$key = $configHelper->getBpostShippingConfig("server_api_key");
|
34 |
|
35 |
if($gMapsAddress) {
|
36 |
$this->_addressLine = $gMapsAddress;
|
30 |
public function callGoogleMaps($gMapsAddress, $latitude = false, $longitude = false)
|
31 |
{
|
32 |
$configHelper = Mage::helper("bpost_shm/system_config");
|
33 |
+
$key = $configHelper->getBpostShippingConfig("server_api_key", Mage::app()->getStore()->getId());
|
34 |
|
35 |
if($gMapsAddress) {
|
36 |
$this->_addressLine = $gMapsAddress;
|
app/code/community/Bpost/ShM/Model/Tablerates/Clickcollect.php
ADDED
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
class Bpost_ShM_Model_Tablerates_Clickcollect extends Mage_Core_Model_Abstract{
|
3 |
+
|
4 |
+
protected function _construct()
|
5 |
+
{
|
6 |
+
$this->_init('bpost_shm/tablerates_clickcollect');
|
7 |
+
}
|
8 |
+
|
9 |
+
}
|
app/code/community/Bpost/ShM/controllers/Adminhtml/Bpost/ShM/AllOrdersController.php
CHANGED
@@ -35,7 +35,7 @@ class Bpost_ShM_Adminhtml_Bpost_ShM_AllOrdersController extends Bpost_ShM_Contro
|
|
35 |
return false;
|
36 |
}
|
37 |
|
38 |
-
return Mage::getSingleton('admin/session')->isAllowed('sales/bpost_all_orders');
|
39 |
}
|
40 |
|
41 |
|
35 |
return false;
|
36 |
}
|
37 |
|
38 |
+
return Mage::getSingleton('admin/session')->isAllowed('sales/bpost_orders/bpost_all_orders');
|
39 |
}
|
40 |
|
41 |
|
app/code/community/Bpost/ShM/controllers/Adminhtml/Bpost/ShM/ConfigController.php
CHANGED
@@ -148,6 +148,6 @@ class Bpost_ShM_Adminhtml_Bpost_ShM_ConfigController extends Mage_Adminhtml_Cont
|
|
148 |
*/
|
149 |
protected function _isAllowed()
|
150 |
{
|
151 |
-
return Mage::getSingleton('admin/session')->isAllowed('system/
|
152 |
}
|
153 |
}
|
148 |
*/
|
149 |
protected function _isAllowed()
|
150 |
{
|
151 |
+
return Mage::getSingleton('admin/session')->isAllowed('system/config/bpost_shm');
|
152 |
}
|
153 |
}
|
app/code/community/Bpost/ShM/controllers/Adminhtml/Bpost/ShM/DownloadController.php
CHANGED
@@ -110,6 +110,6 @@ class Bpost_ShM_Adminhtml_Bpost_ShM_DownloadController extends Mage_Adminhtml_Co
|
|
110 |
*/
|
111 |
protected function _isAllowed()
|
112 |
{
|
113 |
-
return Mage::getSingleton('admin/session')->isAllowed('sales/bpost_download_labels');
|
114 |
}
|
115 |
}
|
110 |
*/
|
111 |
protected function _isAllowed()
|
112 |
{
|
113 |
+
return Mage::getSingleton('admin/session')->isAllowed('sales/bpost_orders/bpost_download_labels');
|
114 |
}
|
115 |
}
|
app/code/community/Bpost/ShM/controllers/Adminhtml/Bpost/ShM/PendingOrdersController.php
CHANGED
@@ -35,7 +35,7 @@ class Bpost_ShM_Adminhtml_Bpost_ShM_PendingOrdersController extends Bpost_ShM_Co
|
|
35 |
return false;
|
36 |
}
|
37 |
|
38 |
-
return Mage::getSingleton('admin/session')->isAllowed('sales/bpost_pending_orders');
|
39 |
}
|
40 |
}
|
41 |
|
35 |
return false;
|
36 |
}
|
37 |
|
38 |
+
return Mage::getSingleton('admin/session')->isAllowed('sales/bpost_orders/bpost_pending_orders');
|
39 |
}
|
40 |
}
|
41 |
|
app/code/community/Bpost/ShM/controllers/AjaxController.php
CHANGED
@@ -40,7 +40,6 @@ class Bpost_ShM_AjaxController extends Mage_Core_Controller_Front_Action {
|
|
40 |
$poiList = "";
|
41 |
$error[] = Mage::helper('bpost_shm')->__("Sorry, there was a problem contacting bpost, please contact the store owner for support.");
|
42 |
}
|
43 |
-
|
44 |
$payloadFull = array("error" => $error, "poilist" => $poiList, "coordinates" => $coordinates);
|
45 |
$this->getResponse()->setHeader('Content-type', 'application/json');
|
46 |
$this->getResponse()->setBody(json_encode($payloadFull));
|
@@ -58,7 +57,7 @@ class Bpost_ShM_AjaxController extends Mage_Core_Controller_Front_Action {
|
|
58 |
$error = array();
|
59 |
$params = $request->getParams();
|
60 |
|
61 |
-
$id = isset($params["id"])
|
62 |
$type = isset($params["type"]) && is_numeric($params["type"]) ? $params["type"] : false;
|
63 |
$spots = isset($params["spots"]) ? json_decode($params["spots"]) : false;
|
64 |
|
40 |
$poiList = "";
|
41 |
$error[] = Mage::helper('bpost_shm')->__("Sorry, there was a problem contacting bpost, please contact the store owner for support.");
|
42 |
}
|
|
|
43 |
$payloadFull = array("error" => $error, "poilist" => $poiList, "coordinates" => $coordinates);
|
44 |
$this->getResponse()->setHeader('Content-type', 'application/json');
|
45 |
$this->getResponse()->setBody(json_encode($payloadFull));
|
57 |
$error = array();
|
58 |
$params = $request->getParams();
|
59 |
|
60 |
+
$id = isset($params["id"]) ? $params["id"] : false;
|
61 |
$type = isset($params["type"]) && is_numeric($params["type"]) ? $params["type"] : false;
|
62 |
$spots = isset($params["spots"]) ? json_decode($params["spots"]) : false;
|
63 |
|
app/code/community/Bpost/ShM/etc/config.xml
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
<config>
|
3 |
<modules>
|
4 |
<Bpost_ShM>
|
5 |
-
<version>1.1.
|
6 |
</Bpost_ShM>
|
7 |
</modules>
|
8 |
<global>
|
@@ -35,6 +35,10 @@
|
|
35 |
<table>bpost_tablerates_parcellocker</table>
|
36 |
</bpost_tablerates_parcellocker>
|
37 |
|
|
|
|
|
|
|
|
|
38 |
<returnlabel>
|
39 |
<table>bpost_shipping_returnlabel</table>
|
40 |
</returnlabel>
|
@@ -157,41 +161,41 @@
|
|
157 |
</observers>
|
158 |
</controller_action_predispatch_onestepcheckout_index_index>
|
159 |
|
160 |
-
<
|
161 |
<observers>
|
162 |
<bpost_shm_controller_action_predispatch_checkout_onepage_savebilling>
|
163 |
<class>bpost_shm/observer</class>
|
164 |
<method>controller_action_predispatch_checkout_onepage_saveAddress</method>
|
165 |
</bpost_shm_controller_action_predispatch_checkout_onepage_savebilling>
|
166 |
</observers>
|
167 |
-
</
|
168 |
|
169 |
-
<
|
170 |
<observers>
|
171 |
<bpost_shm_controller_action_predispatch_checkout_onepage_saveshipping>
|
172 |
<class>bpost_shm/observer</class>
|
173 |
<method>controller_action_predispatch_checkout_onepage_saveAddress</method>
|
174 |
</bpost_shm_controller_action_predispatch_checkout_onepage_saveshipping>
|
175 |
</observers>
|
176 |
-
</
|
177 |
|
178 |
-
<
|
179 |
<observers>
|
180 |
<bpost_shm_controller_action_postdispatch_checkout_onepage_savebilling>
|
181 |
<class>bpost_shm/observer</class>
|
182 |
<method>controller_action_postdispatch_checkout_onepage_saveAddress</method>
|
183 |
</bpost_shm_controller_action_postdispatch_checkout_onepage_savebilling>
|
184 |
</observers>
|
185 |
-
</
|
186 |
|
187 |
-
<
|
188 |
<observers>
|
189 |
<bpost_shm_controller_action_postdispatch_checkout_onepage_saveshipping>
|
190 |
<class>bpost_shm/observer</class>
|
191 |
<method>controller_action_postdispatch_checkout_onepage_saveAddress</method>
|
192 |
</bpost_shm_controller_action_postdispatch_checkout_onepage_saveshipping>
|
193 |
</observers>
|
194 |
-
</
|
195 |
|
196 |
<controller_action_postdispatch_onestepcheckout_ajax_save_billing>
|
197 |
<observers>
|
@@ -361,6 +365,19 @@
|
|
361 |
<saturday_delivery>0</saturday_delivery>
|
362 |
<specificerrmsg>Bpost parcel locker is currently unavailable. If you would like to ship using this shipping method, please contact us.</specificerrmsg>
|
363 |
</bpost_parcellocker>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
364 |
</carriers>
|
365 |
<shipping>
|
366 |
<bpost_shm>
|
2 |
<config>
|
3 |
<modules>
|
4 |
<Bpost_ShM>
|
5 |
+
<version>1.1.3</version>
|
6 |
</Bpost_ShM>
|
7 |
</modules>
|
8 |
<global>
|
35 |
<table>bpost_tablerates_parcellocker</table>
|
36 |
</bpost_tablerates_parcellocker>
|
37 |
|
38 |
+
<bpost_tablerates_clickcollect>
|
39 |
+
<table>bpost_tablerates_clickcollect</table>
|
40 |
+
</bpost_tablerates_clickcollect>
|
41 |
+
|
42 |
<returnlabel>
|
43 |
<table>bpost_shipping_returnlabel</table>
|
44 |
</returnlabel>
|
161 |
</observers>
|
162 |
</controller_action_predispatch_onestepcheckout_index_index>
|
163 |
|
164 |
+
<controller_action_predispatch_checkout_onepage_saveBilling>
|
165 |
<observers>
|
166 |
<bpost_shm_controller_action_predispatch_checkout_onepage_savebilling>
|
167 |
<class>bpost_shm/observer</class>
|
168 |
<method>controller_action_predispatch_checkout_onepage_saveAddress</method>
|
169 |
</bpost_shm_controller_action_predispatch_checkout_onepage_savebilling>
|
170 |
</observers>
|
171 |
+
</controller_action_predispatch_checkout_onepage_saveBilling>
|
172 |
|
173 |
+
<controller_action_predispatch_checkout_onepage_saveShipping>
|
174 |
<observers>
|
175 |
<bpost_shm_controller_action_predispatch_checkout_onepage_saveshipping>
|
176 |
<class>bpost_shm/observer</class>
|
177 |
<method>controller_action_predispatch_checkout_onepage_saveAddress</method>
|
178 |
</bpost_shm_controller_action_predispatch_checkout_onepage_saveshipping>
|
179 |
</observers>
|
180 |
+
</controller_action_predispatch_checkout_onepage_saveShipping>
|
181 |
|
182 |
+
<controller_action_postdispatch_checkout_onepage_saveBilling>
|
183 |
<observers>
|
184 |
<bpost_shm_controller_action_postdispatch_checkout_onepage_savebilling>
|
185 |
<class>bpost_shm/observer</class>
|
186 |
<method>controller_action_postdispatch_checkout_onepage_saveAddress</method>
|
187 |
</bpost_shm_controller_action_postdispatch_checkout_onepage_savebilling>
|
188 |
</observers>
|
189 |
+
</controller_action_postdispatch_checkout_onepage_saveBilling>
|
190 |
|
191 |
+
<controller_action_postdispatch_checkout_onepage_saveShipping>
|
192 |
<observers>
|
193 |
<bpost_shm_controller_action_postdispatch_checkout_onepage_saveshipping>
|
194 |
<class>bpost_shm/observer</class>
|
195 |
<method>controller_action_postdispatch_checkout_onepage_saveAddress</method>
|
196 |
</bpost_shm_controller_action_postdispatch_checkout_onepage_saveshipping>
|
197 |
</observers>
|
198 |
+
</controller_action_postdispatch_checkout_onepage_saveShipping>
|
199 |
|
200 |
<controller_action_postdispatch_onestepcheckout_ajax_save_billing>
|
201 |
<observers>
|
365 |
<saturday_delivery>0</saturday_delivery>
|
366 |
<specificerrmsg>Bpost parcel locker is currently unavailable. If you would like to ship using this shipping method, please contact us.</specificerrmsg>
|
367 |
</bpost_parcellocker>
|
368 |
+
<bpost_clickcollect>
|
369 |
+
<activated>0</activated>
|
370 |
+
<active>0</active>
|
371 |
+
<title>bpost</title>
|
372 |
+
<name><![CDATA[Click & Collect]]></name>
|
373 |
+
<rate_type>0</rate_type>
|
374 |
+
<flat_rate_price>0</flat_rate_price>
|
375 |
+
<showmethod>1</showmethod>
|
376 |
+
<insurance>0</insurance>
|
377 |
+
<sort_order>20</sort_order>
|
378 |
+
<saturday_delivery>0</saturday_delivery>
|
379 |
+
<specificerrmsg><![CDATA[Bpost Click & Collect is currently unavailable. If you would like to ship using this shipping method, please contact the web merchant.]]></specificerrmsg>
|
380 |
+
</bpost_clickcollect>
|
381 |
</carriers>
|
382 |
<shipping>
|
383 |
<bpost_shm>
|
app/code/community/Bpost/ShM/etc/system.xml
CHANGED
@@ -1173,6 +1173,275 @@
|
|
1173 |
</saturday_delivery_from>
|
1174 |
</fields>
|
1175 |
</bpost_parcellocker>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1176 |
</groups>
|
1177 |
</carriers>
|
1178 |
</sections>
|
1173 |
</saturday_delivery_from>
|
1174 |
</fields>
|
1175 |
</bpost_parcellocker>
|
1176 |
+
<bpost_clickcollect translate="label" module="bpost_shm">
|
1177 |
+
<label><![CDATA[bpost Click & Collect]]></label>
|
1178 |
+
<frontend_type>text</frontend_type>
|
1179 |
+
<sort_order>90</sort_order>
|
1180 |
+
<show_in_default>1</show_in_default>
|
1181 |
+
<show_in_website>1</show_in_website>
|
1182 |
+
<show_in_store>1</show_in_store>
|
1183 |
+
<fields>
|
1184 |
+
<logo translate="label">
|
1185 |
+
<label>Logo</label>
|
1186 |
+
<frontend_type>text</frontend_type>
|
1187 |
+
<frontend_model>bpost_shm/adminhtml_system_config_form_field_logo</frontend_model>
|
1188 |
+
<sort_order>0</sort_order>
|
1189 |
+
<show_in_default>1</show_in_default>
|
1190 |
+
<show_in_website>1</show_in_website>
|
1191 |
+
<show_in_store>1</show_in_store>
|
1192 |
+
</logo>
|
1193 |
+
|
1194 |
+
<clickcollect_info>
|
1195 |
+
<label>clickcollectinfo</label>
|
1196 |
+
<frontend_type>text</frontend_type>
|
1197 |
+
<frontend_model>bpost_shm/adminhtml_system_config_form_field_clickcollect</frontend_model>
|
1198 |
+
<sort_order>1</sort_order>
|
1199 |
+
<show_in_default>1</show_in_default>
|
1200 |
+
<show_in_website>1</show_in_website>
|
1201 |
+
<show_in_store>1</show_in_store>
|
1202 |
+
<depends>
|
1203 |
+
<activated>0</activated>
|
1204 |
+
</depends>
|
1205 |
+
</clickcollect_info>
|
1206 |
+
|
1207 |
+
<clickcollect_cache_info>
|
1208 |
+
<label>clickcollectcacheinfo</label>
|
1209 |
+
<frontend_type>text</frontend_type>
|
1210 |
+
<frontend_model>bpost_shm/adminhtml_system_config_form_field_cacheinfo</frontend_model>
|
1211 |
+
<sort_order>1</sort_order>
|
1212 |
+
<show_in_default>1</show_in_default>
|
1213 |
+
<show_in_website>1</show_in_website>
|
1214 |
+
<show_in_store>1</show_in_store>
|
1215 |
+
<depends>
|
1216 |
+
<activated>1</activated>
|
1217 |
+
</depends>
|
1218 |
+
</clickcollect_cache_info>
|
1219 |
+
|
1220 |
+
<subheader_general translate="label">
|
1221 |
+
<label>General</label>
|
1222 |
+
<frontend_type>text</frontend_type>
|
1223 |
+
<frontend_model>bpost_shm/adminhtml_system_config_form_field_subheader</frontend_model>
|
1224 |
+
<sort_order>5</sort_order>
|
1225 |
+
<show_in_default>1</show_in_default>
|
1226 |
+
<show_in_website>1</show_in_website>
|
1227 |
+
<show_in_store>1</show_in_store>
|
1228 |
+
<depends>
|
1229 |
+
<activated>1</activated>
|
1230 |
+
</depends>
|
1231 |
+
</subheader_general>
|
1232 |
+
|
1233 |
+
<active translate="label,comment">
|
1234 |
+
<label>Enabled</label>
|
1235 |
+
<frontend_type>select</frontend_type>
|
1236 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
1237 |
+
<sort_order>10</sort_order>
|
1238 |
+
<show_in_default>1</show_in_default>
|
1239 |
+
<show_in_website>1</show_in_website>
|
1240 |
+
<show_in_store>1</show_in_store>
|
1241 |
+
<comment><![CDATA[]]></comment>
|
1242 |
+
<depends>
|
1243 |
+
<activated>1</activated>
|
1244 |
+
</depends>
|
1245 |
+
</active>
|
1246 |
+
|
1247 |
+
<marker translate="label,comment">
|
1248 |
+
<label>Logo</label>
|
1249 |
+
<frontend_type>image</frontend_type>
|
1250 |
+
<backend_model>adminhtml/system_config_backend_image</backend_model>
|
1251 |
+
<upload_dir config="system/filesystem/media" scope_info="1">bpost</upload_dir>
|
1252 |
+
<base_url type="media" scope_info="1">bpost</base_url>
|
1253 |
+
<sort_order>11</sort_order>
|
1254 |
+
<show_in_default>1</show_in_default>
|
1255 |
+
<show_in_website>1</show_in_website>
|
1256 |
+
<show_in_store>1</show_in_store>
|
1257 |
+
<depends>
|
1258 |
+
<activated>1</activated>
|
1259 |
+
</depends>
|
1260 |
+
<comment><![CDATA[Upload a custom map marker (18x18 px)]]></comment>
|
1261 |
+
</marker>
|
1262 |
+
|
1263 |
+
<subheader_rates translate="label">
|
1264 |
+
<label>Rates</label>
|
1265 |
+
<frontend_type>text</frontend_type>
|
1266 |
+
<frontend_model>bpost_shm/adminhtml_system_config_form_field_subheader</frontend_model>
|
1267 |
+
<sort_order>15</sort_order>
|
1268 |
+
<show_in_default>1</show_in_default>
|
1269 |
+
<show_in_website>1</show_in_website>
|
1270 |
+
<show_in_store>1</show_in_store>
|
1271 |
+
<depends>
|
1272 |
+
<activated>1</activated>
|
1273 |
+
</depends>
|
1274 |
+
</subheader_rates>
|
1275 |
+
|
1276 |
+
<free_shipping translate="label,comment">
|
1277 |
+
<label>Free shipping</label>
|
1278 |
+
<frontend_type>select</frontend_type>
|
1279 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
1280 |
+
<sort_order>20</sort_order>
|
1281 |
+
<show_in_default>1</show_in_default>
|
1282 |
+
<show_in_website>1</show_in_website>
|
1283 |
+
<show_in_store>1</show_in_store>
|
1284 |
+
<depends>
|
1285 |
+
<activated>1</activated>
|
1286 |
+
</depends>
|
1287 |
+
<comment><![CDATA[Allow free shipping]]></comment>
|
1288 |
+
</free_shipping>
|
1289 |
+
|
1290 |
+
<free_shipping_from translate="label,comment">
|
1291 |
+
<label>.. as of</label>
|
1292 |
+
<frontend_type>text</frontend_type>
|
1293 |
+
<sort_order>30</sort_order>
|
1294 |
+
<depends>
|
1295 |
+
<free_shipping>1</free_shipping>
|
1296 |
+
<activated>1</activated>
|
1297 |
+
</depends>
|
1298 |
+
<show_in_default>1</show_in_default>
|
1299 |
+
<show_in_website>1</show_in_website>
|
1300 |
+
<show_in_store>1</show_in_store>
|
1301 |
+
<comment><![CDATA[Free shipping will be applied as from a minimum amount]]></comment>
|
1302 |
+
</free_shipping_from>
|
1303 |
+
|
1304 |
+
<rate_type translate="label,comment,tooltip">
|
1305 |
+
<label>Rate type</label>
|
1306 |
+
<frontend_type>select</frontend_type>
|
1307 |
+
<source_model>bpost_shm/system_config_source_ratetypes</source_model>
|
1308 |
+
<sort_order>40</sort_order>
|
1309 |
+
<show_in_default>1</show_in_default>
|
1310 |
+
<show_in_website>1</show_in_website>
|
1311 |
+
<show_in_store>1</show_in_store>
|
1312 |
+
<depends>
|
1313 |
+
<activated>1</activated>
|
1314 |
+
</depends>
|
1315 |
+
<comment><![CDATA[Choose your rate type (Flat rate or Table rate)]]></comment>
|
1316 |
+
<tooltip>Importing and exporting table rates only possible on website scope. View the documentation for more information.</tooltip>
|
1317 |
+
</rate_type>
|
1318 |
+
|
1319 |
+
<flat_rate_price translate="label,comment">
|
1320 |
+
<label>Flat rate price</label>
|
1321 |
+
<frontend_type>text</frontend_type>
|
1322 |
+
<sort_order>50</sort_order>
|
1323 |
+
<depends>
|
1324 |
+
<rate_type>0</rate_type>
|
1325 |
+
<activated>1</activated>
|
1326 |
+
</depends>
|
1327 |
+
<show_in_default>1</show_in_default>
|
1328 |
+
<show_in_website>1</show_in_website>
|
1329 |
+
<show_in_store>1</show_in_store>
|
1330 |
+
<comment><![CDATA[Fixed fee for bpost Click & Collect shipments, e.g.: 4.95.]]></comment>
|
1331 |
+
</flat_rate_price>
|
1332 |
+
|
1333 |
+
<condition_name translate="label">
|
1334 |
+
<label>Table rates condition</label>
|
1335 |
+
<frontend_type>select</frontend_type>
|
1336 |
+
<source_model>adminhtml/system_config_source_shipping_tablerate</source_model>
|
1337 |
+
<sort_order>60</sort_order>
|
1338 |
+
<depends>
|
1339 |
+
<rate_type>1</rate_type>
|
1340 |
+
<activated>1</activated>
|
1341 |
+
</depends>
|
1342 |
+
<show_in_default>1</show_in_default>
|
1343 |
+
<show_in_website>1</show_in_website>
|
1344 |
+
<show_in_store>0</show_in_store>
|
1345 |
+
</condition_name>
|
1346 |
+
|
1347 |
+
<export translate="label,comment">
|
1348 |
+
<label>Export table rates file</label>
|
1349 |
+
<frontend_type>button</frontend_type>
|
1350 |
+
<frontend_model>bpost_shm/adminhtml_system_config_form_tablerates_export_clickcollect</frontend_model>
|
1351 |
+
<sort_order>70</sort_order>
|
1352 |
+
<depends>
|
1353 |
+
<rate_type>1</rate_type>
|
1354 |
+
<activated>1</activated>
|
1355 |
+
</depends>
|
1356 |
+
<show_in_default>0</show_in_default>
|
1357 |
+
<show_in_website>1</show_in_website>
|
1358 |
+
<show_in_store>0</show_in_store>
|
1359 |
+
<comment><![CDATA[Export your table rates configuration here.]]></comment>
|
1360 |
+
</export>
|
1361 |
+
|
1362 |
+
<import_clickcollect translate="label,comment">
|
1363 |
+
<label>Import table rates file</label>
|
1364 |
+
<frontend_type>import</frontend_type>
|
1365 |
+
<sort_order>80</sort_order>
|
1366 |
+
<backend_model>bpost_shm/adminhtml_system_config_backend_shipping_tablerates_clickcollect</backend_model>
|
1367 |
+
<depends>
|
1368 |
+
<rate_type>1</rate_type>
|
1369 |
+
<activated>1</activated>
|
1370 |
+
</depends>
|
1371 |
+
<show_in_default>0</show_in_default>
|
1372 |
+
<show_in_website>1</show_in_website>
|
1373 |
+
<show_in_store>0</show_in_store>
|
1374 |
+
<comment><![CDATA[Upload your table rates configuration here. Refer to the manual for more information.]]></comment>
|
1375 |
+
</import_clickcollect>
|
1376 |
+
|
1377 |
+
<subheader_options translate="label">
|
1378 |
+
<label>Options</label>
|
1379 |
+
<frontend_type>text</frontend_type>
|
1380 |
+
<frontend_model>bpost_shm/adminhtml_system_config_form_field_subheader</frontend_model>
|
1381 |
+
<sort_order>85</sort_order>
|
1382 |
+
<show_in_default>1</show_in_default>
|
1383 |
+
<show_in_website>1</show_in_website>
|
1384 |
+
<show_in_store>1</show_in_store>
|
1385 |
+
<depends>
|
1386 |
+
<activated>1</activated>
|
1387 |
+
</depends>
|
1388 |
+
</subheader_options>
|
1389 |
+
|
1390 |
+
<insurance translate="label,comment">
|
1391 |
+
<label>Insurance</label>
|
1392 |
+
<frontend_type>select</frontend_type>
|
1393 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
1394 |
+
<sort_order>90</sort_order>
|
1395 |
+
<show_in_default>1</show_in_default>
|
1396 |
+
<show_in_website>1</show_in_website>
|
1397 |
+
<show_in_store>1</show_in_store>
|
1398 |
+
<depends>
|
1399 |
+
<activated>1</activated>
|
1400 |
+
</depends>
|
1401 |
+
<comment><![CDATA[Insurance to insure your goods to a maximum of 500,00 euro.]]></comment>
|
1402 |
+
</insurance>
|
1403 |
+
|
1404 |
+
<insurance_from translate="label">
|
1405 |
+
<label>.. as from</label>
|
1406 |
+
<frontend_type>text</frontend_type>
|
1407 |
+
<sort_order>100</sort_order>
|
1408 |
+
<depends>
|
1409 |
+
<insurance>1</insurance>
|
1410 |
+
<activated>1</activated>
|
1411 |
+
</depends>
|
1412 |
+
<show_in_default>1</show_in_default>
|
1413 |
+
<show_in_website>1</show_in_website>
|
1414 |
+
<show_in_store>1</show_in_store>
|
1415 |
+
</insurance_from>
|
1416 |
+
|
1417 |
+
<saturday_delivery translate="label,comment">
|
1418 |
+
<label>Saturday delivery</label>
|
1419 |
+
<frontend_type>select</frontend_type>
|
1420 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
1421 |
+
<sort_order>110</sort_order>
|
1422 |
+
<show_in_default>1</show_in_default>
|
1423 |
+
<show_in_website>1</show_in_website>
|
1424 |
+
<show_in_store>1</show_in_store>
|
1425 |
+
<comment><![CDATA[The parcel is delivered on Saturday if it is timely dropped in the bpost network.]]></comment>
|
1426 |
+
<depends>
|
1427 |
+
<activated>1</activated>
|
1428 |
+
</depends>
|
1429 |
+
</saturday_delivery>
|
1430 |
+
|
1431 |
+
<saturday_delivery_from translate="label">
|
1432 |
+
<label>.. as from</label>
|
1433 |
+
<frontend_type>text</frontend_type>
|
1434 |
+
<sort_order>120</sort_order>
|
1435 |
+
<depends>
|
1436 |
+
<saturday_delivery>1</saturday_delivery>
|
1437 |
+
<activated>1</activated>
|
1438 |
+
</depends>
|
1439 |
+
<show_in_default>1</show_in_default>
|
1440 |
+
<show_in_website>1</show_in_website>
|
1441 |
+
<show_in_store>1</show_in_store>
|
1442 |
+
</saturday_delivery_from>
|
1443 |
+
</fields>
|
1444 |
+
</bpost_clickcollect>
|
1445 |
</groups>
|
1446 |
</carriers>
|
1447 |
</sections>
|
app/code/community/Bpost/ShM/sql/bpost_shm_setup/upgrade-0.1.8-1.1.3.php
ADDED
@@ -0,0 +1,27 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Created by PHPro
|
4 |
+
*
|
5 |
+
* @package Bpost
|
6 |
+
* @subpackage ShM
|
7 |
+
* @category Checkout
|
8 |
+
* @author PHPro (info@phpro.be)
|
9 |
+
*/
|
10 |
+
if (!Mage::helper('core')->isModuleEnabled('Bpost_ShippingManager')) {
|
11 |
+
$installer = $this;
|
12 |
+
$installer->startSetup();
|
13 |
+
$installer->run("CREATE TABLE IF NOT EXISTS {$installer->getTable('bpost_tablerates_clickcollect')} (
|
14 |
+
`pk` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Primary key',
|
15 |
+
`website_id` int(11) NOT NULL DEFAULT '0' COMMENT 'Website Id',
|
16 |
+
`dest_country_id` varchar(4) NOT NULL DEFAULT '0' COMMENT 'Destination coutry ISO/2 or ISO/3 code',
|
17 |
+
`dest_region_id` int(11) NOT NULL DEFAULT '0' COMMENT 'Destination Region Id',
|
18 |
+
`dest_zip` varchar(10) NOT NULL DEFAULT '*' COMMENT 'Destination Post Code (Zip)',
|
19 |
+
`condition_name` varchar(20) NOT NULL COMMENT 'Rate Condition name',
|
20 |
+
`condition_value` decimal(12,4) NOT NULL DEFAULT '0.0000' COMMENT 'Rate condition value',
|
21 |
+
`price` decimal(12,4) NOT NULL DEFAULT '0.0000' COMMENT 'Price',
|
22 |
+
`cost` decimal(12,4) NOT NULL DEFAULT '0.0000' COMMENT 'Cost',
|
23 |
+
PRIMARY KEY (`pk`),
|
24 |
+
UNIQUE KEY `QIMuM8yoQUkmjsNM6FmJFjBrOZHNJAEu8kP` (`website_id`,`dest_country_id`,`dest_region_id`,`dest_zip`,`condition_name`,`condition_value`)
|
25 |
+
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Bpost ClickCollect Tablerate'");
|
26 |
+
$installer->endSetup();
|
27 |
+
}
|
app/design/frontend/base/default/template/bpost/shm/append_bpost_shippingmethod.phtml
CHANGED
@@ -14,11 +14,13 @@
|
|
14 |
|
15 |
<?php if($this->getCurrentShippingMethod() == "bpostshm_bpost_pickuppoint"){ ?>
|
16 |
<a href="#" id="selectPickupPoint" type="3"><?php echo $settings['select_text'] ?></a>
|
|
|
|
|
17 |
<?php }else{ ?>
|
18 |
<a href="#" id="selectPickupPoint" type="4"><?php echo $settings['select_text_parcel_locker'] ?></a>
|
19 |
<?php } ?>
|
20 |
|
21 |
-
<input id="bpost-id" type="hidden" name="bpost[id]" class="validate-bpostspot validate-parcel"/>
|
22 |
<input type="hidden" name="bpost[street]"/>
|
23 |
<input type="hidden" name="bpost[city]"/>
|
24 |
<input type="hidden" name="bpost[postcode]"/>
|
@@ -78,6 +80,15 @@
|
|
78 |
}
|
79 |
});
|
80 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
81 |
Validation.add('validate-parcel', "<?php echo Mage::helper('bpost_shm')->__('Please select a bpost parcel locker'); ?>", function (v) {
|
82 |
if($('s_method_bpostshm_bpost_parcellocker')) {
|
83 |
return !($('s_method_bpostshm_bpost_parcellocker').checked && Validation.get('IsEmpty').test(v))
|
14 |
|
15 |
<?php if($this->getCurrentShippingMethod() == "bpostshm_bpost_pickuppoint"){ ?>
|
16 |
<a href="#" id="selectPickupPoint" type="3"><?php echo $settings['select_text'] ?></a>
|
17 |
+
<?php }elseif($this->getCurrentShippingMethod() == "bpostshm_bpost_clickcollect"){ ?>
|
18 |
+
<a href="#" id="selectPickupPoint" type="8"><?php echo $settings['select_text_clickcollect'] ?></a>
|
19 |
<?php }else{ ?>
|
20 |
<a href="#" id="selectPickupPoint" type="4"><?php echo $settings['select_text_parcel_locker'] ?></a>
|
21 |
<?php } ?>
|
22 |
|
23 |
+
<input id="bpost-id" type="hidden" name="bpost[id]" class="validate-bpostspot validate-parcel validate-clickcollect"/>
|
24 |
<input type="hidden" name="bpost[street]"/>
|
25 |
<input type="hidden" name="bpost[city]"/>
|
26 |
<input type="hidden" name="bpost[postcode]"/>
|
80 |
}
|
81 |
});
|
82 |
|
83 |
+
Validation.add('validate-clickcollect', "<?php echo Mage::helper('bpost_shm')->__('Please select a bpost Click & Collect point'); ?>", function (v) {
|
84 |
+
if($('s_method_bpostshm_bpost_clickcollect')) {
|
85 |
+
return !($('s_method_bpostshm_bpost_clickcollect').checked && Validation.get('IsEmpty').test(v))
|
86 |
+
}
|
87 |
+
else{
|
88 |
+
return true;
|
89 |
+
}
|
90 |
+
});
|
91 |
+
|
92 |
Validation.add('validate-parcel', "<?php echo Mage::helper('bpost_shm')->__('Please select a bpost parcel locker'); ?>", function (v) {
|
93 |
if($('s_method_bpostshm_bpost_parcellocker')) {
|
94 |
return !($('s_method_bpostshm_bpost_parcellocker').checked && Validation.get('IsEmpty').test(v))
|
app/locale/en_US/Bpost_ShM.csv
CHANGED
@@ -218,4 +218,21 @@
|
|
218 |
"Your return has been generated and is available under -bpost Return labels- in this order.","Your return has been generated and is available under -bpost Return labels- in this order."
|
219 |
"Your selected order is not ready to be shipped or has already been shipped","Your selected order is not ready to be shipped or has already been shipped"
|
220 |
"Zip/Postal Code","Zip/Postal Code"
|
221 |
-
"Your address could not be determined, please return to the shipping address step to correct it.","Your address could not be determined, please correct your shipping address."
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
218 |
"Your return has been generated and is available under -bpost Return labels- in this order.","Your return has been generated and is available under -bpost Return labels- in this order."
|
219 |
"Your selected order is not ready to be shipped or has already been shipped","Your selected order is not ready to be shipped or has already been shipped"
|
220 |
"Zip/Postal Code","Zip/Postal Code"
|
221 |
+
"Your address could not be determined, please return to the shipping address step to correct it.","Your address could not be determined, please correct your shipping address."
|
222 |
+
"bpost Click & Collect","bpost Click & Collect"
|
223 |
+
"You would like to deliver your parcel in your own stores?","You would like to deliver your parcel in your own stores?"
|
224 |
+
"Click & Collect is the most convenient option for you.","Click & Collect is the most convenient option for you."
|
225 |
+
"Please find more information on %s.","Please find more information on %s."
|
226 |
+
"The delivery method Click & Collect is not activated by default on your contract.","The delivery method Click & Collect is not activated by default on your contract."
|
227 |
+
"Please request an activation of the service in order to use it on your website.","Please request an activation of the service in order to use it on your website."
|
228 |
+
"Fixed fee for bpost Click & Collect shipments, e.g.: 4.95.","Fixed fee for bpost Click & Collect shipments, e.g.: 4.95."
|
229 |
+
"Click here to choose a bpost Click & Collect point.","Click here to choose a bpost Click & Collect point."
|
230 |
+
"Click here to change the bpost Click & Collect point.","Click here to change the bpost Click & Collect point."
|
231 |
+
"Bpost Click & Collect is currently unavailable. If you would like to ship using this shipping method, please the web merchant.","Bpost Click & Collect is currently unavailable. If you would like to ship using this shipping method, please contact the web merchant."
|
232 |
+
"No Click & Collect location order data found.","No Click & Collect location order data found."
|
233 |
+
"Please select a bpost Click & Collect point","Please select a bpost Click & Collect point"
|
234 |
+
"Upload a custom map marker","Upload a custom map marker"
|
235 |
+
"Please note that the Click & Collect points are updated once a day.","Please note that the Click & Collect points are updated once a day."
|
236 |
+
"If you have added or removed Click & Collect points in Shipping Manager, be aware that it will take up to 24h to be operational in the bpost Magento plugin.","If you have added or removed Click & Collect points in Shipping Manager, be aware that it will take up to 24h to be operational in the bpost Magento plugin."
|
237 |
+
"If the points don’t appear after 24h, make sure to have cleared the Magento cache.","If the points don’t appear after 24h, make sure to have cleared the Magento cache."
|
238 |
+
|
app/locale/fr_FR/Bpost_ShM.csv
CHANGED
@@ -236,4 +236,20 @@
|
|
236 |
"By using this option, customers with reduced mobility can use the lockers of the machine easiest to reach.","En utilisant la zone à mobilité réduite, les clients peuvent accèder au distributeur de paquets les plus accessibles."
|
237 |
"This order did not (yet) generate labels which automatically returned return label barcodes. This feature might not be actived. Please refer to the documentation and your Shipping Settings under 'System > Configuration > Sales' for more information.","Pour cette commande, il n'y a pas (encore) d' étiquettes avec des étiquettes de retour automatiques. Il est possible que cette fonctionalité n'est pas activée. Veuillez consulter la documentation et votre configuration d'envoi sous 'System > Configuration > Sales' pour plus d'informations."
|
238 |
"The Bpost shipping method ""%s"" is not available because your postal code is not correct. For your country the format should be like ""%s"". Please correct the postal code in your shipping address.","La méthode de livraison ""%s"" de bpost n'est pas disponible parce que votre code postal n'est pas correct. Pour le pays de destination que vous avez choisi, le format doit être comme ""%s"". Veuillez corriger le code postal dans votre adresse d'envoi."
|
239 |
-
"Your address could not be determined, please return to the shipping address step to correct it.","Votre adresse n'existe pas, veuillez corriger votre adresse de livraison."
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
236 |
"By using this option, customers with reduced mobility can use the lockers of the machine easiest to reach.","En utilisant la zone à mobilité réduite, les clients peuvent accèder au distributeur de paquets les plus accessibles."
|
237 |
"This order did not (yet) generate labels which automatically returned return label barcodes. This feature might not be actived. Please refer to the documentation and your Shipping Settings under 'System > Configuration > Sales' for more information.","Pour cette commande, il n'y a pas (encore) d' étiquettes avec des étiquettes de retour automatiques. Il est possible que cette fonctionalité n'est pas activée. Veuillez consulter la documentation et votre configuration d'envoi sous 'System > Configuration > Sales' pour plus d'informations."
|
238 |
"The Bpost shipping method ""%s"" is not available because your postal code is not correct. For your country the format should be like ""%s"". Please correct the postal code in your shipping address.","La méthode de livraison ""%s"" de bpost n'est pas disponible parce que votre code postal n'est pas correct. Pour le pays de destination que vous avez choisi, le format doit être comme ""%s"". Veuillez corriger le code postal dans votre adresse d'envoi."
|
239 |
+
"Your address could not be determined, please return to the shipping address step to correct it.","Votre adresse n'existe pas, veuillez corriger votre adresse de livraison."
|
240 |
+
"bpost Click & Collect","bpost Click & Collect"
|
241 |
+
"You would like to deliver your parcel in your own stores?","Vous désirez livrer vos paquets dans vos propres magasins?"
|
242 |
+
"Click & Collect is the most convenient option for you.","La livraison "Click & Collect" est faite pour vous!"
|
243 |
+
"Please find more information on %s.","Vous trouverez plus d'informations sur %s."
|
244 |
+
"The delivery method Click & Collect is not activated by default on your contract.","La méthode de livraison \"Click & Collect\" n'est pas activée par défaut dans votre contrat."
|
245 |
+
"Please request an activation of the service in order to use it on your website.","Veuillez demander son activation afin de pouvoir l'utiliser sur votre siteweb."
|
246 |
+
"Fixed fee for bpost Click & Collect shipments, e.g.: 4.95.","Tarif fixe pour les envois Click&Collect, ex: 4,95."
|
247 |
+
"Click here to choose a bpost Click & Collect point.","Cliquez ici pour choisir votre point de livraison Click & Collect."
|
248 |
+
"Click here to change the bpost Click & Collect point.","Cliquez ici pour changer de point de livraison Click & Collect."
|
249 |
+
"No Click & Collect location order data found.","Les données de ce point de livraison Click & Collect n'ont pas été trouvées."
|
250 |
+
"Bpost Click & Collect is currently unavailable. If you would like to ship using this shipping method, please contact the web merchant.","bpost Click & Collect n'est pas encore disponible. Si vous désirez utiliser cette méthode de livraison, merci de contacter le marchand du webshop."
|
251 |
+
"Please select a bpost Click & Collect point","Veuillez sélectionner un point de livraison Click & Collect"
|
252 |
+
"Upload a custom map marker","Ajouter un marqueur de carte personnalisée"
|
253 |
+
"Please note that the Click & Collect points are updated once a day.","Veuillez noter que les points de livraisons Click & Collect sont mis à jour de manière journalière."
|
254 |
+
"If you have added or removed Click & Collect points in Shipping Manager, be aware that it will take up to 24h to be operational in the bpost Magento plugin.","Dès lors, si vous avez ajouté ou supprimé des points Click & Collect dans votre Shipping Manager, cela prendra jusqu’à 24h afin d’être opérationnel dans le plugin bpost de Magento."
|
255 |
+
"If the points don’t appear after 24h, make sure to have cleared the Magento cache.","Si les points n’apparaissent pas après 24h, assurez-vous d’avoir vidé le cache de Magento."
|
app/locale/nl_NL/Bpost_ShM.csv
CHANGED
@@ -238,4 +238,20 @@
|
|
238 |
"Zip/Postal Code","Postcode"
|
239 |
"This order did not (yet) generate labels which automatically returned return label barcodes. This feature might not be actived. Please refer to the documentation and your Shipping Settings under 'System > Configuration > Sales' for more information.","Voor dit order zijn (nog) geen etiketten met automatische retouretiketten gegenereerd. Deze functionaliteit is mogelijk niet geactiveerd. Zie documentatie en Shipping Settings onder 'System > Configuration > Sales' voor meer informatie."
|
240 |
"The Bpost shipping method ""%s"" is not available because your postal code is not correct. For your country the format should be like ""%s"". Please correct the postal code in your shipping address.","De bpost leveringsmethode ""%s"" is niet beschikbaar omdat de ingegeven postcode niet correct is. Het postcodeformaat van het door u gekozen land is ""%s"". Gelieve de postcode in uw verzendadres te corrigeren."
|
241 |
-
"Your address could not be determined, please return to the shipping address step to correct it.","Het opgegeven adres kon niet verwerkt worden, gelieve uw leveringsadres te corrigeren."
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
238 |
"Zip/Postal Code","Postcode"
|
239 |
"This order did not (yet) generate labels which automatically returned return label barcodes. This feature might not be actived. Please refer to the documentation and your Shipping Settings under 'System > Configuration > Sales' for more information.","Voor dit order zijn (nog) geen etiketten met automatische retouretiketten gegenereerd. Deze functionaliteit is mogelijk niet geactiveerd. Zie documentatie en Shipping Settings onder 'System > Configuration > Sales' voor meer informatie."
|
240 |
"The Bpost shipping method ""%s"" is not available because your postal code is not correct. For your country the format should be like ""%s"". Please correct the postal code in your shipping address.","De bpost leveringsmethode ""%s"" is niet beschikbaar omdat de ingegeven postcode niet correct is. Het postcodeformaat van het door u gekozen land is ""%s"". Gelieve de postcode in uw verzendadres te corrigeren."
|
241 |
+
"Your address could not be determined, please return to the shipping address step to correct it.","Het opgegeven adres kon niet verwerkt worden, gelieve uw leveringsadres te corrigeren."
|
242 |
+
"bpost Click & Collect","bpost Click & Collect"
|
243 |
+
"You would like to deliver your parcel in your own stores?","Indien u uw pakketten in uw eigen winkel wil laten leveren,"
|
244 |
+
"Click & Collect is the most convenient option for you."," is "Click & Collect" dé oplossing voor u!"
|
245 |
+
"Please find more information on %s.","Meer informatie hierover vindt u op %s."
|
246 |
+
"The delivery method Click & Collect is not activated by default on your contract.","De leveringsmethode Click & Collect is niet standaard geactiveerd in uw contract."
|
247 |
+
"Please request an activation of the service in order to use it on your website.","Gelieve de activatie van deze methode te vragen indien u deze wenst te gebruiken op uw site."
|
248 |
+
"Fixed fee for bpost Click & Collect shipments, e.g.: 4.95.","Vast bedrag voor Click & Collect zendingen, bv. 4,95."
|
249 |
+
"Click here to choose a bpost Click & Collect point.","Klik hier om uw Click & Collect afleverpunt te kiezen."
|
250 |
+
"Click here to change the bpost Click & Collect point.","Klik hier om uw Click & Collect afleverpunt te wijzigen."
|
251 |
+
"No Click & Collect location order data found.","De gegevens voor dit Click & Collect leveringspunt bevinden zich niet in het systeem."
|
252 |
+
"Bpost Click & Collect is currently unavailable. If you would like to ship using this shipping method, please contact the web merchent.","bpost Click & Collect is niet beschikbaar. Gelieve de webwinkelier te contacteren indien u van deze leveringsmethode gebruik wenst te maken."
|
253 |
+
"Please select a bpost Click & Collect point","Gelieve een Click & Collect afleverpunt te selecteren"
|
254 |
+
"Upload a custom map marker","Upload een gepersonaliseerde map marker"
|
255 |
+
"Please note that the Click & Collect points are updated once a day.","De Click & Collect afhaalpunten worden elke dag geüpdatet."
|
256 |
+
"If you have added or removed Click & Collect points in Shipping Manager, be aware that it will take up to 24h to be operational in the bpost Magento plugin.","Als u een Click & Collect punt toevoegt of verwijdert in uw Shipping Manager, duurt het 24u vooraleer dit operationeel wordt in uw bpost plugin voor Magento."
|
257 |
+
"If the points don’t appear after 24h, make sure to have cleared the Magento cache.","Als u deze afhaalpunten niet ziet verschijnen na 24u, verzeker u er dan van dat u de Magento cache hebt geleegd."
|
js/bpost/shm/checkout.js
CHANGED
@@ -47,6 +47,21 @@ Bpost.ShM = Class.create({
|
|
47 |
origin: new google.maps.Point(0, 0),
|
48 |
anchor: new google.maps.Point(24, 36)
|
49 |
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
50 |
this.mapOptions = {
|
51 |
zoom: 13,
|
52 |
panControl: false,
|
@@ -95,7 +110,9 @@ Bpost.ShM = Class.create({
|
|
95 |
}
|
96 |
|
97 |
//init map if bpost carrier is selected
|
98 |
-
if(currentShippingMethod == carrier+"_bpost_parcellocker"
|
|
|
|
|
99 |
this.container.down('label[for="s_method_'+currentShippingMethod+'"]').insert({'after': $("bpostShm")});
|
100 |
activeOption = "s_method_"+currentShippingMethod;
|
101 |
$('selectPickupPoint').style.display = 'inline';
|
@@ -253,7 +270,10 @@ Bpost.ShM = Class.create({
|
|
253 |
rePosition: function (target){
|
254 |
activeOption = target.id;
|
255 |
|
256 |
-
if(activeOption == "s_method_"+carrier+"_bpost_parcellocker"
|
|
|
|
|
|
|
257 |
//hide notifications window
|
258 |
$("notifications-pick-up-point").style.display = "none";
|
259 |
$("notifications-parcel-locker").style.display = "none";
|
@@ -270,7 +290,11 @@ Bpost.ShM = Class.create({
|
|
270 |
selectPickupPointElement.innerHTML = this.settings.select_text_parcel_locker;
|
271 |
//we set point type to 4
|
272 |
selectPickupPointElement.setAttribute("type", "4");
|
273 |
-
}else{
|
|
|
|
|
|
|
|
|
274 |
selectPickupPointElement.innerHTML = this.settings.select_text;
|
275 |
//we set point type to 3
|
276 |
selectPickupPointElement.setAttribute("type", "3");
|
@@ -295,7 +319,10 @@ Bpost.ShM = Class.create({
|
|
295 |
if(target.id == 's_method_'+carrier+'_bpost_homedelivery') {
|
296 |
$(target).up().insert({'after': $("bpostDelivery")});
|
297 |
$("bpostDelivery").style.display = 'block';
|
298 |
-
} else if(target.id == 's_method_'+carrier+'_bpost_parcellocker'
|
|
|
|
|
|
|
299 |
if(this.selectedspot !== false) {
|
300 |
$(target).up().insert({'after': $("bpostDelivery")});
|
301 |
$("bpostDelivery").style.display = 'block';
|
@@ -369,7 +396,10 @@ Bpost.ShM = Class.create({
|
|
369 |
if(this.settings.datepicker_display) {
|
370 |
var currMethod = activeOption.replace('s_method_'+carrier+'_', '');
|
371 |
|
372 |
-
if(currMethod == 'bpost_homedelivery' ||
|
|
|
|
|
|
|
373 |
this.showDates(target);
|
374 |
this.placeDates(this.settings.datepicker_days, currMethod);
|
375 |
}
|
@@ -409,9 +439,13 @@ Bpost.ShM = Class.create({
|
|
409 |
onSuccess: function (transport) {
|
410 |
var json = transport.responseText.evalJSON(true);
|
411 |
if (json.error.length == 0) {
|
412 |
-
//this method only applies to the pick-up points
|
413 |
-
|
414 |
-
|
|
|
|
|
|
|
|
|
415 |
|
416 |
} else {
|
417 |
alert(json.error);
|
@@ -491,7 +525,7 @@ Bpost.ShM = Class.create({
|
|
491 |
this.selectedspot = json.Id;
|
492 |
|
493 |
// create notification html
|
494 |
-
if(activeOption == "s_method_"+carrier+"_bpost_pickuppoint"){
|
495 |
$("notifications-pick-up-point").style.display = "block";
|
496 |
$("pickup-point-notification-email").checked = true;
|
497 |
$("pickup-point-notification-sms").checked = false;
|
@@ -527,7 +561,11 @@ Bpost.ShM = Class.create({
|
|
527 |
$("selectPickupPoint").setAttribute("type", 3)
|
528 |
$("selectPickupPoint").update(this.settings.change_text);
|
529 |
|
530 |
-
}else{
|
|
|
|
|
|
|
|
|
531 |
//change link text
|
532 |
$("selectPickupPoint").setAttribute("type", 4)
|
533 |
$("selectPickupPoint").update(this.settings.change_text_parcel_locker);
|
@@ -632,7 +670,6 @@ Bpost.ShM = Class.create({
|
|
632 |
parameters['id'] = id;
|
633 |
parameters['type'] = type;
|
634 |
parameters['spots'] = spots;
|
635 |
-
|
636 |
new Ajax.Request(this.settings.base_url + 'bpost/ajax/gethours', {
|
637 |
method: 'post',
|
638 |
parameters: parameters,
|
@@ -773,7 +810,8 @@ Bpost.ShM = Class.create({
|
|
773 |
1 : this.imageOpenPostOffice,
|
774 |
2 : this.imageOpenPostPoint,
|
775 |
3 : this.imageOpenPostOffice, //bpost should never return 3
|
776 |
-
4 : this.imageOpenParcelLocker
|
|
|
777 |
}
|
778 |
|
779 |
//google maps marker
|
@@ -796,7 +834,7 @@ Bpost.ShM = Class.create({
|
|
796 |
$$('ul.list').first().insert("<li class='shoplistitem' id='" + this.json.poilist.Poi[i].Record.Id + "'>" + "<span class='title'>" + this.json.poilist.Poi[i].Record.Name + "</span>" + "<span class='address'>" + this.json.poilist.Poi[i].Record.Street + " " + this.json.poilist.Poi[i].Record.Number + "</span>" + "<span class='city'>" + this.json.poilist.Poi[i].Record.Zip + " " + this.json.poilist.Poi[i].Record.City + "</span><a href='#' data-shopid='" + this.json.poilist.Poi[i].Record.Id + "' class='selectspot' >" + this.settings.label_select + " »</a></li>");
|
797 |
}
|
798 |
var pointType = $("selectPickupPoint").getAttribute("type");
|
799 |
-
if(spots.length > 0 && pointType == 3) {
|
800 |
spots = JSON.stringify(spots);
|
801 |
this.generateHours(false, false, true, spots);
|
802 |
}
|
47 |
origin: new google.maps.Point(0, 0),
|
48 |
anchor: new google.maps.Point(24, 36)
|
49 |
};
|
50 |
+
if(this.settings.location_clickcollect_custom_image){
|
51 |
+
this.imageOpenClickCollect = {
|
52 |
+
url: this.settings.location_clickcollect_custom_image,
|
53 |
+
size: new google.maps.Size(24, 24),
|
54 |
+
origin: new google.maps.Point(0, 0),
|
55 |
+
anchor: new google.maps.Point(24, 36)
|
56 |
+
};
|
57 |
+
}else{
|
58 |
+
this.imageOpenClickCollect = {
|
59 |
+
url: this.settings.location_clickcollect_default_image,
|
60 |
+
size: new google.maps.Size(24, 24),
|
61 |
+
origin: new google.maps.Point(0, 0),
|
62 |
+
anchor: new google.maps.Point(24, 36)
|
63 |
+
};
|
64 |
+
}
|
65 |
this.mapOptions = {
|
66 |
zoom: 13,
|
67 |
panControl: false,
|
110 |
}
|
111 |
|
112 |
//init map if bpost carrier is selected
|
113 |
+
if(currentShippingMethod == carrier+"_bpost_parcellocker"
|
114 |
+
|| currentShippingMethod == carrier+"_bpost_pickuppoint"
|
115 |
+
|| currentShippingMethod == carrier+"_bpost_clickcollect"){
|
116 |
this.container.down('label[for="s_method_'+currentShippingMethod+'"]').insert({'after': $("bpostShm")});
|
117 |
activeOption = "s_method_"+currentShippingMethod;
|
118 |
$('selectPickupPoint').style.display = 'inline';
|
270 |
rePosition: function (target){
|
271 |
activeOption = target.id;
|
272 |
|
273 |
+
if(activeOption == "s_method_"+carrier+"_bpost_parcellocker"
|
274 |
+
|| activeOption == "s_method_"+carrier+"_bpost_pickuppoint"
|
275 |
+
|| activeOption == "s_method_"+carrier+"_bpost_clickcollect"
|
276 |
+
){
|
277 |
//hide notifications window
|
278 |
$("notifications-pick-up-point").style.display = "none";
|
279 |
$("notifications-parcel-locker").style.display = "none";
|
290 |
selectPickupPointElement.innerHTML = this.settings.select_text_parcel_locker;
|
291 |
//we set point type to 4
|
292 |
selectPickupPointElement.setAttribute("type", "4");
|
293 |
+
}else if(activeOption == "s_method_"+carrier+"_bpost_clickcollect"){
|
294 |
+
$("selectPickupPoint").setAttribute("type", 8)
|
295 |
+
$("selectPickupPoint").update(this.settings.select_text_clickcollect);
|
296 |
+
}
|
297 |
+
else{
|
298 |
selectPickupPointElement.innerHTML = this.settings.select_text;
|
299 |
//we set point type to 3
|
300 |
selectPickupPointElement.setAttribute("type", "3");
|
319 |
if(target.id == 's_method_'+carrier+'_bpost_homedelivery') {
|
320 |
$(target).up().insert({'after': $("bpostDelivery")});
|
321 |
$("bpostDelivery").style.display = 'block';
|
322 |
+
} else if(target.id == 's_method_'+carrier+'_bpost_parcellocker'
|
323 |
+
|| target.id == 's_method_'+carrier+'_bpost_pickuppoint'
|
324 |
+
|| target.id == 's_method_'+carrier+'_bpost_clickcollect'
|
325 |
+
) {
|
326 |
if(this.selectedspot !== false) {
|
327 |
$(target).up().insert({'after': $("bpostDelivery")});
|
328 |
$("bpostDelivery").style.display = 'block';
|
396 |
if(this.settings.datepicker_display) {
|
397 |
var currMethod = activeOption.replace('s_method_'+carrier+'_', '');
|
398 |
|
399 |
+
if(currMethod == 'bpost_homedelivery' ||
|
400 |
+
currMethod == 'bpost_pickuppoint' ||
|
401 |
+
currMethod == 'bpost_parcellocker' ||
|
402 |
+
currMethod == 'bpost_clickcollect') {
|
403 |
this.showDates(target);
|
404 |
this.placeDates(this.settings.datepicker_days, currMethod);
|
405 |
}
|
439 |
onSuccess: function (transport) {
|
440 |
var json = transport.responseText.evalJSON(true);
|
441 |
if (json.error.length == 0) {
|
442 |
+
//this method only applies to the pick-up points & clickcollect
|
443 |
+
// (nothing else can be closed on saturday)
|
444 |
+
var currMethod = $$('input:checked[type="radio"][name="shipping_method"]').pluck('value');
|
445 |
+
currMethod = currMethod[0].replace('bpostshm_', '');
|
446 |
+
if(currMethod == 'bpost_pickuppoint' || currMethod == 'bpost_clickcollect') {
|
447 |
+
this.placeDates(json.dates, currMethod);
|
448 |
+
}
|
449 |
|
450 |
} else {
|
451 |
alert(json.error);
|
525 |
this.selectedspot = json.Id;
|
526 |
|
527 |
// create notification html
|
528 |
+
if(activeOption == "s_method_"+carrier+"_bpost_pickuppoint" || activeOption == "s_method_"+carrier+"_bpost_clickcollect"){
|
529 |
$("notifications-pick-up-point").style.display = "block";
|
530 |
$("pickup-point-notification-email").checked = true;
|
531 |
$("pickup-point-notification-sms").checked = false;
|
561 |
$("selectPickupPoint").setAttribute("type", 3)
|
562 |
$("selectPickupPoint").update(this.settings.change_text);
|
563 |
|
564 |
+
}else if(activeOption == "s_method_"+carrier+"_bpost_clickcollect"){
|
565 |
+
$("selectPickupPoint").setAttribute("type", 8)
|
566 |
+
$("selectPickupPoint").update(this.settings.change_text_clickcollect);
|
567 |
+
}
|
568 |
+
else{
|
569 |
//change link text
|
570 |
$("selectPickupPoint").setAttribute("type", 4)
|
571 |
$("selectPickupPoint").update(this.settings.change_text_parcel_locker);
|
670 |
parameters['id'] = id;
|
671 |
parameters['type'] = type;
|
672 |
parameters['spots'] = spots;
|
|
|
673 |
new Ajax.Request(this.settings.base_url + 'bpost/ajax/gethours', {
|
674 |
method: 'post',
|
675 |
parameters: parameters,
|
810 |
1 : this.imageOpenPostOffice,
|
811 |
2 : this.imageOpenPostPoint,
|
812 |
3 : this.imageOpenPostOffice, //bpost should never return 3
|
813 |
+
4 : this.imageOpenParcelLocker,
|
814 |
+
8 : this.imageOpenClickCollect
|
815 |
}
|
816 |
|
817 |
//google maps marker
|
834 |
$$('ul.list').first().insert("<li class='shoplistitem' id='" + this.json.poilist.Poi[i].Record.Id + "'>" + "<span class='title'>" + this.json.poilist.Poi[i].Record.Name + "</span>" + "<span class='address'>" + this.json.poilist.Poi[i].Record.Street + " " + this.json.poilist.Poi[i].Record.Number + "</span>" + "<span class='city'>" + this.json.poilist.Poi[i].Record.Zip + " " + this.json.poilist.Poi[i].Record.City + "</span><a href='#' data-shopid='" + this.json.poilist.Poi[i].Record.Id + "' class='selectspot' >" + this.settings.label_select + " »</a></li>");
|
835 |
}
|
836 |
var pointType = $("selectPickupPoint").getAttribute("type");
|
837 |
+
if(spots.length > 0 && (pointType == 3 || pointType == 8)) {
|
838 |
spots = JSON.stringify(spots);
|
839 |
this.generateHours(false, false, true, spots);
|
840 |
}
|
js/bpost/shm/onestepcheckout_shipping.js
CHANGED
@@ -41,6 +41,12 @@ Bpost.ShM.addMethods({
|
|
41 |
$('selectPickupPoint').style.display = 'inline';
|
42 |
}
|
43 |
|
|
|
|
|
|
|
|
|
|
|
|
|
44 |
//init datepicker if bpost carrier is selected
|
45 |
if(currentShippingMethod == carrier+"_bpost_homedelivery" || currentShippingMethod == carrier+"_bpost_international")
|
46 |
{
|
@@ -87,6 +93,21 @@ Bpost.ShM.addMethods({
|
|
87 |
origin: new google.maps.Point(0, 0),
|
88 |
anchor: new google.maps.Point(24, 36)
|
89 |
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
90 |
this.mapOptions = {
|
91 |
zoom: 13,
|
92 |
panControl: false,
|
41 |
$('selectPickupPoint').style.display = 'inline';
|
42 |
}
|
43 |
|
44 |
+
if(currentShippingMethod == carrier+"_bpost_clickcollect"){
|
45 |
+
this.container.down('label[for="s_method_'+carrier+'_bpost_clickcollect"]').insert({'after': $("bpostShm")});
|
46 |
+
activeOption = "s_method_"+carrier+"_bpost_clickcollect";
|
47 |
+
$('selectPickupPoint').style.display = 'inline';
|
48 |
+
}
|
49 |
+
|
50 |
//init datepicker if bpost carrier is selected
|
51 |
if(currentShippingMethod == carrier+"_bpost_homedelivery" || currentShippingMethod == carrier+"_bpost_international")
|
52 |
{
|
93 |
origin: new google.maps.Point(0, 0),
|
94 |
anchor: new google.maps.Point(24, 36)
|
95 |
};
|
96 |
+
if(this.settings.location_clickcollect_custom_image){
|
97 |
+
this.imageOpenClickCollect = {
|
98 |
+
url: this.settings.location_clickcollect_custom_image,
|
99 |
+
size: new google.maps.Size(24, 24),
|
100 |
+
origin: new google.maps.Point(0, 0),
|
101 |
+
anchor: new google.maps.Point(24, 36)
|
102 |
+
};
|
103 |
+
}else{
|
104 |
+
this.imageOpenClickCollect = {
|
105 |
+
url: this.settings.location_clickcollect_default_image,
|
106 |
+
size: new google.maps.Size(24, 24),
|
107 |
+
origin: new google.maps.Point(0, 0),
|
108 |
+
anchor: new google.maps.Point(24, 36)
|
109 |
+
};
|
110 |
+
}
|
111 |
this.mapOptions = {
|
112 |
zoom: 13,
|
113 |
panControl: false,
|
package.xml
CHANGED
@@ -1,18 +1,18 @@
|
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>bpost</name>
|
4 |
-
<version>1.
|
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>bpost shipping manager 2015</summary>
|
10 |
<description>bpost shipping manager By PHPro</description>
|
11 |
-
<notes>
|
12 |
<authors><author><name>PHPro</name><user>heremke</user><email>info@phpro.be</email></author></authors>
|
13 |
-
<date>2016-05-
|
14 |
-
<time>15:
|
15 |
-
<contents><target name="magecommunity"><dir name="Bpost"><dir name="ShM"><dir name="Block"><dir name="Adminhtml"><dir name="Sales"><dir name="AllOrders"><file name="Grid.php" hash="042d1860e8cbed473f36344cc9219bf7"/></dir><file name="AllOrders.php" hash="c9bed128109004f6007a2c51c0b13687"/><dir name="Grid"><dir name="Renderer"><dir name="Dropdate"><file name="Dateformat.php" hash="dc59c761bbc587cf9d9c3b46881cd5a2"/></dir><dir name="Label"><file name="Download.php" hash="6848a41d5eb1bad1e9da43937e279468"/></dir></dir></dir><file name="Grid.php" hash="ae7c83f9baabda1db4627833d1f4f942"/><dir name="Order"><dir name="View"><dir name="Tab"><file name="Returnbarcode.php" hash="d271b69bca3b77dc0a5a624d56628a1d"/><file name="Returnlabels.php" hash="3a281c4942cf722ab58523e9869113eb"/></dir></dir></dir><dir name="PendingOrders"><file name="Grid.php" hash="bcdc263143e9d4c104b6014da45373f6"/></dir><file name="PendingOrders.php" hash="584198acc69c0fad60ac793238ca6c8f"/></dir><dir name="Shipping"><dir name="Carrier"><dir name="Bpost"><dir name="Tablerate"><dir name="Homedelivery"><file name="Grid.php" hash="edc472d70d53b81685e0f861a50cd4fd"/></dir><dir name="International"><file name="Grid.php" hash="c76e5042c0f6ff9ed96d978f45336c2c"/></dir><dir name="Parcellocker"><file name="Grid.php" hash="f5de661468fc82c0b0a51baad560ebb4"/></dir><dir name="Pickuppoint"><file name="Grid.php" hash="23151dff9b96415cd8648429260481c9"/></dir></dir></dir></dir></dir><dir name="System"><dir name="Config"><dir name="Form"><dir name="Api"><dir name="Import"><file name="Countries.php" hash="1f2d94c2ffb8f43d81050b7b9da42a42"/></dir></dir><dir name="Field"><file name="Choose.php" hash="ef813927a3ba26302cd8e4c7c5fb62a8"/><file name="Hour.php" hash="763b955bff596cddf2ceabd4ce85816d"/><file name="Info.php" hash="421631d66f10176e4cca80d30df625eb"/><file name="Logo.php" hash="30d8127ce79649b4cbe228a05fa4205f"/><file name="Subheader.php" hash="1af7b5ce235f4f422ab53e281db3cf6f"/></dir><dir name="Tablerates"><dir name="Export"><file name="Homedelivery.php" hash="beb4c5c59ef77d06a425a31d90893255"/><file name="International.php" hash="7806c48c000e996b707e87e58ac1f166"/><file name="Parcellocker.php" hash="e32815fa7846b08318a87c02a7374990"/><file name="Pickuppoint.php" hash="8cb4911d631d257332ce542db49c3672"/></dir></dir></dir></dir></dir></dir><dir name="Carrier"><file name="Bpost.php" hash="f9ba75037e649e8cf4792bcb0553bf7e"/></dir></dir><dir name="Controller"><dir name="ShM"><file name="Order.php" hash="7ab38959baaf721d9e7fe16bd34e9dab"/></dir></dir><dir name="Helper"><file name="Data.php" hash="1acd713edf8a2f76c715225afa055001"/><file name="Returnlabel.php" hash="e3fb05a9f08577dfe90866669d3f7613"/><dir name="System"><file name="Config.php" hash="393353ca26ef2b398769ecbb59fdcbf9"/></dir></dir><dir name="Model"><dir name="Adminhtml"><file name="Bpostgrid.php" hash="a8728ed9efdb88b5e67be037153c9304"/><file name="Observer.php" hash="f493090c0ec1d53d4b9160c89dc4d0cf"/><dir name="System"><dir name="Config"><dir name="Backend"><dir name="Shipping"><dir name="Tablerates"><file name="Homedelivery.php" hash="26758346e7e09d2b3075cb0613a00b79"/><file name="International.php" hash="c6ba9e8b7e42893a7faf31392e0d647f"/><file name="Parcellocker.php" hash="2fa265b0623de5740b15ea27284a3b47"/><file name="Pickuppoint.php" hash="84ccd80c14f33de89b8164e396ef3241"/></dir></dir></dir><dir name="Source"><file name="Datecomment.php" hash="a67ca74e2f81cbfaec6b7ed0ce8aa9f2"/><file name="Shipping.php" hash="a19f622f5f64ee64c8f8e6667d6d9323"/></dir></dir></dir></dir><dir name="Api"><file name="Abstract.php" hash="4cfff5b324dca9ebfb317e00e21e370a"/><file name="Domcreator.php" hash="9f45d9367589a184cc8c73067c71e46c"/></dir><file name="Api.php" hash="8c6181a0a88f503522d85784233c2380"/><file name="Country.php" hash="7ca2d7fee06b4672ee8679dcc0d437cf"/><file name="Holidays.php" hash="85d3ad2c06516d3bd42d6cf25b6c1c1b"/><file name="Observer.php" hash="bc8f534ee034935ca4ed5a03860b75a9"/><dir name="Resource"><dir name="Country"><file name="Collection.php" hash="173cb7acd05ead3fa4bb29f1a2200188"/></dir><file name="Country.php" hash="3ed62dc4bae568879a781400724e2b31"/><dir name="Holidays"><file name="Collection.php" hash="b39c602b1b6c7802a8e298ccabd3b88d"/></dir><file name="Holidays.php" hash="8410fabf516cce95e6e6a69e52abb6ec"/><dir name="Returnlabel"><file name="Collection.php" hash="d34adb537d24116270238ae1fa377a05"/></dir><file name="Returnlabel.php" hash="419fda598a2630ccc773ce0b0eacbd79"/><dir name="Tablerates"><dir name="Homedelivery"><file name="Collection.php" hash="7a34c249b5015ecda8ad26cbf42c6280"/></dir><file name="Homedelivery.php" hash="a94baf3909962e162813d8003583cc77"/><dir name="International"><file name="Collection.php" hash="6ba99077f1625a8c81990ea3afcb14b8"/></dir><file name="International.php" hash="ca3e45f29f9ef44f00ff41b509e0f0a1"/><dir name="Parcellocker"><file name="Collection.php" hash="9aa78e0bc7d389e93e958472a0fc40b6"/></dir><file name="Parcellocker.php" hash="66bb509267844a48ff5b054c82a47254"/><dir name="Pickuppoint"><file name="Collection.php" hash="1f9db3d5ff7f1a9e9d2eccddf6860513"/></dir><file name="Pickuppoint.php" hash="33e26bc93dcea5aabbee59343043413d"/></dir></dir><file name="Returnlabel.php" hash="169bca5baa7726cd51e2a76e1b9a35a8"/><dir name="Shipping"><dir name="Carrier"><file name="BpostShM.php" hash="55f8f4eb614a8507071d3741e09164d2"/></dir><file name="Geocode.php" hash="e34d79403064a7f1ce73fea4474fa685"/><dir name="Rate"><file name="Result.php" hash="77e9fc98f15441edfdc478fd589e41a8"/></dir></dir><dir name="System"><dir name="Config"><dir name="Source"><file name="Country.php" hash="f49cbe30d05cffb6f516a3df6ddc1b7b"/><file name="Product.php" hash="cb74b0fc8d3f661d0be4ac9f9c5b840d"/><file name="Ratetypes.php" hash="42f1f3f8dc000ea5e5336ca1ad7ab85c"/><file name="Weightunit.php" hash="e0c0a9975395245c4d16d975c0334c31"/></dir></dir></dir><dir name="Tablerates"><file name="Homedelivery.php" hash="d60385de528eb957a2874af6306d4aae"/><file name="International.php" hash="d02e02a7cddbda576530d6acbd6d02e8"/><file name="Parcellocker.php" hash="805a9669f9d024a4c018d611e5c71afd"/><file name="Pickuppoint.php" hash="49dff9f40e26163b8d0c6b8be9f6ee51"/></dir></dir><dir name="controllers"><dir name="Adminhtml"><dir name="Bpost"><dir name="ShM"><file name="AllOrdersController.php" hash="094407f569e3c68b947273d25178b7c3"/><file name="ConfigController.php" hash="48a6c0923f74731a35e945a404c82371"/><file name="DownloadController.php" hash="2ea8c17c69a8611164d954d6f5e8a9a3"/><file name="PendingOrdersController.php" hash="430744f33af2d12a85851e117390748e"/></dir></dir></dir><file name="AjaxController.php" hash="997253df526650401386cc3d0eb30ed6"/></dir><dir name="etc"><file name="adminhtml.xml" hash="cba525a2c3c394cb15c144f887e081cc"/><file name="config.xml" hash="fa5b8954928bb1169a6461b2c70ca95e"/><file name="system.xml" hash="9f0c60aa9c43140ca8a413e290d4d734"/></dir><dir name="sql"><dir name="bpost_shm_setup"><file name="install-0.0.1.php" hash="441ce29ddd9b04c052f03699e8ecc704"/><file name="upgrade-0.0.1-0.0.2.php" hash="7c5bb7a9609d6bec38a927e07eaad066"/><file name="upgrade-0.0.10-0.1.0.php" hash="c1523f2fd829372143c4686376512b37"/><file name="upgrade-0.0.2-0.0.3.php" hash="7e441f96e071efaa42d629815be8379c"/><file name="upgrade-0.0.3-0.0.4.php" hash="e2009ca70b9b268024433be7ac74ba19"/><file name="upgrade-0.0.4-0.0.5.php" hash="a51391f3bf810a5c6ae5c0bdbc5d9603"/><file name="upgrade-0.0.5-0.0.6.php" hash="2d8d624be7f829029b3e9fceb6d6c3b8"/><file name="upgrade-0.0.6-0.0.7.php" hash="82a7a64e3234c8b6e20367fcc80e1049"/><file name="upgrade-0.0.7-0.0.8.php" hash="a3b337a855d92202b5d625269edf4cb8"/><file name="upgrade-0.0.8-0.0.9.php" hash="20a344294274390515a891a89facfcb3"/><file name="upgrade-0.0.9-0.0.10.php" hash="74d06a2bbf41c5c8d9cb7870898a3eb3"/><file name="upgrade-0.1.0-0.1.1.php" hash="ed824736e9cd0f8e98a4dc62c41ecf96"/><file name="upgrade-0.1.1-0.1.2.php" hash="bb7cf544bc07ef2209b82753ac2b950d"/><file name="upgrade-0.1.2-0.1.3.php" hash="04f9ab295e48b018e80da482bdf23132"/><file name="upgrade-0.1.3-0.1.4.php" hash="9e8f6f1e2522917b8efeb379d21cd953"/><file name="upgrade-0.1.4-0.1.5.php" hash="16333b0f3faa92e98d6bb6f75b4273cd"/><file name="upgrade-0.1.5-0.1.6.php" hash="f2f1f169a5ad2fbd0650ffbef3217b08"/><file name="upgrade-0.1.6-0.1.7.php" hash="95eebc7f870fa36c0a0997a06cb47076"/><file name="upgrade-0.1.7-0.1.8.php" hash="56a4bc5320b56309c943a90df00464e8"/></dir></dir></dir></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><dir name="bpost"><file name="shm.xml" hash="8a5ceb93674efcbd6e8063437877d9d5"/></dir></dir><dir name="template"><dir name="bpost"><file name="empty.phtml" hash="45a92398f5adc3dd6dda9527f95ef4d5"/><file name="informationpopup.phtml" hash="42432ed861bb8b5b34a39d879c164979"/><file name="screenshotpopup.phtml" hash="5ad6a05c55ea41e550262ceed28626ae"/><dir name="widget"><dir name="grid"><file name="massaction.phtml" hash="f9b9aa54fe683d66fd535f95afb07dfe"/></dir></dir></dir></dir></dir></dir></dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><dir name="bpost"><file name="shm.xml" hash="7950f7c44cc1b2a10846611251a37501"/></dir></dir><dir name="template"><dir name="bpost"><dir name="shm"><file name="append_bpost_shippingmethod.phtml" hash="6accc6498f212b91c5aa3307c679c72b"/><file name="gmapsapi.phtml" hash="ac4dea1786701a6968a1c771a54e06fd"/></dir></dir></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="zBpost_ShM.xml" hash="791aeaa9ddf185a0b053728b20b06ea0"/></dir></target><target name="magelocale"><dir name="en_US"><file name="Bpost_ShM.csv" hash="9078d2a94a05adc2d5f9ca16dddb1651"/><dir name="template"><dir name="email"><dir name="bpost"><file name="returnlabel.html" hash="fa9b1779caf12fe6e8c85e44899e7e66"/><file name="errorhandling_create_order.html" hash="5458114b6bfee6f66841f4fe19e13675"/></dir></dir></dir></dir><dir name="fr_FR"><file name="Bpost_ShM.csv" hash="4ac44710113c7e3772c0a2a25758781b"/></dir><dir name="nl_NL"><file name="Bpost_ShM.csv" hash="d1e2c15baf9454fd7960ca5559dfb416"/></dir></target><target name="mageweb"><dir name="js"><dir name="bpost"><dir name="shm"><dir name="adminhtml"><file name="informationpopup.js" hash="dd25216084d43f70b7de4beaf1ef23c5"/></dir><file name="checkout.js" hash="a4dc43fed0b8067f0e00b9342643c2da"/><file name="infobox.js" hash="4b42bb1b029f60ecda0ceeabb4726e5d"/><file name="onestepcheckout_shipping.js" hash="317bb85c55e5f4cbd5d8d6448c9785e7"/></dir></dir></dir></target><target name="mageskin"><dir name="frontend"><dir name="base"><dir name="default"><dir name="css"><dir name="bpost"><file name="checkout.css" hash="b085e5c58f8068bbb491eb9b929db40d"/></dir></dir><dir name="images"><dir name="bpost"><file name="ajax-loader-button.gif" hash="cbdad94ec5d22b17d7aae4c6d245069a"/><file name="ajax-loader-wheel.gif" hash="faa74e8c61fc64d5edb11613c7eead2c"/><file name="bpost_logo_RGB72_L.png" hash="ca8a5de3a37cfbbdac7c0fec6e4f9f28"/><file name="bpost_logo_RGB72_M.png" hash="feb4bb3bb7c9c4100612b62cde7037e5"/><file name="bpost_sym_RGB72_S.png" hash="18e774a968be600664d11a9e0691a424"/><file name="btn_close.png" hash="d6ecac0a01a600ef15efc9004ccc9fb7"/><file name="icon-close.png" hash="54d0827f50c1d294c61e88e316e61059"/><file name="icon-info.png" hash="e4de51e3c12327403a9b966aac98a9d6"/><file name="location_parcellocker_default.png" hash="8906b0e09067eab6f31b712d54ecf547"/><file name="location_postoffice_default.png" hash="ea147b38b01449e8a1cff3ebff6b2741"/><file name="location_postpoint_default.png" hash="c53f598daafbec4d042b165d21116719"/><file name=".DS_Store" hash="194577a7e20bdcc7afbb718f502c134c"/></dir></dir><dir name="js"><dir name="bpost"><file name="onestepcheckout.js" hash="a0e4b3df8643ffaa798e679fe20f116c"/></dir></dir></dir></dir></dir><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="css"><dir name="bpost"><file name="informationpopup.css" hash="ce01062469cdb18ba03c76c129912c00"/></dir></dir><dir name="images"><dir name="bpost"><file name="ajax-loader-red.gif" hash="7bf0fa0e5a55c6a7cd122a9bb461006d"/><file name="bpost_logo_RGB72_L.png" hash="ca8a5de3a37cfbbdac7c0fec6e4f9f28"/><file name="bpost_logo_RGB72_M.png" hash="feb4bb3bb7c9c4100612b62cde7037e5"/><file name="btn_close.png" hash="d6ecac0a01a600ef15efc9004ccc9fb7"/><file name="ce-screenshot.png" hash="ff6f4a630cd17efc1abbe8eca6e015a5"/><file name="ee-screenshot.png" hash="ff6f4a630cd17efc1abbe8eca6e015a5"/><file name="pdf_icon.png" hash="95b561422892384337eb2eabb968a558"/></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>
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>bpost</name>
|
4 |
+
<version>1.2.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>bpost shipping manager 2015</summary>
|
10 |
<description>bpost shipping manager By PHPro</description>
|
11 |
+
<notes>Click&Collect implementation and bugfixes</notes>
|
12 |
<authors><author><name>PHPro</name><user>heremke</user><email>info@phpro.be</email></author></authors>
|
13 |
+
<date>2016-05-17</date>
|
14 |
+
<time>15:10:42</time>
|
15 |
+
<contents><target name="magecommunity"><dir name="Bpost"><dir name="ShM"><dir name="Block"><dir name="Adminhtml"><dir name="Sales"><dir name="AllOrders"><file name="Grid.php" hash="042d1860e8cbed473f36344cc9219bf7"/></dir><file name="AllOrders.php" hash="c9bed128109004f6007a2c51c0b13687"/><dir name="Grid"><dir name="Renderer"><dir name="Dropdate"><file name="Dateformat.php" hash="dc59c761bbc587cf9d9c3b46881cd5a2"/></dir><dir name="Label"><file name="Download.php" hash="6848a41d5eb1bad1e9da43937e279468"/></dir></dir></dir><file name="Grid.php" hash="ae7c83f9baabda1db4627833d1f4f942"/><dir name="Order"><dir name="View"><dir name="Tab"><file name="Returnbarcode.php" hash="d271b69bca3b77dc0a5a624d56628a1d"/><file name="Returnlabels.php" hash="3a281c4942cf722ab58523e9869113eb"/></dir></dir></dir><dir name="PendingOrders"><file name="Grid.php" hash="bcdc263143e9d4c104b6014da45373f6"/></dir><file name="PendingOrders.php" hash="584198acc69c0fad60ac793238ca6c8f"/></dir><dir name="Shipping"><dir name="Carrier"><dir name="Bpost"><dir name="Tablerate"><dir name="Clickcollect"><file name="Grid.php" hash="8f4a7990122ab6ccdb079f7fe06e75bb"/></dir><dir name="Homedelivery"><file name="Grid.php" hash="edc472d70d53b81685e0f861a50cd4fd"/></dir><dir name="International"><file name="Grid.php" hash="c76e5042c0f6ff9ed96d978f45336c2c"/></dir><dir name="Parcellocker"><file name="Grid.php" hash="f5de661468fc82c0b0a51baad560ebb4"/></dir><dir name="Pickuppoint"><file name="Grid.php" hash="23151dff9b96415cd8648429260481c9"/></dir></dir></dir></dir></dir><dir name="System"><dir name="Config"><dir name="Form"><dir name="Api"><dir name="Import"><file name="Countries.php" hash="1f2d94c2ffb8f43d81050b7b9da42a42"/></dir></dir><dir name="Field"><file name="Cacheinfo.php" hash="5de9cf047e274154839d2f658c48f9e2"/><file name="Choose.php" hash="ef813927a3ba26302cd8e4c7c5fb62a8"/><file name="Clickcollect.php" hash="b4667cb7e4fe0abcfbc7113f65c859ee"/><file name="Hour.php" hash="763b955bff596cddf2ceabd4ce85816d"/><file name="Info.php" hash="421631d66f10176e4cca80d30df625eb"/><file name="Logo.php" hash="83cc7232c4a0a05b6857aa5e7cd00beb"/><file name="Subheader.php" hash="1b52d6781e07b134c341eae891ac9979"/></dir><dir name="Tablerates"><dir name="Export"><file name="Clickcollect.php" hash="294325998821cba4d98d113c5832d981"/><file name="Homedelivery.php" hash="beb4c5c59ef77d06a425a31d90893255"/><file name="International.php" hash="7806c48c000e996b707e87e58ac1f166"/><file name="Parcellocker.php" hash="e32815fa7846b08318a87c02a7374990"/><file name="Pickuppoint.php" hash="8cb4911d631d257332ce542db49c3672"/></dir></dir></dir></dir></dir></dir><dir name="Carrier"><file name="Bpost.php" hash="31a57fac5a8b4d329c99d25b5b3e0d49"/></dir></dir><dir name="Controller"><dir name="ShM"><file name="Order.php" hash="7ab38959baaf721d9e7fe16bd34e9dab"/></dir></dir><dir name="Helper"><file name="Data.php" hash="bef7d5b51eadc3fd6e91350c8206b073"/><file name="Returnlabel.php" hash="e3fb05a9f08577dfe90866669d3f7613"/><dir name="System"><file name="Config.php" hash="393353ca26ef2b398769ecbb59fdcbf9"/></dir></dir><dir name="Model"><dir name="Adminhtml"><file name="Bpostgrid.php" hash="a8728ed9efdb88b5e67be037153c9304"/><file name="Observer.php" hash="9dc75e175bddf0a49b65e0580ade53a4"/><dir name="System"><dir name="Config"><dir name="Backend"><dir name="Shipping"><dir name="Tablerates"><file name="Clickcollect.php" hash="8247e2d2a93a438f79ea71d91b8c01f2"/><file name="Homedelivery.php" hash="26758346e7e09d2b3075cb0613a00b79"/><file name="International.php" hash="c6ba9e8b7e42893a7faf31392e0d647f"/><file name="Parcellocker.php" hash="2fa265b0623de5740b15ea27284a3b47"/><file name="Pickuppoint.php" hash="84ccd80c14f33de89b8164e396ef3241"/></dir></dir></dir><dir name="Source"><file name="Datecomment.php" hash="a67ca74e2f81cbfaec6b7ed0ce8aa9f2"/><file name="Shipping.php" hash="a19f622f5f64ee64c8f8e6667d6d9323"/></dir></dir></dir></dir><dir name="Api"><file name="Abstract.php" hash="0182e46e81d5de01a567254e311cc174"/><file name="Domcreator.php" hash="2c51ab00bd06265d49cb9cbf62605575"/></dir><file name="Api.php" hash="0661d5bd1cc72642faf6e7ec1b4857c6"/><file name="Country.php" hash="7ca2d7fee06b4672ee8679dcc0d437cf"/><file name="Holidays.php" hash="85d3ad2c06516d3bd42d6cf25b6c1c1b"/><file name="Observer.php" hash="429734398830f14aa1a8a79f6d3acd7e"/><dir name="Resource"><dir name="Country"><file name="Collection.php" hash="173cb7acd05ead3fa4bb29f1a2200188"/></dir><file name="Country.php" hash="3ed62dc4bae568879a781400724e2b31"/><dir name="Holidays"><file name="Collection.php" hash="b39c602b1b6c7802a8e298ccabd3b88d"/></dir><file name="Holidays.php" hash="8410fabf516cce95e6e6a69e52abb6ec"/><dir name="Returnlabel"><file name="Collection.php" hash="d34adb537d24116270238ae1fa377a05"/></dir><file name="Returnlabel.php" hash="419fda598a2630ccc773ce0b0eacbd79"/><dir name="Tablerates"><dir name="Clickcollect"><file name="Collection.php" hash="a076e1266785fc9342fc134ac9268280"/></dir><file name="Clickcollect.php" hash="56ab4e22b459339db3190bfbd102d94f"/><dir name="Homedelivery"><file name="Collection.php" hash="7a34c249b5015ecda8ad26cbf42c6280"/></dir><file name="Homedelivery.php" hash="a94baf3909962e162813d8003583cc77"/><dir name="International"><file name="Collection.php" hash="6ba99077f1625a8c81990ea3afcb14b8"/></dir><file name="International.php" hash="ca3e45f29f9ef44f00ff41b509e0f0a1"/><dir name="Parcellocker"><file name="Collection.php" hash="9aa78e0bc7d389e93e958472a0fc40b6"/></dir><file name="Parcellocker.php" hash="66bb509267844a48ff5b054c82a47254"/><dir name="Pickuppoint"><file name="Collection.php" hash="1f9db3d5ff7f1a9e9d2eccddf6860513"/></dir><file name="Pickuppoint.php" hash="33e26bc93dcea5aabbee59343043413d"/></dir></dir><file name="Returnlabel.php" hash="169bca5baa7726cd51e2a76e1b9a35a8"/><dir name="Shipping"><dir name="Carrier"><file name="BpostShM.php" hash="64515e312b7575e6480e44e7e3c12a0d"/></dir><file name="Geocode.php" hash="d613ba4d1e5d14f8698fcfe9dfd03a66"/><dir name="Rate"><file name="Result.php" hash="77e9fc98f15441edfdc478fd589e41a8"/></dir></dir><dir name="System"><dir name="Config"><dir name="Source"><file name="Country.php" hash="f49cbe30d05cffb6f516a3df6ddc1b7b"/><file name="Product.php" hash="cb74b0fc8d3f661d0be4ac9f9c5b840d"/><file name="Ratetypes.php" hash="42f1f3f8dc000ea5e5336ca1ad7ab85c"/><file name="Weightunit.php" hash="e0c0a9975395245c4d16d975c0334c31"/></dir></dir></dir><dir name="Tablerates"><file name="Clickcollect.php" hash="9d589684df3b1b7e11441dc808a9627c"/><file name="Homedelivery.php" hash="d60385de528eb957a2874af6306d4aae"/><file name="International.php" hash="d02e02a7cddbda576530d6acbd6d02e8"/><file name="Parcellocker.php" hash="805a9669f9d024a4c018d611e5c71afd"/><file name="Pickuppoint.php" hash="49dff9f40e26163b8d0c6b8be9f6ee51"/></dir></dir><dir name="controllers"><dir name="Adminhtml"><dir name="Bpost"><dir name="ShM"><file name="AllOrdersController.php" hash="08df25d3e3718e183c40f68d8722782a"/><file name="ConfigController.php" hash="2537dbc05936e758c6353e46016180f9"/><file name="DownloadController.php" hash="87a534445edd2ff9ae3601fbe99637a5"/><file name="PendingOrdersController.php" hash="300f5472999194f90658737311b94df4"/></dir></dir></dir><file name="AjaxController.php" hash="ba6df7ff9999259273b7414e6bd51f1c"/></dir><dir name="etc"><file name="adminhtml.xml" hash="cba525a2c3c394cb15c144f887e081cc"/><file name="config.xml" hash="7d87b7193ad4be6a6736577403ed84c9"/><file name="system.xml" hash="89a58cb287d88eab93df6294b789a9b5"/></dir><dir name="sql"><dir name="bpost_shm_setup"><file name="install-0.0.1.php" hash="441ce29ddd9b04c052f03699e8ecc704"/><file name="upgrade-0.0.1-0.0.2.php" hash="7c5bb7a9609d6bec38a927e07eaad066"/><file name="upgrade-0.0.10-0.1.0.php" hash="c1523f2fd829372143c4686376512b37"/><file name="upgrade-0.0.2-0.0.3.php" hash="7e441f96e071efaa42d629815be8379c"/><file name="upgrade-0.0.3-0.0.4.php" hash="e2009ca70b9b268024433be7ac74ba19"/><file name="upgrade-0.0.4-0.0.5.php" hash="a51391f3bf810a5c6ae5c0bdbc5d9603"/><file name="upgrade-0.0.5-0.0.6.php" hash="2d8d624be7f829029b3e9fceb6d6c3b8"/><file name="upgrade-0.0.6-0.0.7.php" hash="82a7a64e3234c8b6e20367fcc80e1049"/><file name="upgrade-0.0.7-0.0.8.php" hash="a3b337a855d92202b5d625269edf4cb8"/><file name="upgrade-0.0.8-0.0.9.php" hash="20a344294274390515a891a89facfcb3"/><file name="upgrade-0.0.9-0.0.10.php" hash="74d06a2bbf41c5c8d9cb7870898a3eb3"/><file name="upgrade-0.1.0-0.1.1.php" hash="ed824736e9cd0f8e98a4dc62c41ecf96"/><file name="upgrade-0.1.1-0.1.2.php" hash="bb7cf544bc07ef2209b82753ac2b950d"/><file name="upgrade-0.1.2-0.1.3.php" hash="04f9ab295e48b018e80da482bdf23132"/><file name="upgrade-0.1.3-0.1.4.php" hash="9e8f6f1e2522917b8efeb379d21cd953"/><file name="upgrade-0.1.4-0.1.5.php" hash="16333b0f3faa92e98d6bb6f75b4273cd"/><file name="upgrade-0.1.5-0.1.6.php" hash="f2f1f169a5ad2fbd0650ffbef3217b08"/><file name="upgrade-0.1.6-0.1.7.php" hash="95eebc7f870fa36c0a0997a06cb47076"/><file name="upgrade-0.1.7-0.1.8.php" hash="56a4bc5320b56309c943a90df00464e8"/><file name="upgrade-0.1.8-1.1.3.php" hash="d2058a8a86a501111fca4053a1f49ba2"/></dir></dir></dir></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><dir name="bpost"><file name="shm.xml" hash="8a5ceb93674efcbd6e8063437877d9d5"/></dir></dir><dir name="template"><dir name="bpost"><file name="empty.phtml" hash="45a92398f5adc3dd6dda9527f95ef4d5"/><file name="informationpopup.phtml" hash="42432ed861bb8b5b34a39d879c164979"/><file name="screenshotpopup.phtml" hash="5ad6a05c55ea41e550262ceed28626ae"/><dir name="widget"><dir name="grid"><file name="massaction.phtml" hash="f9b9aa54fe683d66fd535f95afb07dfe"/></dir></dir></dir></dir></dir></dir></dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><dir name="bpost"><file name="shm.xml" hash="7950f7c44cc1b2a10846611251a37501"/></dir></dir><dir name="template"><dir name="bpost"><dir name="shm"><file name="append_bpost_shippingmethod.phtml" hash="36beca46e5a8e2246161fbb807886883"/><file name="gmapsapi.phtml" hash="ac4dea1786701a6968a1c771a54e06fd"/></dir></dir></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="zBpost_ShM.xml" hash="791aeaa9ddf185a0b053728b20b06ea0"/></dir></target><target name="magelocale"><dir name="en_US"><file name="Bpost_ShM.csv" hash="ed46d79674f4af306343332fca1dd1d2"/><dir name="template"><dir name="email"><dir name="bpost"><file name="returnlabel.html" hash="fa9b1779caf12fe6e8c85e44899e7e66"/><file name="errorhandling_create_order.html" hash="5458114b6bfee6f66841f4fe19e13675"/></dir></dir></dir></dir><dir name="fr_FR"><file name="Bpost_ShM.csv" hash="2c28271ca71add5c1eb748d388c4672e"/></dir><dir name="nl_NL"><file name="Bpost_ShM.csv" hash="bef78c98957327ef45635ab13469c9c1"/></dir></target><target name="mageweb"><dir name="js"><dir name="bpost"><dir name="shm"><dir name="adminhtml"><file name="informationpopup.js" hash="dd25216084d43f70b7de4beaf1ef23c5"/></dir><file name="checkout.js" hash="d0d9d11bb87513f5cf72bfc4a260b432"/><file name="infobox.js" hash="4b42bb1b029f60ecda0ceeabb4726e5d"/><file name="onestepcheckout_shipping.js" hash="5543fb8c7b6b9a4fa03eb11fad70960d"/></dir></dir></dir></target><target name="mageskin"><dir name="frontend"><dir name="base"><dir name="default"><dir name="css"><dir name="bpost"><file name="checkout.css" hash="b085e5c58f8068bbb491eb9b929db40d"/></dir></dir><dir name="images"><dir name="bpost"><file name="ajax-loader-button.gif" hash="cbdad94ec5d22b17d7aae4c6d245069a"/><file name="ajax-loader-wheel.gif" hash="faa74e8c61fc64d5edb11613c7eead2c"/><file name="bpost_logo_RGB72_L.png" hash="ca8a5de3a37cfbbdac7c0fec6e4f9f28"/><file name="bpost_logo_RGB72_M.png" hash="feb4bb3bb7c9c4100612b62cde7037e5"/><file name="bpost_sym_RGB72_S.png" hash="18e774a968be600664d11a9e0691a424"/><file name="btn_close.png" hash="d6ecac0a01a600ef15efc9004ccc9fb7"/><file name="icon-close.png" hash="54d0827f50c1d294c61e88e316e61059"/><file name="icon-info.png" hash="e4de51e3c12327403a9b966aac98a9d6"/><file name="location_clickcollect_default.png" hash="dba619d29c0013538003f3fec98da652"/><file name="location_parcellocker_default.png" hash="8906b0e09067eab6f31b712d54ecf547"/><file name="location_postoffice_default.png" hash="ea147b38b01449e8a1cff3ebff6b2741"/><file name="location_postpoint_default.png" hash="c53f598daafbec4d042b165d21116719"/><file name=".DS_Store" hash="194577a7e20bdcc7afbb718f502c134c"/></dir></dir><dir name="js"><dir name="bpost"><file name="onestepcheckout.js" hash="a0e4b3df8643ffaa798e679fe20f116c"/></dir></dir></dir></dir></dir><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="css"><dir name="bpost"><file name="informationpopup.css" hash="bffce6ef1182a763f626a0b3288b3887"/></dir></dir><dir name="images"><dir name="bpost"><file name="ajax-loader-red.gif" hash="7bf0fa0e5a55c6a7cd122a9bb461006d"/><file name="bpost_logo_RGB72_L.png" hash="ca8a5de3a37cfbbdac7c0fec6e4f9f28"/><file name="bpost_logo_RGB72_M.png" hash="feb4bb3bb7c9c4100612b62cde7037e5"/><file name="btn_close.png" hash="d6ecac0a01a600ef15efc9004ccc9fb7"/><file name="ce-screenshot.png" hash="ff6f4a630cd17efc1abbe8eca6e015a5"/><file name="ee-screenshot.png" hash="ff6f4a630cd17efc1abbe8eca6e015a5"/><file name="pdf_icon.png" hash="95b561422892384337eb2eabb968a558"/></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>
|
skin/adminhtml/default/default/css/bpost/informationpopup.css
CHANGED
@@ -20,7 +20,11 @@ td.subheader.value{
|
|
20 |
padding:8px 5px 8px 0!important;
|
21 |
}
|
22 |
|
|
|
|
|
|
|
23 |
.adminhtml-bpost-shm-config-gridinformationpopup{width: 100%;height: 240px; background: url('../../images/bpost/ajax-loader-red.gif') center no-repeat white;}
|
24 |
.adminhtml-bpost-shm-config-gridinformationpopup .text-wrapper{position: absolute; bottom: 35px; text-align: center;}
|
25 |
.adminhtml-bpost-shm-config-screenshotpopup{overflow: hidden}
|
26 |
.adminhtml-bpost-shm-config-screenshotpopup .example-screenshot{width: 100%}
|
|
20 |
padding:8px 5px 8px 0!important;
|
21 |
}
|
22 |
|
23 |
+
td.fulltext{
|
24 |
+
width:1175px !important;
|
25 |
+
}
|
26 |
.adminhtml-bpost-shm-config-gridinformationpopup{width: 100%;height: 240px; background: url('../../images/bpost/ajax-loader-red.gif') center no-repeat white;}
|
27 |
.adminhtml-bpost-shm-config-gridinformationpopup .text-wrapper{position: absolute; bottom: 35px; text-align: center;}
|
28 |
.adminhtml-bpost-shm-config-screenshotpopup{overflow: hidden}
|
29 |
.adminhtml-bpost-shm-config-screenshotpopup .example-screenshot{width: 100%}
|
30 |
+
#carriers_bpost_clickcollect_marker_image{height:18px; width: 18px;}
|
skin/frontend/base/default/images/bpost/location_clickcollect_default.png
ADDED
Binary file
|