diff --git a/one_page_checkout/README.rst b/one_page_checkout/README.rst new file mode 100755 index 000000000..67f076839 --- /dev/null +++ b/one_page_checkout/README.rst @@ -0,0 +1,46 @@ +.. image:: https://img.shields.io/badge/license-AGPL--3-blue.svg + :target: https://www.gnu.org/licenses/agpl-3.0-standalone.html + :alt: License: AGPL-3 + +One Page Checkout +================= +* Condensed ecommerce checkout into a single page. + +Configuration +============= +* No additional configurations needed + +License +------- +AFFERO GENERAL PUBLIC LICENSE, Version 3 (AGPL v3). +(https://www.gnu.org/licenses/agpl-3.0-standalone.html) + +Company +------- +* `Cybrosys Techno Solutions `__ + +Credits +------- +* Developer: (V17) Afra K, Contact: odoo@cybrosys.com + +Contacts +-------- +* Mail Contact : odoo@cybrosys.com +* Website : https://cybrosys.com + +Bug Tracker +----------- +Bugs are tracked on GitHub Issues. In case of trouble, please check there if your issue has already been reported. + +Maintainer +========== +.. image:: https://cybrosys.com/images/logo.png + :target: https://cybrosys.com + +This module is maintained by Cybrosys Technologies. + +For support and more information, please visit `Our Website `__ + +Further information +=================== +HTML Description: ``__ diff --git a/one_page_checkout/__init__.py b/one_page_checkout/__init__.py new file mode 100755 index 000000000..d5fed7ad6 --- /dev/null +++ b/one_page_checkout/__init__.py @@ -0,0 +1,22 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies(). +# Author: Cybrosys Techno Solutions() +# +# You can modify it under the terms of the GNU AFFERO +# GENERAL PUBLIC LICENSE (AGPL v3), Version 3. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. +# +# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE +# (AGPL v3) along with this program. +# If not, see . +# +############################################################################# +from . import controllers diff --git a/one_page_checkout/__manifest__.py b/one_page_checkout/__manifest__.py new file mode 100755 index 000000000..568898ca1 --- /dev/null +++ b/one_page_checkout/__manifest__.py @@ -0,0 +1,61 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies(). +# Author: Cybrosys Techno Solutions() +# +# You can modify it under the terms of the GNU AFFERO +# GENERAL PUBLIC LICENSE (AGPL v3), Version 3. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. +# +# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE +# (AGPL v3) along with this program. +# If not, see . +# +############################################################################# +{ + 'name': 'One Page Checkout', + 'version': '17.0.1.0.0', + 'category': 'eCommerce', + 'summary': """ + Simplifies ecommerce checkout by condensing it into a single, + user-friendly page. + """, + 'description': """ + Condenses the entire ecommerce checkout process into a single, + user-friendly page, simplifying the steps and enhancing the user + experience. + """, + 'author': 'Cybrosys Techno Solutions', + 'company': 'Cybrosys Techno Solutions', + 'maintainer': 'Cybrosys Techno Solutions', + 'website': 'https://www.cybrosys.com', + 'images': ['static/description/banner.jpg'], + 'depends': ['base', 'website', 'website_sale', 'payment_demo'], + 'data': [ + 'views/address_column_templates.xml', + 'views/address_form_templates.xml', + 'views/extra_info_templates.xml', + 'views/payment_templates.xml', + 'views/website_sale_templates.xml', + ], + 'assets': { + 'web.assets_frontend': [ + 'one_page_checkout/static/src/css/style.css', + 'one_page_checkout/static/src/js/website_sale.js', + 'one_page_checkout/static/src/js/checkout_form.js', + 'one_page_checkout/static/src/js/website_sale_delivery.js', + 'one_page_checkout/static/src/js/payment_demo.js' + ], + }, + 'license': 'AGPL-3', + 'installable': True, + 'auto_install': False, + 'application': False, +} diff --git a/one_page_checkout/controllers/__init__.py b/one_page_checkout/controllers/__init__.py new file mode 100755 index 000000000..d3021360c --- /dev/null +++ b/one_page_checkout/controllers/__init__.py @@ -0,0 +1,23 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies(). +# Author: Cybrosys Techno Solutions() +# +# You can modify it under the terms of the GNU AFFERO +# GENERAL PUBLIC LICENSE (AGPL v3), Version 3. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. +# +# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE +# (AGPL v3) along with this program. +# If not, see . +# +############################################################################# +from . import website_form +from . import website_sale diff --git a/one_page_checkout/controllers/website_form.py b/one_page_checkout/controllers/website_form.py new file mode 100755 index 000000000..da7a8ed8d --- /dev/null +++ b/one_page_checkout/controllers/website_form.py @@ -0,0 +1,56 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies(). +# Author: Cybrosys Techno Solutions() +# +# You can modify it under the terms of the GNU AFFERO +# GENERAL PUBLIC LICENSE (AGPL v3), Version 3. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. +# +# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE +# (AGPL v3) along with this program. +# If not, see . +# +############################################################################# +from odoo import http +from odoo.http import request +from odoo.addons.website.controllers.form import WebsiteForm + + +class WebsiteSaleForm(WebsiteForm): + """ + Class representing a form for ecommerce checkout. + Inherits: + WebsiteForm: The base class for website forms, providing common + functionalities. + Usage: + 1. Create an instance of `WebsiteSaleForm` and customize it as needed. + 2. Use the instance to handle the checking out in your shop. + """ + + @http.route('/website/form/shop.sale.order', type='http', auth="public", + methods=['POST'], website=True) + def website_form_saleorder(self, **kwargs): + """ + This function is called when the user submits the checkout form for a + sales order on the website. It first calls the parent method `website_ + form_sale_order` to handle the submission of the form and create the + sales order. Then, it retrieves the created sales order from the + website session and stores its ID in the user's session. Finally, + it redirects the user to the payment status page. + + :param kwargs: Optional keyword arguments. + :return: A redirect to the payment status page. + """ + super(WebsiteSaleForm, self).website_form_saleorder(**kwargs) + order = request.website.sale_get_order() + if request.session.get('sale_last_order_id') is None and order: + request.session['sale_last_order_id'] = order.id + return request.redirect('/payment/status') diff --git a/one_page_checkout/controllers/website_sale.py b/one_page_checkout/controllers/website_sale.py new file mode 100755 index 000000000..2e10aa9f7 --- /dev/null +++ b/one_page_checkout/controllers/website_sale.py @@ -0,0 +1,137 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies(). +# Author: Cybrosys Techno Solutions() +# +# You can modify it under the terms of the GNU AFFERO +# GENERAL PUBLIC LICENSE (AGPL v3), Version 3. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. +# +# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE +# (AGPL v3) along with this program. +# If not, see . +# +############################################################################# +from odoo import http +from odoo.http import request +from odoo.addons.website_sale.controllers.main import WebsiteSale + + +class WebsiteSaleEcom(WebsiteSale): + """ + Customized version of the website sale controller for e-commerce. + This class is a subclass of `WebsiteSale` and provides additional + customizations and overrides specific to e-commerce functionality on the + website. It extends the base functionality of `WebsiteSale` to cater to the + specific needs of an e-commerce website. + + Inherits: + WebsiteSale: The base class for the website sale controller. + Usage: + 1. Create an instance of `WebsiteSaleEcom` and customize it as needed. + 2. Use the instance to handle e-commerce functionality on your website. + """ + + def _get_address_values(self, **post): + """ + This method overrides the default `address()` method of the + `WebsiteSale` class to get additional context values related to the + customer's address. + + :param post: A dictionary containing the form data submitted by the + user. + :type post: dict + + :return: A dictionary containing the updated q-context values related + to the customer's address. + :rtype: dict + """ + return super(WebsiteSaleEcom, self).address(**post).qcontext + + @http.route(['/shop/address'], type='http', methods=['GET', 'POST'], + auth="public", website=True, sitemap=False) + def address(self, **kw): + """ + Renders the checkout address page for the current website sale order. + If the request is a POST, updates the current order's delivery and + invoice addresses with the provided data. + + If the current user is authenticated and the order's partner matches + the authenticated user's partner, redirects to the payment page. + + :return: An HTTP response with the rendered checkout address page or a + redirection to the login or payment page. + :rtype: werkzeug.wrappers.Response + """ + res = super(WebsiteSaleEcom, self).address(**kw) + order = res.qcontext.get('website_sale_order') + if order: + user = request.website.user_id.sudo() + if order.partner_id.id == user.partner_id.id: + return request.redirect('/shop/payment') + else: + return res + return res + + @http.route(['/shop/extra_info'], type='http', auth="public", website=True, + sitemap=False) + def extra_info(self): + """ + Overwrites the existing extra_info function. + Redirects the current request to the checkout payment page. + + :return: An HTTP response redirecting to the checkout payment page. + :rtype: werkzeug.wrappers.Response + """ + return request.redirect('/shop/payment') + + @http.route('/shop/payment', type='http', auth='public', website=True, + sitemap=False) + def shop_payment(self, **post): + """ + Overwrites the existing shop_payment function. + Removed the redirection if there is no address for user. + This page proposes several payment means based on available + payment.provider. State at this point : + + - a draft sales order with lines; otherwise, clean context / session + and back to the shop + - no transaction in context / session, or only a draft one, if the + customer did go to a payment.provider webshop_paymentsite but + closed the tab without paying / canceling + """ + post.update({'partner_id': -1}) + order = request.website.sale_get_order() + render_values = self._get_shop_payment_values(order, **post) + render_values['only_services'] = order and order.only_services or False + address_values = self._get_address_values(**post) + # Included /address values to the /payment and its template + render_values.update({ + 'account_on_checkout': address_values.get('account_on_checkout'), + 'country_states': address_values.get('country_states', []), + 'is_public_user': address_values.get('is_public_user'), + 'only_services': address_values.get('only_services'), + 'countries': address_values.get('countries', []), + 'country': address_values.get('country', []), + 'checkout': address_values.get('checkout'), + 'error': address_values.get('error'), + 'mode': address_values.get('mode'), + 'deliveries': order._get_delivery_methods().sudo(), + 'delivery_action_id': request.env.ref( + 'delivery.action_delivery_carrier_form' + ).id, + 'sale_order_id': order.id + + }) + if render_values['errors']: + render_values.pop('providers', '') + render_values.pop('tokens', '') + request.session['sale_last_order_id'] = order.id + return request.render("website_sale.payment", render_values) diff --git a/one_page_checkout/doc/RELEASE_NOTES.md b/one_page_checkout/doc/RELEASE_NOTES.md new file mode 100755 index 000000000..31b291373 --- /dev/null +++ b/one_page_checkout/doc/RELEASE_NOTES.md @@ -0,0 +1,7 @@ +## Module + +#### 10.07.2024 +#### Version 17.0.1.0.0 +#### ADD + +- Initial Commit for One Page Checkout diff --git a/one_page_checkout/static/description/assets/icons/capture (1).png b/one_page_checkout/static/description/assets/icons/capture (1).png new file mode 100644 index 000000000..8824deafc Binary files /dev/null and b/one_page_checkout/static/description/assets/icons/capture (1).png differ diff --git a/one_page_checkout/static/description/assets/icons/check.png b/one_page_checkout/static/description/assets/icons/check.png new file mode 100644 index 000000000..c8e85f51d Binary files /dev/null and b/one_page_checkout/static/description/assets/icons/check.png differ diff --git a/one_page_checkout/static/description/assets/icons/chevron.png b/one_page_checkout/static/description/assets/icons/chevron.png new file mode 100644 index 000000000..2089293d6 Binary files /dev/null and b/one_page_checkout/static/description/assets/icons/chevron.png differ diff --git a/one_page_checkout/static/description/assets/icons/cogs.png b/one_page_checkout/static/description/assets/icons/cogs.png new file mode 100644 index 000000000..95d0bad62 Binary files /dev/null and b/one_page_checkout/static/description/assets/icons/cogs.png differ diff --git a/one_page_checkout/static/description/assets/icons/consultation.png b/one_page_checkout/static/description/assets/icons/consultation.png new file mode 100644 index 000000000..8319d4baa Binary files /dev/null and b/one_page_checkout/static/description/assets/icons/consultation.png differ diff --git a/one_page_checkout/static/description/assets/icons/ecom-black.png b/one_page_checkout/static/description/assets/icons/ecom-black.png new file mode 100644 index 000000000..a9385ff13 Binary files /dev/null and b/one_page_checkout/static/description/assets/icons/ecom-black.png differ diff --git a/one_page_checkout/static/description/assets/icons/education-black.png b/one_page_checkout/static/description/assets/icons/education-black.png new file mode 100644 index 000000000..3eb09b27b Binary files /dev/null and b/one_page_checkout/static/description/assets/icons/education-black.png differ diff --git a/one_page_checkout/static/description/assets/icons/hotel-black.png b/one_page_checkout/static/description/assets/icons/hotel-black.png new file mode 100644 index 000000000..130f613be Binary files /dev/null and b/one_page_checkout/static/description/assets/icons/hotel-black.png differ diff --git a/one_page_checkout/static/description/assets/icons/img.png b/one_page_checkout/static/description/assets/icons/img.png new file mode 100644 index 000000000..70197f477 Binary files /dev/null and b/one_page_checkout/static/description/assets/icons/img.png differ diff --git a/one_page_checkout/static/description/assets/icons/license.png b/one_page_checkout/static/description/assets/icons/license.png new file mode 100644 index 000000000..a5869797e Binary files /dev/null and b/one_page_checkout/static/description/assets/icons/license.png differ diff --git a/one_page_checkout/static/description/assets/icons/lifebuoy.png b/one_page_checkout/static/description/assets/icons/lifebuoy.png new file mode 100644 index 000000000..658d56ccc Binary files /dev/null and b/one_page_checkout/static/description/assets/icons/lifebuoy.png differ diff --git a/one_page_checkout/static/description/assets/icons/manufacturing-black.png b/one_page_checkout/static/description/assets/icons/manufacturing-black.png new file mode 100644 index 000000000..697eb0e9f Binary files /dev/null and b/one_page_checkout/static/description/assets/icons/manufacturing-black.png differ diff --git a/one_page_checkout/static/description/assets/icons/photo-capture.png b/one_page_checkout/static/description/assets/icons/photo-capture.png new file mode 100644 index 000000000..06c111758 Binary files /dev/null and b/one_page_checkout/static/description/assets/icons/photo-capture.png differ diff --git a/one_page_checkout/static/description/assets/icons/pos-black.png b/one_page_checkout/static/description/assets/icons/pos-black.png new file mode 100644 index 000000000..97c0f90c1 Binary files /dev/null and b/one_page_checkout/static/description/assets/icons/pos-black.png differ diff --git a/one_page_checkout/static/description/assets/icons/puzzle.png b/one_page_checkout/static/description/assets/icons/puzzle.png new file mode 100644 index 000000000..65cf854e7 Binary files /dev/null and b/one_page_checkout/static/description/assets/icons/puzzle.png differ diff --git a/one_page_checkout/static/description/assets/icons/restaurant-black.png b/one_page_checkout/static/description/assets/icons/restaurant-black.png new file mode 100644 index 000000000..4a35eb939 Binary files /dev/null and b/one_page_checkout/static/description/assets/icons/restaurant-black.png differ diff --git a/one_page_checkout/static/description/assets/icons/service-black.png b/one_page_checkout/static/description/assets/icons/service-black.png new file mode 100644 index 000000000..301ab51cb Binary files /dev/null and b/one_page_checkout/static/description/assets/icons/service-black.png differ diff --git a/one_page_checkout/static/description/assets/icons/trading-black.png b/one_page_checkout/static/description/assets/icons/trading-black.png new file mode 100644 index 000000000..9398ba2f1 Binary files /dev/null and b/one_page_checkout/static/description/assets/icons/trading-black.png differ diff --git a/one_page_checkout/static/description/assets/icons/training.png b/one_page_checkout/static/description/assets/icons/training.png new file mode 100644 index 000000000..884ca024d Binary files /dev/null and b/one_page_checkout/static/description/assets/icons/training.png differ diff --git a/one_page_checkout/static/description/assets/icons/update.png b/one_page_checkout/static/description/assets/icons/update.png new file mode 100644 index 000000000..ecbc5a01a Binary files /dev/null and b/one_page_checkout/static/description/assets/icons/update.png differ diff --git a/one_page_checkout/static/description/assets/icons/user.png b/one_page_checkout/static/description/assets/icons/user.png new file mode 100644 index 000000000..6ffb23d9f Binary files /dev/null and b/one_page_checkout/static/description/assets/icons/user.png differ diff --git a/one_page_checkout/static/description/assets/icons/wrench.png b/one_page_checkout/static/description/assets/icons/wrench.png new file mode 100644 index 000000000..6c04dea0f Binary files /dev/null and b/one_page_checkout/static/description/assets/icons/wrench.png differ diff --git a/one_page_checkout/static/description/assets/misc/Cybrosys R.png b/one_page_checkout/static/description/assets/misc/Cybrosys R.png new file mode 100644 index 000000000..da4058087 Binary files /dev/null and b/one_page_checkout/static/description/assets/misc/Cybrosys R.png differ diff --git a/one_page_checkout/static/description/assets/misc/categories.png b/one_page_checkout/static/description/assets/misc/categories.png new file mode 100644 index 000000000..bedf1e0b1 Binary files /dev/null and b/one_page_checkout/static/description/assets/misc/categories.png differ diff --git a/one_page_checkout/static/description/assets/misc/check-box.png b/one_page_checkout/static/description/assets/misc/check-box.png new file mode 100644 index 000000000..42caf24b9 Binary files /dev/null and b/one_page_checkout/static/description/assets/misc/check-box.png differ diff --git a/one_page_checkout/static/description/assets/misc/compass.png b/one_page_checkout/static/description/assets/misc/compass.png new file mode 100644 index 000000000..d5fed8faa Binary files /dev/null and b/one_page_checkout/static/description/assets/misc/compass.png differ diff --git a/one_page_checkout/static/description/assets/misc/corporate.png b/one_page_checkout/static/description/assets/misc/corporate.png new file mode 100644 index 000000000..2eb13edbf Binary files /dev/null and b/one_page_checkout/static/description/assets/misc/corporate.png differ diff --git a/one_page_checkout/static/description/assets/misc/customer-support.png b/one_page_checkout/static/description/assets/misc/customer-support.png new file mode 100644 index 000000000..79efc72ed Binary files /dev/null and b/one_page_checkout/static/description/assets/misc/customer-support.png differ diff --git a/one_page_checkout/static/description/assets/misc/cybrosys-logo.png b/one_page_checkout/static/description/assets/misc/cybrosys-logo.png new file mode 100644 index 000000000..cc3cc0ccf Binary files /dev/null and b/one_page_checkout/static/description/assets/misc/cybrosys-logo.png differ diff --git a/one_page_checkout/static/description/assets/misc/email.svg b/one_page_checkout/static/description/assets/misc/email.svg new file mode 100644 index 000000000..15291cdc3 --- /dev/null +++ b/one_page_checkout/static/description/assets/misc/email.svg @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/one_page_checkout/static/description/assets/misc/features.png b/one_page_checkout/static/description/assets/misc/features.png new file mode 100644 index 000000000..b41769f77 Binary files /dev/null and b/one_page_checkout/static/description/assets/misc/features.png differ diff --git a/one_page_checkout/static/description/assets/misc/logo.png b/one_page_checkout/static/description/assets/misc/logo.png new file mode 100644 index 000000000..478462d3e Binary files /dev/null and b/one_page_checkout/static/description/assets/misc/logo.png differ diff --git a/one_page_checkout/static/description/assets/misc/phone.svg b/one_page_checkout/static/description/assets/misc/phone.svg new file mode 100644 index 000000000..b7bd7f251 --- /dev/null +++ b/one_page_checkout/static/description/assets/misc/phone.svg @@ -0,0 +1,3 @@ + + + diff --git a/one_page_checkout/static/description/assets/misc/pictures.png b/one_page_checkout/static/description/assets/misc/pictures.png new file mode 100644 index 000000000..56d255fe9 Binary files /dev/null and b/one_page_checkout/static/description/assets/misc/pictures.png differ diff --git a/one_page_checkout/static/description/assets/misc/pie-chart.png b/one_page_checkout/static/description/assets/misc/pie-chart.png new file mode 100644 index 000000000..426e05244 Binary files /dev/null and b/one_page_checkout/static/description/assets/misc/pie-chart.png differ diff --git a/one_page_checkout/static/description/assets/misc/right-arrow.png b/one_page_checkout/static/description/assets/misc/right-arrow.png new file mode 100644 index 000000000..730984a06 Binary files /dev/null and b/one_page_checkout/static/description/assets/misc/right-arrow.png differ diff --git a/one_page_checkout/static/description/assets/misc/star (1) 2.svg b/one_page_checkout/static/description/assets/misc/star (1) 2.svg new file mode 100644 index 000000000..5ae9f507a --- /dev/null +++ b/one_page_checkout/static/description/assets/misc/star (1) 2.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/one_page_checkout/static/description/assets/misc/star.png b/one_page_checkout/static/description/assets/misc/star.png new file mode 100644 index 000000000..2eb9ab29f Binary files /dev/null and b/one_page_checkout/static/description/assets/misc/star.png differ diff --git a/one_page_checkout/static/description/assets/misc/support (1) 1.svg b/one_page_checkout/static/description/assets/misc/support (1) 1.svg new file mode 100644 index 000000000..7d37a8f30 --- /dev/null +++ b/one_page_checkout/static/description/assets/misc/support (1) 1.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/one_page_checkout/static/description/assets/misc/support-email.svg b/one_page_checkout/static/description/assets/misc/support-email.svg new file mode 100644 index 000000000..eb70370d6 --- /dev/null +++ b/one_page_checkout/static/description/assets/misc/support-email.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/one_page_checkout/static/description/assets/misc/support.png b/one_page_checkout/static/description/assets/misc/support.png new file mode 100644 index 000000000..4f18b8b82 Binary files /dev/null and b/one_page_checkout/static/description/assets/misc/support.png differ diff --git a/one_page_checkout/static/description/assets/misc/tick-mark.svg b/one_page_checkout/static/description/assets/misc/tick-mark.svg new file mode 100644 index 000000000..2dbb40187 --- /dev/null +++ b/one_page_checkout/static/description/assets/misc/tick-mark.svg @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + diff --git a/one_page_checkout/static/description/assets/misc/whatsapp 1.svg b/one_page_checkout/static/description/assets/misc/whatsapp 1.svg new file mode 100644 index 000000000..0bfaf8fc6 --- /dev/null +++ b/one_page_checkout/static/description/assets/misc/whatsapp 1.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/one_page_checkout/static/description/assets/misc/whatsapp.png b/one_page_checkout/static/description/assets/misc/whatsapp.png new file mode 100644 index 000000000..d513a5356 Binary files /dev/null and b/one_page_checkout/static/description/assets/misc/whatsapp.png differ diff --git a/one_page_checkout/static/description/assets/misc/whatsapp.svg b/one_page_checkout/static/description/assets/misc/whatsapp.svg new file mode 100644 index 000000000..b618aea1d --- /dev/null +++ b/one_page_checkout/static/description/assets/misc/whatsapp.svg @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/one_page_checkout/static/description/assets/modules/1.gif b/one_page_checkout/static/description/assets/modules/1.gif new file mode 100644 index 000000000..ae3a880a2 Binary files /dev/null and b/one_page_checkout/static/description/assets/modules/1.gif differ diff --git a/one_page_checkout/static/description/assets/modules/1.png b/one_page_checkout/static/description/assets/modules/1.png new file mode 100644 index 000000000..d0f36b007 Binary files /dev/null and b/one_page_checkout/static/description/assets/modules/1.png differ diff --git a/one_page_checkout/static/description/assets/modules/2.png b/one_page_checkout/static/description/assets/modules/2.png new file mode 100644 index 000000000..8513873ea Binary files /dev/null and b/one_page_checkout/static/description/assets/modules/2.png differ diff --git a/one_page_checkout/static/description/assets/modules/3.png b/one_page_checkout/static/description/assets/modules/3.png new file mode 100644 index 000000000..cb17cf612 Binary files /dev/null and b/one_page_checkout/static/description/assets/modules/3.png differ diff --git a/one_page_checkout/static/description/assets/modules/4.jpg b/one_page_checkout/static/description/assets/modules/4.jpg new file mode 100644 index 000000000..67c7f7062 Binary files /dev/null and b/one_page_checkout/static/description/assets/modules/4.jpg differ diff --git a/one_page_checkout/static/description/assets/modules/5.jpg b/one_page_checkout/static/description/assets/modules/5.jpg new file mode 100644 index 000000000..5141a7802 Binary files /dev/null and b/one_page_checkout/static/description/assets/modules/5.jpg differ diff --git a/one_page_checkout/static/description/assets/modules/6.png b/one_page_checkout/static/description/assets/modules/6.png new file mode 100644 index 000000000..0e311ca87 Binary files /dev/null and b/one_page_checkout/static/description/assets/modules/6.png differ diff --git a/one_page_checkout/static/description/assets/modules/l2.png b/one_page_checkout/static/description/assets/modules/l2.png new file mode 100644 index 000000000..f40a0756d Binary files /dev/null and b/one_page_checkout/static/description/assets/modules/l2.png differ diff --git a/one_page_checkout/static/description/assets/modules/l3.png b/one_page_checkout/static/description/assets/modules/l3.png new file mode 100644 index 000000000..5738a486e Binary files /dev/null and b/one_page_checkout/static/description/assets/modules/l3.png differ diff --git a/one_page_checkout/static/description/assets/modules/l4.png b/one_page_checkout/static/description/assets/modules/l4.png new file mode 100644 index 000000000..8d99e8c68 Binary files /dev/null and b/one_page_checkout/static/description/assets/modules/l4.png differ diff --git a/one_page_checkout/static/description/assets/modules/l5.png b/one_page_checkout/static/description/assets/modules/l5.png new file mode 100644 index 000000000..3415917c2 Binary files /dev/null and b/one_page_checkout/static/description/assets/modules/l5.png differ diff --git a/one_page_checkout/static/description/assets/modules/l6.png b/one_page_checkout/static/description/assets/modules/l6.png new file mode 100644 index 000000000..c7ea331ee Binary files /dev/null and b/one_page_checkout/static/description/assets/modules/l6.png differ diff --git a/one_page_checkout/static/description/assets/screenshots/hero.gif b/one_page_checkout/static/description/assets/screenshots/hero.gif new file mode 100644 index 000000000..317d7819e Binary files /dev/null and b/one_page_checkout/static/description/assets/screenshots/hero.gif differ diff --git a/one_page_checkout/static/description/assets/screenshots/image1.png b/one_page_checkout/static/description/assets/screenshots/image1.png new file mode 100644 index 000000000..db50755d9 Binary files /dev/null and b/one_page_checkout/static/description/assets/screenshots/image1.png differ diff --git a/one_page_checkout/static/description/assets/screenshots/image2.png b/one_page_checkout/static/description/assets/screenshots/image2.png new file mode 100644 index 000000000..43c10ae11 Binary files /dev/null and b/one_page_checkout/static/description/assets/screenshots/image2.png differ diff --git a/one_page_checkout/static/description/assets/screenshots/image3.png b/one_page_checkout/static/description/assets/screenshots/image3.png new file mode 100644 index 000000000..f3bc4a851 Binary files /dev/null and b/one_page_checkout/static/description/assets/screenshots/image3.png differ diff --git a/one_page_checkout/static/description/banner.jpg b/one_page_checkout/static/description/banner.jpg new file mode 100644 index 000000000..154fc9554 Binary files /dev/null and b/one_page_checkout/static/description/banner.jpg differ diff --git a/one_page_checkout/static/description/icon.png b/one_page_checkout/static/description/icon.png new file mode 100644 index 000000000..b7466955a Binary files /dev/null and b/one_page_checkout/static/description/icon.png differ diff --git a/one_page_checkout/static/description/index.html b/one_page_checkout/static/description/index.html new file mode 100755 index 000000000..0d1641599 --- /dev/null +++ b/one_page_checkout/static/description/index.html @@ -0,0 +1,655 @@ + + + + + + Odoo App 3 Index + + + + + + + + +
+
+
+
+
+ +
+
+
+ Community +
+
+ Enterprise +
+
+ Odoo.sh +
+
+
+
+
+
+

+ One Page Checkout

+

+ This Module simplifies ecommerce checkout by condensing it into a single, user-friendly page. +

+
+ +
+
+
+
+
+

+ Key Highlights +

+
+
+
+
+
+ +
+
+

+ Simplifies the ecommerce checkout process into single step.

+
+
+
+
+
+
+ +
+
+

+ Create a new address and select existing address.

+
+
+
+
+
+
+ +
+
+
+
+
+ +
+
+

+ Checking out with Login User.

+
+
+
+
+
+
+ +
+
+

+ Checking out with Public User.

+
+
+
+
+
+
+ +
+
+

+ Form validation for Public User.

+
+
+
+
+
+
+
    +
  • + Support in Community, Enterprise & Odoo.sh. +
  • +
  • + Select any delivery method. +
  • +
  • + Create a new address and select existing address. +
  • +
  • + Apply your promo-codes. +
  • +
  • + Inline validation for public users. +
  • + +
+
+
+
+
+
+
Version + 17.0.1.0.0|Released on:25th Jan 2024 +
+

+ Initial commit for One Page Checkout

+
+
+
+
+
+
+
+

+ Related Products

+
+
+ +
+
+

+ Our Services

+ +
+
+
+
+
+
+
+
+ service-icon +
+
+

Odoo + Customization

