File tree 5 files changed +24
-2
lines changed
5 files changed +24
-2
lines changed Original file line number Diff line number Diff line change @@ -229,6 +229,10 @@ public function collectRates(RateRequest $request)
229
229
$ firstOption = $ shippingOptions ['shippingOptions ' ][0 ];
230
230
$ shippingPrice = $ firstOption ['rate ' ];
231
231
$ method ->setMethodTitle ($ firstOption ['name ' ]);
232
+ } else {
233
+ if (!$ this ->config ->getAllowWithoutShippingOption ($ quote ->getStoreId ())) {
234
+ return false ;
235
+ }
232
236
}
233
237
}
234
238
Original file line number Diff line number Diff line change @@ -583,4 +583,13 @@ public function getHouseNumberDefaultOption($store = null)
583
583
{
584
584
return !!$ this ->getValue (self ::API_CONFIG_PATH . '/housenumber_default_value ' , $ store );
585
585
}
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
+ }
586
595
}
Original file line number Diff line number Diff line change 2
2
"name" : " paazl/magento2-checkout-widget" ,
3
3
"description" : " Paazl checkoutWidget for Magento 2" ,
4
4
"type" : " magento2-module" ,
5
- "version" : " 1.17.6 " ,
5
+ "version" : " 1.18.0 " ,
6
6
"keywords" : [
7
7
" Paazl" ,
8
8
" Magento 2" ,
Original file line number Diff line number Diff line change 174
174
<field id =" active" >1</field >
175
175
</depends >
176
176
</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 >
177
185
<field id =" heading_attributes" translate =" label comment" type =" text" sortOrder =" 50" showInDefault =" 1" showInWebsite =" 1" showInStore =" 1" >
178
186
<label >Product Attributes</label >
179
187
<frontend_model >Paazl\CheckoutWidget\Block\Adminhtml\Paazl\Heading</frontend_model >
Original file line number Diff line number Diff line change 8
8
<default >
9
9
<carriers >
10
10
<paazlshipping >
11
- <version >v1.17.6 </version >
11
+ <version >v1.18.0 </version >
12
12
<active >0</active >
13
13
<sallowspecific >0</sallowspecific >
14
14
<price >0</price >
34
34
<widget_initial_pickup_locations >5</widget_initial_pickup_locations >
35
35
<insurance_value >0</insurance_value >
36
36
<housenumber_default_value >1</housenumber_default_value >
37
+ <allow_without_shipping_option >1</allow_without_shipping_option >
37
38
<total_price >subtotal_incl_discount</total_price >
38
39
<use_local_js_for_widget >0</use_local_js_for_widget >
39
40
<dimensions_metric >cm</dimensions_metric >
You can’t perform that action at this time.
0 commit comments