- This topic has 45 replies, 3 voices, and was last updated 4 years, 8 months ago by Tom.
-
AuthorPosts
-
August 20, 2019 at 5:19 pm #989298TomLead DeveloperLead Developer
Is the CSS live right now? I’m not seeing it.
August 20, 2019 at 5:35 pm #989308PedroHello Tom! Currently not because it was not visualizing well.
If you tell me to activate it now I will.
Is that the site is in production and I am having enough traffic.
August 20, 2019 at 5:38 pm #989311PedroI have enabled it so you can see.
Please don’t delay haha
August 20, 2019 at 6:57 pm #989322PedroPlease, how can I disable the main menu icons in the mobile version?
August 20, 2019 at 7:21 pm #989327TomLead DeveloperLead DeveloperIt may be best to do these changes on a staging site if this one has traffic.
I just updated the CSS here: https://generatepress.com/forums/topic/optimized-woocommerce-checkout/#post-988372
August 20, 2019 at 7:33 pm #989336PedroHello Tom! Thank you very much for answering.
It worked perfectly, however is there any possibility that the title “Checkout” is aligned with the edge of the coupon field?
It seems to be very aligned to the right.
Thank you!!
August 21, 2019 at 7:04 am #989615DavidStaffCustomer SupportTry this CSS:
.checkout-title { padding-right: 40px; } @media (max-width: 768px) { .checkout-title { padding-right: 20px; } }
August 21, 2019 at 7:09 am #989623PedroHello david! Thanks for answering.
I am not an expert in CSS, that code you gave me I added to the one Tom had given me and it looks like this:
.checkout-title { order: 10; line-height: 60px; color: #fff; font-size: 17px; padding-right: 40px; } @media (max-width: 768px) { .checkout-title { padding-right: 20px; } }
It’s okay? Thank you!
August 21, 2019 at 8:15 am #989834DavidStaffCustomer SupportLooks correct
August 21, 2019 at 8:34 am #989852PedroHello david! Thank you very much, and the title was aligned. Now I just need to change the coupon field as I instructed Tom. Thank you!
August 21, 2019 at 10:21 am #989949DavidStaffCustomer SupportSo you want to move the coupon notice / toggle form from the top? If so try this filter:
remove_action( 'woocommerce_before_checkout_form', 'woocommerce_checkout_coupon_form', 10 ); add_action( 'woocommerce_after_checkout_form', 'woocommerce_checkout_coupon_form' );
Change:
add_action( 'woocommerce_after_checkout_form'
for the hook you want to place it in – which you can find here:https://businessbloomer.com/woocommerce-visual-hook-guide-checkout-page/
August 21, 2019 at 10:47 am #989978PedroHello david! What I want is to move the coupon field and make it look like in this image:
https://mega.nz/#!GtNWzCiA!ZEg2rpp9FVTpJ9s4bvEhxcsuy_xQWTg-iwaKpkhhUaQ
August 21, 2019 at 11:24 am #990005DavidStaffCustomer SupportThis really is custom development – not sure if this method will still work but you can try:
1. First off use the remove_action i provided earlier to remove the current form.
2. Create a new Hook Element and add this:
<?php if ( wc_coupons_enabled() ) { ?> <div class="custom-coupon"> <form action="http://example.com/cart/" method="post"> <label for="coupon_code"><?php esc_html_e( 'Coupon:', 'woocommerce' ); ?></label> <input type="text" name="coupon_code" class="input-text" id="coupon_code" value="" placeholder="<?php esc_attr_e( 'Coupon code', 'woocommerce' ); ?>" /> <button type="submit" class="button" name="apply_coupon" value="<?php esc_attr_e( 'Apply coupon', 'woocommerce' ); ?>"><?php esc_attr_e( 'Apply coupon', 'woocommerce' ); ?></button> </form> <?php do_action( 'woocommerce_cart_coupon' ); ?> </div> <?php } ?>
2.1 Select the:
woocommerce_review_order_before_payment
Hook.
2.2 Check execute PHP
2.3 Set your Display Rules to Pages > Checkout
2.4 Note – in the above code you will need to change the form action URL3. Add some CSS to hide the label and make them into a row.
.custom-coupon { display: flex; margin: 20px 0; } .custom-coupon label { display: none; }
I am not sure if this method will work. If it doesn’t then only workaround is to edit child theme copies of woo – but as i said this is custom development and out of our scope.
August 21, 2019 at 2:29 pm #990106PedroHello david!
I have added all the codes and apparently it works.
However, when you click on the “Apply coupon” button, what you do is pay the order.
August 21, 2019 at 2:37 pm #990107Pedro2.4 Note – in the above code you will need to change the form action URL
I think it may be because of this, what URL should I place?
-
AuthorPosts
- You must be logged in to reply to this topic.