cram1010 Posted September 28, 2013 Share Posted September 28, 2013 I know how to add the export option to any admin list. It is done with `$this->allow_export=true` in the corresponding AdminController. But how can you add it to the group view, which is in fact a list of customers for that group?. If I add `$this->allow_export=true` to AdminGroupsController then the list of groups is exportable, but not the list of customers that you get when you click in a group show icon. I looked at the source code and I saw that the list is generated with the `HelperList` class, but I didn't see anything helpful there. Thanks. Link to comment Share on other sites More sharing options...
cram1010 Posted October 1, 2013 Author Share Posted October 1, 2013 No solution? Link to comment Share on other sites More sharing options...
yodankful Posted September 4, 2017 Share Posted September 4, 2017 Did you ever figure it out? Link to comment Share on other sites More sharing options...
Scully Posted September 5, 2017 Share Posted September 5, 2017 Just setting $this->allow_export=true isn't enough. The built-in export functionality is based on only single tables and not joined results like the one asked (join means two or more tables to be scanned through). There isn't an easy way at all with the approach choosen. Simpler would be: make a SQL query which does the select and run the query from backoffice for example. SELECT cg.id_group, c.firstname, c.lastname, c.email FROM `ps_customer_group` cg LEFT JOIN ps_customer c on c.id_customer = cg.id_customer ORDER BY cg.id_group Above example does such a select and orders the result by group ID. 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