mirror of
https://github.com/Sylius/Sylius.git
synced 2026-07-14 17:10:53 +00:00
[UX] Fix cart button on small screens
This commit is contained in:
parent
50c9d31096
commit
aa2d054810
2 changed files with 10 additions and 7 deletions
|
|
@ -25,11 +25,14 @@ import './sylius-variants-prices';
|
|||
$(document).ready(() => {
|
||||
$('.popup-js').popup();
|
||||
|
||||
$('.cart.button')
|
||||
.popup({
|
||||
popup: $('.cart.popup'),
|
||||
on: 'click',
|
||||
});
|
||||
$('.cart.button').popup({
|
||||
popup: $('.cart.popup'),
|
||||
on: 'click',
|
||||
onUnplaceable() {
|
||||
window.location.href = $('#sylius-go-to-cart').attr('href');
|
||||
},
|
||||
silent: true,
|
||||
});
|
||||
|
||||
$('.star.rating').rating({
|
||||
fireOnInit: true,
|
||||
|
|
@ -85,6 +88,6 @@ $(document).ready(() => {
|
|||
slidesToScroll: 1,
|
||||
prevArrow: $('.carousel-left'),
|
||||
nextArrow: $('.carousel-right'),
|
||||
appendArrows: false
|
||||
appendArrows: false,
|
||||
});
|
||||
});
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@
|
|||
{% endfor %}
|
||||
<div class="item"><strong>{{ 'sylius.ui.subtotal'|trans }}</strong>: {{ money.convertAndFormat(cart.itemsTotal) }}</div>
|
||||
</div>
|
||||
<a href="{{ path('sylius_shop_cart_summary') }}" class="ui fluid basic text button">{{ 'sylius.ui.view_and_edit_cart'|trans }}</a>
|
||||
<a href="{{ path('sylius_shop_cart_summary') }}" id="sylius-go-to-cart" class="ui fluid basic text button">{{ 'sylius.ui.view_and_edit_cart'|trans }}</a>
|
||||
<div class="ui divider"></div>
|
||||
<a href="{{ path('sylius_shop_checkout_start') }}" class="ui fluid primary button">{{ 'sylius.ui.checkout'|trans }}</a>
|
||||
{% endif %}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue