Setting Up the Online Store
This can be done in the Catalog Manager, Catalog > Stores >> Shipping. The following entities are used:
- ShipmentMethod – set up types of shipping available (ie, Ground, Air, Next Day)
- CarrierShipmentMethod – associate a carrier with the various shipping methods. The carrier must be a Party with a PartyRole of CARRIER. The carrierServiceCode field is used to set the carrier's service code (i.e., '03' for Ground with UPS.)
- ProductStoreShipmentMeth – This is the most important entity and defines the shipment methods for a ProductStore and which carrier would be used to provide the shipment. Its fields allow you to set the following:
- includeGeoId and excludeGeoId: set which geographical regions are included or excluded.
- allowUspsAddr: whether this shipment method is allowed for USPS address (PO Box or RR)
- requireUspsAddr: whether this shipment will only be used for PO Box or RR addresses
- includeFeatureGroup and excludeFeatureGroup: specify if product features such as HAZMAT or over-size are allowed or not.
- companyPartyId, requireCompanyAddr, allowCompanyAddr: specify if this shipment method is only available for shipping to postal addresses of a particular company identified by the companyPartyId (requireCompanyAddr=Y), or if it cannot be used to ship to postal addresses off this particular company (allowCompanyAddr=N)
- serviceName and configProps: If you want to use a service to get shipping estimates, you can define the service in serviceName and in configProps fields. For example, use upsRateEsimate for UPS rate estimates and opentaps.fedexRateRequest for FedEx. Set configProps to the location of your .properties file if you are not using the default application/product/config/shipment.properties See Setting up UPS shipping for more details.
- ShipmentCostEstimate – used to define shipping cost estimates for the carriers.
You can add a surcharge for COD payments by setting ProductStoreShipmentMeth.codSurcharge. This is a surcharge for your customers and is different than the surcharge you instruct the carrier to collect from the customer, which is configured in UPS COD surcharge.
If you want to get the actual carrier’s rate estimate rather than rely on a table, then follow the instructions for setting up shipping keys.
The ofbiz free shipping promos are currently broken, but you can configure simple examples of free shipping like this:
<ShipmentMethodType description="Free Ground Service for Orders over $100" shipmentMethodTypeId="FREE_GROUND"/> <CarrierShipmentMethod partyId="UPS" roleTypeId="CARRIER" shipmentMethodTypeId="FREE_GROUND" sequenceNumber="1" carrierServiceCode="03"/> <ProductStoreShipmentMeth productStoreShipMethId="9300" productStoreId="9000" partyId="UPS" includeNoChargeItems="N" allowUspsAddr="N" requireUspsAddr="N" roleTypeId="CARRIER" shipmentMethodTypeId="FREE_GROUND" sequenceNumber="30" minTotal="100.0"/> <ShipmentCostEstimate productStoreId="9000" orderFlatPrice="0.0" orderItemFlatPrice="0.0" orderPricePercent="0.0" shipmentCostEstimateId="9300" shipmentMethodTypeId="FREE_GROUND" carrierPartyId="UPS" carrierRoleTypeId="CARRIER"/>
What I did was define a new shipment method, which has the same carrier service and carrier service code as an existing one (03 is for UPS ground) and then added it to the ProductStoreShipmentMeth with the flag minTotal="100.00" so that only orders with amounts greater than $100 would get this shipment method. You can also modify the ProductStoreShipmentMeth for the regular UPS ground service with a maxTotal="99.99" flag so that only orders under $100 would be shown the "for pay" ground service.
Persisting Customers' Shopping Carts
If you want to keep your customers' shopping carts around so that the next time they visit your site, it is there with all the items they had added on their previous visit, simply configure ProductStore.autoSaveCart to "Y".
Manage pages >> Warehouse Setup
Section pages >> Setup for opentaps email Handling