The intention is to apply a discount to the customer who registers
My attempt to generate a user discount from a snippet
<?php
$users = array('8');
$fields = array();
$fields['id'] = '';
$fields['users'] = $users;
$fields['from_amount'] = '100.5';
$fields['product_restrict'] = '132';
$fields['discount_percent'] = '25';
$fields['used_allowed'] = '1';
$fields['expires'] = '2016-03-31 23:45:00';
$response = $modx->runProcessor('mgr/userdiscounts/createuser', $fields, array('processors_path' => '/home/../core/components/simplecart/processors/') );
if ($response->isError()) {
return $response->getMessage();
}
return;
Log error
[2016-03-09 11:00:18] (ERROR @ /index.php) Could not load class: simpleCartUserDiscount from mysql.simplecartuserdiscount.
[2016-03-09 11:00:18] (ERROR @ /index.php) Could not load class: simpleCartUserDiscount from mysql.simplecartuserdiscount.
[2016-03-09 11:00:18] (ERROR @ /index.php) Could not load class simpleCartUserDiscount
[2016-03-09 11:00:18] (ERROR @ /index.php) Could not load class: simpleCartUserDiscount from mysql.simplecartuserdiscount.
I don’t have the necessary knowledge to make the best choice to do it…
Some idea?
Thanks in advance