+
+
+
+
+
+
+ service-icon +
+
+

Odoo + Implementation

+
+
+
+
+
+
+ service-icon +
+
+

Odoo + Support

+
+
+
+
+
+
+ service-icon +
+
+

Hire + Odoo Developer

+
+
+
+
+ +
+
+ service-icon +
+
+

Odoo + Integration

+
+
+
+
+
+
+ service-icon +
+
+

Odoo + Migration

+
+
+
+
+
+
+ service-icon +
+
+

Odoo + Consultancy

+
+
+
+
+
+
+ service-icon +
+
+

Odoo + Implementation

+
+
+
+
+
+
+ service-icon +
+
+

Odoo + Licensing Consultancy

+
+
+
+
+
+
+

+ Our Industries

+ +
+
+
+
+
+
+ +

Trading

+

Easily procure and sell your products

+
+
+
+
+ +

POS

+

Easy configuration and convivial experience

+
+
+
+
+ +

+ Education

+

A platform for educational management

+
+
+
+
+ +

+ Manufacturing

+

Plan, track and schedule your operations

+
+
+
+
+ +

E-commerce & + Website

+

Mobile friendly, awe-inspiring product pages

+
+
+
+
+ +

Service + Management

+

Keep track of services and invoice

+
+
+
+
+ +

