Can the coupon be used with a URL that also utilizes the add-to-cart parameter?

Top WooCommerce & WordPress Plugins Forums URL Coupons for WooCommerce Can the coupon be used with a URL that also utilizes the add-to-cart parameter?

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #92545
    Eugenio
    Participant

    Hi,
    Is it possibile to concatenate url with coupon apply to the add product to cart?
    Not sure about it: I’m trying but I didn’t succeded.
    Thx

    #92546
    Tom Anbinder
    Moderator
    Plugin Support

    Hi Eugenio,

    Generally, you should be able to do that with something like this:

    http://example.com/cart/?add-to-cart=2495&alg_apply_coupon=test

    Is it not working? If that’s the case – could you please post the exact URL you are trying it with? Also – are you adding simple products? Or variable products maybe?

    #92547
    Eugenio
    Participant

    Hi, it is actually a simple product.
    The URL I’m trying is as follow:
    https://www.revoring.com/carrello/?add-to-cart=90498&cpn=offerta-home

    I do not get what am I missing… 🙁

    #92548
    Tom Anbinder
    Moderator
    Plugin Support

    Hi Eugenio,

    Sorry for the late reply.

    I did check it, and it looks weird indeed. Both params (i.e. add-to-cart and cpn) work properly when used separately, however, add-to-cart seems to be blocking cpn for some reason when used together… Could I log in to your site to check what’s going on (my email is [email protected])? Please let me know if sharing an account is not an option, and I will continue solving it remotely.

    #92549
    Tom Anbinder
    Moderator
    Plugin Support

    If anyone else has a similar question – although I wasn’t able to reproduce the issue on my test server, after logging in to Eugenio’s site, I’ve managed to fix it. Generally, our “apply coupon” action was called later than “add to cart” action for some reason. I’m not sure why, as it’s working differently on my test server, but it may be some compatibility issue with some other plugin installed on the server. I ended up adding two new options to the plugin (in v1.3.1): Hook priority and Remove “add to cart” key. Both options are in the “Advanced” settings section of our plugin (in “WooCommerce > Settings > URL Coupons”). So now if you lower the “Hook priority” to 10, and disable the “Remove ‘add to cart’ key” checkbox, it all seems to be working fine.

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