Support » Plugin: WooCommerce » Edit Cart Item Function?

  • Resolved Gerdski

    (@gerdski)


    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!

    • This topic was modified 3 months, 1 week ago by Gerdski.
Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Support Elvira K

    (@treibalen)

    Hi there @gerdski,

    This is a fairly complex development topic. I’m going to leave it open for a bit to see if anyone is able to chime in to help you out.

    I can also recommend the following places for more development-oriented questions:

    1. WooCommerce Slack Community: https://woocommerce.com/community-slack/
    2. Advanced WooCommerce group on Facebook: https://www.facebook.com/groups/advanced.woocommerce/

    Cheers!

    Gerdski

    (@gerdski)

    Hi, thanks for your answer.

    It is not really complex…in fact I’ve done it by combining “add product” and “delete product” into one action.

    I was just puzzled that this possibility is not ioncluded in WC out-of-the-box, as it is in every other Shooping System I know. Also strange that nobody seems to miss it but me 🙂

    Plugin Support Elvira K

    (@treibalen)

    Hi @gerdski,

    It is not really complex…in fact I’ve done it by combining “add product” and “delete product” into one action.

    I’ll let someone else chime in and help you out with this question.

    I was just puzzled that this possibility is not ioncluded in WC out-of-the-box, as it is in every other Shooping System I know. Also strange that nobody seems to miss it but me 🙂

    It would be great to have you add your ideas to the Ideas Board, which is where developers go to look for future plugin features and improvements.

    Meanwhile, can you please describe what exactly you’re trying to achieve? Providing a real use-case can help a lot 🙂 Maybe we have an extension on WooCommerce.com which would accommodate your request.

    Gerdski

    (@gerdski)

    >> It is not really complex…in fact I’ve done it by combining “add product” and “delete product” into one action.

    > I’ll let someone else chime in and help you out with this question.

    Why? The problem is solved, I implemented my own functions.

    >> I was just puzzled that this possibility is not ioncluded in WC out-of-the-box, as it is in every other Shooping System I know. Also strange that nobody seems to miss it but me 🙂

    > It would be great to have you add your ideas to the Ideas Board, which is where developers go to look for future plugin features and improvements.

    Yes, you could do that.

    > Meanwhile, can you please describe what exactly you’re trying to achieve? Providing a real use-case can help a lot 🙂 Maybe we have an extension on WooCommerce.com which would accommodate your request.

    I did already describe it in the very first post of this thread. What is missing?

    Plugin Support Elvira K

    (@treibalen)

    Hi there @gerdski,

    Why? The problem is solved, I implemented my own functions.

    To help you with the question which you raised in your initial post.

    Yes, you could do that.

    If you submit an idea yourself, you’ll get notifications for its comments and status.

    I did already describe it in the very first post of this thread. What is missing?

    Having more details about the specific products you want to sell makes it easier to find an extension that would also suit your needs.

    Cheers!

    >> Why? The problem is solved, I implemented my own functions.
    > To help you with the question which you raised in your initial post.

    The problem is solved.

    >>Yes, you could do that.
    >If you submit an idea yourself, you’ll get notifications for its comments and status.

    The problem is solved.

    >>I did already describe it in the very first post of this thread. What is missing?
    >Having more details about the specific products you want to sell makes it easier to find an extension that would also suit your needs.

    It is Print Products we like to sell. But my description of the problem is valid for all types of products. It is the missing “edit product in cart” function we needed. It is avalable in other Shopping Systems. I solved the problem by combining “delete product from cart” and “add product to cart” again with the right values.

    • This reply was modified 2 months, 4 weeks ago by Gerdski.

    Please can you share the code on how you achieved this @gerdski ?

Viewing 7 replies - 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.