touslesitesauto Posted July 29, 2016 Share Posted July 29, 2016 Hello everyone,I try to include in the table that displays "cart" on my BO, the ip_address of existing cart.I've included my column, no problem but now I try to modify the query except that in my file AdminCartsController.php, it looks like public function __construct() { $this->bootstrap = true; $this->table = 'cart'; $this->className = 'Cart'; $this->lang = false; $this->explicitSelect = true; $this->addRowAction('view'); $this->addRowAction('delete'); $this->allow_export = true; $this->_orderWay = 'DESC'; $this->_select = 'CONCAT(LEFT(c.`firstname`, 1), \'. \', c.`lastname`) `customer`, a.id_cart total, ca.name carrier, IF (IFNULL(o.id_order, \''.$this->l('Non ordered').'\') = \''.$this->l('Non ordered').'\', IF(TIME_TO_SEC(TIMEDIFF(\''.pSQL(date('Y-m-d H:i:00', time())).'\', a.`date_add`)) > 86400, \''.$this->l('Abandoned cart').'\', \''.$this->l('Non ordered').'\'), o.id_order) AS status, IF(o.id_order, 1, 0) badge_success, IF(o.id_order, 0, 1) badge_danger, IF(co.id_guest, 1, 0) id_guest'; $this->_join = 'LEFT JOIN '._DB_PREFIX_.'customer c ON (c.id_customer = a.id_customer) LEFT JOIN '._DB_PREFIX_.'currency cu ON (cu.id_currency = a.id_currency) LEFT JOIN '._DB_PREFIX_.'carrier ca ON (ca.id_carrier = a.id_carrier) LEFT JOIN '._DB_PREFIX_.'orders o ON (o.id_cart = a.id_cart) LEFT JOIN `'._DB_PREFIX_.'connections` co ON (a.id_guest = co.id_guest AND TIME_TO_SEC(TIMEDIFF(\''.pSQL(date('Y-m-d H:i:00', time())).'\', co.`date_add`)) < 1800)'; So I included "co.ip_address `connections`" in my request after the first point but it does not work! Thank you for your help PS : Sorry for the translation, I used Google translate Link to comment Share on other sites More sharing options...
Knowband Plugins Posted August 11, 2016 Share Posted August 11, 2016 Could you please share some screenshot or something that can show the exact error that you are getting? Also in the code snippet, you added in your question doesn't have any column like ip_address any where. 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