Home › Forums › WoodMart support forum › second "add to cart" button css
second "add to cart" button css
- This topic has 5 replies, 2 voices, and was last updated 6 years, 7 months ago by
Elise Noromit.
-
AuthorPosts
-
July 16, 2018 at 8:51 pm #67917
piannikovParticipantI modified the simple product WC template to add additional buttons “add the cart”.
<form class="cart" action="<?php echo esc_url( apply_filters( 'woocommerce_add_to_cart_form_action', $product->get_permalink() ) ); ?>" method="post" enctype='multipart/form-data'> <div class="quantityhide"><?php woocommerce_quantity_input( array( 'input_value' =>'2', ) ); ?></div> <button type="submit" name="add-to-cart2" value="<?php echo esc_attr( $product->get_id() ); ?>" class="single_add_to_cart_button2 button alt"><?php echo esc_html("Добавить 2"); ?></button> </form>
They have a css class ([type=”submit”] and [type=”button”]) that matches the first button “add the cart” and my attempts to use the css class=”single_add_to_cart_button2 button alt” are unsuccessful. I ask you how to change the “padding” of new buttons, any help is welcome.
July 17, 2018 at 6:54 am #67930
Elise NoromitMemberHello,
Try to use this set of selectors:
.quantityhide > .button, .quantityhide > [type=submit], .quantityhide > button { font-size: 13px; line-height: 18px; padding: 12px 20px; background-color: #f3f3f3; color: #3E3E3E; display: inline-block; position: relative; font-weight: 600; text-align: center; text-transform: uppercase; letter-spacing: .3px; border-radius: 0; border-width: 0; border-style: solid; border-color: transparent; outline: 0; -webkit-box-shadow: none; box-shadow: none; text-shadow: none; text-decoration: none; vertical-align: middle; cursor: pointer; -webkit-transition: color .25s ease,background-color .25s ease,border-color .25s ease,box-shadow .25s ease,opacity .25s ease; -webkit-transition: color .25s ease,background-color .25s ease,border-color .25s ease,opacity .25s ease,-webkit-box-shadow .25s ease; transition: color .25s ease,background-color .25s ease,border-color .25s ease,opacity .25s ease,-webkit-box-shadow .25s ease; transition: color .25s ease,background-color .25s ease,border-color .25s ease,box-shadow .25s ease,opacity .25s ease; transition: color .25s ease,background-color .25s ease,border-color .25s ease,box-shadow .25s ease,opacity .25s ease,-webkit-box-shadow .25s ease; }
Change the styles as per your needs.
Best Regards
July 17, 2018 at 2:07 pm #68002
piannikovParticipantthis does not work 🙁
July 17, 2018 at 2:47 pm #68019
Elise NoromitMemberHello,
Please provide your site admin access.
Best Regards
July 17, 2018 at 3:09 pm #68037
piannikovParticipantok
July 17, 2018 at 3:40 pm #68048
Elise NoromitMemberHello,
Here is the code for these two buttons: http://prntscr.com/k7ke2q
This button has the same class as the main add to cart button http://prntscr.com/k7kfdf.single_add_to_cart_button2 { font-size: 13px; line-height: 18px; padding: 12px 20px; background-color: red; color: #3E3E3E; display: inline-block; position: relative; font-weight: 600; text-align: center; text-transform: uppercase; letter-spacing: .3px; border-radius: 0; border-width: 0; border-style: solid; border-color: transparent; outline: 0; -webkit-box-shadow: none; box-shadow: none; text-shadow: none; text-decoration: none; vertical-align: middle; cursor: pointer; -webkit-transition: color .25s ease,background-color .25s ease,border-color .25s ease,box-shadow .25s ease,opacity .25s ease; -webkit-transition: color .25s ease,background-color .25s ease,border-color .25s ease,opacity .25s ease,-webkit-box-shadow .25s ease; transition: color .25s ease,background-color .25s ease,border-color .25s ease,opacity .25s ease,-webkit-box-shadow .25s ease; transition: color .25s ease,background-color .25s ease,border-color .25s ease,box-shadow .25s ease,opacity .25s ease; transition: color .25s ease,background-color .25s ease,border-color .25s ease,box-shadow .25s ease,opacity .25s ease,-webkit-box-shadow .25s ease; }
Change the styles as per your needs.
The first custom button has this class
.single_add_to_cart_button
You can add this to the code above with comaBest Regards
-
AuthorPosts
- You must be logged in to create new topics. Login / Register