Call function after add to cart

Discussion in 'Opencart Support' started by harlandraka, Feb 22, 2017.

Thread Status:
Not open for further replies.
  1. harlandraka

    harlandraka UKBF Newcomer Free Member

    1 0
    Hi all,

    It's my very first attempt at creating plugins for OpenCart 2.3.2.

    I want a function I wrote to be called whenever a user adds a product to his cart.

    I've read about the event system, it seems to be what I'm looking for, but I cannot seem to find an official source which lists all available events. I only found a blog post dated 2014, which is a bit old (and anyway doesn't list cart events).

    Can anyone help me?

    Thank you
    Posted: Feb 22, 2017 By: harlandraka Member since: Feb 22, 2017
  2. WebDesires

    WebDesires UKBF Regular Full Member

    203 26
    As far as I know there isnt any events for it, you will need to use a VQ or OC mod to add your call to this file:

    Find the section:

    public function add($product_id$qty 1$option = array(), $recurring_id 0) {
    Posted: Mar 1, 2017 By: WebDesires Member since: Feb 23, 2016
  3. antropy

    antropy OpenCart Experts Full Member - Verified Business

    3,209 557
    Perhaps the OP means the JavaScript add() function?
    Posted: Mar 28, 2017 By: antropy Member since: Aug 2, 2010
  4. webmto

    webmto UKBF Contributor Free Member

    90 2
    You want something to happen after visitors add products in your cart?
    Posted: Sep 6, 2017 By: webmto Member since: Aug 28, 2017
Thread Status:
Not open for further replies.