GLUCD — ADDRESS + EMAIL, CONNECTED TO GOOGLE SHEETS

READY TO UPLOAD
Upload/extract the archive contents into the website's /glucd/ directory so index.html and assets/ are directly inside it. Back up the current folder first. The hosted page has not been replaced by this chat; this is the upload package.

LIVE DESTINATION
Spreadsheet: 1boTztCisZvsktxSarJ5dun9DvtPindUZZQuMBJ6y4mg
Tab ID: 893985174 (Feuille 1)
Google Apps Script project: GLUCD Order Form → codeuro
https://script.google.com/u/0/home/projects/1MRjrsWG8orA_N0WyprqeflAcTJ23oCfSyD3fZA-I7_72kZe8rm7c73Qx/edit
Receiver URL:
https://script.google.com/macros/s/AKfycbyPbab5Vo4kj0fBB-oQ2aHLYMkd7GnSOiupZmgFm6Znya3OWUyTxA9Y8KD6AzvS2Hxs/exec

WHAT CHANGED
Required Spanish address and email fields were added to all four original forms and the generated popup. Name and phone remain required. The new assets/order-submit.js sends orders to the deployed receiver. It confirms success only after receiving the receiver's acknowledgement. Retries keep the same order ID to avoid duplicate sheet rows.

EXISTING COLUMN MAPPING PRESERVED
A order id; B date; C full name; D sku; E quantity; F phone; G email; H product title; I full address; J city; K zip code; L province code; M total price; N Contry code.
The receiver checks these headers before writing and appends without replacing existing rows.

Verified product settings: SKU I2570-11, quantity 1, blood sugar complex, total 39 EUR, country ES. Email is written to G and address to I. A five-digit postal code is copied from the complete address to K when present. Separate city/province fields remain empty because this form does not collect them. Customers should include city and postal code in their full address.

AUTHORIZATION
The receiver runs under your authorized Google account. Google authorization and public submission deployment were approved by the user. Google's Sheets permission is broad; the code explicitly targets only the spreadsheet and tab above. Public GET requests expose configuration status only, never customer rows. The form accepts submissions from https://diva-nova.store (localhost is also enabled for verification).

MAINTENANCE
The deployed source is included in integration/Code.gs. Editing that local file does not change the running receiver: edit the Apps Script project and update its existing deployment to a new version. Avoid changing the /exec URL. If you move the website to another domain, update the receiver's allowed-origin validation and redeploy.

IMPORTANT
The package does not call an affiliate order API directly. It writes to your existing CODEuro-mapped spreadsheet. Any subsequent CODEuro import depends on your existing CODEuro sheet configuration, product availability and shipping requirements.

VERIFICATION
Live receiver health returned ok:true with the exact spreadsheet ID and tab ID. The browser form received and displayed the real receiver validation response for an intentionally invalid submission. Local receiver checks passed for successful append mapping, formula escaping, invalid data rejection and retry deduplication. No valid test order was created in the live fulfillment sheet.
