[*] WS: the customer services are now handled by webservices
This commit is contained in:
@@ -55,6 +55,17 @@ class CustomerMessageCore extends ObjectModel
|
|||||||
'read' => array('type' => self::TYPE_BOOL, 'validate' => 'isBool')
|
'read' => array('type' => self::TYPE_BOOL, 'validate' => 'isBool')
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
|
protected $webserviceParameters = array(
|
||||||
|
'fields' => array(
|
||||||
|
'id_employee' => array(
|
||||||
|
'xlink_resource' => 'employees'
|
||||||
|
),
|
||||||
|
'id_customer_thread' => array(
|
||||||
|
'xlink_resource' => 'customer_threads'
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
|
||||||
public static function getMessagesByOrderId($id_order, $private = true)
|
public static function getMessagesByOrderId($id_order, $private = true)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -59,6 +59,39 @@ class CustomerThreadCore extends ObjectModel
|
|||||||
'date_upd' => array('type' => self::TYPE_DATE, 'validate' => 'isDate'),
|
'date_upd' => array('type' => self::TYPE_DATE, 'validate' => 'isDate'),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
|
protected $webserviceParameters = array(
|
||||||
|
'fields' => array(
|
||||||
|
'id_lang' => array(
|
||||||
|
'xlink_resource' => 'languages'
|
||||||
|
),
|
||||||
|
'id_shop' => array(
|
||||||
|
'xlink_resource' => 'shops'
|
||||||
|
),
|
||||||
|
'id_customer' => array(
|
||||||
|
'xlink_resource' => 'customers'
|
||||||
|
),
|
||||||
|
'id_order' => array(
|
||||||
|
'xlink_resource' => 'orders'
|
||||||
|
),
|
||||||
|
'id_product' => array(
|
||||||
|
'xlink_resource' => 'products'
|
||||||
|
),
|
||||||
|
),
|
||||||
|
'associations' => array(
|
||||||
|
'customer_messages' => array(
|
||||||
|
'resource' => 'customer_message',
|
||||||
|
'id' => array('required' => true)),
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
|
public function getWsCustomerMessages()
|
||||||
|
{
|
||||||
|
return Db::getInstance()->executeS('
|
||||||
|
SELECT `id_customer_message` id
|
||||||
|
FROM `'._DB_PREFIX_.'customer_message`
|
||||||
|
WHERE `id_customer_thread` = '.(int)$this->id);
|
||||||
|
}
|
||||||
|
|
||||||
public function delete()
|
public function delete()
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -231,6 +231,8 @@ class WebserviceRequestCore
|
|||||||
'countries' => array('description' => 'The countries','class' => 'Country'),
|
'countries' => array('description' => 'The countries','class' => 'Country'),
|
||||||
'currencies' => array('description' => 'The currencies', 'class' => 'Currency'),
|
'currencies' => array('description' => 'The currencies', 'class' => 'Currency'),
|
||||||
'customers' => array('description' => 'The e-shop\'s customers','class' => 'Customer'),
|
'customers' => array('description' => 'The e-shop\'s customers','class' => 'Customer'),
|
||||||
|
'customer_threads' => array('description' => 'Customer services threads','class' => 'CustomerThread'),
|
||||||
|
'customer_messages' => array('description' => 'Customer services messages','class' => 'CustomerMessage'),
|
||||||
'deliveries' => array('description' => 'Product delivery', 'class' => 'Delivery'),
|
'deliveries' => array('description' => 'Product delivery', 'class' => 'Delivery'),
|
||||||
'groups' => array('description' => 'The customer\'s groups','class' => 'Group'),
|
'groups' => array('description' => 'The customer\'s groups','class' => 'Group'),
|
||||||
'guests' => array('description' => 'The guests', 'class' => 'Guest'),
|
'guests' => array('description' => 'The guests', 'class' => 'Guest'),
|
||||||
|
|||||||
Reference in New Issue
Block a user