-
Notifications
You must be signed in to change notification settings - Fork 235
feat(shopify): multi-tenant architecture + standardized account resolution #374
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
engahmed1190
wants to merge
24
commits into
frappe:develop
Choose a base branch
from
BrainWise-DEV:develop
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…ation Add support for multiple Shopify stores with isolated configurations per company. Introduce Shopify Account doctype to replace legacy singleton settings. Update all core functions to be account-aware including product sync, order processing, inventory management, and webhook handling. Maintain backward compatibility with existing installations. - Add Shopify Account doctype with company-specific settings - Modify product, order, inventory, and fulfillment logic to support multi-tenancy - Update webhook handling to route events by shop domain - Add account selection UI to product import page - Include comprehensive tests and documentation
Introduce resolve_account_context utility to handle account resolution consistently Update all modules to use the new standardized account resolution Simplify temp_shopify_session decorator with new account handling
Author
- Update Shopify Account doctype with clearer authentication labels and add shop URL field - Simplify old order sync logic by removing redundant checks - Refactor location fetching to use direct session management
Move Shopify location fetching logic to a dedicated method with proper error handling and logging. This improves code organization and maintainability while providing better error tracking.
Replace reference_document parameter with account parameter in create_shopify_log calls Update create_shopify_log to handle account context in message instead of reference_document
… inventory settings section for better organization
- Add required customer group field for customer sync - Move fetch_shopify_locations to separate handler - Clean up comments and redundant code - Improve form query setup organization
…ments - Add default_sales_tax_account and default_shipping_charges_account fields - Set form intro description for better user guidance - Make shop_domain read-only after save to prevent accidental changes
Pass account parameter through sync chain to ensure proper context Update method name from import_all_products to queue_sync_all_products Use centralized ecommerce_item.is_synced check for consistency
[CS-61 Fix the logic by adding setting.is_enabled() condition]
- Removed legacy singleton references and replaced with account-based settings for Shopify integration. - Updated inventory synchronization logic to utilize user-specific Shopify accounts. - Simplified functions for handling sales invoices and orders by eliminating account parameters where unnecessary. - Enhanced product synchronization methods to operate without explicit account context. - Improved error handling and logging for better traceability during synchronization processes. - Streamlined JavaScript code for product import to remove account selection, focusing on a single account context. - Added utility functions to fetch Shopify accounts based on user permissions and company associations.
- Add company support for multi-tenant. - Complete integration functionalities including shopify hooks. - improve logging
|
Hi @engahmed1190, Thanks |
…companies Cs 86 shopify support multi companies
…-with-prices set shopify product price as a shopify_selling_rate in the newly created erpnext item
…-with-prices Enhance retry functionality and Shopify account handling in Ecommerce Integration Log
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description:
This PR introduces major enhancements to the Shopify integration by adding multi-tenant support and standardizing account resolution logic across all modules.
Key Changes
Multi-Tenant Architecture
Standardized Account Resolution
resolve_account_contextutility for consistent account resolution across modules.temp_shopify_sessiondecorator using the new account resolution flow.UI & Developer Enhancements
Impact