How can I add a custom field for items in woo cart?
Hello, Toolset Types can add custom fields to any public post type or to WooCommerce Products. However, WooCommerce does not create separate posts for each Order Item, so there's no easy way for Toolset to add custom fields that apply to each item in an Order. You could add custom fields to the Product post type, but those fields would apply to the Product itself and are not specific to each Order. If I understand what you want to achieve with these fields, I might be able to provide some guidance. Can you provide additional details?
Hi,
Thank for your reply, I Need a custom field where in frontend the client can add a number and after the client can see that field in the cart and in the order, and the cart and the order are sort by that number.
I am creating an itinerary sort for crono day
I hope all is more clear
Thanks a lot for your worth help
Okay thanks, that clarifies things a bit. Unfortunately Toolset does not provide the features you need to add this type of custom field information to order items in WooCommerce. It sounds like you also need the ability to manipulate the product lists in the Cart and Checkout screens, but Toolset does not provide any hooks or filters specifically for manipulating those WooCommerce lists. I believe you'll need a different 3rd-party plugin or custom programming to achieve exactly what you're looking for here.
Additional information about adding custom fields to order items using custom code:
https://wisdmlabs.com/blog/add-custom-data-woocommerce-order/
https://stackoverflow.com/questions/54402176/save-order-item-custom-field-in-woocommerce-admin-order-pages
https://www.ibenic.com/manage-order-item-meta-woocommerce/
https://ecommerce.grazitti.com/topic/how-to-add-custom-data-to-woocommerce-order/
Additional information about sorting the cart and order items by custom field:
https://kartechify.com/product/sort-woocommerce-products-in-cart-and-order/
My issue is resolved now. Thank you!