system.xml 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. <?xml version="1.0"?>
  2. <!--
  3. /**
  4. * Copyright © Magento, Inc. All rights reserved.
  5. * See COPYING.txt for license details.
  6. */
  7. -->
  8. <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  9. xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Config:etc/system_file.xsd">
  10. <system>
  11. <section id="cataloginventory">
  12. <group id="source_selection_distance_based" translate="label" type="text" sortOrder="600" showInDefault="1"
  13. showInWebsite="1" showInStore="1">
  14. <label>Distance Provider for Distance Based SSA</label>
  15. <field id="provider" translate="label" type="select" sortOrder="10" showInDefault="1" showInWebsite="0"
  16. showInStore="0" canRestore="1">
  17. <label>Provider</label>
  18. <source_model>Magento\InventoryDistanceBasedSourceSelectionAdminUi\Model\Config\Source\DistanceProvider</source_model>
  19. </field>
  20. </group>
  21. <group id="source_selection_distance_based_google" translate="label" type="text" sortOrder="650" showInDefault="1"
  22. showInWebsite="1" showInStore="1">
  23. <label>Google Distance Provider</label>
  24. <field id="api_key" translate="label" type="password" sortOrder="10" showInDefault="1" showInWebsite="0"
  25. showInStore="0">
  26. <label>Google API key</label>
  27. <comment>Geocoding API and Distance Matrix API must enabled in your Google API key to support this feature.</comment>
  28. </field>
  29. <field id="mode" translate="label" type="select" sortOrder="20" showInDefault="1" showInWebsite="0"
  30. showInStore="0" canRestore="1">
  31. <source_model>Magento\InventoryDistanceBasedSourceSelectionAdminUi\Model\Config\Source\GoogleDistanceProvider\Mode</source_model>
  32. <label>Computation mode</label>
  33. </field>
  34. <field id="value" translate="label" type="select" sortOrder="30" showInDefault="1" showInWebsite="0"
  35. showInStore="0" canRestore="1">
  36. <source_model>Magento\InventoryDistanceBasedSourceSelectionAdminUi\Model\Config\Source\GoogleDistanceProvider\Value</source_model>
  37. <label>Value</label>
  38. </field>
  39. <!-- TODO: Add avoids and traffic models: https://developers.google.com/maps/documentation/distance-matrix/intro#travel_modes -->
  40. </group>
  41. </section>
  42. </system>
  43. </config>