Skip to content

Commit

Permalink
Sync Settings Simplification - Hide sync controls from UI (#656)
Browse files Browse the repository at this point in the history
* remove UI sync controls

* adding comments with instructions on how to update the values using SQL

---------

Co-authored-by: Carter Buce <[email protected]>
  • Loading branch information
carterbuce and Carter Buce authored Mar 14, 2024
1 parent 92dcdf9 commit 9b12569
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 6 deletions.
4 changes: 2 additions & 2 deletions app/code/Meta/Catalog/etc/adminhtml/system.xml
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@
</group>
<group id="business_extension" translate="label" type="text" showInDefault="0"
showInWebsite="0" showInStore="0">
<field id="enable_catalog_sync" translate="label comment" type="select" sortOrder="10" showInDefault="1"
showInWebsite="0" showInStore="1">
<field id="enable_catalog_sync" translate="label comment" type="select" sortOrder="10" showInDefault="0"
showInWebsite="0" showInStore="0">
<label>Enable Catalog Sync</label>
<config_path>facebook/catalog_management/enable_catalog_sync</config_path>
<source_model>Magento\Config\Model\Config\Source\Yesno</source_model>
Expand Down
4 changes: 4 additions & 0 deletions app/code/Meta/Catalog/etc/config.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@
<default>
<facebook>
<catalog_management>
<!-- No longer has a UI toggle. To update post-install,
run the following sql command and then refresh cache using `bin/magento cache:clean`
`update core_config_data set value=1 where path like 'facebook/catalog_management/enable_catalog_sync';`
-->
<enable_catalog_sync>1</enable_catalog_sync>
<price_incl_tax>0</price_incl_tax>
<out_of_stock_threshold>0</out_of_stock_threshold>
Expand Down
2 changes: 1 addition & 1 deletion app/code/Meta/Promotions/etc/adminhtml/system.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<group id="business_extension" translate="label" type="text" showInDefault="1"
showInWebsite="0" showInStore="1">
<field id="enable_promotion_sync" translate="label comment" type="select" sortOrder="10"
showInDefault="1" showInWebsite="0" showInStore="1">
showInDefault="0" showInWebsite="0" showInStore="0">
<label>Enable Promotions Sync</label>
<config_path>facebook/promotions/enable_promotions_sync</config_path>
<source_model>Magento\Config\Model\Config\Source\Yesno</source_model>
Expand Down
7 changes: 6 additions & 1 deletion app/code/Meta/Promotions/etc/config.xml
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Store:etc/config.xsd">
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Store:etc/config.xsd">
<default>
<facebook>
<promotions>
<!-- No longer has a UI toggle. To update post-install,
run the following sql command and then refresh cache using `bin/magento cache:clean`
`update core_config_data set value=1 where path like 'facebook/promotions/enable_promotions_sync';`
-->
<enable_promotions_sync>1</enable_promotions_sync>
</promotions>
</facebook>
Expand Down
4 changes: 2 additions & 2 deletions app/code/Meta/Sales/etc/adminhtml/system.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@
showInWebsite="0"
showInStore="1">
<field id="orders_sync_active" translate="label comment" type="select" sortOrder="10"
showInDefault="1"
showInWebsite="0" showInStore="1">
showInDefault="0"
showInWebsite="0" showInStore="0">
<label>Enable Orders Sync</label>
<config_path>facebook/orders_sync/active</config_path>
<source_model>Magento\Config\Model\Config\Source\Yesno</source_model>
Expand Down
4 changes: 4 additions & 0 deletions app/code/Meta/Sales/etc/config.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@
<default>
<facebook>
<orders_sync>
<!-- No longer has a UI toggle. To update post-install,
run the following sql command and then refresh cache using `bin/magento cache:clean`
`update core_config_data set value=1 where path like 'facebook/orders_sync/active';`
-->
<active>1</active>
<default_order_status>processing</default_order_status>
<auto_subscribe_to_newsletter>1</auto_subscribe_to_newsletter>
Expand Down

0 comments on commit 9b12569

Please sign in to comment.