Skip to content

Commit

Permalink
Checkout carrier option extra content display fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Oksydan committed Aug 31, 2023
1 parent e07865f commit 5fe90bb
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion _dev/js/checkout/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ $(document).ready(() => {
// Hide all carrier extra content ...
$(prestashop.themeSelectors.checkout.carrierExtraContent).hide();
// and show the one related to the selected carrier
params.deliveryOption.next(prestashop.themeSelectors.checkout.carrierExtraContent).slideDown();
params.deliveryOption.next(prestashop.themeSelectors.checkout.carrierExtraContent).show();
});
prestashop.on('changedCheckoutStep', (params) => {
if (typeof params.event.currentTarget !== 'undefined') {
Expand Down
6 changes: 3 additions & 3 deletions templates/checkout/_partials/steps/shipping.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,9 @@
>
<div class="form-fields">
{block name='delivery_options'}
<div class="delivery-options js-delivery-option">
<div class="delivery-options">
{foreach from=$delivery_options item=carrier key=carrier_id}
<div class="mb-3 checkout-option-block checkout-option {if $delivery_option == $carrier_id} selected{/if}">
<div class="mb-3 checkout-option-block checkout-option js-delivery-option {if $delivery_option == $carrier_id} selected{/if}">
<input class="custom-control-input" type="radio" name="delivery_option[{$id_address}]" id="delivery_option_{$carrier.id}" value="{$carrier_id}"{if $delivery_option == $carrier_id} checked{/if}>

<label class="card mb-0 cursor-pointer h-100" for="delivery_option_{$carrier.id}">
Expand Down Expand Up @@ -76,8 +76,8 @@
</div>
</label>

<div class="carrier-extra-content js-carrier-extra-content"{if $delivery_option != $carrier_id} style="display:none;"{/if}>{$carrier.extraContent nofilter}</div>
</div>
<div class="carrier-extra-content js-carrier-extra-content my-3"{if $delivery_option != $carrier_id} style="display:none;"{/if}>{$carrier.extraContent nofilter}</div>
{/foreach}
</div>
{/block}
Expand Down

0 comments on commit 5fe90bb

Please sign in to comment.