4

I am trying to understand how to extend Broadleaf so that multiple Fulfilment locations (warehouses) can be added. I know that this is available in Commercial edition of Broadleaf, but I cannot afford it... :-)

I am planning to add few tables like blc_ext_fulfilment_locations (location_id,location_name) and blc_ext_fulfilment_location_inventory (location_id,sku_id,quantity).

The question is which is the right object to extend - InventoryServiceImpl or InventoryServiceExtensionHandler or CheckAvailabilityActivity as mentioned in http://www.broadleafcommerce.com/docs/core/current/broadleaf-concepts/inventory

I am assuming I should extend InventoryServiceImpl, but I am not able to get how the DAOs are actually getting called from the proxy in this call extensionManager.getProxy().retrieveQuantitiesAvailable.

Below is the relevant code:

@Service("blInventoryService")
public class InventoryServiceImpl implements ContextualInventoryService {

...

@Resource(name = "blInventoryServiceExtensionManager")
protected InventoryServiceExtensionManager extensionManager;

...

@Override
public Map<Sku, Integer> retrieveQuantitiesAvailable(Collection<Sku> skus, Map<String, Object> context) {
    ExtensionResultHolder<Map<Sku, Integer>> holder = new ExtensionResultHolder<Map<Sku, Integer>>();
    ExtensionResultStatusType res = extensionManager.getProxy().retrieveQuantitiesAvailable(skus, context, holder);
...
}
...
}
user1880957
  • 1,146
  • 3
  • 15
  • 29

0 Answers0