Skip to content

Commit

Permalink
Listen to newsletter/general/active (#157)
Browse files Browse the repository at this point in the history
  • Loading branch information
Jade-GG authored Dec 17, 2024
1 parent 80ad360 commit 8f656c4
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 15 deletions.
6 changes: 3 additions & 3 deletions config/rapidez/checkout-theme.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,12 @@
],
'checkout' => [
'success' => [
// Show the account registration on the success page?
'register' => false
// Show the account registration on the success page
'register' => false,
],
],
'register' => [
// Make the user create an address during registration.
// Make the user create an address during registration
'create-address' => false,
],
];
8 changes: 5 additions & 3 deletions resources/views/account/edit.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,11 @@
<x-rapidez-ct::card.inactive>
@include('rapidez-ct::account.partials.sections.edit.addresses')
</x-rapidez-ct::card.inactive>
<x-rapidez-ct::card.inactive>
@include('rapidez-ct::account.partials.sections.edit.newsletter')
</x-rapidez-ct::card.inactive>
@if (Rapidez::config('newsletter/general/active', 1))
<x-rapidez-ct::card.inactive>
@include('rapidez-ct::account.partials.sections.edit.newsletter')
</x-rapidez-ct::card.inactive>
@endif
<x-rapidez-ct::card.inactive>
@include('rapidez-ct::account.partials.sections.edit.email')
</x-rapidez-ct::card.inactive>
Expand Down
8 changes: 5 additions & 3 deletions resources/views/account/partials/register-account.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -106,9 +106,11 @@ class="grid gap-5 md:grid-cols-2"
</x-rapidez-ct::card.inactive>
@endif

<x-rapidez-ct::card.inactive>
<x-rapidez-ct::newsletter v-model="variables.is_subscribed"/>
</x-rapidez-ct::card.inactive>
@if (Rapidez::config('newsletter/general/active', 1))
<x-rapidez-ct::card.inactive>
<x-rapidez-ct::newsletter v-model="variables.is_subscribed"/>
</x-rapidez-ct::card.inactive>
@endif
</x-rapidez-ct::sections>
</graphql-mutation>
</graphql-mutation>
8 changes: 5 additions & 3 deletions resources/views/checkout/steps/credentials.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,11 @@
<x-rapidez-ct::card.inactive>
@include('rapidez-ct::checkout.partials.sections.address')
</x-rapidez-ct::card.inactive>
<x-rapidez-ct::card.inactive>
@include('rapidez-ct::checkout.partials.sections.newsletter')
</x-rapidez-ct::card.inactive>
@if (Rapidez::config('newsletter/general/active', 1))
<x-rapidez-ct::card.inactive>
@include('rapidez-ct::checkout.partials.sections.newsletter')
</x-rapidez-ct::card.inactive>
@endif
<x-rapidez-ct::card.inactive>
@include('rapidez-ct::checkout.partials.sections.shipping')
</x-rapidez-ct::card.inactive>
Expand Down
8 changes: 5 additions & 3 deletions resources/views/checkout/steps/success.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,11 @@

@include('rapidez-ct::checkout.partials.sections.success.products')

<x-rapidez-ct::card.inactive>
@include('rapidez-ct::checkout.partials.sections.success.newsletter')
</x-rapidez-ct::card.inactive>
@if (Rapidez::config('newsletter/general/active', 1))
<x-rapidez-ct::card.inactive>
@include('rapidez-ct::checkout.partials.sections.success.newsletter')
</x-rapidez-ct::card.inactive>
@endif
<x-rapidez-ct::card.inactive>
@if (config('rapidez.checkout-theme.checkout.success.register'))
@include('rapidez-ct::checkout.partials.sections.success.create-account')
Expand Down

0 comments on commit 8f656c4

Please sign in to comment.