Greetings, esteemed ones.
There is a website on DLE that needs to adapt the template from the previous store. I have attached a screenshot of the site (where products are simply listed) and a screenshot of the store (where they are displayed as product cards).
In addition, a script needs to be developed that, when clicking on add to cart, will add the selected product, quantity, and price to the cart. The cart needs to be fully functional so that the quantity of products and the total cost can be seen.
I suggest not to overcomplicate things, without any data storage, so that simply on the client side JS adds products, forms the cart, and when the send button is pressed - the data is sent to the WhatsApp group according to the template. There is a separate WhatsApp server with its own API.
I am ready with the templates, just need to integrate DLE. DLE is already installed and ready for action ))
Summary of what is needed:
Of course, integration with the new template. Next come the scripts. JS will be suitable:
An array for storing products and their quantities
A function for adding a product to the cart or increasing its quantity
A function for decreasing/increasing the quantity of a product or removing it
A function for updating the display of the quantity and price of a product on the page
A function for updating the total quantity of products in the cart
A function for hiding and resetting the cart upon successful submission of products
A function for sending data via API to WhatsApp through an AJAX request to a PHP script
Optimization of image loading through LazyLoad and data caching to avoid overloading Mysql