Home › Forums › WoodMart support forum › how to remove “coupon code” from CART
how to remove “coupon code” from CART
- This topic has 47 replies, 2 voices, and was last updated 8 months, 2 weeks ago by Aizaz Imtiaz Awan.
-
AuthorPosts
-
February 20, 2024 at 7:33 pm #541940
kamilskawinski97ParticipantHow can i remove the “coupon code” from the cart page?
check imageAttachments:
You must be logged in to view attached files.February 20, 2024 at 7:33 pm #541942
kamilskawinski97Participanti want to rmeove the entire thing .. together with the button “apply coupon”
February 20, 2024 at 7:35 pm #541943
kamilskawinski97Participantalso, i wish to remove this:
“Shipping options will be updated during checkout.
Calculate shipping”–
because the shipping is free ALWAYS, in any case, so there is nothing to calculate. this might stop people from buying and abandon the cartthank you!
Attachments:
You must be logged in to view attached files.February 21, 2024 at 1:38 pm #542294
Aizaz Imtiaz AwanKeymasterHello,
Please add the below code to the functions.php file into the Child theme.
add_filter( 'woocommerce_coupons_enabled', 'pk_disable_coupons_cart_page' ); function pk_disable_coupons_cart_page() { if ( is_cart() ) return false; return true; }
Navigate to WooCommerce > Settings > General“> “Shipping Location(s)“. Then select the “Disable shipping & shipping calculations” option. This will effectively remove the shipping address field from your checkout page.
Best Regards
March 1, 2024 at 9:00 pm #545520
kamilskawinski97Participantas your reply does not match with my question:
when i am at the CART page of the website, on the right side, where the shipping charges are, i can read this:
“Shipping options will be updated during checkout.
Calculate shipping”–
i want to delete this text: Shipping options will be updated during checkout.
Calculate shippingbecause the shipping is free ALWAYS in this website, in any case, so there is nothing to calculate. this might stop people from buying and abandon the cart.
since there is no shipping to calculate or taxes, i wish to compeltely remove it.
Attachments:
You must be logged in to view attached files.March 2, 2024 at 11:59 am #545595
Aizaz Imtiaz AwanKeymasterHello,
Please try using the below Custom CSS code and paste it to Dashboard >> Theme Settings >> Custom CSS >> Global CSS section:
.cart-totals-inner .woocommerce-shipping-destination,.cart-totals-inner .shipping-calculator-button { display: none; }
Best Regards.
March 7, 2024 at 9:25 pm #547142
kamilskawinski97Participanthello i need to show the reviews with images first. how can i do that? i see that there is the “filter option” but i dont want the customer to use that. i want it to be automatically showed first.
please advise.Attachments:
You must be logged in to view attached files.March 8, 2024 at 2:32 pm #547381
Aizaz Imtiaz AwanKeymasterHello,
Navigate to Theme Settings > Single Product > reviews and check the available option about product reviews.
Please check this manual:
https://xtemos.com/docs-topic/product-reviews/Best Regards.
March 8, 2024 at 6:54 pm #547508
kamilskawinski97Participantthank you for the reply. but is not helping me i guess.
i already went to the settings reviews. what i need to do it:
to show the reviews with images first. how can i do that? i see that there is the “filter option” but i dont want the customer to use that. i want it to be automatically showed first. this has to be done automatically when you visit the page.March 9, 2024 at 11:22 am #547613
Aizaz Imtiaz AwanKeymasterHello,
You need to click on the “only with images” option to see the images related to reviews. Sorry there are no options in theme settings to show them in the top of the section. You need to find a plugin for this purpose that best suits your needs. We have not tested any plugin in this regard.
https://ibb.co/pL3PMWzBest Regards.
March 13, 2024 at 12:42 am #548628
kamilskawinski97Participanthow can i remove the button “view cart” and only leave the button “checkout” please?
Attachments:
You must be logged in to view attached files.March 13, 2024 at 12:36 pm #548761
Aizaz Imtiaz AwanKeymasterHello,
Please add this code to the Theme Settings > Custom CSS > Global:
body .woocommerce-mini-cart__buttons .btn-cart { display:none; }
Best Regards
March 13, 2024 at 1:07 pm #548775
kamilskawinski97Participantamazing thank you
how can i put the “you have (percentage) and euros” in the price space in the product page please?
Attachments:
You must be logged in to view attached files.March 13, 2024 at 3:00 pm #548823
Aizaz Imtiaz AwanKeymasterHello,
Try to add the following PHP code in the function.php of the child theme.
add_filter( 'woocommerce_get_price_html', 'change_displayed_sale_price_html', 10, 2 ); function change_displayed_sale_price_html( $price, $product ) { // Only on sale products on frontend and excluding min/max price on variable products if( $product->is_on_sale() && ! is_admin() && ! $product->is_type('variable')){ // Get product prices $regular_price = (float) $product->get_regular_price(); // Regular price $sale_price = (float) $product->get_price(); // Active price (the "Sale price" when on-sale) // "Saving Percentage" calculation and formatting $precision = 1; // Max number of decimals $saving_percentage = round( 100 - ( $sale_price / $regular_price * 100 ), 1 ) . '%'; // Append to the formated html price $price .= sprintf( __('<p class="saved-sale">You Save: %s</p>', 'woocommerce' ), $saving_percentage ); } return $price; }
Best Regards.
March 13, 2024 at 6:14 pm #548889
kamilskawinski97Participantomg you are great!
it’s totally working!
one thing: can i change the color? and, can you also display the “amount of money saved”, besides the percentage?
so it would be like:
€129.90 – €99.90
You Save: 23.1% (euro symbol 30.2)please, master
Attachments:
You must be logged in to view attached files.March 14, 2024 at 10:23 am #548968
Aizaz Imtiaz AwanKeymasterHello,
Please add this code to the Theme Settings > Custom CSS > Global:
p.saved-sale { color: #005efb }
Please remove the previous code and add this new code.
add_filter( 'woocommerce_get_price_html', 'change_displayed_sale_price_html', 10, 2 ); function change_displayed_sale_price_html( $price, $product ) { // Only on sale products on frontend and excluding min/max price on variable products if( $product->is_on_sale() && ! is_admin() && ! $product->is_type('variable')){ // Get product prices $regular_price = (float) $product->get_regular_price(); // Regular price $sale_price = (float) $product->get_price(); // Active price (the "Sale price" when on-sale) // Calculate the saving percentage $saving_percentage = round( 100 - ( $sale_price / $regular_price * 100 ), 1 ); // Calculate the amount of money saved $amount_saved = $regular_price - $sale_price; // Format the saving percentage and amount saved $saving_percentage_text = sprintf( __('%.1f%%', 'woocommerce'), $saving_percentage ); $amount_saved_text = wc_price( $amount_saved ); // Append to the formatted HTML price $price .= sprintf( __('<p class="saved-sale">You Save: %s (%s)</p>', 'woocommerce' ), $saving_percentage_text, $amount_saved_text ); } return $price; }
Best Regards.
March 25, 2024 at 1:16 am #551853
kamilskawinski97ParticipantHow can I change the size of this?
As it is too big (the money saved part)
thank youAttachments:
You must be logged in to view attached files.March 25, 2024 at 11:49 am #551961
Aizaz Imtiaz AwanKeymasterHello,
Please add this code to the Theme Settings > Custom CSS > Global:
.wd-rs-65f0c09de564f .amount, .wd-rs-65f0c09de564f .price, .wd-rs-65f0c09de564f { font-size: 20px; }
Best Regards.
March 26, 2024 at 4:32 pm #552435
kamilskawinski97Participanthello, it is still the same, after insering the code three days ago – could you please advise?
Attachments:
You must be logged in to view attached files.March 27, 2024 at 10:33 am #552613
Aizaz Imtiaz AwanKeymasterHello,
Please add this code to the Theme Settings > Custom CSS > Global and check the issue after completely clearing the browser cache.
.wd-rs-65f0c09de564f .amount, .wd-rs-65f0c09de564f .price, .wd-rs-65f0c09de564f { font-size: 10px !important; }
Best Regards.
March 28, 2024 at 1:04 am #552895
kamilskawinski97Participantit is now changing, but the problem is now that the price also changed
please check picture attachedAttachments:
You must be logged in to view attached files.March 28, 2024 at 11:30 am #552978
Aizaz Imtiaz AwanKeymasterHello,
You want to change the font size of price only with the euro currency price which is in brackets?
Best Regards.
April 1, 2024 at 7:49 pm #553970
kamilskawinski97Participantyes exactly. i want to chage the part in brakets ( ).
i want the price of 119.90 to be as it is right now in the picture.and i want that the price of euro 30 in between brakets, is the same as the part that sayins: You Save: 20.0% (€30)
Attachments:
You must be logged in to view attached files.April 2, 2024 at 10:42 am #554096
Aizaz Imtiaz AwanKeymasterHello,
You are using the php code for this. To change the font size of only the amount saved (€10.00) within the curly braces, you can modify the PHP code to wrap it with a tag and apply a CSS class specifically to that span.
Here’s how you can do it:
add_filter( 'woocommerce_get_price_html', 'change_displayed_sale_price_html', 10, 2 ); function change_displayed_sale_price_html( $price, $product ) { // Only on sale products on frontend and excluding min/max price on variable products if( $product->is_on_sale() && ! is_admin() && ! $product->is_type('variable')){ // Get product prices $regular_price = (float) $product->get_regular_price(); // Regular price $sale_price = (float) $product->get_price(); // Active price (the "Sale price" when on-sale) // Calculate the saving percentage $saving_percentage = round( 100 - ( $sale_price / $regular_price * 100 ), 1 ); // Calculate the amount of money saved $amount_saved = $regular_price - $sale_price; // Format the saving percentage and amount saved $saving_percentage_text = sprintf( __('%.1f%%', 'woocommerce'), $saving_percentage ); $amount_saved_text = wc_price( $amount_saved ); // Append to the formatted HTML price $price .= sprintf( __('<p class="saved-sale">You Save: %s (<span class="amount2">%s</span>)</p>', 'woocommerce' ), $saving_percentage_text, $amount_saved_text ); } return $price; }
After that add this custom css code in Theme Settings > Custom CSS:
.amount2 { font-size: 20px; }
Best Regards.
April 2, 2024 at 4:33 pm #554286
kamilskawinski97Participanti changed the php code and css but nothing – it is the same as it was.. can you please suggest?
April 3, 2024 at 10:14 am #554454
Aizaz Imtiaz AwanKeymasterHello,
Can you please share the WP admin login details of your site so I will check and give you the possible solution.
Best Regards.
April 5, 2024 at 9:53 pm #555308
kamilskawinski97Participantplease check the admin log in – please check the image – the one with the number 50 €, i would like to make it smaller, preferably the same size of where it says: You Save: 27.8% (€50.00)
Attachments:
You must be logged in to view attached files.April 6, 2024 at 3:22 pm #555408
Aizaz Imtiaz AwanKeymasterHello,
Your issue has been resolved. I have added the following PHP code in the function.php of the child theme.
add_filter( 'woocommerce_get_price_html', 'change_displayed_sale_price_html', 10, 2 ); function change_displayed_sale_price_html( $price, $product ) { // Only on sale products on frontend and excluding min/max price on variable products if( $product->is_on_sale() && ! is_admin() && ! $product->is_type('variable')){ // Get product prices $regular_price = (float) $product->get_regular_price(); // Regular price $sale_price = (float) $product->get_price(); // Active price (the "Sale price" when on-sale) // Calculate the saving percentage $saving_percentage = round( 100 - ( $sale_price / $regular_price * 100 ), 1 ); // Calculate the amount of money saved $amount_saved = $regular_price - $sale_price; // Format the saving percentage and amount saved $saving_percentage_text = sprintf( __('%.1f%%', 'woocommerce'), $saving_percentage ); $amount_saved_text = wc_price( $amount_saved ); // Append to the formatted HTML price $price .= sprintf( __('<p class="saved-sale">You Save: %s (<span class="saveprice">%s</span>)</p>', 'woocommerce' ), $saving_percentage_text, $amount_saved_text ); } return $price; }
Also, I have added the below custom CSS code in the theme settings >> Custom CSS >> Global CSS section:
span.saveprice span.woocommerce-Price-amount.amount bdi { font-size: 15px; }
Best Regards.
April 7, 2024 at 5:41 pm #555527
kamilskawinski97Participantim seeing a small problem – when adding a new product, the “savings price in €” doesnt show up.
please check picture n.1
there is a product discount, but it doesnt show.please check picture n.2
there is a discount, and it shows, with the savings in green color.could you help please sir?
Attachments:
You must be logged in to view attached files.April 8, 2024 at 12:55 pm #555649
Aizaz Imtiaz AwanKeymasterHello,
Please deactivate all the 3rd party plugins and activate only theme-required plugins on the site and then check the issue. I am sure your issue will be solved. Then Activate the 3rd party plugins one by one and check which plugin is creating the issue for you.
Otherwise, if the issue still exists then keep the 3rd party plugins deactivated and let me know I will further check on your site and give you a possible solution.
Best Regards.
-
AuthorPosts
The topic ‘how to remove “coupon code” from CART’ is closed to new replies.
- You must be logged in to create new topics. Login / Register