From 4c85743d3ef7d65cb2bccfb6142f912e92ba6ec6 Mon Sep 17 00:00:00 2001 From: Roene Date: Thu, 27 Nov 2025 11:07:21 +0100 Subject: [PATCH 1/5] Added empty cart state + test --- lang/nl.json | 49 +++++++++++++------------ resources/svg/empty-cart.svg | 1 + resources/views/cart/empty.blade.php | 16 ++++++++ resources/views/cart/overview.blade.php | 6 ++- tests/playwright/cart.spec.js | 5 +++ 5 files changed, 51 insertions(+), 26 deletions(-) create mode 100644 resources/svg/empty-cart.svg create mode 100644 resources/views/cart/empty.blade.php diff --git a/lang/nl.json b/lang/nl.json index a0a3b99e0..3e25866c2 100644 --- a/lang/nl.json +++ b/lang/nl.json @@ -10,12 +10,14 @@ "Apply": "Toepassen", "Apply coupon code": "Kortingscode toepassen", "Billing address": "Factuuradres", + "Business": "Zakelijk", "Cart": "Winkelwagen", "Categories": "Categorieën", "Category": "Categorie", "Check the spelling of your search term": "De spelling van je zoekterm te controleren", "Checkout": "Afrekenen", "City": "Stad", + "Clear the search query": "De zoekopdracht wissen", "Close": "Sluiten", "Company": "Bedrijf", "Compatible file extensions to upload": "Compatibele bestandsextensies om te uploaden", @@ -30,20 +32,25 @@ "Fax": "Fax", "Filters": "Filters", "First": "Eerste", + "First Page": "Eerste pagina", "Firstname": "Voornaam", "Forgot your password?": "Wachtwoord vergeten?", "Go to home": "Naar de homepagina", "Have you tried:": "Heb je gedacht aan:", + "Here are some suggestions:": "Hier zijn enkele suggesties:", "Home": "Homepagina", "Housenumber": "Huisnummer", "Increase": "Verhogen", "Items per page": "Producten per pagina", "Last": "Laatste", + "Last Page": "Laatste pagina", "Lastname": "Achternaam", "Less options": "Minder opties", "Loading": "Aan het laden", "Login": "Inloggen", + "Login to view your shopping cart": "Login om je winkelwagen te bekijken", "Logout": "Uitloggen", + "Main menu": "Hoofdmenu", "Make your search term less specific": "Je zoekterm minder specifiek maken", "Maximum image height": "Maximale hoogte", "Maximum image width": "Maximale breedte", @@ -52,12 +59,17 @@ "My billing and shipping address are the same": "Mijn factuur- en verzendadres zijn hetzelfde", "New address": "Nieuw adres", "Next": "Volgende", + "Next Page": "Volgende pagina", "No": "Nee", + "No products found.": "Geen producten gevonden.", "No results found for :searchterm": "Geen resultaten voor :searchterm", + "No selection": "Geen selectie", "Order placed succesfully": "Bestelling succesvol geplaatst", + "Order type": "Type bestelling", "Orders": "Bestellingen", "Out of stock": "Niet op voorraad", "page": "pagina", + "Page": "Pagina", "Password": "Wachtwoord", "Payment": "Betalen", "Payment method": "Betaalmethode", @@ -69,7 +81,12 @@ "Postcode": "Postcode", "Prefix": "Aanhef", "Prev": "Vorige", + "Previous Page": "Vorige pagina", + "Previous Searches": "Vorige zoekopdrachten", + "Price from": "Prijs vanaf", + "Price to": "Prijs tot", "Privacy Policy": "Privacybeleid", + "Private": "Particulier", "products": "producten", "Products": "Producten", "Quantity": "Hoeveelheid", @@ -81,8 +98,10 @@ "Reset filters": "Filters resetten", "Search": "Zoeken", "Search for": "Zoeken naar", - "No selection": "Geen selectie", + "Search within the results": "Zoeken binnen resultaten", + "Searching...": "Zoeken...", "Select": "Selecteer", + "Selected filters": "Geselecteerde filters", "Shipping": "Verzending", "Shipping & billing address": "Verzend- en factuuradres", "Shipping address": "Verzendadres", @@ -92,27 +111,25 @@ "Sign up for our newsletter to stay up to date.": "Meld je aan voor onze nieuwsbrief om op de hoogte te blijven.", "Sorry! No image": "Sorry! Geen afbeelding", "Sorry! This product is currently out of stock.": "Sorry! Dit product is momenteel niet op voorraad.", - "No products found.": "Geen producten gevonden.", - "There are currently no products in this category.": "Er zijn momenteel geen producten in deze categorie.", - "Here are some suggestions:": "Hier zijn enkele suggesties:", - "Suggestions": "Suggesties", + "Sort options": "Sorteer opties", "Specifications": "Specificaties", "Street": "Straat", "Subscribe": "Inschrijven", "Subtotal": "Subtotaal", "Success": "Succes", "Suffix": "Achtervoegsel", + "Suggestions": "Suggesties", "Tax": "Btw", "Tax ID": "Btw-id", "Telephone": "Telefoonnummer", "Thank you for subscribing!": "Bedankt voor het inschrijven!", + "There are currently no products in this category.": "Er zijn momenteel geen producten in deze categorie.", "This product is out of stock, remove it to continue your order.": "Dit product is niet op voorraad, verwijder het om verder te gaan met je bestelling.", "This product will be backordered": "Dit product zal worden nageleverd", "This website uses cookies": "Deze website maakt gebruik van cookies", "Total": "Totaal", "Update": "Update", "Use other search terms": "Andere zoektermen te gebruiken", - "Previous Searches": "Vorige zoekopdrachten", "View all products": "Bekijk alle producten", "Want product news and updates?": "Wil je productnieuws en updates?", "We care about the protection of your data. Read our": "Wij geven om de bescherming van uw gegevens. Lees onze", @@ -124,21 +141,5 @@ "Yes": "Ja", "You don't have anything in your cart.": "Je hebt geen producten in je winkelwagen.", "You have filtered for:": "Je hebt gefilterd op:", - "Your order is currently:": "Je bestelling is op dit moment:", - "Search within the results": "Zoeken binnen resultaten", - "Selected filters": "Geselecteerde filters", - "First Page": "Eerste pagina", - "Previous Page": "Vorige pagina", - "Page": "Pagina", - "Next Page": "Volgende pagina", - "Last Page": "Laatste pagina", - "Clear the search query": "De zoekopdracht wissen", - "Sort options": "Sorteer opties", - "Searching...": "Zoeken...", - "Order type": "Type bestelling", - "Private": "Particulier", - "Business": "Zakelijk", - "Main menu": "Hoofdmenu", - "Price from": "Prijs vanaf", - "Price to": "Prijs tot" -} + "Your order is currently:": "Je bestelling is op dit moment:" +} \ No newline at end of file diff --git a/resources/svg/empty-cart.svg b/resources/svg/empty-cart.svg new file mode 100644 index 000000000..3fe91ebbc --- /dev/null +++ b/resources/svg/empty-cart.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/resources/views/cart/empty.blade.php b/resources/views/cart/empty.blade.php new file mode 100644 index 000000000..92deeed2f --- /dev/null +++ b/resources/views/cart/empty.blade.php @@ -0,0 +1,16 @@ +
+ +
+
+ @lang('You don\'t have anything in your cart.') +
+ + @lang('Login to view your shopping cart') + + + @lang('Continue shopping') + +
+
+ +@include('rapidez::listing.partials.popular-products') diff --git a/resources/views/cart/overview.blade.php b/resources/views/cart/overview.blade.php index 16d3a8c06..c0a004b5b 100644 --- a/resources/views/cart/overview.blade.php +++ b/resources/views/cart/overview.blade.php @@ -37,7 +37,9 @@ /> -
@lang('You don\'t have anything in your cart.')
-
@lang('Loading')...
+
+ @include('rapidez::cart.empty') +
+
@lang('Loading')...
@endsection diff --git a/tests/playwright/cart.spec.js b/tests/playwright/cart.spec.js index 7b7391caa..50c6f1690 100644 --- a/tests/playwright/cart.spec.js +++ b/tests/playwright/cart.spec.js @@ -32,6 +32,11 @@ test('remove product', BasePage.tags, async ({ page }) => { await expect(page.getByTestId('cart-item')).toHaveCount(0) }) +test('empty cart', BasePage.tags, async ({ page }) => { + await page.goto('/cart') + await new BasePage(page).screenshot('fullpage-footer') +}) + test('wcag', BasePage.tags, async ({ page }, testInfo) => { const product = await new ProductPage(page).addToCart(process.env.PRODUCT_URL_SIMPLE) await new CartPage(page).gotoCart() From cbb2214992c7f1a6ad0b00042f7c24542f6cfc79 Mon Sep 17 00:00:00 2001 From: Roene-JustBetter Date: Thu, 27 Nov 2025 10:08:18 +0000 Subject: [PATCH 2/5] Apply fixes from Prettier --- lang/nl.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lang/nl.json b/lang/nl.json index 3e25866c2..3db9fc280 100644 --- a/lang/nl.json +++ b/lang/nl.json @@ -142,4 +142,4 @@ "You don't have anything in your cart.": "Je hebt geen producten in je winkelwagen.", "You have filtered for:": "Je hebt gefilterd op:", "Your order is currently:": "Je bestelling is op dit moment:" -} \ No newline at end of file +} From 7317e381683d07a55a55d9fb3432307f9bd1b827 Mon Sep 17 00:00:00 2001 From: Roene Date: Thu, 27 Nov 2025 11:13:33 +0100 Subject: [PATCH 3/5] Fix double space --- resources/views/cart/empty.blade.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/views/cart/empty.blade.php b/resources/views/cart/empty.blade.php index 92deeed2f..00477958c 100644 --- a/resources/views/cart/empty.blade.php +++ b/resources/views/cart/empty.blade.php @@ -4,7 +4,7 @@
@lang('You don\'t have anything in your cart.')
- + @lang('Login to view your shopping cart') From fea52a625e0babc7ce5a5a3c5b4640613a1e9f24 Mon Sep 17 00:00:00 2001 From: Roene-JustBetter Date: Thu, 27 Nov 2025 10:28:38 +0000 Subject: [PATCH 4/5] [CI] Update Snapshots --- .../empty-cart-1-Mobile-Chrome-linux.png | 3 +++ .../empty-cart-1-Mobile-Safari-linux.png | 3 +++ .../cart.spec.js-snapshots/empty-cart-1-chromium-linux.png | 3 +++ .../cart.spec.js-snapshots/empty-cart-1-firefox-linux.png | 3 +++ .../cart.spec.js-snapshots/empty-cart-1-webkit-linux.png | 3 +++ 5 files changed, 15 insertions(+) create mode 100644 tests/playwright/cart.spec.js-snapshots/empty-cart-1-Mobile-Chrome-linux.png create mode 100644 tests/playwright/cart.spec.js-snapshots/empty-cart-1-Mobile-Safari-linux.png create mode 100644 tests/playwright/cart.spec.js-snapshots/empty-cart-1-chromium-linux.png create mode 100644 tests/playwright/cart.spec.js-snapshots/empty-cart-1-firefox-linux.png create mode 100644 tests/playwright/cart.spec.js-snapshots/empty-cart-1-webkit-linux.png diff --git a/tests/playwright/cart.spec.js-snapshots/empty-cart-1-Mobile-Chrome-linux.png b/tests/playwright/cart.spec.js-snapshots/empty-cart-1-Mobile-Chrome-linux.png new file mode 100644 index 000000000..708aae3d4 --- /dev/null +++ b/tests/playwright/cart.spec.js-snapshots/empty-cart-1-Mobile-Chrome-linux.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4c056dac162034caa1d116abb9425ebb7ea587148493fed0a8a1e754bac68f87 +size 87482 diff --git a/tests/playwright/cart.spec.js-snapshots/empty-cart-1-Mobile-Safari-linux.png b/tests/playwright/cart.spec.js-snapshots/empty-cart-1-Mobile-Safari-linux.png new file mode 100644 index 000000000..9de03cf82 --- /dev/null +++ b/tests/playwright/cart.spec.js-snapshots/empty-cart-1-Mobile-Safari-linux.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:14e2707cb39a5bb9ccb785b7bc027050493cd5aa3b3f502c4716835b4159e3b9 +size 94936 diff --git a/tests/playwright/cart.spec.js-snapshots/empty-cart-1-chromium-linux.png b/tests/playwright/cart.spec.js-snapshots/empty-cart-1-chromium-linux.png new file mode 100644 index 000000000..a58725864 --- /dev/null +++ b/tests/playwright/cart.spec.js-snapshots/empty-cart-1-chromium-linux.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9f2b40934c70324ab0e1ce245a8295343e03a0483f1072ea9eb78dfbac613a36 +size 94035 diff --git a/tests/playwright/cart.spec.js-snapshots/empty-cart-1-firefox-linux.png b/tests/playwright/cart.spec.js-snapshots/empty-cart-1-firefox-linux.png new file mode 100644 index 000000000..35ec2fa50 --- /dev/null +++ b/tests/playwright/cart.spec.js-snapshots/empty-cart-1-firefox-linux.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e2602aa04cc540cb258ac6e3eab5317dcdfc5e6367a0066dc46af3a410f06659 +size 126398 diff --git a/tests/playwright/cart.spec.js-snapshots/empty-cart-1-webkit-linux.png b/tests/playwright/cart.spec.js-snapshots/empty-cart-1-webkit-linux.png new file mode 100644 index 000000000..7e9643168 --- /dev/null +++ b/tests/playwright/cart.spec.js-snapshots/empty-cart-1-webkit-linux.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:758c810f3009fa466d907a48724d3f4d068059137bc45f0ea2b3f369ae317eb1 +size 107921 From dc86b88c13a731218e46210ec9c38246c1b88174 Mon Sep 17 00:00:00 2001 From: Roene Date: Thu, 27 Nov 2025 11:56:52 +0100 Subject: [PATCH 5/5] Added translation --- lang/nl.json | 1 + 1 file changed, 1 insertion(+) diff --git a/lang/nl.json b/lang/nl.json index 3db9fc280..71e668e79 100644 --- a/lang/nl.json +++ b/lang/nl.json @@ -19,6 +19,7 @@ "City": "Stad", "Clear the search query": "De zoekopdracht wissen", "Close": "Sluiten", + "Continue shopping": "Verder winkelen", "Company": "Bedrijf", "Compatible file extensions to upload": "Compatibele bestandsextensies om te uploaden", "Continue": "Verder gaan",