Documentation Home

Module Installation

Steps to enable this module in your custom Broadleaf Commerce project

Steps

Step 1 Pull this dependency into your core/pom.xml:

<dependency>
    <groupId>org.broadleafcommerce</groupId>
    <artifactId>broadleaf-export</artifactId>
</dependency>

This assumes that you are using the Broadleaf BOM that pins all version information. If not, you will need to also add a <version> qualifier

Data Changes

Admin Security Changes

The data in the following SQL file is required to establish Admin sections and permissions for this module:

classpath:/config/bc/sql/load_export_admin_security.sql

This file is automatically included if you have set blPU.hibernate.hbm2ddl.auto=create and you have not set import.sql.enabled=false in your properties files. If you are not using Hibernate's auto DDL process and are using Liquibase, you can add a new changeSet that references this file:

<?xml version="1.1" encoding="UTF-8" standalone="no"?>
<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog" xmlns:ext="http://www.liquibase.org/xml/ns/dbchangelog-ext" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog-ext http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-ext.xsd http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.5.xsd">
    <changeSet author="broadleaf" id="some-unique-id">
        <sqlFile path="config/bc/sql/load_export_admin_security.sql" encoding="utf8" stripComments="true" />
    </changeSet>
</databaseChangeLog>

Finally, you can unpack the downloaded .jar file and look at the files in the config/bc/sql folder to execute this sql manually.

Available Exports

Customer, Customer Address, Order, Order Item, Category, and Product exports are available out of the box.
Each of these export have to be specifically enabled in order for them to be available in the admin.

In order to enable these exports, the following dependencies will need to be added into your core/pom.xml:

For Customer and Customer Address:

<dependency>
    <groupId>com.broadleafcommerce</groupId>
    <artifactId>broadleaf-export-customer</artifactId>
</dependency>

For Order and OrderItem

<dependency>
    <groupId>com.broadleafcommerce</groupId>
    <artifactId>broadleaf-export-order</artifactId>
</dependency>

For Category

<dependency>
    <groupId>com.broadleafcommerce</groupId>
    <artifactId>broadleaf-export-category</artifactId>
</dependency>

For Product

<dependency>
    <groupId>com.broadleafcommerce</groupId>
    <artifactId>broadleaf-export-product</artifactId>
</dependency>

Once added, the export functionality will be available from the respective entity List page. The "Add New ..." button will have a dropdown with the available exports listed.

Note that these exports reference a pre-defined list of fields. Any additional fields would require extending of the module.