konnektive-one 1.2.1 → 1.2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "konnektive-one",
3
- "version": "1.2.1",
3
+ "version": "1.2.2",
4
4
  "description": "Konnektive / CheckoutChamp checkout engine \u2014 single-bundle (jQuery + sweetalert2). Load dist/engine.js with a data-config attribute pointing at your OPconfig.js.",
5
5
  "main": "dist/engine.js",
6
6
  "repository": {
package/readme.md CHANGED
@@ -73,10 +73,34 @@ Only the `*_konnektive` ids (`pid_konnektive`, `pid_konnektive_ss`, `campaignID_
73
73
  `vid_konnektive`) are sent to the API. Display fields (`price`, `name`, `terms*`, …) are for
74
74
  your page scripts. `shippingID` is the Konnektive shipping profile.
75
75
 
76
+ ### Other init() keys worth knowing
77
+
78
+ | Key | Default | What it does |
79
+ |---|---|---|
80
+ | `urlPiiTransport` | `'session'` | How customer details cross the shipping → checkout hop. `'session'` parks them in `sessionStorage` and keeps them out of the URL. `'query'` restores the old native GET submit that put name/email/phone/address in the query string — a kill switch, not a feature. |
81
+ | `piiFields` | the `cShip*` / `cEmail` / `cPhone2` set | Fields withheld from the URL. A **denylist**: anything not listed passes through, so unknown affiliate/tracking params survive. Setting it **replaces** the default list — restate the defaults you still want. |
82
+ | `quickLeadOnBlur` | `false` | Two-page funnels only: keep a partial lead fresh on every shipping-field blur. One-page checkouts (`data-onePageCheckout="true"`) already do this. Opt-in because it issues a `/leads/import` per blur. |
83
+ | `pageExtension` | `'.html'` | Extension the engine puts on in-funnel links (`bonus2`, `thankyou`). **Set `''` on hosts that serve extensionless routes** (Cloudflare Workers Assets, Netlify, Vercel), or every navigation eats a redirect. |
84
+ | `passThruParams` | `clickid, msclkid, refd, trk` | Params forwarded past checkout to bonus/thankyou. Also **replaces** wholesale — restate the defaults. |
85
+
76
86
  ## 3. Config-dependent page scripts
77
87
 
78
- Scripts that read `getConfig()` **at load time** must wait for the config. Use
79
- `PaymentEngine.ready` (a Promise that resolves with the config) — keep the
88
+ Scripts that read `getConfig()` **at load time** must wait for the config. There
89
+ are two signals, and picking the wrong one fails silently:
90
+
91
+ | Your script… | Wait on |
92
+ |---|---|
93
+ | only reads `getConfig()` | `PaymentEngine.ready` |
94
+ | also reads a field `render()` builds — `#cBillProductIndex`, `#cShipCountry`, `#cShip*` (package/price summaries, `initTotalBox()`) | `PaymentEngine.rendered` |
95
+
96
+ `ready` resolves as soon as config loads, which is **before** `render()` has
97
+ built those hidden inputs. Using it for the second case gives you an empty form,
98
+ so the script silently falls back to defaults — the classic symptom is a
99
+ checkout summary rendering `$00.00`. When in doubt use `rendered`: it is strictly
100
+ later and settles on tracking pages too. Each has a matching DOM event
101
+ (`konnektive:ready`, `konnektive:rendered`).
102
+
103
+ Use `PaymentEngine.ready` (a Promise that resolves with the config) — keep the
80
104
  dependency visible in the page body:
81
105
 
82
106
  ```html