I changed the frontend templates (overriding by copying the file to my folder with custom themes) the cart and checkout pages replacing some constructions with table-row-columns-containers with div containers to create (in my opinion) a clearer layout, as well as to handle flexible changes layout.
It looks like the Wordpress hook / action woocommerce_checkout_order_review
called from the template checkout/form-checkout.php
uses the code from cart/cart-shipping.php
, which is great, because ist saves the list containing the selected delivery methods on both pages.
"Critical" change is to remove the tag td
and th
and replace <tr class="shipping">
on <div class="shipping">
in cart/cart-shipping.php
.
This leads to a problem:
Clicking on the shipping_methods ul list item triggers events update_checkout
and updated_checkout
which (I think) are responsible for updating the cart / chekout page. With modified HTML templates, everything does not work as it should; every time everything ul
gets replicated. I could not find occurrences tr.shipping
either .shipping
in woocommerce js code .
Why does the template structure that violates jQuery code change? And how can I achieve this change without breaking?
source
share