Extra Variant Options (more than 3) on Shopify Product Page || Draft Order issue #139575
Replies: 3 comments
-
|
Thanks for posting in the GitHub Community, @Shaykh-Abdul-Basit ! We’ve moved your post to our Programming Help 🧑💻 category, which is more appropriate for this type of discussion. Please review our guidelines about the Programming Help category for more information. |
Beta Was this translation helpful? Give feedback.
This comment was marked as off-topic.
This comment was marked as off-topic.
-
|
You’ve hit the exact dilemma that makes the Draft Order strategy so difficult to scale. Once you move to a custom_item to bypass the price lock, you lose the native link to the product's CDN image and the Attribution/Analytics engine. A more stable way to handle this in 2026 without the Draft Order overhead is to stay within the Ajax Cart and use Line Item Properties combined with a 'Master Variant' strategy. Instead of creating a custom item at the endpoint, you keep the base variant_id but use a hidden 'service' product or a price-adjustment logic that Shopify’s Functions (specifically Cart Transform) can now handle more natively. Alternatively, if you want to avoid the headache of manual price-syncing and broken analytics altogether, you should look into Misk Variant & Product Options. We built it as a native Shopify App Embed specifically to solve this '3-option limit' and the price-adjustment bug. It uses Line Item Properties to pass extra data while keeping the product image and analytics intact, so you don't have to rely on external endpoints or draft order invoices to get custom pricing to work. It keeps the theme code 100% clean and saves you from having to bridge that gap between custom prices and variant tracking manually! |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Select Topic Area
Question
Body
As we know, Shopify only provides 3 variant options on the product page, so I’m trying to add more variants.
I am trying to add more variant options on the Shopify product page, as Shopify only allows up to three options by default. I’m sending extra variant options (which have different prices) from the product page. When the customer selects any of these extra variants, the price is added to the total. I then send all the variant data (including extra variants) through properties to the cart page.
Once in the cart, the prices are adjusted using JavaScript, and the data is stored in an array successfully. When the customer clicks on checkout, a request is sent to my external endpoint to create a draft order. The customer is then redirected to checkout via the draft invoice URL. So far, this works fine.
The issue arises when I want to show the product image. To display it, I need to send the variant ID in the array. However, if I include the variant ID, I can’t set a custom price because it picks the default variant's original price. On the other hand, if I don’t send the variant ID and save it as a custom item, the image won’t display, and Shopify’s analytics won’t track the product data (e.g., which items were sold). Since it’s treated as a custom item, this tracking fails.
Is there any way to achieve both: showing the image and having a custom price while retaining Shopify’s product tracking? Or, is there another way to achieve this functionality without using the draft order strategy?
Any guidance or suggestions would be appreciated
Beta Was this translation helpful? Give feedback.
All reactions