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

Design v2 #2744

Open
wants to merge 44 commits into
base: next
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
c84d193
[Design-v2] - set webpack , base scss styles, b-icons, flag-icons, h…
codingioanniskrikos Sep 9, 2024
16b621f
[Design-v2] - test
codingioanniskrikos Sep 9, 2024
92557ab
[Design-v2] - topbar, cart widget
codingioanniskrikos Sep 9, 2024
a40826a
[Design-v2] - remove extra template
codingioanniskrikos Sep 9, 2024
e0fe1a7
[Design-v2] - product preview , form
codingioanniskrikos Sep 11, 2024
83f4e68
[Design-v2] - product detail
codingioanniskrikos Sep 12, 2024
ed8beb9
[Design-v2] - category, add cart
codingioanniskrikos Sep 13, 2024
fee078f
[Design-v2] - category, checkout cart step 1
codingioanniskrikos Sep 17, 2024
959ef73
[Design-v2] - cart steps
codingioanniskrikos Sep 17, 2024
33142fd
[Design-v2] - checkout steps
codingioanniskrikos Sep 18, 2024
43c20c2
[Design-v2] - flash message, summary
codingioanniskrikos Sep 19, 2024
4b5e403
[Design-v2] - change logic for the javascripts, bootstrap 5.3
codingioanniskrikos Sep 23, 2024
4faa213
[Design-v2] - add JS
codingioanniskrikos Sep 24, 2024
d5b9e2c
[Design-v2] - checkout thank summary
codingioanniskrikos Sep 24, 2024
5d768ef
[Design-v2] - profile pages
codingioanniskrikos Sep 27, 2024
9308ea3
[Desing-v2] - profile pages
codingioanniskrikos Sep 27, 2024
b95d5c9
Merge branch 'next' into Design-v2
codingioanniskrikos Oct 9, 2024
60387b2
[Design-v2] - remove jquery, convert to vanillajs, remove packages no…
codingioanniskrikos Oct 10, 2024
252f36d
[Design-v2] - format address JS
codingioanniskrikos Oct 10, 2024
ffb9755
[Design-v2] - cart list
codingioanniskrikos Oct 14, 2024
94143a8
[Design-v2] - load Cart widget vis AJax request
codingioanniskrikos Oct 21, 2024
d30214e
Merge branch 'next' into Design-v2
dpfaffenbauer Nov 5, 2024
12ba2da
[Design-v2] - refactor code - SonarCloud
codingioanniskrikos Nov 5, 2024
5505c9e
[Design-v2] - refactor SonarCloud
codingioanniskrikos Nov 5, 2024
6da3310
[Design-v2] - refactor SonarCloud
codingioanniskrikos Nov 5, 2024
cc889c9
[Design-v2] - refactor sonarcloud
codingioanniskrikos Nov 6, 2024
a9532ca
[Design-v2] - refactor sonarcloud
codingioanniskrikos Nov 6, 2024
3440852
[Design-v2]- refactor sonarcloud
codingioanniskrikos Nov 6, 2024
6f9ce43
[Design-v2] - refactor sonarcloud test
codingioanniskrikos Nov 6, 2024
8846507
[Design-v2] - refactor code
codingioanniskrikos Nov 6, 2024
309324c
[Design-v2] - refactor code
codingioanniskrikos Nov 6, 2024
0be3dc8
[Design-v2] - remove defer
codingioanniskrikos Nov 6, 2024
5c6ce89
[Design-v2] - fix Behat part 1
codingioanniskrikos Nov 6, 2024
7acf93d
[Behat] fix checkbox click
dpfaffenbauer Nov 6, 2024
c24ad5c
[Design-v2] - Behat tests
codingioanniskrikos Nov 8, 2024
93a8579
[Design-v2] - refactor sonarcloud
codingioanniskrikos Nov 8, 2024
7608765
[Design-v2] - behat test, category filter icons
codingioanniskrikos Nov 11, 2024
76dc279
[Design-v2] - behat fix feature
codingioanniskrikos Nov 14, 2024
19fbc1e
[DesignV2] use webpack builds and asset paths
dpfaffenbauer Nov 14, 2024
39c10f7
Merge branch 'Design-v2' of github.com:codingioanniskrikos/CoreShop i…
dpfaffenbauer Nov 14, 2024
fca53aa
[DesignV2] reverts
dpfaffenbauer Nov 14, 2024
b84467e
[DesignV2] use address formatter
dpfaffenbauer Nov 14, 2024
425956d
[Design-v2] - adapt style and structure
codingioanniskrikos Nov 25, 2024
48d9f61
[Design-v2] - fix behat test
codingioanniskrikos Nov 26, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
*.exe
*.o
*.so
cache

