diff --git a/Block/System/Config/Form/Field/Version.php b/Block/System/Config/Form/Field/Version.php index 964f53cfe5cfdc52a4de73baf68d88fe3cb38f1c..1b2e43592b0d158bb7b71dfcb120908ad0142d96 100644 --- a/Block/System/Config/Form/Field/Version.php +++ b/Block/System/Config/Form/Field/Version.php @@ -39,7 +39,7 @@ class Version extends \Magento\Config\Block\System\Config\Form\Field protected function _getElementHtml(AbstractElement $element) { $extensionVersion = $this->_helper->getExtensionVersion(); - $extensionTitle = 'BobGo'; + $extensionTitle = 'Bob Go'; $versionLabel = sprintf( '<a href="%s" title="%s" target="_blank">%s</a>', self::EXTENSION_URL, diff --git a/Model/Carrier/CustomShipping.php b/Model/Carrier/CustomShipping.php index 1cf940d52ae846c1218368ed4871f15c98b01c30..db29d6f28055da6bc174794270d0091ede229ee2 100644 --- a/Model/Carrier/CustomShipping.php +++ b/Model/Carrier/CustomShipping.php @@ -408,6 +408,9 @@ class CustomShipping extends AbstractCarrierOnline implements \Magento\Shipping\ 'allspecificcountries' => [ 'ZA' => __('South Africa'), ], + 'showmethod' => [ + '0' => __('No'), + ], ]; if (!isset($codes[$type])) { diff --git a/Model/Source/Showmethod.php b/Model/Source/Showmethod.php new file mode 100644 index 0000000000000000000000000000000000000000..d2c517c78e74c844672f83ab83a1237aa5d40b3d --- /dev/null +++ b/Model/Source/Showmethod.php @@ -0,0 +1,17 @@ +<?php + +namespace bobgo\CustomShipping\Model\Source; + +class Showmethod extends Generic +{ + /** + * @return array + */ + public function toOptionArray() + { + return [ + ['value' => '0', 'label' => __('No')], + ]; + } + +} diff --git a/etc/adminhtml/system.xml b/etc/adminhtml/system.xml index 2174008d7114f1d1e676542048c6cbc44d9ac443..af55345114db791cc72f1abcbcd1fdec60121a19 100644 --- a/etc/adminhtml/system.xml +++ b/etc/adminhtml/system.xml @@ -70,7 +70,7 @@ <field id="showmethod" translate="label" type="select" sortOrder="92" showInDefault="1" showInWebsite="1" showInStore="0"> <label>Show Method if Not Applicable</label> <frontend_class>shipping-skip-hide</frontend_class> - <source_model>Magento\Config\Model\Config\Source\Yesno</source_model> + <source_model>bobgo\CustomShipping\Model\Source\Showmethod</source_model> </field> <field id="unit_of_measure" translate="label" type="select" sortOrder="73" showInDefault="1" showInWebsite="1" canRestore="1"> <label>Weight Unit</label> diff --git a/etc/config.xml b/etc/config.xml index aa8f79dfde17814e8deff10dd15e1a395b4a4f7a..0a72bc6010121abc06d0b3d8cf8c2c3070f4e578 100644 --- a/etc/config.xml +++ b/etc/config.xml @@ -16,7 +16,7 @@ <carriers> <bobgo> - <active>0</active> + <active>1</active> <sallowspecific>0</sallowspecific> <price>0.00</price> <model>bobgo\CustomShipping\Model\Carrier\CustomShipping</model>