Skip to content

Commit

Permalink
feat: adding subscriptions to sales menu and re-adding enabled gatewa…
Browse files Browse the repository at this point in the history
…y dependency to show recurrence settings
  • Loading branch information
Mateus Picoloto committed Sep 25, 2023
1 parent e4d9fc3 commit 6251459
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
8 changes: 6 additions & 2 deletions etc/adminhtml/menu.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<add action="pagarme_pagarme/charges/index" id="Pagarme::pagarme_charges" module="Pagarme_Pagarme" parent="Pagarme::pagarme_label" resource="Magento_Backend::content" sortOrder="20" title="Charges Pagar.me" translate="title" />
<add action="pagarme_pagarme/cards/index" id="Pagarme::pagarme_cards" module="Pagarme_Pagarme" parent="Pagarme::pagarme_label" resource="Magento_Backend::content" sortOrder="10" title="Cards Pagar.me" translate="title" />
<add action="adminhtml/system_config/edit/section/payment" id="Pagarme::pagarme_payment_methods" module="Pagarme_Pagarme" parent="Pagarme::pagarme_label" resource="Magento_Config::config" sortOrder="1" title="Payment Methods" translate="title" />

<add id="Pagarme::pagarme_pagarme_marketplace" module="Pagarme_Pagarme" parent="Pagarme::pagarme" resource="Magento_Config::config" sortOrder="20" dependsOnConfig="pagarme_pagarme/marketplace/active" title="Marketplace" translate="title" />
<add action="pagarme_pagarme/recipients/index" id="Pagarme::pagarme_pagarme_recipients_index" module="Pagarme_Pagarme" parent="Pagarme::pagarme_pagarme_marketplace" resource="Magento_Config::config" sortOrder="1" title="Recipients" translate="title" />

Expand All @@ -15,9 +15,13 @@
<add action="pagarme_pagarme/plans/index" id="Pagarme::pagarme_plans_index" module="Pagarme_Pagarme" parent="Pagarme::pagarme_recurrence" resource="Magento_Config::config" sortOrder="1" title="Plans" translate="title" />
<add action="pagarme_pagarme/subscriptions/index" id="Pagarme::pagarme_subscriptions_index" module="Pagarme_Pagarme" parent="Pagarme::pagarme_recurrence" resource="Magento_Config::config" sortOrder="1" title="Subscriptions" translate="title" />

<!-- Add recurence items in catalog menu -->
<!-- Add recurrence items in catalog menu -->
<add id="Pagarme::pagarme_recurrence_catalog" module="Pagarme_Pagarme" parent="Magento_Catalog::catalog" resource="Magento_Config::config" dependsOnConfig="pagarme_pagarme/recurrence/active" sortOrder="30" title="Recurrence" translate="title" />
<add action="pagarme_pagarme/recurrenceproducts/index" id="Pagarme::pagarme_recurrenceproducts_catalog" module="Pagarme_Pagarme" parent="Pagarme::pagarme_recurrence_catalog" resource="Magento_Config::config" sortOrder="1" title="Recurrence Products" translate="title" />
<add action="pagarme_pagarme/plans/index" id="Pagarme::pagarme_plans_catalog" module="Pagarme_Pagarme" parent="Pagarme::pagarme_recurrence_catalog" resource="Magento_Config::config" sortOrder="1" title="Plans" translate="title" />

<!-- Add recurrence items in order menu -->
<add id="Pagarme::pagarme_recurrence_order" module="Pagarme_Pagarme" parent="Magento_Sales::sales" resource="Magento_Config::config" dependsOnConfig="pagarme_pagarme/recurrence/active" sortOrder="30" title="Recurrence" translate="title" />
<add action="pagarme_pagarme/subscriptions/index" id="Pagarme::pagarme_subscriptions_order" module="Pagarme_Pagarme" parent="Pagarme::pagarme_recurrence_order" resource="Magento_Config::config" sortOrder="1" title="Subscriptions" translate="title" />
</menu>
</config>
3 changes: 3 additions & 0 deletions etc/adminhtml/system/recurrence.xml
Original file line number Diff line number Diff line change
Expand Up @@ -84,5 +84,8 @@
<field id="active">1</field>
</depends>
</field>
<depends>
<field id="*/*/pagarme_pagarme_global/is_gateway_integration_type">1</field>
</depends>
</group>
</include>

0 comments on commit 6251459

Please sign in to comment.