ukbaz Posted June 7, 2017 Share Posted June 7, 2017 Hi we have set up different contact types in the contact form. For example: 'product problem' goes to 'customerservice@ 'product question' goes to 'sales@ etc Options on contact form are 'problem with a product' 'question about a product' And when a customer sends from form these values are assigned in Customer Service tab list view under 'Type'. On opening individual customer service questions it is now possible to 'forward discussion to another employee/department - however it is not currently possible to re-assign the question type. So if someone uses the contact form to ask a 'question about a product' when in fact they actually have a 'problem with a product' the question type always stays in the state originally chosen by the customer when sending contact form. I want to be able to re-assign question type/ id_contact. Is this possibel? Thanks Baz Link to comment Share on other sites More sharing options...
NemoPS Posted June 9, 2017 Share Posted June 9, 2017 That's not possible by default, you should edit AdminCustomerThreads and the relative controller.I might actually write a tutorial about it Link to comment Share on other sites More sharing options...
ukbaz Posted June 13, 2017 Author Share Posted June 13, 2017 That would be VERY helpful Nemo . I'm stuck on this one! Baz Link to comment Share on other sites More sharing options...
ukbaz Posted June 14, 2017 Author Share Posted June 14, 2017 Been thinking about this and how best to achieve it.... One possibility would be to add an extra field to database to contain updated id_contact, so in classes/CustomerThread.php: class CustomerThreadCore extends ObjectModel { public $id; public $id_shop; public $id_lang; public $id_contact; public $id_customer; public $id_order; public $id_product; public $status; public $email; public $token; public $date_add; public $date_upd; public $id_contact_upd; /** * @see ObjectModel::$definition */ public static $definition = array( 'table' => 'customer_thread', 'primary' => 'id_customer_thread', 'fields' => array( 'id_lang' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId', 'required' => true), 'id_contact' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId', 'required' => true), 'id_shop' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId'), 'id_customer' =>array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId'), 'id_order' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId'), 'id_product' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId'), 'email' => array('type' => self::TYPE_STRING, 'validate' => 'isEmail', 'size' => 254), 'token' => array('type' => self::TYPE_STRING, 'validate' => 'isGenericName', 'required' => true), 'status' => array('type' => self::TYPE_STRING), 'date_add' => array('type' => self::TYPE_DATE, 'validate' => 'isDate'), 'date_upd' => array('type' => self::TYPE_DATE, 'validate' => 'isDate'), 'id_contact_upd' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId'), ), ); Then I'd need to further mod controller Or is it better just to update the existing id_contact field? Thanks Baz Link to comment Share on other sites More sharing options...
NemoPS Posted June 14, 2017 Share Posted June 14, 2017 I would just update the current using a button on the thread page, as well as the proper code to alter it in the postProcess method of the controller (I believe I will release the tut next week) Link to comment Share on other sites More sharing options...
ukbaz Posted June 15, 2017 Author Share Posted June 15, 2017 Hi NemoPS Thanks so much for that - I'll await the tut! Thanks again! Baz Link to comment Share on other sites More sharing options...
NemoPS Posted June 20, 2017 Share Posted June 20, 2017 Here you are http://nemops.com/prestashop-customer-threads-change-department/#.WUlfmGiGOUkFabio Link to comment Share on other sites More sharing options...
ukbaz Posted June 22, 2017 Author Share Posted June 22, 2017 Hi Fabio - thank you so Much! Will get implementing this first thing tomorrow All the best! Baz Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now