Skip to content

Commit

Permalink
Merge pull request #484 from myparcelnl/Remove-Pickup-Express
Browse files Browse the repository at this point in the history
Remove Pickup Express
  • Loading branch information
RichardPerdaan authored Dec 23, 2019
2 parents 67953f2 + 5ac017d commit 162ad5a
Show file tree
Hide file tree
Showing 8 changed files with 6 additions and 105 deletions.
6 changes: 1 addition & 5 deletions app/code/community/TIG/MyParcel2014/Helper/Data.php
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ public function shippingMethodIsPakjegemak($method)
$myParcelCarrier = Mage::getModel('tig_myparcel/carrier_myParcel');
$myParcelCode = $myParcelCarrier->getCarrierCode();

if ($method == $myParcelCode . '_pakjegemak' || $method == $myParcelCode . '_pickup' || $method == $myParcelCode . '_pickup_express') {
if ($method == $myParcelCode . '_pakjegemak' || $method == $myParcelCode . '_pickup') {
return true;
}

Expand Down Expand Up @@ -1197,7 +1197,6 @@ public function getExtraPrice($method, $price)
$eveningFee = (float)$this->getConfig('eveningdelivery_fee', 'eveningdelivery');
$signatureAndOnlyRecipient = (float)$this->getConfig('signature_and_only_recipient_fee', 'delivery');
$pickupFee = (float)$this->getConfig('pickup_fee', 'pickup');
$pickupExpressFee = (float)$this->getConfig('pickup_express_fee', 'pickup_express');
$mailboxFee = (float)$this->getConfig('mailbox_fee', 'mailbox');

switch ($method) {
Expand Down Expand Up @@ -1227,9 +1226,6 @@ public function getExtraPrice($method, $price)
case ('pickup'):
$price += $pickupFee;
break;
case ('pickup_express'):
$price += $pickupExpressFee;
break;
case ('mailbox'):
$price = $mailboxFee;
break;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,6 @@ public function getAllowedMethods()
'evening' => $helper->__('TYPE_night'),
'evening_signature' => $helper->__('TYPE_night') . ' (' . $signatureTitle . ')',
'pickup' => $helper->getConfig('pickup_title', 'pickup'),
'pickup_express' => $helper->getConfig('pickup_title', 'pickup') . ' (' . strtolower($helper->__('TYPE_retailexpress')) . ')',
'flatrate' => $this->getConfigData('name') . ' flat',
'tablerate' => $this->getConfigData('name') . ' table',
'mailbox' => $helper->getConfig('mailbox_title', 'mailbox'),
Expand Down Expand Up @@ -230,7 +229,6 @@ public function collectRates(Mage_Shipping_Model_Rate_Request $request)
$this->addShippingRate($result, 'morning_delivery', 'morning_delivery', 'morning_signature');
$this->addShippingRate($result, 'eveningdelivery', 'eveningdelivery', 'evening');
$this->addShippingRate($result, 'eveningdelivery', 'eveningdelivery', 'evening_signature');
$this->addShippingRate($result, 'pickup_express', 'pickup_express', 'pickup_express');
}

return $result;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -145,10 +145,6 @@ public function infoAction()
}
$data['pickup'] = (object)$pickup;

$pickupExpress['active'] = $helper->getConfig('pickup_express_active', 'pickup_express') == "1" && $data['address']['country'] == self::CC_NL ? true : false;
$pickupExpress['fee'] = $this->getExtraPrice($basePrice, $this->getShippingPrice($helper->getConfig('pickup_express_fee', 'pickup_express'), $quote));
$data['pickupExpress'] = (object)$pickupExpress;

$info = array(
'version' => (string) Mage::getConfig()->getModuleConfig("TIG_MyParcel2014")->version,
'data' => (object)$data
Expand All @@ -158,7 +154,7 @@ public function infoAction()
echo(json_encode($info));
exit;
}


