Skip to content

Commit

Permalink
Merge branch 'master' of github.com:rapidez/checkout-theme into featu…
Browse files Browse the repository at this point in the history
…re/rapidez-v3
  • Loading branch information
indykoning committed Nov 1, 2024
2 parents 99999cf + 87fb396 commit 9128ab3
Show file tree
Hide file tree
Showing 7 changed files with 63 additions and 12 deletions.
26 changes: 25 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,33 @@
# Changelog

[Unreleased changes](https://github.com/rapidez/checkout-theme/compare/2.5.2...master)
[Unreleased changes](https://github.com/rapidez/checkout-theme/compare/2.8.0...master)
## [2.8.0](https://github.com/rapidez/checkout-theme/releases/tag/2.8.0) - 2024-10-31

### Added

- Forgot password link at checkout login (#122)

## [2.7.0](https://github.com/rapidez/checkout-theme/releases/tag/2.7.0) - 2024-10-29

### Added

- Dutch translations (#119)

## [2.6.0](https://github.com/rapidez/checkout-theme/releases/tag/2.6.0) - 2024-10-22

### Added

- Backorder count to cart (#117)
- VAT change event (#120)

### Fixed

- Fix address popup when list is to long | Fix text alignment (#116)

## [2.5.2](https://github.com/rapidez/checkout-theme/releases/tag/2.5.2) - 2024-09-16

### Fixed

- Fix the product image because catalog/product is already in the image url (#115)
- Make back button work (#112)
- Fix cart summary(#113)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
name="vat_id"
label="Vat ID"
v-model="addressVariables.vat_id"
v-on:change="window.app.$emit('vat-change', $event)"
:required="Rapidez::config('customer/address/taxvat_show', 0) == 'req'"
/>
@endif
Expand Down
14 changes: 14 additions & 0 deletions resources/views/cart/partials/product/alert.blade.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<div
class="flex self-start items-center rounded gap-x-1 font-medium text-primary border border-yellow-300 bg-yellow-100 text-xs w-fit max-xl:absolute max-xl:top-2 max-xl:right-0 py-0.5"
v-if="item.qty_backordered"
>
<x-heroicon-o-exclamation-circle class="text-yellow-500 mt-px w-5" />
<span>
<template v-if="item.qty_backordered < item.qty">
@lang(':count of the requested quantity will be backordered', ['count' => '@{{ item.qty_backordered }}'])
</template>
<template v-else>
@lang('This product will be backordered')
</template>
</span>
</div>
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<td class="flex max-md:w-1/2 md:table-cell">
@include('rapidez-ct::cart.partials.product.alert')
<div class="flex flex-col items-start">
<a :href="item.product.url_key + item.product.url_suffix | url">
<div dusk="cart-item-name">@{{ item.product.name }}</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ class="justify-center"
</template>
<p v-if="!loggedIn && !checkoutLogin.isEmailAvailable" class="self-end text-ct-inactive">
@lang('You already have an account with this e-mail address. Please log in to continue.')
<a href="{{ route('account.forgotpassword') }}" class="underline hover:no-underline">@lang('Forgot your password?')</a>
</p>
@if (App::providerIsLoaded('Rapidez\Account\AccountServiceProvider'))
<a href="{{ route('account.forgotpassword') }}" class="inline-block text-sm hover:underline mt-5" v-if="!checkoutLogin.isEmailAvailable">
Expand Down
1 change: 1 addition & 0 deletions resources/views/components/address-form.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ class="sm:col-span-2"
name="{{ $type }}_vat_id"
label="Tax ID"
v-model="{{ $address }}.vat_id"
v-on:change="window.app.$emit('vat-change', $event)"
:required="Rapidez::config('customer/address/taxvat_show', 0) == 'req'"
/>
@endif
Expand Down
31 changes: 20 additions & 11 deletions src/ServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,44 +18,46 @@ public function boot()
$this
->bootViews()
->bootPublishables()
->bootMacros();
->bootMacros()
->bootTranslations();
}

public function registerConfig() : self
public function registerConfig(): self
{
$this->mergeConfigFrom(__DIR__.'/../config/rapidez/checkout-theme.php', 'rapidez.checkout-theme');
$this->mergeConfigFrom(__DIR__ . '/../config/rapidez/checkout-theme.php', 'rapidez.checkout-theme');

return $this;
}

public function bootViews() : self
public function bootViews(): self
{
$this->loadViewsFrom(__DIR__.'/../resources/views', 'rapidez-ct');
$this->loadViewsFrom(__DIR__ . '/../resources/views', 'rapidez-ct');

return $this;
}

public function bootPublishables() : self
public function bootPublishables(): self
{
$this->publishes([
__DIR__.'/../resources/core-overwrites' => resource_path('views/vendor/rapidez'),
__DIR__ . '/../resources/core-overwrites' => resource_path('views/vendor/rapidez'),
], 'core-overwrites');

$this->publishes([
__DIR__.'/../resources/views' => resource_path('views/vendor/rapidez-ct'),
__DIR__ . '/../resources/views' => resource_path('views/vendor/rapidez-ct'),
], 'views');

$this->publishes([
__DIR__.'/../config/rapidez/checkout-theme.php' => config_path('rapidez/checkout-theme.php'),
__DIR__ . '/../config/rapidez/checkout-theme.php' => config_path('rapidez/checkout-theme.php'),
], 'config');

return $this;
}
public function bootMacros() : self

public function bootMacros(): self
{
ComponentAttributeBag::macro('hasAny', function ($key) {
/** @var ComponentAttributeBag $this */
if (! count($this->attributes)) {
if (!count($this->attributes)) {
return false;
}

Expand All @@ -71,4 +73,11 @@ public function bootMacros() : self
});
return $this;
}

protected function bootTranslations(): self
{
$this->loadJsonTranslationsFrom(__DIR__ . '/../lang');

return $this;
}
}

0 comments on commit 9128ab3

Please sign in to comment.