Site logo

Archived topic

Change coupon field style in checkout

13 replies · Started by Pedro on July 1, 2019

Viewing posts 1–14 of 14

Hello! By default WooCommerce shows the coupon field as a news item on the chekout page. (A blue box)

I would like to change it and it would only be shown as a simple text.

How could I do it?

Hi there,

so this topic we showed how to remove it:

https://generatepress.com/forums/topic/move-coupon-field-in-checkout-woocommerce/#post-946501

Or you can use this CSS to strip back the styling:

.woocommerce-form-coupon-toggle .woocommerce-info {
    background-color: transparent;
    border: 0;
    color: #000;
    padding-left: 0;
}
.woocommerce-form-coupon-toggle .woocommerce-info a {
    color: #000;
}
.woocommerce-form-coupon-toggle .woocommerce-info a:hover {
    color: #aaa !important;
}

Hello david! It worked perfectly.

However I would like to change the color of the link since it is not displayed well.

You can help me?

Thank you!

Sorry where can I find this form field you are referring to?

A screenshot and some guideline to get there might help :)

Hello Tom! The payment page is for the site http://www.rebajaslocas.com

And I mean the field of the coupon, the code that David gave me removes the block blue color, however the colors of the link are not displayed correctly.

Try this:

.woocommerce-form-coupon-toggle .woocommerce-info a,
.woocommerce-form-coupon-toggle .woocommerce-info a:hover,
.woocommerce-form-coupon-toggle .woocommerce-info a:focus {
    color: #0066c0;
}

Hi leo! Thanks for answering.

I have used the code and it works, it shows the blue color link, however when I click it turns gray and then white.

How can I correct this?

Hi leo! It worked very well, and finally I would like that when doing hover it would not turn gray but black.

As Generatepress does by default.

Thank you!

As mentioned above, it's #aaa on hover because you already have the CSS added with !important.

You can just change the color there.

Hi leo!! You're the best, it worked for me.

Then I leave all the code, Could you verify that everything is fine?

.woocommerce-form-coupon-toggle .woocommerce-info {
    background-color: transparent;
    border: 0;
    color: #000;
    padding-left: 0;
}
.woocommerce-form-coupon-toggle .woocommerce-info a {
    color: #000;
}
.woocommerce-form-coupon-toggle .woocommerce-info a:hover {
    color: #000000 !important;
}
.woocommerce-form-coupon-toggle .woocommerce-info a,
.woocommerce-form-coupon-toggle .woocommerce-info a:focus {
    color: #0066c0;
}

It's just that I'm a novice in everything that is code.

Thank you!

I edited your code slightly. Other than that it looks good!

This archived topic is closed to new replies.