Implement the logic for recalculating the total amount of goods in the cart using JavaScript, taking into account the packaging (box).
Output Data
The site indicates the price per pair, site on Khoroshop
Each product has packaging (number of pairs in a box) — for example:
6
8
10
12
24
One model can have different packagings (modifications)
📌 Required Logic
In the cart, the quantity of the product should mean number of boxes
The actual number of pairs =
number of boxes × packagingThe total amount in the cart should be displayed as:
actual number of pairs × price per pair
📌 Example
Price per pair: 500 UAH
Packaging: 12 pairs
The client adds to the cart: 2
Result:
2 × 12 = 24 pairs
24 × 500 = 12,000 UAH
The cart should display the amount of 12,000 UAH.
📌 Important
The solution is implemented via JS (Custom scripts), without access to the server side.
It is necessary:
to work correctly when changing the quantity
to consider AJAX updates of the cart
There is no payment on the site, so only the correct display of the calculation for the user is important.
📌 Additionally (preferable)
Limit the possibility of entering fractional quantities
If necessary — add an explanation in the cart:
1 box = 12 pairs
📌 Expected Result
Ready JS code
Connection instructions
Brief explanation of the implementation logic
🔎 Please indicate in your feedback:
Do you have experience working with Khoroshop
Do you have experience customizing cart logic in e-commerce
What technical approach do you plan to use
The specific amount you are willing to take
-
326 Hello! I looked at the technical specifications — the task is clear: in the cart, quantity = boxes, and the total is calculated from the actual pairs (boxes × packaging) × price per pair. I will do this carefully in JS through Custom scripts, without a server, taking into account AJAX updates and correct operation with any change in quantity.
Technical approach
I will pull the packaging for each item (from modifications/attributes/name — wherever it is more convenient and stable on Goodshop).
I will intercept changes in quantity (buttons +/- and manual input), and prohibit fractions.
After each AJAX update of the cart, I will recalculate the lines and the total, so that everything matches visually.
…
If desired, I will add a note in the cart: “1 box = 12 pairs” (for each item).
Experience
Goodshop: yes, I have worked (custom scripts, storefront/cart edits, handling dynamic updates).
Customization of cart logic in e-commerce: yes (recalculations, dependencies on packaging/multiples, UI explanations).
Cost
1,800 UAH for “turnkey”: ready JS code + connection instructions + short explanation of the logic.
-
355 1 0 Hello! The task is clear, I am ready to implement the script for Khoroshop.
I work with pure JavaScript, so I can implement this logic even without access to the platform's backend.
Please tell me, is the information about "packaging" (for example, "12 pairs") currently displayed somewhere in the product card in the cart, or does it need to be pulled from the product page?
-
686 2 0 Hello, Bohdan!
I have carefully reviewed the technical task for your store on Khoroshop. This is an interesting logical problem that I can implement as cleanly and reliably as possible. The "boxes and pairs" issue is clear to me — I have already done similar custom calculations for e-commerce projects.
My approach to execution:
I will implement the code using MutationObserver. This guarantees that the logic will trigger instantly during AJAX updates of the cart (changing quantities, removing products) without reloading the page.
I will add validation so that the user cannot enter fractional values.
I will visually display explanations: how many pairs the customer is buying in the selected number of boxes and at what price.
… I will provide the finished JS code, which you can simply insert into the Khoroshop admin panel, along with detailed instructions for verification.
I am familiar with the Khoroshop platform and know how to work with its Custom Scripts. I am ready to start now and provide results within a few hours.
I look forward to collaborating!
-
4429 80 1 4 Trust a professional with over 10 years of experience! The rates and deadlines are current! I will be happy to cooperate! Experience in commercial development of online stores on CMS, business portals, and corporate websites - 11 years! +CMS: WordPress (+Woocommerce) PrestaShop/Opencart/Joomla/Bitrix/MODX/DLE/Shopify php/html/css/js/Mysql, PhotoShop/Figma Examples of work (from scratch, turnkey): https://amari.net.ua/ https://heypretty.gr/ https://thaibalispa.pl/ https://wildandorganic.com/ https://cryptosignals.org/ https://ecnbot.com https://locs-ua.com/ https://www.grower.com.ua/ https://www.alternativemedicine.com.ua/ https://silkkiss.ua/ https://v12coffee.com.ua/ https://smrtalgo.com/ https://sengero.no/ https://beautybysim.no/ https://sonatagalleri.com/ https://www.solmy-realestate.com/ https://www.emmanuel.com.ua/ https://www.onsitecomputersinc.com/ https://express-tehbud.com/ https://korostenporcelain.com.ua/ https://sladok.com.ua/ https://pricemds.com/ https://picupmedia.com/ https://www.serasar.com/
-
270 Good day, I have not had direct commercial experience with Goodshop, but I have worked with custom JS scripts in various CMS and e-commerce platforms. Approximately this technical approach:
1. Interception of changes in the quantity of goods
2. Multiplication of the number of boxes by packaging (reading from data attributes or DOM)
3. Dynamic recalculation of the total
4. Tracking AJAX updates (through MutationObserver or re-initialization after cart updates)
-
95878 1272 1 10 Hello. I have been working with JavaScript for over 8+ years. I am ready to collaborate.
-
8193 63 1 Good day,
I am ready to take on the implementation of the calculation of the quantity of goods in the cart on your website. The proposed logic for calculating the actual number of pairs and the total amount meets your requirements.
For this project, I will use JS (Custom scripts) for the correct operation with changes in the quantity of goods and AJAX updates of the cart. I am considering an additional restriction on the input of fractional values and the possibility of adding an explanation about packaging in the cart.
My rate is $16 per hour.
Arthur
-
298 Hello.
I have experience working with Khoroshop and customizing cart logic in e-commerce. I implement solutions through JS (Custom Scripts): intercepting quantity changes, obtaining packaging from modifications, and dynamically recalculating the total amount (boxes × packaging × price per pair) with correct functionality after AJAX updates (via MutationObserver/events). I will also limit fractional values and, if necessary, add an explanation "1 box = N pairs."
Cost: $50
Deadline: 1-2 days
-
332 Hello, Bohdan!
I have experience working with JavaScript on the frontend, customizing DOM logic, and working with AJAX.
I am working with the Khoroshop platform for the first time, but I am ready to adapt quickly.
I plan to implement the following:
- Use MutationObserver for correct logic during AJAX updates of the cart
- Read the packaging (number of pairs in a box) from the DOM (data attribute or select)
- Intercept changes in the quantity of goods
- Recalculate the actual number of pairs and the total: boxes × packaging × price
- Prohibition of fractional numbers
… - Display an explanation under the input: “1 box = X pairs”
- Testing the logic in all scenarios (different packagings, AJAX updates, quantity changes)
The solution will be implemented entirely through JS without interference in the server part.
-
182 Hello! I am a Frontend developer, a student at Kharkiv National University of Radioelectronics (ITU-24-1). I have experience working with the Horoshop logic through custom scripts.
My technical approach:
• MutationObserver: for stable calculations during AJAX updates of the cart without reloading.
• JS logic: automatic recalculation of the amount using the formula (boxes × packaging × price) and validation for whole numbers.
• Clean Code: development in VS Code, clean implementation without interference in the core.
Example of implementing complex logic in JS: https://sashynag33.github.io/forest-park-resort/
-
273 Good day, Bohdan! The project looks interesting. I have relevant experience in similar tasks. To estimate the timelines/budget, I need a bit more detail. Can we discuss this tomorrow with a short call?
-
1375 5 0 Hello.
I am implementing JS logic for recalculating the amount in the cart for packaging (boxes) for Khoroshop - without access to the backend, correctly considering AJAX updates.
Message me privately, I will see how your cart is displayed and will tell you about the cost and timelines.
-
834 4 0 Hello! I have a ready solution specifically for Horoshop. I will implement it through MutationObserver — this will allow for the correct recalculation of the price instantly, even during AJAX updates of the cart without reloading the page. What I will do: Automatic fetching of packaging from the product card. Logic: "Entered 2 boxes → Bot calculated 24 pairs → Displayed the total for 24 pairs." Complete prohibition on entering fractional values. I will add a text explanation under the input (e.g., "Total: 12 pairs").
-
2617 427 9 1 Send the website, I can go in to take a preliminary look at what can be done. No access is needed.
-
218 Yes, I have experience customizing cart logic in e-commerce and working with JS in builders (including solutions without access to the backend).
I understand the specifics of AJAX updates and DOM redrawing, so I will implement the correct recalculation of quantity (boxes > pairs) with dynamic updating of the total and limiting fractional values.
Technically, I plan to implement the solution through custom JS with tracking of quantity changes and MutationObserver for correct operation during AJAX updates of the cart.
-
156 Hello, I am ready to implement a price recalculation script for packaging on your site Khoroshop, I have extensive experience in development for this platform and can start working on the order right now.
-
1233 19 0 2 Hello! I am ready to complete the task. I have worked a lot with the modernization of shopping carts for e-commerce, but not on Khoroshop, but the JS is the same everywhere) I can complete it tomorrow during the day. I will write a function that will recalculate the price when the quantity changes as well as when AJAX is triggered. If necessary, it can be connected to any other action, it will not interfere with the backend.
-
976 4 0 Good night
I can implement the required cart logic on Khoroshop through custom JS without interfering with the server side. I have done similar customizations for e-commerce, where it is necessary to change the logic of displaying price, quantity, and totals taking into account modifications and AJAX updates.
Technically, the solution will be implemented through a JS script that will track changes in the quantity of products in the cart, take the packaging value of a specific modification, multiply the number of boxes by the packaging, and correctly recalculate the actual number of pairs and the total amount. The script will work stably with AJAX updates of the cart, without conflicts with the standard logic of Khoroshop. I can also add restrictions on fractional values and explanations like “1 box = X pairs”.
As a result, you will receive ready JS code, connection instructions, and an explanation of the logic so that in the future it will be easy to maintain or change the functionality.
I work with Khoroshop and custom scripts for the cart, so I understand all the limitations of the platform and how to implement this as stably as possible. I am ready to discuss the details and immediately start the implementation.
-
Не думаю що на хорошопі ви зможете таке реалізувати
-
Current freelance projects in the category HTML & CSS
Moved the website from OpenCart to the Khoroshop platformHello. There is a website on OpenCart, an online store. It is necessary to transfer the structure of the site to the GoodShop platform, select a design for the new site, and make it fully functional. HTML & CSS, Web Programming ∙ 11 hours 21 minutes back ∙ 20 proposals |
Need a strong WordPress / WooCommerce specialist for the refinement of the MARSPRO website.We are looking for a responsible freelancer or a small team for the quality completion and technical refinement of the MARSPRO company website. The website is already operational, but there are many minor and significant technical issues left by the previous developer. We need a… Content Management Systems, HTML & CSS ∙ 1 day 11 hours back ∙ 43 proposals |
Sandra Ice Cream - Kaleidoscop
92 USD
We have a small project, and we would like to know if you can prepare a video for us for an LED screen. The video will be used at our event. We will provide all necessary materials: design, brand book, dimensions, and technical requirements. Please let us know if you are… HTML & CSS ∙ 1 day 13 hours back ∙ 6 proposals |
WordPress block layoutHello. We need to do a redesign, specifically the layout of the blocks as shown in the mockup. The structure is not very different from what is currently done, except for the header and hero block. We need to redesign both the mobile and desktop versions. The website is on… HTML & CSS, Website Maintenance ∙ 1 day 18 hours back ∙ 67 proposals |
Development of a website according to the specifications on FramerYou need to create a website based on the parameters in the technical specification. https://docs.google.com/document/d/1ODO2C9Krb4AaMiJz9wfbNzWlAyA2FwCCHL8r0biajUY/edit?usp=sharing Please provide your actual rate based on this design. HTML & CSS, Javascript and Typescript ∙ 1 day 19 hours back ∙ 26 proposals |