Edit Cart Item Function?
-
Hello,
I am a bit puzzled that I cannot find a “edit cart item” possibility, similar to the “remove from cart” possibility in the Frontend Cart, (the white cross), like in other shop systems.
There should be a way to take one of the products in the cart, modify it (its custom attributes in my case) and put the modified version back in the cart.
I have tried a workaround by adding an edit-link in the cart and writing a function executed on the single product view page:
add_action('woocommerce_after_single_product_summary', 'my_edit_cart_item_function');This function deletes the clicked product and then recreates its custom attributes in a new instance of the same product.
This function has a serious downside…if a customer decides to edit a cart item and changes his mind on the single product view page, the old product is already gone.
Is there a better way to establish an edit-cart-item-function?
Thanks!
The topic ‘Edit Cart Item Function?’ is closed to new replies.