/**
* Save the MyParcel data in quote
Expand Down
6 changes: 1 addition & 5 deletions app/code/community/TIG/MyParcel2014/etc/config.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<config>
<modules>
<TIG_MyParcel2014>
<version>1.18.2</version>
<version>1.19.0</version>
</TIG_MyParcel2014>
</modules>
<global>
Expand Down Expand Up @@ -310,10 +310,6 @@
<pickup_title>Ophalen bij een PostNL locatie</pickup_title>
<pickup_fee>0</pickup_fee>
</pickup>
<pickup_express>
<pickup_express_active>1</pickup_express_active>
<pickup_express_fee>1.38</pickup_express_fee>
</pickup_express>
<belgium_delivery>
<belgium_delivery_title>Bezorgen</belgium_delivery_title>
<belgium_standard_delivery_titel>Standaard levering</belgium_standard_delivery_titel>
Expand Down
44 changes: 0 additions & 44 deletions app/code/community/TIG/MyParcel2014/etc/system.xml
Original file line number Diff line number Diff line change
Expand Up @@ -631,50 +631,6 @@
</pickup_fee>
</fields>
</pickup>
<pickup_express translate="label comment" module="tig_myparcel">
<label>Pickup Express at PostNL location</label>
<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>
<fields>
<pickup_express_active translate="label" module="tig_myparcel">
<label>Pickup Express active</label>
<frontend_type>select</frontend_type>
<source_model>tig_myparcel/system_config_source_yesno</source_model>
<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>
</pickup_express_active>
<pickup_express_not_active_holder translate="label" module="tig_myparcel">
<label>Pickup Express active</label>
<comment>Not possible if Pickup at PostNL location is not active</comment>
<frontend_type>select</frontend_type>
<source_model>tig_myparcel/system_config_source_yesno</source_model>
<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>
<depends>
<pickup_active>1</pickup_active>
</depends>
</pickup_express_not_active_holder>
<pickup_express_fee translate="label,comment" module="tig_myparcel">
<label>Pickup Express fee</label>
<comment>This will be added to the regular shipping price</comment>
<frontend_type>text</frontend_type>
<validate>validate-number</validate>
<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>
<depends>
<pickup_express_active>1</pickup_express_active>
</depends>
</pickup_express_fee>
</fields>
</pickup_express>
<belgium_delivery translate="label comment" module="tig_myparcel">
<label>Belgium Delivery</label>
<sort_order>21</sort_order>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,6 @@ var adminSystemConfig = {
configShippingMethodsContent.insert($('tig_myparcel_morning_delivery-head').up(1));
configShippingMethodsContent.insert($('tig_myparcel_eveningdelivery-head').up(1));
configShippingMethodsContent.insert($('tig_myparcel_pickup-head').up(1));
configShippingMethodsContent.insert($('tig_myparcel_pickup_express-head').up(1));
configShippingMethodsContent.insert($('tig_myparcel_belgium_delivery-head').up(1));
configShippingMethodsContent.insert($('tig_myparcel_pickup_belgium-head').up(1));

Expand Down Expand Up @@ -299,11 +298,6 @@ var adminSystemConfig = {
this.updateDependsAgeCheck();
/** age check */
$('tig_myparcel_delivery_age_check').observe('change', this.updateDependsAgeCheck);

this.updateDependsPickupCheck();
/** Pickup Express check */
$('tig_myparcel_pickup_pickup_active').observe('change', this.updateDependsPickupCheck);

},
updateDependsAgeCheck: function () {
var active = $('tig_myparcel_delivery_age_check').value;
Expand All @@ -328,20 +322,6 @@ var adminSystemConfig = {
$('row_tig_myparcel_eveningdelivery_eveningdelivery_active').style.display = "table-row";
$('row_tig_myparcel_eveningdelivery_eveningdelivery_fee').style.display = "table-row";
},
updateDependsPickupCheck: function () {
var active = $('tig_myparcel_pickup_pickup_active').value;
if (active == 1) {
$('row_tig_myparcel_pickup_express_pickup_express_not_active_holder').style.display = "none";
$('row_tig_myparcel_pickup_express_pickup_express_active').style.display = "table-row";
$('row_tig_myparcel_pickup_express_pickup_express_fee').style.display = "table-row";
return;
}

$('row_tig_myparcel_pickup_express_pickup_express_not_active_holder').style.display = "table-row";
$('row_tig_myparcel_pickup_express_pickup_express_active').style.display = "none";
$('row_tig_myparcel_pickup_express_pickup_express_fee').style.display = "none";

}
};

