I’d like to raise a discussion about a current limitation with Cart Transform Functions that’s affecting app performance and scalability.
Current Situation:
- Each app is limited to ONE Cart Transform Function per store
- This means all app features requiring cart modifications must be handled by this single function
- In our case, we’re building a bundling solution that relies heavily on line item properties
The Challenge: Our app needs to read multiple line item properties to properly handle product bundling. Because we’re forced to include all our logic in a single Cart Transform Function, we’re seeing increasing query costs as we need to:
- Read all bundle-related properties for every cart modification
- Process multiple features through the same function
- Handle various bundling scenarios in one code block
Proposed Solution: If apps could implement multiple Cart Transform Functions per store, we could:
- Split different bundling features into separate functions
- Distribute the property reading across multiple functions
- Only query the specific properties needed for each particular feature
- Better organize and maintain our code
- Potentially reduce the overall query cost by making each function more focused
This would lead to:
- More efficient resource usage
- Better code organization
- Reduced query costs
- Improved maintainability
Has anyone else encountered similar challenges? How are you handling complex cart modifications within the single function limitation?
Looking forward to your thoughts and any potential workarounds you might have discovered.