Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement cart information providing in BO order creation page - part 1 #15814

Merged
merged 24 commits into from Oct 9, 2019
Merged
Show file tree
Hide file tree
Changes from 15 commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
1766226
Implements empty cart creation and summary after customer select
zuk3975 Oct 1, 2019
13dd8fc
Add loading cart locale info of empty cart
zuk3975 Oct 2, 2019
52e8d92
Separate Carts and Orders summary endpoints
zuk3975 Oct 2, 2019
e5bea56
Separate endpoints for carts/orders summary. WIP omplement cart infor…
zuk3975 Oct 3, 2019
18512a8
Get cart straight from db instead of context
zuk3975 Oct 3, 2019
40809f9
Removes unusable cartContextInitializer
zuk3975 Oct 3, 2019
8293961
Adds TODO check cart context importance
zuk3975 Oct 3, 2019
ec503e8
Separate cart creation and info provider. Some js refactoring, add Us…
zuk3975 Oct 3, 2019
e67b247
updates licences
zuk3975 Oct 4, 2019
73f1d02
Moves addresses renderer to separate class. Removes unused props in c…
zuk3975 Oct 4, 2019
7a070cf
Adds some docblocks in js
zuk3975 Oct 4, 2019
c61e08a
Adds cart duplication action and some todo`s
zuk3975 Oct 4, 2019
fc02e3e
Adds vouchers list providing and rendering
zuk3975 Oct 4, 2019
afb1478
rename method typo
zuk3975 Oct 4, 2019
249ba67
Introduce js routing FOSJsRoutingBundle
zuk3975 Oct 4, 2019
c037c20
Configure js router with dynamic base url and security token
zuk3975 Oct 7, 2019
97e1175
Require npm dependency of fos-routing
zuk3975 Oct 7, 2019
ea71366
Refactor routes after introducing js router
zuk3975 Oct 7, 2019
a4f8b15
Implements CartProduct DTO
zuk3975 Oct 8, 2019
88f4ba2
Removes unusable symlink
zuk3975 Oct 8, 2019
4183d6c
Router wrapper code optimization
zuk3975 Oct 8, 2019
1da0e2e
adds new end of file line
zuk3975 Oct 8, 2019
5085888
Removes fos-js-routing bundle symlink
zuk3975 Oct 8, 2019
3910b24
Move js router metadata from legacy controller to twig function
zuk3975 Oct 9, 2019
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions admin-dev/themes/new-theme/js/bundles/csaguzzle
1 change: 1 addition & 0 deletions admin-dev/themes/new-theme/js/bundles/fosjsrouting
53 changes: 53 additions & 0 deletions admin-dev/themes/new-theme/js/components/router.js
@@ -0,0 +1,53 @@
/**
* 2007-2019 PrestaShop SA and Contributors
*
* NOTICE OF LICENSE
*
* This source file is subject to the Open Software License (OSL 3.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* https://opensource.org/licenses/OSL-3.0
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@prestashop.com so we can send you a copy immediately.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
* versions in the future. If you wish to customize PrestaShop for your
* needs please refer to https://www.prestashop.com for more information.
*
* @author PrestaShop SA <contact@prestashop.com>
* @copyright 2007-2019 PrestaShop SA and Contributors
* @license https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*/

/**
* Class responsible for checking password's validity.
* Can validate entered password's length against min/max values.
* If password confirmation input is provided, can validate if entered password is matching confirmation.
*/

import Routing from '../../../../../vendor/friendsofsymfony/jsrouting-bundle/Resources/public/js/router.min';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please use: https://www.npmjs.com/package/fos-routing instead. Separate php dependecies from npm dependencies


Routing.setRoutingData(require('../fos_js_routes.json'));

/**
* Wraps FOSJsRoutingbundle with exposed routes.
* To expose route add option `expose: true` in .yml routing config
*
* e.g.
*
* `my_route
* path: /my-path
* options:
* expose: true
* `
* And run `bin/console fos:js-routing:dump --format=json --target=admin-dev/themes/new-theme/js/fos_js_routes.json`
*/
export default class Router {
constructor() {
return Routing;
}
}
1 change: 1 addition & 0 deletions admin-dev/themes/new-theme/js/fos_js_routes.json
@@ -0,0 +1 @@
{"base_url":"","routes":{"admin_carts_info":{"tokens":[["text","\/sell\/orders\/carts\/info"]],"defaults":[],"requirements":{"cartId":"\\d+"},"hosttokens":[],"methods":["GET"],"schemes":[]},"admin_carts_create_empty":{"tokens":[["text","\/sell\/orders\/carts\/create-empty"]],"defaults":[],"requirements":{"customerId":"\\d+"},"hosttokens":[],"methods":["POST"],"schemes":[]},"admin_carts_duplicate":{"tokens":[["text","\/sell\/orders\/carts\/duplicate"]],"defaults":[],"requirements":{"orderId":"\\d+"},"hosttokens":[],"methods":["POST"],"schemes":[]},"admin_carts_edit_address":{"tokens":[["text","\/sell\/orders\/carts\/edit-address"]],"defaults":[],"requirements":{"cartId":"\\d+"},"hosttokens":[],"methods":["POST"],"schemes":[]}},"prefix":"","host":"localhost","port":"","scheme":"http","locale":[]}