Checkout_payment.php > change the label class

Open to all! Ask other shopowners for help.
Post Reply
loop
Contributor
Posts: 253
Joined: Thu Mar 25, 2021 12:26 pm
Phoenix Version:
Has thanked: 7 times
Been thanked: 3 times

Checkout_payment.php > change the label class

Post by loop »

Hi all
I need that the Label makes 100% of the width so i can format in the Label the information i need

Code: Select all

 <tr class="table-selection">
              <td><label for="p_<?= $choice['id'] ?>"><?= $choice['module'] ?></label></td>
              <td class="text-right">
i found out, thatt the if i add the class "d-block" to the label '<label class="d-block" <?= $choice['id'] ?>">' i have 100% width and i can format as i need
but i don't know how to do it (without overwriting the checkout_payment.php) can somebody helps me with a other idea, how to implement a hoock to do that? thanks in advance!


Join The Code Co-op to get access to your library in the Code Co-op Forum
loop
Contributor
Posts: 253
Joined: Thu Mar 25, 2021 12:26 pm
Phoenix Version:
Has thanked: 7 times
Been thanked: 3 times

Re: Checkout_payment.php > change the label class

Post by loop »

i have found 1 solution, but don't know if it's the nicest. I added this in the custom css:

Code: Select all

form[name="checkout_payment"] > div > div > div > table > tbody > tr > td > label {
  display:block !important;
}
it works, but maybe there is a better way?
ecartz
Core Team
Posts: 3084
Joined: Tue Nov 05, 2019 6:02 pm
Phoenix Version:
Has thanked: 4 times
Been thanked: 208 times

Re: Checkout_payment.php > change the label class

Post by ecartz »

If you know the choice ID and it is always the same, you could just do

Code: Select all

LABEL[for="p_1"]
Replace the 1 as appropriate.

If not, I suspect that

Code: Select all

FORM[name="checkout_payment"] LABEL {
would be sufficient.


Join The Code Co-op to get access to your library in the Code Co-op Forum
Post Reply