Open
Conversation
…cate item handling - Add intelligent fallback mapping for line items without product_id * Tips -> SHOPIFY-TIP * Samples -> SHOPIFY-SAMPLE * Rush fees -> SHOPIFY-RUSH-FEE * Adjustments -> SHOPIFY-ADJUSTMENT * Other -> SHOPIFY-MISC - Skip syncing items with null product_id in create_items_if_not_exist() - Add error handling for duplicate item errors to prevent order sync failures - Enhance get_order_items() to process null product_id items before product_exists check - Improve _match_sku_and_link_item() to match by both SKU and product_id - Add comprehensive logging for fallback item mapping and errors Fixes expected String to be a id error when orders contain tips, samples, or other non-product line items
- Added Store 2 configuration fields to Shopify Setting DocType - Created Shopify Webhook Store 2 child DocType for Store 2 webhooks - Implemented store-aware webhook routing via X-Shopify-Shop-Domain header - Modified API session decorator to use correct store credentials - Added automatic webhook registration/unregistration for Store 2 - Updated order, invoice, and fulfillment processors with store context - Graceful error handling prevents Store 2 issues from affecting Store 1 - Full backward compatibility maintained for Store 1
Changes: - Fix indentation error in connection.py debug logging - Add comprehensive debug logging for store matching in webhooks - Propagate store context to background jobs: * sync_sales_order() in order.py * prepare_sales_invoice() in invoice.py * prepare_delivery_note() in fulfillment.py - Set frappe.local.shopify_store_name in all background job functions - Ensures @temp_shopify_session uses correct store credentials Fixes Store 2 (0ish15-bq.myshopify.com) webhooks failing to create Sales Orders
- Add floating-point tolerance (0.01) for amount comparisons - Skip line item comparison if shopify_line_item_id not available - Remove transaction_date comparison (created_at never changes) - Only log real business changes, ignore metadata updates - Early return for metadata-only updates on submitted orders - Server Script trigger only runs for real changes
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
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.
No description provided.