# \#javascript

**URL:** https://community.shopify.com/tag/javascript/1420.md

[Latest](https://community.shopify.com/latest.md) · [Categories](https://community.shopify.com/categories.md) · [Tags](https://community.shopify.com/tags.md)

---

## [Half of my orders were zero on GA4](https://community.shopify.com/t/half-of-my-orders-were-zero-on-ga4/383081)

<div class="topic-metadata">

**Author:** [@Damasceno](https://community.shopify.com/u/Damasceno)\
**Replies:** 4\
**Last updated:** [October 2, 2026, 11:12pm UTC](https://community.shopify.com/t/half-of-my-orders-were-zero-on-ga4/383081 "2026-10-02T23:12:13Z")

</div>

Hello good afternoon! Guys, half of my orders are arriving zero in GA4, I’ll show you how the tag is configured. This is my purchase tag: It is configured to fire on an event in the ‘‘purchase’’ data layer. Howeve…

---

## [Dawn Theme: Unavailable variant remains selected after changing options](https://community.shopify.com/t/dawn-theme-unavailable-variant-remains-selected-after-changing-options/684854)

<div class="topic-metadata">

**Author:** [@kristd](https://community.shopify.com/u/kristd)\
**Replies:** 16\
**Last updated:** [September 22, 2026, 1:06pm UTC](https://community.shopify.com/t/dawn-theme-unavailable-variant-remains-selected-after-changing-options/684854 "2026-09-22T13:06:42Z")

</div>

My customers have provided feedback that they are confused on one of my product pages due to the way Shopify handles variant selections. TL;DR: I want to fix how an unavailable variant remains selected after changing op…

---

## [Check Out](https://community.shopify.com/t/check-out/418919)

<div class="topic-metadata">

**Author:** [@tracy\_xoxo](https://community.shopify.com/u/tracy_xoxo)\
**Replies:** 4\
**Last updated:** [September 21, 2026, 11:54am UTC](https://community.shopify.com/t/check-out/418919 "2026-09-21T11:54:02Z")

</div>

Is it possible to block customers from purchasing a product on its own? For example, if a client adds only a diamond (without a ring setting) to the cart and proceeds to checkout, can the system automatically stop them …

---

## [How to Build a Custom Form with Image Upload, Text Input, Dropdown and Store Data in Shopify?](https://community.shopify.com/t/how-to-build-a-custom-form-with-image-upload-text-input-dropdown-and-store-data-in-shopify/419796)

<div class="topic-metadata">

**Author:** [@ShajidAhamed](https://community.shopify.com/u/ShajidAhamed)\
**Replies:** 3\
**Last updated:** [September 14, 2026, 5:00am UTC](https://community.shopify.com/t/how-to-build-a-custom-form-with-image-upload-text-input-dropdown-and-store-data-in-shopify/419796 "2026-09-14T05:00:39Z")

</div>

Hi Shopify Devs, I’m trying to build a custom form on my Shopify store (not using an app) and I need help implementing the following: Form Requirements: I want to create a form that allows website visitors to: Upload …

---

## [How do I make additional fields required in the Contact form?](https://community.shopify.com/t/how-do-i-make-additional-fields-required-in-the-contact-form/411606)

<div class="topic-metadata">

**Author:** [@Marianna\_YTTG](https://community.shopify.com/u/Marianna_YTTG)\
**Replies:** 6\
**Last updated:** [September 14, 2026, 4:56am UTC](https://community.shopify.com/t/how-do-i-make-additional-fields-required-in-the-contact-form/411606 "2026-09-14T04:56:47Z")

</div>

Hello Shopify Community! It seems that the validation for the email field in Contact form happens server side in Dawn. Is there an easy way to extend that to other form fields? I would like to make other form fields req…

---

## [Shopify app generate extension --template discount fails with "graphql-code-generator not found" (JS, npm and pnpm, CLI 4.8.0)](https://community.shopify.com/t/shopify-app-generate-extension-template-discount-fails-with-graphql-code-generator-not-found-js-npm-and-pnpm-cli-4-8-0/680026)

<div class="topic-metadata">

**Author:** [@Renzo\_Gil\_Cruzado](https://community.shopify.com/u/Renzo_Gil_Cruzado)\
**Replies:** 4\
**Last updated:** [September 11, 2026, 1:31pm UTC](https://community.shopify.com/t/shopify-app-generate-extension-template-discount-fails-with-graphql-code-generator-not-found-js-npm-and-pnpm-cli-4-8-0/680026 "2026-09-11T13:31:16Z")

</div>

Reproduced consistently across 5 attempts, two different package managers (npm at app root and pnpm at app root — the discount template always shells out to pnpm internally regardless), JavaScript flavor. Steps to repro…

---

## [Someone Has Cloned My Site But Isn't Mirroring](https://community.shopify.com/t/someone-has-cloned-my-site-but-isnt-mirroring/356498)

<div class="topic-metadata">

**Author:** [@way\_out\_west](https://community.shopify.com/u/way_out_west)\
**Replies:** 5\
**Last updated:** [September 5, 2026, 5:57am UTC](https://community.shopify.com/t/someone-has-cloned-my-site-but-isnt-mirroring/356498 "2026-09-05T05:57:32Z")

</div>

So, I found out last week that someone has cloned my site but it isn’t mirrored. They have content up from WAYYY earlier in they year. I dug through every shopify conversation that I could looking for solutions to redire…

---

## [Solution for cloning Shopify HTML websites](https://community.shopify.com/t/solution-for-cloning-shopify-html-websites/589015)

<div class="topic-metadata">

**Author:** [@Triffit](https://community.shopify.com/u/Triffit)\
**Replies:** 6\
**Last updated:** [August 31, 2026, 7:59am UTC](https://community.shopify.com/t/solution-for-cloning-shopify-html-websites/589015 "2026-08-31T07:59:55Z")

</div>

I am suffering a lot from website cloning attacks. Customers are complaining and damaging my brand’s reputation, saying they did not receive their products. This is harming my business significantly. I would really like …

---

## [Help with Filter Issue – Selected Color Swatch Not Showing Product Properly](https://community.shopify.com/t/help-with-filter-issue-selected-color-swatch-not-showing-product-properly/421740)

<div class="topic-metadata">

**Author:** [@Adesh1](https://community.shopify.com/u/Adesh1)\
**Replies:** 8\
**Last updated:** [August 28, 2026, 9:23pm UTC](https://community.shopify.com/t/help-with-filter-issue-selected-color-swatch-not-showing-product-properly/421740 "2026-08-28T21:23:47Z")

</div>

Hi everyone, I’m facing an issue with the filtering on my Shopify store. When a customer selects a color swatch (e.g., Blue Links), instead of showing the product that has that Blue Links variant, it shows the main prod…

---

## [Why does my store's wishlist function keep redirecting to a reCAPTCHA page?](https://community.shopify.com/t/why-does-my-stores-wishlist-function-keep-redirecting-to-a-recaptcha-page/303262)

<div class="topic-metadata">

**Author:** [@Packpe](https://community.shopify.com/u/Packpe)\
**Replies:** 6\
**Last updated:** [August 28, 2026, 8:41pm UTC](https://community.shopify.com/t/why-does-my-stores-wishlist-function-keep-redirecting-to-a-recaptcha-page/303262 "2026-08-28T20:41:23Z")

</div>

The wishlist function of my store seems to be malfunctioning. I’ve noticed that it works for only a few products, and for others, it redirects to a Google reCAPTCHA page. Upon completing the reCAPTCHA, it prompts again, …

---

## [Finding pending operations on a file](https://community.shopify.com/t/finding-pending-operations-on-a-file/390701)

<div class="topic-metadata">

**Author:** [@Craftware](https://community.shopify.com/u/Craftware)\
**Replies:** 4\
**Last updated:** [August 26, 2026, 9:07am UTC](https://community.shopify.com/t/finding-pending-operations-on-a-file/390701 "2026-08-26T09:07:02Z")

</div>

Our app, Craftware Simple File Manager, is running into a bug that prevents the application from moving files. Shopify file update operations occasionally fail with FILE\_LOCKED. Merchants are unable to figure out why an…

---

## [Prevent repeat purchases of certain products but allow other products to be purchased again](https://community.shopify.com/t/prevent-repeat-purchases-of-certain-products-but-allow-other-products-to-be-purchased-again/361210)

<div class="topic-metadata">

**Author:** [@wendy\_clark](https://community.shopify.com/u/wendy_clark)\
**Replies:** 3\
**Last updated:** [August 22, 2026, 6:14am UTC](https://community.shopify.com/t/prevent-repeat-purchases-of-certain-products-but-allow-other-products-to-be-purchased-again/361210 "2026-08-22T06:14:50Z")

</div>

Hello! I have some digital products (e-books) as well as physical products (paperbacks). I want to prevent someone from purchasing duplicates of the ebook as I don’t have a gifting system or anything, they just end up wi…

---

## [How to change the 'Buy Now' button text?](https://community.shopify.com/t/how-to-change-the-buy-now-button-text/333143)

<div class="topic-metadata">

**Author:** [@Milan\_5](https://community.shopify.com/u/Milan_5)\
**Replies:** 6\
**Last updated:** [August 20, 2026, 11:19am UTC](https://community.shopify.com/t/how-to-change-the-buy-now-button-text/333143 "2026-08-20T11:19:08Z")

</div>

Hello, I’m trying to change the text of the “Buy Now” button to say “Preorder Now” instead. I’ve looked into various solutions, like the one mentioned here: https://community.shopify.com/post/1703459 . However, it seems…

---

## [Need Help Improving Store Speed - Remove Leftover Code &amp; Reduce Unused JavaScript](https://community.shopify.com/t/need-help-improving-store-speed-remove-leftover-code-amp-reduce-unused-javascript/385236)

<div class="topic-metadata">

**Author:** [@TheGreyArea](https://community.shopify.com/u/TheGreyArea)\
**Replies:** 7\
**Last updated:** [August 9, 2026, 4:20am UTC](https://community.shopify.com/t/need-help-improving-store-speed-remove-leftover-code-amp-reduce-unused-javascript/385236 "2026-08-09T04:20:02Z")

</div>

I’m struggling with my store speed, and Shopify support suggested removing leftover app code and reducing unused JavaScript. However, I’m not very technical, so I’m unsure how to do this myself. Here’s my performance re…

---

## [How to Add a button to header of Reformation theme](https://community.shopify.com/t/how-to-add-a-button-to-header-of-reformation-theme/378519)

<div class="topic-metadata">

**Author:** [@alextulin](https://community.shopify.com/u/alextulin)\
**Replies:** 9\
**Last updated:** [August 5, 2026, 8:34am UTC](https://community.shopify.com/t/how-to-add-a-button-to-header-of-reformation-theme/378519 "2026-08-05T08:34:45Z")

</div>

Hello. I would like to add a clickable button to the header of site. Site is: https://4867ec-96.myshopify.com/ Thank you in advance. Alex

---

## [Best ways to sell boxed tiles by m²](https://community.shopify.com/t/best-ways-to-sell-boxed-tiles-by-m/660633)

<div class="topic-metadata">

**Author:** [@nw2](https://community.shopify.com/u/nw2)\
**Replies:** 5\
**Last updated:** [August 5, 2026, 7:05am UTC](https://community.shopify.com/t/best-ways-to-sell-boxed-tiles-by-m/660633 "2026-08-05T07:05:14Z")

</div>

Hello community, We currently run a live tile store on Shopify and are looking for the best way to handle pricing per square meter (m²) while selling only full boxes. In the tile industry, customers expect to see price…

---

## [How are you handling add-to-cart these days — full page reload or AJAX drawer?](https://community.shopify.com/t/how-are-you-handling-add-to-cart-these-days-full-page-reload-or-ajax-drawer/658437)

<div class="topic-metadata">

**Author:** [@Rasel](https://community.shopify.com/u/Rasel)\
**Replies:** 11\
**Last updated:** [August 2, 2026, 8:34am UTC](https://community.shopify.com/t/how-are-you-handling-add-to-cart-these-days-full-page-reload-or-ajax-drawer/658437 "2026-08-02T08:34:42Z")

</div>

Cart UX chat for the theme devs :shopping\_cart: I’ve mostly moved to AJAX add-to-cart with a slide-out drawer so people never leave the page they’re on. Feels smoother, but it does mean more JS to babysit (updating the …

---

## [Rich Text Editor Removes JSON-LD Script After Saving – Any Workaround?](https://community.shopify.com/t/rich-text-editor-removes-json-ld-script-after-saving-any-workaround/651802)

<div class="topic-metadata">

**Author:** [@Indo\_Power](https://community.shopify.com/u/Indo_Power)\
**Replies:** 5\
**Last updated:** [July 16, 2026, 8:52am UTC](https://community.shopify.com/t/rich-text-editor-removes-json-ld-script-after-saving-any-workaround/651802 "2026-07-16T08:52:41Z")

</div>

Rich Text Editor Removes JSON-LD Script After Saving – Any Workaround? Hi everyone, I’m facing an issue with the Shopify Rich Text Editor and couldn’t find a reliable solution. I’m working on an industrial products web…

---

## [Is there a publicly available schema for the Admin GraphQL API?](https://community.shopify.com/t/is-there-a-publicly-available-schema-for-the-admin-graphql-api/350472)

<div class="topic-metadata">

**Author:** [@IstohG](https://community.shopify.com/u/IstohG)\
**Replies:** 17\
**Last updated:** [July 15, 2026, 6:46pm UTC](https://community.shopify.com/t/is-there-a-publicly-available-schema-for-the-admin-graphql-api/350472 "2026-07-15T18:46:24Z")

</div>

Does anyone know if there’s a publicly-available schema of the Admin API? Or can you only access it via a store’s authenticated endpoint (e.g https://.myshopify.com/admin/api//graphql.json)? I’m in a situation where my …

---

## [Is there an API Endpoint / GraphQL Mutation to create Purchase Orders?](https://community.shopify.com/t/is-there-an-api-endpoint-graphql-mutation-to-create-purchase-orders/280935)

<div class="topic-metadata">

**Author:** [@RyanTechLLC](https://community.shopify.com/u/RyanTechLLC)\
**Replies:** 14\
**Last updated:** [July 2, 2026, 10:08am UTC](https://community.shopify.com/t/is-there-an-api-endpoint-graphql-mutation-to-create-purchase-orders/280935 "2026-07-02T10:08:14Z")

</div>

I need to be able to create purchase orders (Shopify Help Center | Purchase orders) via the Shopify API. I can work with either one (Rest or GraphQl), I just can’t find documentation for it anywhere. I’m specifically try…

---

## [Facing issue with RTL-Arabic mapping. Swatch dont show the variant as soon as I switch to Arabic from English. Using storefront api to inject remaining variants if above 250](https://community.shopify.com/t/facing-issue-with-rtl-arabic-mapping-swatch-dont-show-the-variant-as-soon-as-i-switch-to-arabic-from-english-using-storefront-api-to-inject-remaining-variants-if-above-250/629527)

<div class="topic-metadata">

**Author:** [@dorame](https://community.shopify.com/u/dorame)\
**Replies:** 3\
**Last updated:** [July 1, 2026, 8:57am UTC](https://community.shopify.com/t/facing-issue-with-rtl-arabic-mapping-swatch-dont-show-the-variant-as-soon-as-i-switch-to-arabic-from-english-using-storefront-api-to-inject-remaining-variants-if-above-250/629527 "2026-07-01T08:57:42Z")

</div>

I’m facing an issue with RTL/Arabic localization on Shopify storefront variant swatches. Setup Storefront uses Shopify Storefront API Product has more than 250 variants We inject/load the remaining variants sepa…

---

## [window.ShopifyAnalytics.meta missing/empty inside Theme Editor? (Works fine on Live storefront)](https://community.shopify.com/t/window-shopifyanalytics-meta-missing-empty-inside-theme-editor-works-fine-on-live-storefront/643606)

<div class="topic-metadata">

**Author:** [@Dev\_369](https://community.shopify.com/u/Dev_369)\
**Replies:** 7\
**Last updated:** [June 28, 2026, 1:30pm UTC](https://community.shopify.com/t/window-shopifyanalytics-meta-missing-empty-inside-theme-editor-works-fine-on-live-storefront/643606 "2026-06-28T13:30:56Z")

</div>

Hi everyone, I’m experiencing a strange issue with the global window.ShopifyAnalytics object, specifically inside the Theme Editor (Customizer) environment. The Problem: When inspecting the live storefront (production)…

---

## [Product snippets from search console](https://community.shopify.com/t/product-snippets-from-search-console/357362)

<div class="topic-metadata">

**Author:** [@ihs1](https://community.shopify.com/u/ihs1)\
**Replies:** 5\
**Last updated:** [June 26, 2026, 5:17am UTC](https://community.shopify.com/t/product-snippets-from-search-console/357362 "2026-06-26T05:17:28Z")

</div>

HI google search console is saying that i have 2 fields missing in my product snippets. im not sure i have done this so dont know where i need to add the below 2 fields it shows as missing: Missing field “aggregateRati…

---

## [Oops, something went wrong. What happened? Oauth error missing\_shopify\_permission: write\_payment\_ga](https://community.shopify.com/t/oops-something-went-wrong-what-happened-oauth-error-missing-shopify-permission-write-payment-ga/297893)

<div class="topic-metadata">

**Author:** [@Eduardosent](https://community.shopify.com/u/Eduardosent)\
**Replies:** 1\
**Last updated:** [June 18, 2026, 7:25am UTC](https://community.shopify.com/t/oops-something-went-wrong-what-happened-oauth-error-missing-shopify-permission-write-payment-ga/297893 "2026-06-18T07:25:39Z")

</div>

I tried to select those permissions from the app dashboard but they were nowhere to be found. only I found write\_payment-mandate, none of the ones I was looking for, what can I do

---

## [Automated Inventory Management](https://community.shopify.com/t/automated-inventory-management/387543)

<div class="topic-metadata">

**Author:** [@magikartcards](https://community.shopify.com/u/magikartcards)\
**Replies:** 8\
**Last updated:** [June 13, 2026, 5:38am UTC](https://community.shopify.com/t/automated-inventory-management/387543 "2026-06-13T05:38:19Z")

</div>

My store is mainly focused on selling packs of trading cards. Sealed boxes contain 30 packs. I sell both sealed boxes and groups of individual packs broken out of the sealed boxes. Variations are as follows: -Sealed Bo…

---

## [How do I add Structured Data to individual Pages?](https://community.shopify.com/t/how-do-i-add-structured-data-to-individual-pages/325259)

<div class="topic-metadata">

**Author:** [@RoncoIndustries](https://community.shopify.com/u/RoncoIndustries)\
**Replies:** 7\
**Last updated:** [June 3, 2026, 5:24am UTC](https://community.shopify.com/t/how-do-i-add-structured-data-to-individual-pages/325259 "2026-06-03T05:24:45Z")

</div>

I am looking at what Google is asking for for structured data on website. Here https://developers.google.com/search/docs/appearance/structured-data/intro-structured-data#markup-formats-and-placement I want to either adj…

---

## [I need to add an EVENT for my wishlist's add to cart to work](https://community.shopify.com/t/i-need-to-add-an-event-for-my-wishlists-add-to-cart-to-work/628128)

<div class="topic-metadata">

**Author:** [@3rdDay](https://community.shopify.com/u/3rdDay)\
**Replies:** 7\
**Last updated:** [May 20, 2026, 6:50am UTC](https://community.shopify.com/t/i-need-to-add-an-event-for-my-wishlists-add-to-cart-to-work/628128 "2026-05-20T06:50:02Z")

</div>

Hi, I have an app called SWishlist and it provides a wishlist page with add to cart buttons below each product added to the wishlist on my website (Horizon theme): 3rd Day - you may need to add a product to the wishlist…

---

## [Javascript error in Firefox with Variant Picker](https://community.shopify.com/t/javascript-error-in-firefox-with-variant-picker/623025)

<div class="topic-metadata">

**Author:** [@Astroimagery](https://community.shopify.com/u/Astroimagery)\
**Replies:** 4\
**Last updated:** [May 18, 2026, 5:28am UTC](https://community.shopify.com/t/javascript-error-in-firefox-with-variant-picker/623025 "2026-05-18T05:28:52Z")

</div>

Horizon theme variant-picker.js throws a script error in Firefox on product pages — private class fields in the custom element appear to initialise before the DOM is ready in Firefox. Any body understand how to fix this?…

---

## [What am I missing in Admin UI for Discounts?](https://community.shopify.com/t/what-am-i-missing-in-admin-ui-for-discounts/418601)

<div class="topic-metadata">

**Author:** [@Fred\_Blueshoon](https://community.shopify.com/u/Fred_Blueshoon)\
**Replies:** 3\
**Last updated:** [May 15, 2026, 5:46pm UTC](https://community.shopify.com/t/what-am-i-missing-in-admin-ui-for-discounts/418601 "2026-05-15T17:46:23Z")

</div>

According to this page, https://shopify.dev/docs/apps/build/discounts/ux-for-discounts I should be able to Adding simple form inputs to the discount page that manage metafields owned by the discount. Your UI extension i…

---

## [Checkout: Display informational inline message instead of blocking error?](https://community.shopify.com/t/checkout-display-informational-inline-message-instead-of-blocking-error/402953)

<div class="topic-metadata">

**Author:** [@Sam\_D6](https://community.shopify.com/u/Sam_D6)\
**Replies:** 2\
**Last updated:** [May 15, 2026, 8:37am UTC](https://community.shopify.com/t/checkout-display-informational-inline-message-instead-of-blocking-error/402953 "2026-05-15T08:37:19Z")

</div>

Through a ui-extension or shopify function if its possible to display a non-blocking message like how shopify will suggest a zip code correction here? I’m using a shopify function currently and can display this message “…

[Next page](https://community.shopify.com/tag/javascript/1420.md?match_all_tags=true&page=1&tags%5B%5D=javascript)
