PrevPrev Go to previous topic
NextNext Go to next topic
Last Post 2/22/2018 8:07 PM by  Will Strohl
Add promo code field to checkout page
 3 Replies
 1 Subscribed to this topic
 1 Subscribed to this forum
Sort:
You are not authorized to post a reply.
Author Messages





New Member






--
2/8/2018 5:57 PM
    Is there a way to add a "add promo code" field to the checkout page? If I copy it over from the cart viewset, whenever a promo code is entered, the site redirects to the cart page. I want the user to stay on the checkout page. How can I override this behaviour of automatic redirect to cart page after coupon code entry?
    Paras Daryanani Co-founder & CTO @ Celestial Sites [email protected]





    Veteran Member






    --
    2/9/2018 11:26 PM
    The checkout isn't really built to allow you to move/copy the promotion code functionality there from the cart view. While it's possible to do this still, it would be a lot of work in the viewset and would also require that you create a custom Web API endpoint for the checkout to talk to in order to duplicate the functionality found in the cart.

    In regards to the postback, I've created an issue for this to be discussed and possibly implemented at some point.

    https://github.com/Hotcak...merce/core/issues/70
    Will Strohl, Upendo Ventures Hotcakes Cloud | Get Support | Code Support Official Cloud & Support provider for Hotcakes





    New Member






    --
    2/10/2018 4:21 PM
    Thanks Will! For now I've managed to override the behaviour using ajax requests. While it's not the best approach, it's an imminent client requirement for me. I'll try and make some time to write proper endpoints for this and make it a bit more SPA friendly. Once done I'll send a pull request.
    Paras Daryanani Co-founder & CTO @ Celestial Sites [email protected]





    Veteran Member






    --
    2/22/2018 8:07 PM
    Thanks for the update. :)

    On a side note... Please remember to create an issue for anything you wish to submit a pull request for (if it doesn't already exist).
    Will Strohl, Upendo Ventures Hotcakes Cloud | Get Support | Code Support Official Cloud & Support provider for Hotcakes
    You are not authorized to post a reply.


    Loading
    • Sign-up for the Hotcakes Community Newsletter: