Přejít na obsah
Menu
You need to be registered to interact with the community.
This question has been flagged
1 Odpovědět
745 Zobrazení

So you can't add or buy more than 1 copy of the same course at a time which makes sense, however I'm trying to have Variants/Attributes to my course and when I do I become able to add more than one copy!

I have one course that has 3 tiers.

you can't add the same tire twice but you can add tire 1 and tire 3 of same course to your cart for example and then I get users telling my the total is too high.

Any fix?

Odoo 18v

Avatar
Zrušit
Nejlepší odpověď

Odoo doesn’t natively limit how many different variants of a product can be added to the cart, but you can achieve this with a custom module or by using website sale hooks.

Here’s how you can approach it:

  1. Custom Python Logic
    • Override the website_sale.cart_update_json() method.
    • Add a condition to check how many different variants of the course are already in the cart.
    • If it exceeds the limit (e.g., 1), block the addition and return a warning.
  2. Alternative: Attribute Filtering
    • If you only want to show limited attribute combinations, configure those under: Sales → Products → Attributes → Values
    • Or use the “Optional Products” feature in the Sales tab to guide user selection.
  3. UI Alert (Optional)
    • Use JavaScript to show a message when a user tries to add more than one course variant.

At Wan Buffer Services, we’ve helped many eLearning businesses restrict product configurations and checkout behavior based on business rules.

Avatar
Zrušit
Related Posts Odpovědi Zobrazení Aktivita
2
čvc 25
1115
0
pro 16
3962
4
bře 15
6773
4
srp 25
1029
1
čvc 25
383