ronoch Posted April 22, 2014 Share Posted April 22, 2014 Hi helper, Anyone can help me that I want to add a email address field in the admin cart rule page? It is because I have created some voucher for single customer. hope that It can be showed in the admin cart rule page in BO. Thanks~ Link to comment Share on other sites More sharing options...
vekia Posted April 23, 2014 Share Posted April 23, 2014 what prestashop version you use? Link to comment Share on other sites More sharing options...
ronoch Posted April 23, 2014 Author Share Posted April 23, 2014 Hi Vekia, My prestashop version is 1.5.6.2 Hopefully you can help me. Thanks! Link to comment Share on other sites More sharing options...
vekia Posted April 23, 2014 Share Posted April 23, 2014 Hi Vekia, My prestashop version is 1.5.6.2 Hopefully you can help me. Thanks! effect: open: /controllers/admin/AdminCartRulesController.php and change entire __construct() function to: public function __construct() { $this->table = 'cart_rule'; $this->className = 'CartRule'; $this->lang = true; $this->addRowAction('edit'); $this->addRowAction('delete'); $this->bulk_actions = array('delete' => array('text' => $this->l('Delete selected'), 'confirm' => $this->l('Delete selected items?'))); $this->_select = 'c.*'; $this->_join = 'LEFT JOIN `'._DB_PREFIX_.'customer` c ON (c.`id_customer` = a.`id_customer`)'; $this->fields_list = array( 'id_cart_rule' => array('title' => $this->l('ID'), 'align' => 'center', 'width' => 25), 'name' => array('title' => $this->l('Name')), 'email' => array('title'=>$this->l('email')), 'priority' => array('title' => $this->l('Priority')), 'code' => array('title' => $this->l('Code')), 'quantity' => array('title' => $this->l('Quantity')), 'date_to' => array('title' => $this->l('Until')), 'active' => array('title' => $this->l('Status'), 'align' => 'center', 'active' => 'status', 'type' => 'bool', 'orderby' => false), ); parent::__construct(); } Link to comment Share on other sites More sharing options...
ronoch Posted April 24, 2014 Author Share Posted April 24, 2014 Thanks Vekia, Thank You for your help! It works for my Prestashop. Link to comment Share on other sites More sharing options...
vekia Posted April 24, 2014 Share Posted April 24, 2014 you're welcome yeah it works, because i created code for exact version you mentioned before (this is why i asked about that, there are several differencies between PS releases) i marked this topic as solved with regards, Milos 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