We are working on making our upsell app compatible with premium themes for post add-to-cart behavior i.e. to open cart drawer (or any configured post ATC behavior).
We are currently at ~28 themes and the lines of code (only for storing configs for each theme) is more than 500 lines.
I am curious if we are going in the right direction or not…
We are storing a config in an object with theme name as the key, and the post ATC behavior as the value.
The expectation was that themes from the same vendor/developer will use the same approach but they don’t, its slightly different.
Other apps have done this, although I am not sure if they support all premium themes.
What do you guys suggest on approaching this?
also has anyone done this before and open-sourced the solution/configs?
thanks