How can I add a variant picker in the Shopify cart drawer for an upsell product? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed 4 hours ago. Improve this question I’m trying to add a variant picker in the cart drawer section for an upsell product (a cap with two color variants). However, Shopify doesn’t automatically include a variant selector when upselling this product. The default selection is always the “Navy Blue” variant. I know that Shopify has a component called product_variant_picker, and these are the parameters it accepts: {% comment %} Renders product variant picker Accepts: product: {Object} product object. block: {Object} passing the block information. product_form_id: {String} Id of the product form to which the variant picker is associated. update_url: {Boolean} whether or not to update the URL when changing variants. If false, the URL isn't updated. Default: true (optional). Usage: {% render 'product-variant-picker', product: product, block: block, product_form_id: product_form_id %} {% endcomment %} How do I properly integrate the product_variant_picker in the cart drawer section? What should I pass for the block parameter? Is there anything else I’m missing that could be preventing the variant options from displaying correctly? Any guidance or examples would be greatly appreciated!

Comment (0)

You’ll be in good company