+ Restaurant

+

Run your bar or restaurant methodically

+
+
+
+
+ +

Hotel + Management

+

An all-inclusive hotel management application

+
+
+
+
+
+
+

+ Support

+
+
+
+
+
+
+
+ +
+ Need + Help? +

Got + questions or need help? Get in touch.

+
odoo@cybrosys.com +
+
+
+
+
+
+
+
+ +
+ WhatsApp +

Say hi to + us on WhatsApp!

+
+91 + 99456767686 +
+
+
+
+
+
+
+
+
+ + + + + + \ No newline at end of file diff --git a/one_page_checkout/static/src/css/style.css b/one_page_checkout/static/src/css/style.css new file mode 100755 index 000000000..893b7e7a5 --- /dev/null +++ b/one_page_checkout/static/src/css/style.css @@ -0,0 +1,38 @@ +/* Column Responsive CSS for including three templates in a single page */ +.single_pg_checkout_layout{ + width:90%; + max-width:1400px; + margin: 0 auto; +} +.single_pg_checkout_layout .column { + float: left; + width: 33.33%; +} +.block-ui{ + pointer-events:none; + opacity:0.5; +} +/* Clear floats after the columns */ +.single_pg_checkout_layout:after { + content: ""; + display: table; + clear: both; +} +@media screen and (max-width: 1000px) { + .single_pg_checkout_layout .column { + width: 80%; + margin: 15px auto; + } +} +@media screen and (max-width: 750px) { + .single_pg_checkout_layout .column { + width: 90%; + margin: 15px auto; + } +} +@media screen and (max-width: 500px) { + .single_pg_checkout_layout .column { + width: 97%; + margin: 15px auto; + } +} diff --git a/one_page_checkout/static/src/js/checkout_form.js b/one_page_checkout/static/src/js/checkout_form.js new file mode 100755 index 000000000..b75a110e8 --- /dev/null +++ b/one_page_checkout/static/src/js/checkout_form.js @@ -0,0 +1,24 @@ +/** @odoo-module **/ +import { _t } from '@web/core/l10n/translation'; +import { Component } from '@odoo/owl'; +import PaymentForm from '@payment/js/payment_form'; + + +PaymentForm.include({ + events: Object.assign({}, PaymentForm.prototype.events || {}, { + 'click button[name="o_payment_submit_button"]': '_onClickPayment', + }), + init: function () { + this._super(...arguments); + }, + /** + * OnePagePaymentForm widget. Enhances the payment form by adding a click + * event listener that submits the extra_info_form along with the payment form. + * + * @extends paymentFormMixin + */ + _onClickPayment: async function (ev) { + this.$el('#extra_info_form').submit() + }, +}); + diff --git a/one_page_checkout/static/src/js/payment_demo.js b/one_page_checkout/static/src/js/payment_demo.js new file mode 100644 index 000000000..df765fe91 --- /dev/null +++ b/one_page_checkout/static/src/js/payment_demo.js @@ -0,0 +1,16 @@ +/** @odoo-module **/ + +import publicWidget from "@web/legacy/js/public/public_widget"; +import { jsonrpc } from "@web/core/network/rpc_service"; +publicWidget.registry.determine_checkout = publicWidget.Widget.extend({ + selector: '#wrap', + init() { + this._super(...arguments); + this.rpc = this.bindService("rpc"); + }, + willStart: function () { + var self = this; + this.$el.find('#o_demo_express_checkout_container_6').css('display', 'none') + return this._super(...arguments); + }, +}); \ No newline at end of file diff --git a/one_page_checkout/static/src/js/website_sale.js b/one_page_checkout/static/src/js/website_sale.js new file mode 100755 index 000000000..c205370c9 --- /dev/null +++ b/one_page_checkout/static/src/js/website_sale.js @@ -0,0 +1,215 @@ +/** @odoo-module **/ + +import wSaleUtils from "@website_sale/js/website_sale_utils"; +import VariantMixin from "@website_sale/js/sale_variant_mixin"; +import publicWidget from '@web/legacy/js/public/public_widget'; +import { cartHandlerMixin } from '@website_sale/js/website_sale_utils'; +import { WebsiteSale } from '@website_sale/js/website_sale'; +import { _t } from "@web/core/l10n/translation"; + +publicWidget.registry.OnePageCheckoutWebsiteSale = publicWidget.Widget.extend( +VariantMixin, cartHandlerMixin, { + selector: '.single_pg_checkout_layout', + events: Object.assign({}, VariantMixin.events || {}, { + 'click .a-submit': '_onClickSubmit', + 'click .show_coupon': '_onClickShowCoupon', + 'change select[name="country_id"]': '_onChangeCountry', + 'click span[title="Details"]': '_onCartDetailClick', + }), + /** + * Initializes the widget. + * Sets the `isWebsite` property to `true`. + */ + init: function () { + this._super.apply(this, arguments); + this.isWebsite = true; + this.rpc = this.bindService("rpc"); + }, + + /** + * Starts the widget. + * Calls the super method and returns the resulting promise. + * @returns {Promise} A promise representing the start of the widget. + */ + start() { + const def = this._super(...arguments); + return def; + }, + /** + * Destroys the widget. + * Calls the super method and performs any necessary cleanup. + */ + destroy() { + this._super.apply(this, arguments); + this._cleanupZoom(); + }, + /** + * Changes the country and updates the corresponding fields + based on the selected country. + */ + _changeCountry: function () { + var self = this + if (!this.$el.find("#country_id").val()) { + return; + } + return this.rpc("/shop/country_infos/" + $("#country_id").val(), { + mode: this.$el.find("#country_id").attr('mode'), + }).then(function (data) { + // placeholder phone_code + self.$el.find("input[name='phone']").attr('placeholder', data.phone_code !== 0 ? '+'+ data.phone_code : ''); + + // populate states and display + var selectStates = self.$el.find("select[name='state_id']"); + // dont reload state at first loading (done in qweb) + if (selectStates.data('init')===0 || selectStates.find('option').length===1) { + if (data.states.length || data.state_required) { + selectStates.html(''); + data.states.forEach((x) => { + var opt = self.$el.find('