Last active
March 5, 2026 10:55
-
-
Save jmabbas/645f5d9fc874852c1bab94ef970d012a to your computer and use it in GitHub Desktop.
Electro - Cart page custom
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| add_action( 'init', 'ec_child_cart_shipping_calculator_link', 10 ); | |
| function ec_child_cart_shipping_calculator_link() { | |
| add_action( 'woocommerce_before_cart', 'custom_shipping_calculator_link', 8 ); | |
| add_action( 'woocommerce_before_shipping_calculator', 'custom_shipping_calculator_link_redirect', 8 ); | |
| } | |
| function custom_shipping_calculator_link() { | |
| ?> | |
| <a href="#shipping-calculator-form-redirect" class="custom-shipping-calculator-link" style="display: none; color: #ce2020; text-decoration: underline;justify-content: center;" aria-expanded="false" aria-controls="shipping-calculator-form" role="button">Click here to calculate shipping fees</a> | |
| <?php | |
| } | |
| function custom_shipping_calculator_link_redirect() { | |
| ?> | |
| <div id="shipping-calculator-form-redirect"></div> | |
| <?php | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @media (max-width: 767px) { | |
| table.shop_table.shop_table_responsive tr td.product-thumbnail { | |
| display: block; | |
| margin: 0 auto; | |
| } | |
| table.shop_table.shop_table_responsive tr td:before { | |
| content: none; | |
| } | |
| tr.woocommerce-cart-form__cart-item.cart_item { | |
| display: flex !important; | |
| flex-wrap: wrap; | |
| align-items: center; | |
| } | |
| table.shop_table td.product-remove { | |
| width: 100%; | |
| } | |
| td.product-name { | |
| width: 60%; | |
| } | |
| td.product-thumbnail, | |
| td.product-price,td.product-quantity,td.product-subtotal { | |
| width:30%; | |
| } | |
| .custom-shipping-calculator-link { | |
| display: flex !important; | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment