I want to call my own function after someone buy a product from my store. Where i can call this function? I tried to put the test code in catalog/model/checkout/order.php in addOrder and addOrderHistory methods, but it doesn't work.. Can anyone know in which file and method i should put my own code?
There is piece of my test code:
Code: Select all
<?php
class ModelCheckoutOrder extends Model {
public function addOrder($data) {
//TEST
file_put_contents('my_directory/test.txt', 'test');
...
I can put my code in catalog/controller/success.php, but i need to get and pass informations about all ordered products. Any ideas?
Best regards.