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...
  • 4 weeks later...
  • 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

  • 6 months later...

@Spinbox if @kongondo isn't going to have a release for that feature soon, I'll finish working on the module I was creating ASAP and share it. I was/am 80% there with it, but got sidetracked with a large project. But happy to set dive back in and get on it. I'll await his response though before I spend time needlessly 🙂

  • Like 1
Link to comment
Share on other sites

Hi both,

On 10/25/2023 at 10:44 AM, Spinbox said:

Hi @kongondo,

Do you have an update for the 'Gift Cards/Vouchers' feature and 'Discounts' feature?

Actually, this was supposed to be last week! I was hoping to release version 009 of Padloper which is packed with a number of new features including discounts but life got in the way! I am now going to be unavailable from this week for a number of weeks (at least 2) without access to internet. Hope to finish this quickly when I get back.

On 10/25/2023 at 12:41 PM, alexm said:

👍🏻 let's wait and see what he says. If it's going to be a while before it's released, we'll get it sorted!

Nice work all the same!

  • Like 2
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...