@Override @Transactional("blTransactionManager") public Order createNamedOrderForCustomer(String name, Customer customer) { Order namedOrder = orderDao.create(); namedOrder.setCustomer(customer); namedOrder.setName(name); namedOrder.setStatus(OrderStatus.NAMED); if (extensionManager != null) { extensionManager.getProxy().attachAdditionalDataToNewNamedCart(customer, namedOrder); } if (BroadleafRequestContext.getBroadleafRequestContext() != null) { namedOrder.setLocale(BroadleafRequestContext.getBroadleafRequestContext().getLocale()); } return orderDao.save(namedOrder); // No need to price here }
// This method exists to provide OrderService methods the ability to save an order // without having to worry about a PricingException being thrown. protected Order persist(Order order) { return orderDao.save(order); }