Jump to content

Edit History

Darius1990

Darius1990

I found solution! 

case: if you want selected default payment option and another option dont displayed additional info.

payment.tpl

<span class="custom-radio float-xs-left">
    <input class="ps-shown-by-js {if $option.binary} binary {/if}"
                 id="{$option.id}"
                 data-module-name="{$option.module_name}"
                 name="payment-option"
                 type="radio"
                required
               {if 'payment-option-1' == $option.id || $is_free} checked {/if}  <--update this line
     >
    <span></span>
</span>

and refactoring this line: (add extra if statement)

extra TIP: if you want to move payment row ordet methods use paymentOptions hook in display->position and select unpositional hooks :)

{if $option.additionalInformation && $option.id == 'payment-option-1' }
    <div>
         {$option.additionalInformation nofilter}
     </div>
{else}
<div id="{$option.id}-additional-information"
         class="js-additional-information definition-list additional-information{if $option.id != $selected_payment_option} ps-hidden {/if}"
>
{$option.additionalInformation nofilter}
</div>
{/if}
Darius1990

Darius1990

I found solution! 

case: if you want selected default payment option and another option dont displayed additional info.

payment.tpl

<span class="custom-radio float-xs-left">
<input
class="ps-shown-by-js {if $option.binary} binary {/if}"
id="{$option.id}"
data-module-name="{$option.module_name}"
name="payment-option"
type="radio"
required
{if 'payment-option-1' == $option.id || $is_free} checked {/if}  <--update this line
>
<span></span>
</span>

and refactoring this line: (add extra if statement)

extra TIP: if you want to move payment row ordet methods use paymentOptions hook in display->position and select unpositional hooks :)

{if $option.additionalInformation && $option.id == 'payment-option-1' }
<div
>
{$option.additionalInformation nofilter}
</div>
 
{else}
<div
id="{$option.id}-additional-information"
class="js-additional-information definition-list additional-information{if $option.id != $selected_payment_option} ps-hidden {/if}"
>
{$option.additionalInformation nofilter}
</div>
{/if}
Darius1990

Darius1990

I found solution! 

case: if you want selected default payment option and another option dont displayed.

payment.tpl

<span class="custom-radio float-xs-left">
<input
class="ps-shown-by-js {if $option.binary} binary {/if}"
id="{$option.id}"
data-module-name="{$option.module_name}"
name="payment-option"
type="radio"
required
{if 'payment-option-1' == $option.id || $is_free} checked {/if}  <--update this line
>
<span></span>
</span>

and refactoring this line: (add extra if statement)

{if $option.additionalInformation && $option.id == 'payment-option-1' }
<div
>
{$option.additionalInformation nofilter}
</div>
 
{else}
<div
id="{$option.id}-additional-information"
class="js-additional-information definition-list additional-information{if $option.id != $selected_payment_option} ps-hidden {/if}"
>
{$option.additionalInformation nofilter}
</div>
{/if}
×
×
  • Create New...