Jump to content

PRéselectionner un moyen de paiement


Recommended Posts

Bonjour, je souhaite que le bouton radio devant un des moyens de paiement soit pré-checké par défaut. Le moyen de paiement est postfinance. Les boutons radio sont gérés par le fichier paiement.tpl du thème avec cette partie

 <span class="custom-radio pull-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 $selected_payment_option == $option.id} checked {/if}
              >
              <span></span>
            </span>

Actuellement le choix postfinance, id = "payment-option-2". Je essayé {if$ option.id =="'payment-option-2"} checked {/if} et cela fonctionne. Mais en fonction du type de client, les moyens de paiement peuvent changer et j'imagine que l'id risque de changer. Y a-t-il un autre moyen plus sûr de faire ?

 

Merci d'avance

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...