Advanced User / Price Grouping

Dear Django community

We are considering the development of our new website on Django but as a beginner developer/Django developer I want to make sure Django is the right choice for us.

For commercial reasons we offer our B2B clients somewhat complex discount system and we need to replicate it in Django. We have:

  1. General discount depending on the type of client (10/15/20%)
  2. Additional discount for a specific brand or type of products (10/15/20%)
  3. Discount for a credit a client has accumulated for the volume of his purchases
  • There are 2 more discounts but I won’t include them here to make it easier to understand the question.

So one client can have 15% general discounts and 20% discount for the category “shoes”. In the case he buys shoes only the 20% discount (Discount 2) should be applied. Then if the client wants he can get additional discount from the credit he has (Discount 3).

Currently we have this setup and working on a PrestaShop with 3/4 modules (using client and product groups) and the website is working very slow because some of the calculations are done on the front-end.

So my questions are:

  • Is this discount structure feasible in a Django Ecommerce Website?

  • Can you give me some source/documentation where I can learn how this setup should be planned? I understand that there are several ways this can be achieved and this is why I would love to see the possible solutions.

P.D. I tried to find information about my question but was not able. If there is please direct me to it.

Thank you in advance

Yorgo

Yes.

If you’re looking for third-party packages that might already implement something like this, I suggest you check out the Ecommerce section on djangopackages.org. Even if you don’t find a package there that can satisfy these requirements, you may find examples showing how it might be done.

Hi Ken,

Thank you for the reply.

My main concern was if this can be developed in a way that it works good in terms of speed. The reason is that we have several thousand references and customers, currently we have around 40 active discounts that fall in the described “structure” plus thousands of individual discount coupons. I am trying of course to simplify the logic as much as possible but a custom solutions/application sounds very logical in our case.

That said I will have a detailed look in the packages section, thanks for this advice !

Best
Yorgo

Yes, absolutely. How your models and queries are structured are going to have a lot to do with that, but it definitely can be done.

1 Like