Skip to content

Commit e9f0b2e

Browse files
Merge pull request #120 from Paazl/release/1.18.0
Release/1.18.0
2 parents 51c1072 + 15c6e0c commit e9f0b2e

File tree

5 files changed

+24
-2
lines changed

5 files changed

+24
-2
lines changed

Model/Carrier/Paazlshipping.php

+4
Original file line numberDiff line numberDiff line change
@@ -229,6 +229,10 @@ public function collectRates(RateRequest $request)
229229
$firstOption = $shippingOptions['shippingOptions'][0];
230230
$shippingPrice = $firstOption['rate'];
231231
$method->setMethodTitle($firstOption['name']);
232+
} else {
233+
if (!$this->config->getAllowWithoutShippingOption($quote->getStoreId())) {
234+
return false;
235+
}
232236
}
233237
}
234238

Model/Config.php

+9
Original file line numberDiff line numberDiff line change
@@ -583,4 +583,13 @@ public function getHouseNumberDefaultOption($store = null)
583583
{
584584
return !!$this->getValue(self::API_CONFIG_PATH . '/housenumber_default_value', $store);
585585
}
586+
587+
/**
588+
* @param null|Store|int|string $store
589+
* @return bool
590+
*/
591+
public function getAllowWithoutShippingOption($store = null)
592+
{
593+
return !!$this->getValue(self::API_CONFIG_PATH . '/allow_without_shipping_option', $store);
594+
}
586595
}

composer.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "paazl/magento2-checkout-widget",
33
"description": "Paazl checkoutWidget for Magento 2",
44
"type": "magento2-module",
5-
"version": "1.17.6",
5+
"version": "1.18.0",
66
"keywords": [
77
"Paazl",
88
"Magento 2",

etc/adminhtml/system.xml

+8
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,14 @@
174174
<field id="active">1</field>
175175
</depends>
176176
</field>
177+
<field id="allow_without_shipping_option" translate="label comment" type="select" sortOrder="49" showInDefault="1"
178+
showInWebsite="1" showInStore="1">
179+
<label>Allow orders when Paazl doesn’t return a shipping option</label>
180+
<source_model>Magento\Config\Model\Config\Source\Yesno</source_model>
181+
<depends>
182+
<field id="active">1</field>
183+
</depends>
184+
</field>
177185
<field id="heading_attributes" translate="label comment" type="text" sortOrder="50" showInDefault="1" showInWebsite="1" showInStore="1">
178186
<label>Product Attributes</label>
179187
<frontend_model>Paazl\CheckoutWidget\Block\Adminhtml\Paazl\Heading</frontend_model>

etc/config.xml

+2-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
<default>
99
<carriers>
1010
<paazlshipping>
11-
<version>v1.17.6</version>
11+
<version>v1.18.0</version>
1212
<active>0</active>
1313
<sallowspecific>0</sallowspecific>
1414
<price>0</price>
@@ -34,6 +34,7 @@
3434
<widget_initial_pickup_locations>5</widget_initial_pickup_locations>
3535
<insurance_value>0</insurance_value>
3636
<housenumber_default_value>1</housenumber_default_value>
37+
<allow_without_shipping_option>1</allow_without_shipping_option>
3738
<total_price>subtotal_incl_discount</total_price>
3839
<use_local_js_for_widget>0</use_local_js_for_widget>
3940
<dimensions_metric>cm</dimensions_metric>

0 commit comments

Comments
 (0)