Корзина товаров на JS+JSON
Нужно доделать\переделать уже готовый скрипт корзины.
https://d.paybot.top/lab/js/script.js
Страница с корзиной:
https://d.paybot.top/mc_payform_new.php?user_id=1868174519888391&customer=1788512094582035&order_id=490
1. Исправить баг с разблокировкой товара с помощью +/- (результат можно посмотреть в дебаге ниже под корзиной)
2. Немного изменить принцип работы.
У нас будет единый скрипт на бекенде https://d.paybot.top/mc_vis_getcart_new.php?user_id=1868174519888391&customer=1788512094582035&order_id=490, который принимает значения
user_id
mes_id
order_id
cart
Доступ к ФТП дам.
В случае если cart = "" (при первой загрузке) mc_vis_getcart_new.php не будет писать в базу (так как собственно и нечего), а вернет json-строку вида:
{"result":"ok","cart":"корзина в json как ранее","subtotal":"Подитог: 100 USD","tax":"Налог: 5% (5 USD)","delivery":"Стоимость доставки 10 USD","total":"Итого: 115 USD","paybuttons":"html код кнопок","addr":"Адрес", "phone":"12321123","comm":"комментарий","order_id":"21332"}
Распихиваем это все по соответствующим переменными (если result = ok) и выводим в таком порядке
order_id
addr
phone
comm
cart
subtotal
tax
delivery
total
paybuttons
На фронте мы сумму не считаем (только стоимость товаров в группах). При действиях с корзиной формируем json-строку с товарами и отправляем на mc_vis_getcart_new.php. Пока в ответ не получим result = ok блокируем интерфейс (делаем никликабельным или накладываем оверлей с какой-то анимацией загрузки), затем перерисовуем (обновляем) в случае успеха.
Требования:
- уделить внимание безопасности
- комментарии к "хитрым" кускам кода
Более подробно в переписке.
Current freelance projects in the category Javascript and Typescript
Development of an interactive Palworld map for the websiteWe need to develop an interactive map for Palworld based on the example: https://palworld.gg/map We need not just a static image, but a full-fledged interactive map where users can view locations, toggle object categories on/off, search for specific points, and interact with… HTML & CSS, Javascript and Typescript ∙ 1 day 9 hours back ∙ 28 proposals |
Development of the AM Mobility platform (car service, parking, insurance, car rental)
5804 USD
We are looking for a team or an experienced Full Stack developer to create the MVP of the AM Mobility platform. AM Mobility is a unified digital ecosystem for motorists, combining in one application and web platform: parking; car service; tire fitting; car wash; car rental;… Javascript and Typescript, Web Programming ∙ 6 days 16 hours back ∙ 116 proposals |
Gsap animations
22 USD
Good day. Corrections need to be made in the current project. A specialist is needed who works well with gsap/lenis. Animation of cards needs to be done. Detailed specifications here:… Javascript and Typescript, Web Programming ∙ 6 days 22 hours back ∙ 21 proposals |
I am looking for a mentor with Claude Code to launch a web project from scratch.Brief about the task: I am a beginner with no programming experience. I have a ready specification for website development (42 pages, Next.js, PostgreSQL). I want to implement it myself using Claude Code - I need a specialist who will set up the environment and teach me how to… Javascript and Typescript, Tuition ∙ 8 days 21 hours back ∙ 23 proposals |
Website design updateIt is necessary to update the design of the existing website using HTML, CSS, JS: refresh the appearance, make it modern and responsive for mobile devices. Smooth animations and interactive elements need to be added. HTML & CSS, Javascript and Typescript ∙ 9 days 14 hours back ∙ 97 proposals |