Ecommerce Shopify WordPress Discussion

How to add "how did you hear about us?" dropdown to the BUY BUTTON cart in Shopify?

I was able to follow the instructions on this site to get a "How did you hear about us?" dropdown field to show up on the main cart page for a shopify store. However, I only use the Buy Buttons on my own-hosted website. Any ideas how to get this new field to show up in the Buy Button-generated cart? This is the code that makes the Buy Button appear on my site. Is there something that can be added to this under "Cart" to pull in the "How did you hear about us" question? <div id='product-component-1701116833004'></div> <script type="text/javascript"> /*<![CDATA[*/ (function () { var scriptURL = 'https://sdks.shopifycdn.com/buy-button/latest/buy-button-storefront.min.js'; if (window.ShopifyBuy) { if (window.ShopifyBuy.UI) { ShopifyBuyInit(); } else { loadScript(); } } else { loadScript(); } function loadScript() { var script = document.createElement('script'); script.async = true; script.src = scriptURL; (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(script); script.onload = ShopifyBuyInit; } function ShopifyBuyInit() { var client = ShopifyBuy.buildClient({ domain: 'XXXXX.myshopify.com', storefrontAccessToken: '555f8b0e8383840db2ffef9508a976e3', }); ShopifyBuy.UI.onReady(client).then(function (ui) { ui.createComponent('product', { id: '8256061538602', node: document.getElementById('product-component-1701116833004'), moneyFormat: '%24%7B%7Bamount%7D%7D', options: { "product": { "styles": { "product": { "@media (min-width: 601px)": { "max-width": "calc(25% - 20px)", "margin-left": "20px", "margin-bottom": "50px" } } }, "text": { "button": "Add to cart" } }, "productSet": { "styles": { "products": { "@media (min-width: 601px)": { "margin-left": "-20px" } } } }, "modalProduct": { "contents": { "img": false, "imgWithCarousel": true, "button": false, "buttonWithQuantity": true }, "styles": { "product": { "@media (min-width: 601px)": { "max-width": "100%", "margin-left": "0px", "margin-bottom": "0px" } } }, "text": { "button": "Add to cart" } }, "option": {}, "cart": { "text": { "total": "Subtotal", "button": "Checkout" }, "contents": { "note": true } }, "toggle": {} }, }); }); } })(); /*]]>*/ </script>
Our products

The help you need, when you need it

App by Turbo Engine

3 apps • 5.0 average rating

Turbosify Speed Booster

5.0 (7)
Get better conversions by optimizing shopify store Google page speed Installed

Turbosify Translator for Wordpress Woocommerce

5.0 (74) Free Wordpress Woocommerce Plugin
Translate your wordpress website to multiple language within 1 click, no configuration needed, no No technical required

Grow your business here

Whether you want to sell products down the street or around the world, we have all the tools you need.