For the 7.x-1.x and 6.x-2.x version Views integration is planned. A part of the integration is already done and is included in the latest releases (7.x-1.0-alpha1 and 6.x-2.0-alpha2 by the time of writing).
There are several things left to be implemented to complete Views integration:
Row style: fields(added to 7.x-1.0-alpha1/6.x-2.0-alpha2)
- #1942748: Views integration: address row style
- #1900150: Views integration: address access filters
- #1900176: Views integration: address view, edit and delete links
- #1908904: View integration : needs a relationship in the user based views
- #1942746: Views integration: display access restrictions
- Automated tests
- Default view for the address book page: #1433034: Redesign the address book page using Views
Some of the noted features above depend on entity integration to be completed:
#1831424: Turn Ubercart Addresses address into an entity
User interface changes
Site builders get new options in Views.
Original report by MegaChriz
There should be a new View type created which will be called "Ubercart Addresses". This view type should support two row styles:
Row style: Fields
For the fields row style, Views will pull the data itself right from the database, so the address book API shouldn't get involved here. The Views field handlers should be connected with the Ubercart Addresses field handler API: the output of values should go through outputValue(). The Views field handlers to be implemented should respect the output formats the Ubercart Addresses field handler supports (see getOutputFormats()).
Row style: Address
See #1942748: Views integration: address row style.
The address row style will be used to display addresses themed with "uc_addresses_list_address".
For the address row style, the address book API should be responsible for loading the addresses from the database. Views should only load the address ID (aid) and user ID (uid) from the uc_addresses table and then pass this values to the address book API which will care for loading full UcAddressesAddress objects. To increase performance, the address book API should be informed to load all addresses for one user at once. This can be done by setting the performance hint to
See #1900150: Views integration: address access filters.
There should be a Views filter for every database column of the table "uc_addresses". There should also be filters to filter on address access:
- A filter for if the address may be viewed.
- A filter for if the address may be edited.
- A filter for if the address may be deleted.
- You can use the module uc_views_addresses (part of the Ubercart Views project) as a starting point, but there should be no longer a dependency on Ubercart Views (output of Views field handlers should go through the Ubercart Addresses field handlers).
- It's possible that the field handler API needs to be a little bit adjusted to ease the Views integration. You may come with a proposal.
- The Views integration should be implemented for both the 6.x-2.x and the 7.x-1.x branch.
I'm happy to assist where possible. Contact me or place a comment on this issue page.
Note: I may make some edits to this post in case I have something forgotten to note in the proposal.