Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Nalysa 48 posts 269 karma points
    Sep 01, 2020 @ 02:58
    Nalysa
    0

    How to override the Basket.AddItem method in Merchello v2.7.1

    I want to add a new product into the user's basket every time the user clicks on the "Add to basket" button.

    For example,

    1. I have Product A.
    2. User clicks "Add to basket".
    3. Product A added to the user's basket that has quantity 1.
    4. User clicks again "Add to basket".
    5. Another Product A added to the user's basket that has quantity 1.

    So, here are the products inside the user's basket?

    1. PRODUCT A | Qty = 1
    2. PRODUCT A | Qty = 1

    Is this kind behavior able to be implemented?

    What I think (a) I can override the Basket.AddItem() method; or (b) lock the quantity in the basket always sets to 1.

    I need some help how can I reach this requirement.

    Thank you.

Please Sign in or register to post replies

Write your reply to:

Draft