Apply Points to Cart w/ myCred (like Amazon Points)
-
I’d like to create a cart experience similar to Amazon’s where you can choose to apply an arbitrary number of “points” to your cart, dynamically reducing the balance you’ll pay using your preferred gateway (PayPal, etc). Here are some notes/requirements:
- Each point will have a respective dollar amount (ie. 1 point = $0.50)
- I’m using myCred as my points system, and will be incrementing a user’s points for a number reasons (sharing their purchases, etc)
- I’d like an “Apply points to this order” box located here (See Screenshot) showing the user’s points balance with a numeric selection of how many points to apply to the cart, with up/down arrows to increment/decrement the points selection
- When the user changes their points selection, I’d like the “Applied Points Amount” box to dynamically change, as well as the total cart amount/balance.
- I need this information to persist through the checkout/payment process, as well as be stored somewhere in the order itself so if I need to apply a refund, I can write the logic to reimburse the points.
- I’m using WooCommerce Composite Products, so the cart will be populated with Composites, just so you’re aware.
I’d like a “Points Applied” discount located here (See Screenshot)
I’ve looked at all possibly applicable WooCommerce Hooks/Filters and I’ve seen some clues to how to approach this, but I need help better understanding all the places I’ll need to tie into to properly persist all this data throughout the checkout process, etc.
I will obviously also need to apply some server side validation so they can’t accidentally apply more points than the cost of the order.
I’ve already looked at all pre-existing myCred integrations/add-ons (that I could find) and the only one I saw forces you to use myCred points as your “only” payment gateway, plus I’m looking to provide that smooth UI experience that Amazon gives you rather than other clunky suggestions like having to generate coupons from myCreds points, etc.
Any help would be much appreciated!
The topic ‘Apply Points to Cart w/ myCred (like Amazon Points)’ is closed to new replies.
