Skip to content

Commit

Permalink
Fix mobile checkout
Browse files Browse the repository at this point in the history
  • Loading branch information
sjcallender committed Feb 27, 2025
1 parent f7494a0 commit a764e88
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 4 deletions.
16 changes: 14 additions & 2 deletions src/templates/checkout/address.twig
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,17 @@
</button>
</div>

<div class="lg:hidden mt-4 grid grid-cols-1 gap-4 p-4 bg-gray-200 sm:p-6">

<button
type="submit"
class="block w-full px-4 py-3 font-medium text-white text-center bg-[var(--brandColor)] border border-[var(--brandColor)] rounded-xl"
>
{{ 'Next Step'|t('foster-checkout') }}
</button>

</div>

</form>

{% include 'foster-checkout/_components/app/steps-uncompleted' with {
Expand Down Expand Up @@ -238,9 +249,9 @@
{% block mobileFooter %}

{% if cart.lineItems|length > 0 %}
<div class="grid grid-cols-1 gap-4 p-4 bg-gray-200 sm:p-6">
<div class="hidden grid grid-cols-1 gap-4 p-4 bg-gray-200 sm:p-6">
<a
href="#"
href="{{ craft.fostercheckout.getPath('cancel') }}"
class="block w-full px-4 py-3 font-medium text-[var(--brandColor)] text-center bg-white border border-[var(--brandColor)] rounded-xl"
>
{{ 'Continue Shopping'|t('foster-checkout') }}
Expand All @@ -251,6 +262,7 @@
>
{{ 'Next Step'|t('foster-checkout') }}
</button>
</form>
</div>
{% endif %}

Expand Down
15 changes: 13 additions & 2 deletions src/templates/checkout/shipping.twig
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@

{{ csrfInput() }}
{{ actionInput('commerce/cart/update-cart') }}

{% if cart.availableShippingMethodOptions|length >= 1 %}
{{ redirectInput(craft.fostercheckout.getPath('checkout') ~ '/payment') }}
{% else %}
Expand Down Expand Up @@ -126,6 +126,17 @@
</button>
</div>

<div class="lg:hidden mt-4 grid grid-cols-1 gap-4 p-4 bg-gray-200 sm:p-6">

<button
type="submit"
class="block w-full px-4 py-3 font-medium text-white text-center bg-[var(--brandColor)] border border-[var(--brandColor)] rounded-xl"
>
{{ 'Next Step'|t('foster-checkout') }}
</button>

</div>

</form>

{% include 'foster-checkout/_components/app/steps-uncompleted' with {
Expand Down Expand Up @@ -183,7 +194,7 @@
{% block mobileFooter %}

{% if cart.lineItems|length > 0 %}
<div class="grid grid-cols-1 gap-4 p-4 bg-gray-200 sm:p-6">
<div class="hidden grid grid-cols-1 gap-4 p-4 bg-gray-200 sm:p-6">
<a
href="#"
class="block w-full px-4 py-3 font-medium text-[var(--brandColor)] text-center bg-white border border-[var(--brandColor)] rounded-xl"
Expand Down

0 comments on commit a764e88

Please sign in to comment.