Jump to content

Discount...


joe_g
 Share

Recommended Posts

Hi there,

Now that I have a functioning padloper installation I have my first real challenge. One that actually might be a bit tricky. Maybe too tricky?

The client wants to sell workshops for kids, and give discounts for siblings, X% for the first sibling and Y% for two or more siblings. What's the best way for me to go about this?

many thanks for your thoughts,

J

  • Like 1
Link to comment
Share on other sites

I guess one way to do this (without an actual discount system) would be to automatically generate 3 products, one with the original price, and two with the discounts. Then instead of using the builtin 'add to cart' I'll make my own add to cart that adds the appropriate product depending if the kids are siblings or not..?

...actually no. That won't work because it will not keep track of the inventory.. THe workshops have limited spots (12), so inventory is really handy for helping to see if something is fully booked

Link to comment
Share on other sites

.. when looking for a solution I see 'variants' in the code but I'm not sure how to make it work. Seems to be the same as Attributes? But if i add some attributes I can't see any change in the product page (no new fields to fill, or similar)...

Link to comment
Share on other sites

Hi @joe_g,

4 hours ago, joe_g said:

What's the best way for me to go about this?

In-built discounts feature is a planned feature. For now, you can achieve this via a Hook.

4 hours ago, joe_g said:

I guess one way to do this (without an actual discount system) would be to automatically generate 3 products, one with the original price, and two with the discounts.

This is not a good way to do it, as you have now found out 🙂.

4 hours ago, joe_g said:

The client wants to sell workshops for kids, and give discounts for siblings, X% for the first sibling and Y% for two or more siblings.

Implementation will (for now) be via a Hook. Before this though, you need to make a decision about the logic. For instance:

  1. Is the discount applied before or after tax? Is it applied (if relevant) pre- or post- shipping costs? This is especially relevant for 'fixed discount' type.
  2. Are you applying the discount automatically at checkout or via processing a form with an input(s) for discount code(s)? If the latter, you will need to process validity (e.g. discount available on system and is not expired, etc) and limits (e.g. used once only).
  3. How to manage the 'siblings' logic.

Once you have the above decided, you can implement the logic by hooking into the 'price' during checkout. An example is provided in the docs here.

Link to comment
Share on other sites

  • 1 month later...
On 2/16/2023 at 8:16 PM, Spinbox said:

Do you have a eta for this feature? 🤗

I am hoping very soon. I am currently working on a 'Gift Cards/Vouchers' feature after which I'll work on 'Discounts'.

  • Like 1
Link to comment
Share on other sites

  • 4 weeks later...

Hey @kongondo,

do you know a rough release date for the discount feature? Looking forward using it (or a workaround) by the middle of this year. Or is here anyone who already build an addon/hook for this?

 

Kind regards,
Guido

  • Like 1
Link to comment
Share on other sites

  • 5 weeks later...

If it's to use of anyone this thread covers how I've implemented a (currently hardcoded) discount code with the help of @kongondo.

I can share more information if required, but this should defo get you in the right direction. The next job, when I get a mo, will be to look at making an add on to pull and update the discount code from for admins of the shop. I know that it's on the roadmap for development, so it depends whether I get round to that before this feature is released as part of the core package.

  • Like 1
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...