Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix issue with scripts appearing next to single product buttons #2923

Merged
merged 5 commits into from
Jun 29, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
74 changes: 18 additions & 56 deletions assets/scss/woocommerce/_product.scss
Original file line number Diff line number Diff line change
Expand Up @@ -18,60 +18,33 @@
}
}

.entry-summary .quantity {
margin-left: 2px !important;
margin-right: 2px !important;
}

.quantity input {
padding-right: 4px !important;
padding-left: 4px !important;
box-sizing: border-box;
line-height: normal;
}

.woocommerce-variation-add-to-cart,
.entry-summary > form.cart {
display: flex;
flex-wrap: wrap;
align-items: stretch;
margin-right: -2px;
margin-left: -2px;

> * {
margin-right: 2px;
margin-left: 2px;
display: flex;
align-self: normal;
align-items: center;
}

.quantity input {
align-self: inherit;
}
.woocommerce-variation-add-to-cart,
.entry-summary > form.cart {
display: flex !important;
flex-wrap: wrap;
margin-left: -2px;
margin-right: -2px;
> * {
flex-basis: 100%;
margin-left: 2px;
margin-right: 2px;
margin-top: 4px!important;
}
.quantity, .single_add_to_cart_button {
display: flex;
flex-basis: initial;
}

.single_variation_wrap {
display: flex;
flex-wrap: wrap;
align-items: stretch;
margin-right: -1px;
margin-left: -1px;

> * {
margin-right: 1px;
margin-left: 1px;
display: flex;
align-self: normal;
align-items: center;
}

.woocommerce-variation {
display: flex;
flex-wrap: wrap;
flex: 0 0 100%;
}
.single_add_to_cart_button {
align-items: center;
}
}
}

.single_add_to_cart_button {
Expand Down Expand Up @@ -312,17 +285,6 @@
body.single-product .neve-main > .container > .row {
flex-wrap: wrap;
}

.woocommerce.single {
.entry-summary > form.cart {
.wc-forward {
flex-basis: auto;
}
}
}
//.variations select {
// height: 35px;
//}
}

.woocommerce ul.products.exclusive-products li.product,
Expand Down
9 changes: 4 additions & 5 deletions inc/compatibility/woocommerce.php
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ public function init() {
add_action( 'wp', array( $this, 'register_hooks' ), 11 );
add_action( 'neve_react_controls_localization', array( $this, 'add_customizer_options' ) );
}

/**
* Add params to specify if the site has elementor templates.
*
Expand All @@ -113,7 +113,7 @@ public function add_customizer_options( $options ) {
$options['elementor']['hasElementorProductTemplate'] = Elementor::has_template( 'product' );
return $options;
}

/**
* Should module load?
*
Expand All @@ -129,7 +129,7 @@ public function should_load() {

return ! ( $is_shop_template || $is_product_template );
}

/**
* Register hooks
*
Expand Down Expand Up @@ -585,8 +585,7 @@ public function add_primary_btns_padding( $selectors ) {
.woocommerce .actions > button[type=submit],
.woocommerce button#place_order,
.woocommerce .return-to-shop > .button,
.woocommerce .button.woocommerce-form-login__submit,
.woocommerce.single .quantity input' );
.woocommerce .button.woocommerce-form-login__submit' );
}

/**
Expand Down