######################
# Packages #
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -111,12 +111,12 @@
"stof/doctrine-extensions-bundle": "^1.6",
"sylius/theme-bundle": "^2.2",
"symfony/dotenv": "^6.3",
"symfony/form": "^6.3",
"symfony/http-client": "^6.3",
"symfony/intl": "^6.3",
"symfony/notifier": "^6.3",
"symfony/serializer": "^6.3",
"symfony/twig-bundle": "^6.3",
"symfony/form": "^6.3",
"webmozart/assert": "^1.10"
},
"require-dev": {
Expand Down
4 changes: 2 additions & 2 deletions features/ui/frontend/cart/adding_product_to_cart.feature
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Feature: Adding a product to the cart
Then I should be on the cart summary page
And I should be notified that the product has been successfully added
And there should be one item in my cart
And this item should have name "TSHIRT"
And this item should have name "TShirt"
And I should see "TShirt" with unit price "€100.00" in my cart

Scenario: Adding a product to the cart as a logged in customer
Expand All @@ -23,5 +23,5 @@ Feature: Adding a product to the cart
Then I should be on the cart summary page
And I should be notified that the product has been successfully added
And there should be one item in my cart
And this item should have name "RACING CAR"
And this item should have name "Racing Car"
And I should see "Racing Car" with unit price "€1,000.00" in my cart
Original file line number Diff line number Diff line change
Expand Up @@ -13,19 +13,19 @@ Feature: Adding a product to the cart with maximum Quantity to Order
Then I should be on the cart summary page
And I should be notified that the product has been successfully added
And there should be one item in my cart
And this item should have name "TSHIRT"
And this item should have name "TShirt"
And I should see "TShirt" with unit price "€100.00" in my cart

Scenario: Adding product to cart with less than minimum quantity to order
Given the product "TShirt" has a maximum order quantity of "100"
When I add 101 of this product to the cart
Then I should be on the cart summary page
And I should be notified that I can only order a maximum of 100 of TSHIRT
And I should be notified that I can only order a maximum of 100 of TShirt


Scenario: Adding product to cart with less than minimum quantity to order with smaller quantities
Given the product "TShirt" has a maximum order quantity of "2"
When I add 3 of this product to the cart
Then I should be on the cart summary page
And I should be notified that I can only order a maximum of 2 of TSHIRT
And I should be notified that I can only order a maximum of 2 of TShirt

Original file line number Diff line number Diff line change
Expand Up @@ -13,19 +13,19 @@ Feature: Adding a product to the cart with minimum Quantity to Order
Then I should be on the cart summary page
And I should be notified that the product has been successfully added
And there should be one item in my cart
And this item should have name "TSHIRT"
And this item should have name "TShirt"
And I should see "TShirt" with unit price "€100.00" in my cart

Scenario: Adding product to cart with less than minimum quantity to order
Given the product "TShirt" has a minimum order quantity of "100"
When I add 99 of this product to the cart
Then I should be on the cart summary page
And I should be notified that I need to order at least 100 of TSHIRT
And I should be notified that I need to order at least 100 of TShirt


Scenario: Adding product to cart with less than minimum quantity to order with smaller quantities
Given the product "TShirt" has a minimum order quantity of "2"
When I add 1 of this product to the cart
Then I should be on the cart summary page
And I should be notified that I need to order at least 2 of TSHIRT
And I should be notified that I need to order at least 2 of TShirt

Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@ Feature: Adding a product to the cart with a Product that is tracked and out-of-
Then I should be on the cart summary page
And I should be notified that the product has been successfully added
And there should be one item in my cart
And this item should have name "TSHIRT"
And this item should have name "TShirt"
And I should see "TShirt" with unit price "€100.00" in my cart

Scenario: Adding product to cart with more than stocked quantity
When I add 3 of this product to the cart
Then I should be on the cart summary page
And I should be notified that TSHIRT does not have sufficient stock
And I should be notified that TShirt does not have sufficient stock

Scenario: Adding product, with on-hold stock, to cart with more than stocked quantity
Given the product has 2 on hold
Expand All @@ -31,5 +31,5 @@ Feature: Adding a product to the cart with a Product that is tracked and out-of-
Given the product has 1 on hold
When I add 2 of this product to the cart
Then I should be on the cart summary page
And I should be notified that TSHIRT does not have sufficient stock
And I should be notified that TShirt does not have sufficient stock

4 changes: 2 additions & 2 deletions features/ui/frontend/cart/automatic_cart_price_rule.feature
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Feature: Getting an automatic cart price rule
Then I should be on the cart summary page
And I should be notified that the product has been successfully added
And there should be one item in my cart
And this item should have name "TSHIRT"
And this item should have name "TShirt"
And I should see "TShirt" with unit price "€100.00" in my cart
And my cart's total should be "€80.00"

Expand All @@ -25,6 +25,6 @@ Feature: Getting an automatic cart price rule
Then I should be on the cart summary page
And I should be notified that the product has been successfully added
And there should be one item in my cart
And this item should have name "TSHIRT"
And this item should have name "TShirt"
And I should see "TShirt" with unit price "€100.00" in my cart
And my cart's total should be "€70.00"
4 changes: 2 additions & 2 deletions features/ui/frontend/cart/keep_cart_after_login.feature
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@ Feature: Maintaining cart after login
When I log in as "[email protected]" with "cybertruck" password
And I see the summary of my cart
Then there should be one item in my cart
And this item should have name "TSHIRT"
And this item should have name "TShirt"

Scenario: Having cart maintained after registration
Given I add this product to the cart
When I register with email "[email protected]" and password "bigbigbooster"
And I see the summary of my cart
Then there should be one item in my cart
And this item should have name "TSHIRT"
And this item should have name "TShirt"
10 changes: 5 additions & 5 deletions features/ui/frontend/category/view_category.feature
Original file line number Diff line number Diff line change
Expand Up @@ -56,13 +56,13 @@ Feature: Viewing a product details
When I switch to category "Coats" on main menu
Then I should see 3 products in the category list
And I change order to "Name Descending"
And I should see products in order "WINTER COAT,RAIN COAT,JACKET" in list
And I should see products in order "Winter Coat,Rain Coat,Jacket" in list
And I change order to "Name Ascending"
And I should see products in order "JACKET,RAIN COAT,WINTER COAT" in list
And I should see products in order "Jacket,Rain Coat,Winter Coat" in list
When I switch to category "Shoes" on left menu
And I change order to "Name Descending"
And I should see products in order "SHOE 2,SHOE" in list
And I should see products in order "Shoe 2,Shoe" in list
And I switch to view to "grid"
And I should see products in order "SHOE 2,SHOE" in grid
And I should see products in order "Shoe 2,Shoe" in grid
And I change order to "Name Ascending"
And I should see products in order "SHOE,SHOE 2" in grid
And I should see products in order "Shoe,Shoe 2" in grid
1 change: 1 addition & 0 deletions features/ui/frontend/payment/concurrency.feature
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ Feature: Create a new order
And the site has a tax rule group "AT"
And the tax rule group has a tax rule for country "Austria" with tax rate "AT"
And the site has a product "T-Shirt" priced at 2000
And the product is active and published and available for store "Austria"
And the product has the tax rule group "AT"
And the site has a customer "[email protected]"
And the customer "[email protected]" has an address with country "Austria", "4600", "Wels", "Freiung", "9-11/N3"
Expand Down
12 changes: 6 additions & 6 deletions src/CoreShop/Behat/Context/Ui/Frontend/CartContext.php
Original file line number Diff line number Diff line change
Expand Up @@ -159,23 +159,23 @@ public function shouldBeOnMyCartSummaryPage(): void
*/
public function iShouldBeNotifiedThatItHasBeenSuccessfullyAdded(): void
{
$this->notificationChecker->checkNotification('ITEM ADDED', NotificationType::success());
$this->notificationChecker->checkNotification('Item added', NotificationType::success());
}

/**
* @Then I should be notified that the voucher has been applied
*/
public function iShouldBeNotifiedThatTheVoucherHasBeenApplied(): void
{
$this->notificationChecker->checkNotification('VOUCHER HAS BEEN SUCCESSFULLY APPLIED', NotificationType::success());
$this->notificationChecker->checkNotification('Voucher has been successfully applied', NotificationType::success());
}

/**
* @Then I should be notified that the voucher is invalid
*/
public function iShouldBeNotifiedThatTheVoucherIsInvalid(): void
{
$this->notificationChecker->checkNotification('THIS VOUCHER IS INVALID', NotificationType::error());
$this->notificationChecker->checkNotification('This voucher is invalid', NotificationType::error());
}

/**
Expand All @@ -184,7 +184,7 @@ public function iShouldBeNotifiedThatTheVoucherIsInvalid(): void
public function iShouldBeNotifiedThatItNeedToOrderAtLeastOf(string $quantity, string $productName): void
{
$this->notificationChecker->checkNotification(
sprintf('YOU NEED TO ORDER AT LEAST %s UNITS OF %s.', $quantity, $productName),
sprintf('You need to order at least %s units of %s.', $quantity, $productName),
NotificationType::error(),
);
}
Expand All @@ -195,7 +195,7 @@ public function iShouldBeNotifiedThatItNeedToOrderAtLeastOf(string $quantity, st
public function iShouldBeNotifiedThatICanOnlyOrderAMaximumQuantityOf(string $quantity, string $productName): void
{
$this->notificationChecker->checkNotification(
sprintf('YOU CAN ORDER A MAXIMUM OF %s UNITS OF %s.', $quantity, $productName),
sprintf('You can order a maximum of %s units of %s.', $quantity, $productName),
NotificationType::error(),
);
}
Expand All @@ -206,7 +206,7 @@ public function iShouldBeNotifiedThatICanOnlyOrderAMaximumQuantityOf(string $qua
public function iShouldBeNotifiedThatDoesNotHaveSufficientStock(string $productName): void
{
$this->notificationChecker->checkNotification(
sprintf('%s DOES NOT HAVE SUFFICIENT STOCK.', $productName),
sprintf('%s does not have sufficient stock.', $productName),
NotificationType::error(),
);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ public function specifyAddressPhoneNumber(?string $phoneNumber): void

public function acceptTermsOfService(): void
{
$this->getElement('terms_of_service')->check();
$this->getElement('terms_of_service')->click();
}

protected function getDefinedElements(): array
Expand Down
2 changes: 1 addition & 1 deletion src/CoreShop/Behat/Page/Frontend/Checkout/CustomerPage.php
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ public function specifyGuestAddressCountry(?int $country): void

public function acceptTermsOfService(): void
{
$this->getElement('terms_of_service')->check();
$this->getElement('terms_of_service')->click();
}

public function submitGuestCheckout(): void
Expand Down
4 changes: 2 additions & 2 deletions src/CoreShop/Behat/Page/Frontend/Checkout/SummaryPage.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,12 @@ public function submitOrder(): void

public function acceptTermsOfService(): void
{
$this->getElement('terms_of_service')->check();
$this->getElement('terms_of_service')->click();
}

public function declineTermsOfService(): void
{
$this->getElement('terms_of_service')->uncheck();
$this->getElement('terms_of_service')->click();
}

public function submitQuote(): void
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,18 +62,18 @@

class CartController extends FrontendController
{
public function widgetAction(Request $request, ShopperContextInterface $shopperContext): Response
public function widgetAction(Request $request): Response
{
$multiCartEnabled = $this->getParameter('coreshop.storage_list.multi_list.order');

$params = [
'cart' => $this->getCart(),
'multi_cart_enabled' => $this->getParameter('coreshop.storage_list.multi_list.order')
'multi_cart_enabled' => $this->getParameter('coreshop.storage_list.multi_list.order'),
];

if ($multiCartEnabled) {
$form = $this->container->get('form.factory')->createNamed('coreshop', CartListType::class, ['list' => $this->getCart()], [
'context' => $shopperContext->getContext(),
'context' => $this->container->get(ShopperContextInterface::class)->getContext(),
]);

$params['form'] = $form->createView();
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
<?php

declare(strict_types=1);

/*
* CoreShop
*
* This source file is available under two different licenses:
* - GNU General Public License version 3 (GPLv3)
* - CoreShop Commercial License (CCL)
* Full copyright and license information is available in
* LICENSE.md which is distributed with this source code.
*
* @copyright Copyright (c) CoreShop GmbH (https://www.coreshop.org)
* @license https://www.coreshop.org/license GPLv3 and CCL
*
*/

namespace CoreShop\Bundle\FrontendBundle\Controller\Extend;

use CoreShop\Bundle\FrontendBundle\Controller\FrontendController;
use CoreShop\Component\Core\Context\ShopperContextInterface;
use Psr\Container\ContainerInterface;
use Symfony\Component\HttpFoundation\JsonResponse;

class CartWidgetController extends FrontendController
{
private ShopperContextInterface $shopperContext;

public function __construct(
ShopperContextInterface $shopperContext,
ContainerInterface $container,
) {
parent::__construct($container);
$this->shopperContext = $shopperContext;
}

public function cartNumberAction(): JsonResponse
{
$items = $this->shopperContext->getCart()->getItems();

return new JsonResponse(count($items));
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@ public function load(array $configs, ContainerBuilder $container): void
$container->setParameter('coreshop.frontend.category.default_sort_name', $configs['category']['default_sort_name']);
$container->setParameter('coreshop.frontend.category.default_sort_direction', $configs['category']['default_sort_direction']);

$container->setParameter('coreshop.frontend_dir', dirname(__DIR__));

$loader = new YamlFileLoader($container, new FileLocator(__DIR__ . '/../Resources/config'));
$loader->load('services.yml');
}
Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
22 changes: 22 additions & 0 deletions src/CoreShop/Bundle/FrontendBundle/Resources/assets/js/app.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
/* STYLES */
import '../scss/app.scss';
import 'swiper/css/bundle';

/* JS */
import 'bootstrap';
import './scripts/handle-prototypes.js';
import './plugin/coreshop.plugin.quantity.js';
import './plugin/coreshop.plugin.variant.js';
import './scripts/shop.js';
import './scripts/variant.js';
import './scripts/map.js';
import {Carousel} from './scripts/carousel';
//import {CartInfo} from './scripts/cartInfo';

document.addEventListener('DOMContentLoaded', function () {
// const CartWidget = new CartInfo('/coreshop_get_cart_items', '.js-cart-widget');
const CarouselProducts = new Carousel();

//console.log(CartWidget);
console.log(CarouselProducts);
})
Loading