Skip to content

Commit

Permalink
Merge pull request #37 from wuunder/development
Browse files Browse the repository at this point in the history
Development
  • Loading branch information
TimD90 authored Jun 18, 2019
2 parents 97cf34a + d71df40 commit e5a655a
Show file tree
Hide file tree
Showing 6 changed files with 149 additions and 6 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@ Please file changes under `Added`, `Changed`, `Deprecated`, `Removed`, `Fixed` o
The format is based on [Keep a Changelog](http://keepachangelog.com/).
## Unreleased

## [4.3.3](https://github.com/wuunder/wuunder-webshopplugin-magento/releases/tag/4.3.3) - 2019-06-18

### Added
- Added config to enable/disable webhook functionality (default= enabled)

## [4.3.2](https://github.com/wuunder/wuunder-webshopplugin-magento/releases/tag/4.3.2) - 2019-06-13

### Added
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -453,7 +453,7 @@ public function buildWuunderData($infoArray, $order, $bookingToken)
$sourceObj = array(
"product" => "Magento 1 extension",
"version" => array(
"build" => "4.3.2",
"build" => "4.3.3",
"plugin" => "4.0"
),
"platform" => array(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,4 +117,10 @@ private function ship($orderId, $carrier, $label_id)
Mage::helper('wuunderconnector/data')->log("ERROR: Can not ship");
}
}

function _isWebhookEnabled() {
$storeId = Mage::app()->getStore()->getStoreId();
$enabled = (int)Mage::getStoreConfig('wuunderconnector/advanced/webhookenable', $storeId);
return $enabled == 1 ? true : false;
}
}
2 changes: 1 addition & 1 deletion app/code/community/Wuunder/WuunderConnector/etc/config.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<config>
<modules>
<Wuunder_WuunderConnector>
<version>4.3.2</version>
<version>4.3.3</version>
</Wuunder_WuunderConnector>
</modules>
<global>
Expand Down
138 changes: 135 additions & 3 deletions app/code/community/Wuunder/WuunderConnector/etc/system.xml
Original file line number Diff line number Diff line change
Expand Up @@ -330,6 +330,110 @@
</debug_mode>
</fields>
</connect>
<!--<address>-->
<!--<label>Pickup address settings</label>-->
<!--<frontend_type>text</frontend_type>-->
<!--<sort_order>5</sort_order>-->
<!--<show_in_default>1</show_in_default>-->
<!--<show_in_website>1</show_in_website>-->
<!--<show_in_store>1</show_in_store>-->
<!--<expanded>1</expanded>-->
<!--<fields>-->
<!--<company translate="label">-->
<!--<label>Company Name</label>-->
<!--<frontend_type>text</frontend_type>-->
<!--<sort_order>40</sort_order>-->
<!--<show_in_default>1</show_in_default>-->
<!--<show_in_website>1</show_in_website>-->
<!--<show_in_store>1</show_in_store>-->
<!--<validate>validate-length maximum-length-30</validate>-->
<!--<comment>Maximum length: 30</comment>-->
<!--</company>-->
<!--<firstname translate="label">-->
<!--<label>Firstname</label>-->
<!--<frontend_type>text</frontend_type>-->
<!--<sort_order>50</sort_order>-->
<!--<show_in_default>1</show_in_default>-->
<!--<show_in_website>1</show_in_website>-->
<!--<show_in_store>1</show_in_store>-->
<!--<validate>validate-length maximum-length-30</validate>-->
<!--<comment>Maximum length: 30</comment>-->
<!--</firstname>-->
<!--<lastname translate="label">-->
<!--<label>Lastname</label>-->
<!--<frontend_type>text</frontend_type>-->
<!--<sort_order>51</sort_order>-->
<!--<show_in_default>1</show_in_default>-->
<!--<show_in_website>1</show_in_website>-->
<!--<show_in_store>1</show_in_store>-->
<!--<validate>validate-length maximum-length-30</validate>-->
<!--<comment>Maximum length: 30</comment>-->
<!--</lastname>-->
<!--<email translate="label">-->
<!--<label>E-mail</label>-->
<!--<frontend_type>text</frontend_type>-->
<!--<sort_order>60</sort_order>-->
<!--<show_in_default>1</show_in_default>-->
<!--<show_in_website>1</show_in_website>-->
<!--<show_in_store>1</show_in_store>-->
<!--</email>-->
<!--<phone translate="label">-->
<!--<label>Phonenumber</label>-->
<!--<comment>Phonenumber with country code prefix e.g. +31612345678</comment>-->
<!--<frontend_type>text</frontend_type>-->
<!--<sort_order>70</sort_order>-->
<!--<show_in_default>1</show_in_default>-->
<!--<show_in_website>1</show_in_website>-->
<!--<show_in_store>1</show_in_store>-->
<!--</phone>-->
<!--<streetname translate="label">-->
<!--<label>Street Name</label>-->
<!--<frontend_type>text</frontend_type>-->
<!--<sort_order>80</sort_order>-->
<!--<show_in_default>1</show_in_default>-->
<!--<show_in_website>1</show_in_website>-->
<!--<show_in_store>1</show_in_store>-->
<!--<validate>validate-length maximum-length-30</validate>-->
<!--<comment>Maximum length: 30</comment>-->
<!--</streetname>-->
<!--<housenumber translate="label">-->
<!--<label>Housenumber</label>-->
<!--<frontend_type>text</frontend_type>-->
<!--<sort_order>81</sort_order>-->
<!--<show_in_default>1</show_in_default>-->
<!--<show_in_website>1</show_in_website>-->
<!--<show_in_store>1</show_in_store>-->
<!--</housenumber>-->
<!--<zipcode translate="label">-->
<!--<label>Zipcode</label>-->
<!--<frontend_type>text</frontend_type>-->
<!--<sort_order>90</sort_order>-->
<!--<show_in_default>1</show_in_default>-->
<!--<show_in_website>1</show_in_website>-->
<!--<show_in_store>1</show_in_store>-->
<!--</zipcode>-->
<!--<city translate="label">-->
<!--<label>City</label>-->
<!--<frontend_type>text</frontend_type>-->
<!--<sort_order>100</sort_order>-->
<!--<show_in_default>1</show_in_default>-->
<!--<show_in_website>1</show_in_website>-->
<!--<show_in_store>1</show_in_store>-->
<!--<validate>validate-length maximum-length-30</validate>-->
<!--<comment>Maximum length: 30</comment>-->
<!--</city>-->
<!--<country translate="label">-->
<!--<label>Country Code</label>-->
<!--<comment>Country code, use ISO 3166-1 alpha-2 format e.g. NL</comment>-->
<!--<frontend_type>text</frontend_type>-->
<!--<sort_order>110</sort_order>-->
<!--<show_in_default>1</show_in_default>-->
<!--<show_in_website>1</show_in_website>-->
<!--<show_in_store>1</show_in_store>-->
<!--<validate>validate-length maximum-length-2</validate>-->
<!--</country>-->
<!--</fields>-->
<!--</address>-->
<magentoconfig translate="label" module="wuunderconnector">
<label>Magento settings</label>
<frontend_type>text</frontend_type>
Expand Down Expand Up @@ -368,6 +472,30 @@
</separate_housenumber>
</fields>
</magentoconfig>
<advanced>
<label>Advanced settings</label>
<frontend_type>text</frontend_type>
<sort_order>20</sort_order>
<show_in_default>1</show_in_default>
<show_in_website>1</show_in_website>
<show_in_store>1</show_in_store>
<expanded>0</expanded>
<fields>
<webhookenable translate="label">
<label>Enable Webhook</label>
<frontend_type>select</frontend_type>
<source_model>adminhtml/system_config_source_yesno</source_model>
<sort_order>20</sort_order>
<show_in_default>1</show_in_default>
<show_in_website>1</show_in_website>
<show_in_store>1</show_in_store>
<comment>Wanneer enabled zullen shipment updates naar de shop gestuurd worden. Wanneer
disabled, dan zal de shop geen shipment updates ontvangen en zal er ook geen order
status veranderen na het boeken.
</comment>
</webhookenable>
</fields>
</advanced>
</groups>
</wuunderconnector>
<carriers translate="label" module="shipping">
Expand Down Expand Up @@ -519,18 +647,22 @@
<parcelshop_carriers translate="label">
<label>Choose Carriers</label>
<!-- <frontend_type>multiselect</frontend_type> -->
<source_model>wuunderconnector/adminhtml_system_config_source_parcelshopCarriers</source_model>
<source_model>wuunderconnector/adminhtml_system_config_source_parcelshopCarriers
</source_model>

<!-- <frontend_model>wuunderconnecter/parcelshopsTable</frontend_model> -->
<frontend_model>wuunderconnector/parcelshopsTable</frontend_model>

<!--<backend_model>adminhtml/system_config_backend_serialized_array</backend_model>-->
<backend_model>wuunderconnector/adminhtml_system_config_backend_parcelshopConfigGrid</backend_model>
<backend_model>wuunderconnector/adminhtml_system_config_backend_parcelshopConfigGrid
</backend_model>
<sort_order>5</sort_order>
<show_in_default>1</show_in_default>
<show_in_website>1</show_in_website>
<show_in_store>1</show_in_store>
<comment>Select the parcelshops you want your customer to be able to select for pickup (cmd/ctrl for multiple)</comment>
<comment>Select the parcelshops you want your customer to be able to select for pickup
(cmd/ctrl for multiple)
</comment>
</parcelshop_carriers>
<country_cost_table translate="label">
<label>Cost per country</label>
Expand Down

0 comments on commit e5a655a

Please sign in to comment.