Home Forums Pre-Sale Button “Add to cart” on product archive pages lead to url “…/undefined/”

Button “Add to cart” on product archive pages lead to url “…/undefined/”

  • Author
    Posts
  • #181944

    Hermann Vaubel
    Participant

    Hi,

    I found a small bug:

    When I put the maximum available stock amount of a variation product in the cart then go to the product archive page and try to put that exact variation again in the cart via selecting the variation and clicking the “add to cart” button, normally WooCommerce would give an error message on same page or redirect to product single page depending on you settings on (WooCommerce -> Settings -> Products—> Ajax & redirect options).

    But the add to cart button of your plugin in this case throws you to the url ”…/undefined/” and therefore the 404 page shows up.

    So basically when I´m here

    ”.de/zelte/ultraleicht-bikepacking/”

    and do the steps as described above it will throw me out here

    “.de/zelte/ultraleicht-bikepacking/undefined/”

    Instead of leaving me at the same product archive page with error message that already all available are in cart neither sending me to product page with error message (depending on individual woo settings).

    Any idea why this happens? It would be good if it would act like the normal “add to cart” button from woocommerce in this case.

    How to reproduce?
    1.) Go to a single product page of a variation product for example here: https://balxny1.myraidbox.de/ausruestung/taschen/kulturbeutel/wash-center-ii/
    2.) Choose a variation and put ALL available in stock into your cart
    3.) Go to product archive page of that product for example here https://balxny1.myraidbox.de/?s=3930821&post_type=product&dgwt_wcas=1
    4.) Select the variation you already have put the max amount in cart
    5.) click on the “add to cart” button
    6.) see that you will be redirected to “…/undefined/” instead of product single page with error message

    Thanks for your help

    PS. This message is regarding to my comment on codecanyon as “hwvaubel” where was said I should answer here.

You must be logged in to see replies to this topic. Click here to login or register