adminSystemConfig.setFieldsInTabs();
Expand Down
3 changes: 0 additions & 3 deletions app/locale/nl_NL/TIG_MyParcel2014.csv
Original file line number Diff line number Diff line change
Expand Up @@ -90,9 +90,6 @@ TIG_MyParcel2014::Pickup at PostNL location,Ophalen bij PostNL locatie
TIG_MyParcel2014::Pickup active,Ophalen actief
TIG_MyParcel2014::Pickup title,Ophalen titel
TIG_MyParcel2014::Pickup fee,Ophalen prijs
TIG_MyParcel2014::Pickup Express at PostNL location,Extra vroeg ophalen bij PostNL locatie
TIG_MyParcel2014::Pickup Express active,Extra vroeg ophalen actief
TIG_MyParcel2014::Pickup Express fee,Extra vroeg ophalen prijs
TIG_MyParcel2014::Pickup at Belgium PostNL location,Ophalen bij een Belgische PostNL locatie
TIG_MyParcel2014::Pickup Belgium active,Ophalen België actief
TIG_MyParcel2014::Pickup Belgium title,Ophalen België titel
Expand Down
24 changes: 3 additions & 21 deletions skin/frontend/base/default/js/TIG/MyParcel2014/myparcel.js
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,6 @@ MyParcel = {
"priceEveningDelivery": data.eveningDelivery['fee'],
"priceSignature": data.delivery['signature_fee'],
"pricePickup": data.pickup['fee'],
"pricePickupExpress": data.pickupExpress['fee'],
"priceOnlyRecipient": data.delivery['only_recipient_fee'],

"deliveryTitel":data.delivery['delivery_title'],
Expand Down Expand Up @@ -440,18 +439,7 @@ MyParcel = {
*/
if (mypajQuery('#mypa-pickup-delivery').prop('checked') || mypajQuery('#mypa-pickup-selector').prop('checked'))
{
/**
* Early morning pickup
*/
if (mypajQuery('#mypa-pickup-express-selector').prop('checked'))
{
mypajQuery('#s_method_myparcel_pickup_express').click();
MyParcel.addPickupToMagentoInput('retailexpress');
MyParcel.addStyleToPrice('#mypa-pickup-express-price');
return;
}else{
MyParcel.addStyleToPrice('#mypa-pickup-price');
}
MyParcel.addStyleToPrice('#mypa-pickup-price');

mypajQuery('#s_method_myparcel_pickup').click();
MyParcel.addPickupToMagentoInput('retail');
Expand Down Expand Up @@ -540,15 +528,9 @@ MyParcel = {
var isPickup = mypajQuery('#mypa-pickup-delivery').is(':checked');
mypajQuery('#mypa-pickup-selector').prop('checked', true);

if(isPickup && this.currentLocation.price_comment === "retailexpress"){
mypajQuery('#mypa-pickup-express-price').html(MyParcel.getPriceHtml(this.data.config.pricePickupExpress));
mypajQuery('#mypa-pickup-express').show();

} else{
mypajQuery('#mypa-pickup-express-selector').attr("checked", false);
mypajQuery('#mypa-pickup-express').hide();
mypajQuery('#mypa-pickup-express-selector').attr("checked", false);
mypajQuery('#mypa-pickup-express').hide();

}
},


Expand Down

0 comments on commit 162ad5a

Please sign in to comment.