Right now I have built a website that

Right now I have built a website that hides pricing unless a cookie is present. I am using cloudflare workers to restore pricing information through styling when the cookie is present. However, this worker is breaking the "Add to Cart" functionality on my side
13 Replies
Retard
Retard2y ago
Stack Overflow
Cloudflare Worker Prevents Add to Cart from Working on First Attemp...
I am currently working on a Cloudflare Worker Script that will restore all pricing information if the user has accesses the pricing mode page, which applies a unique "pricing-mode" ON Coo...
Retard
Retard2y ago
I am not sure if the code that I have written is "beautiful" but I have also been told that I can simply use HTMLRewriter instead Then again, I also believe I have solved this issue By using a php redirect on amount log script I guess, can someone please just verify that my Worker Script is written correctly?
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
Retard
Retard2y ago
So all in all, my worker script is breaking my add to cart button. Not sure how to get support here in this discord but I can even tip someone for their time
Retard
Retard2y ago
Ella's Bubbles
4-Fold Tempered Glass Shower Screen for Walk-In Tubs
This is brand new product just launched by Ella’s Bubbles and is very convenient alternative to regular shower curtains. This is probably the best and most convenient screen option for walk-in tubs found anywhere.
Retard
Retard2y ago
Notice that you need to add it to your cart twice If I disable my worker script, this is resolved..
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
Retard
Retard2y ago
Really appreciate that man, I would love to compensate you for your time or leave a review in any manner I’m also still working on this as you can tell I converted my issue from not being to add the main product to cart at all, to needing to click add to cart twice on accessory pages lol I appreciate it @zsmooth Maybe even HTMLRewriter would solve this, either that or I’m thinking somehow disabling the worker from running on button click
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
Retard
Retard2y ago
Ella's Bubbles
Shower Column Kit for Deck Mounted Walk-In Tub Faucets
Ella Shower Column Kit for Walk-In Tubs features a column that holds a large overhead rain shower and an adjustable slider for the hand shower.
Retard
Retard2y ago
Somehow things seem to be working for me, I’ve done absolutely nothing with the worker script 😭😭😭 Do you mind maybe still educating me on a better way to have wrote that script? @zsmooth
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
Retard
Retard2y ago
And to confirm I can append CSS the same way? Can you merge this with my current code for example? I’m sure I can gamble with it for 2 hours but just to save me the time? Happy Thanksgiving and holidays @zsmooth You’re a good lad! 🤙🏽 Hey @zsmooth, I’m wondering if you can help me merge 2 worker scripts into one and possible touch up my replace <body> code For instance I’d like to apply custom CSS AND apply a cookie in some cases, and I’m not so sure how to combine those with different responses And/or if I can just have 2 async functions as the same worker on the same paths I can tip you for your time as well
Want results from more Discord servers?
Add your server