I’m starting to develop Shopify apps and my first mission is to create a widget that needs to render in the cart. The concept of the widget functionality is when the widget button is pressed a new product should be added to the existing cart.
I’m reading Shopify’s documentation and I could see the warning: “Your app might not pass App Store review if it uses script tags instead of theme app extensions.” - related to ScriptTags.
My first idea was load a remote script (using Script Tags) that can handle all I need on the cart, but this app that I’m building also need be done with Shopify best practices to be able to won the “Built for Shopify” seal.
In contrast I could see that there is a suggestion of “Checkout UI”, but the problem I found is that this feature is in “development preview” and is only accessible for Shopify Plus plans.
So my question is: what exactly should I use to create and display a widget in the shopping cart that is not restrict for a specific plan (because my customers can have Basic plan only)?
If you are trying to place this UI in the checkout page, I believe the store must have a Shopify plus plan. But if you are trying to just add a product in the cart, you can use the Shopify app extension and Cart API to do so.
My interest is to create something that can be added to the cart page to provide the ability for a person to add one more item to their cart. This “one more item” will be our service: “WhatsTrack: Trackable Order by WhatsApp Notifications”.
I have some examples of how this can be done using the script tag: The script tag is loaded in the store and we ask the merchant to create a div somewhere in the cart template, for example: “
. ..”, then using the script tag we can manipulate this div to insert an inline HTML content.
Do you think this approach might be a bad thing to do that could make it impossible for the application to receive the “Built for Shopify” seal? Our greatest interest is to achieve the seal, including the application that will be installed in the store is being created with React + Shopify Polaris.