In any ecommerce site, Delivery modes are very important during checkout experience.

We need to have an option like Standard delivery, Express delivery so that User can select whichever is suitable for their order.

How we define delivery modes in Hybris

We mainly have Delivery zones where each Zone consists of set of countries

So, we need to define the Zone first before defining delivery modes as below

  1. INSERT_UPDATE Zone;code[unique=true];countries(isocode)
  2. ;uk;GB,GG,IM,JE
  3. ;usa;US
INSERT_UPDATE Zone;code[unique=true];countries(isocode)

We need to define Delivery Modes required in our application using ZoneDeliveryMode as below

  1. INSERT_UPDATE ZoneDeliveryMode;code[unique=true];net;active[default=true]
  2. ;premium;true
  3. ;standard;true
INSERT_UPDATE ZoneDeliveryMode;code[unique=true];net;active[default=true]

We have added 2 delivery modes here , we can add as many as our application requires.

We need to link these delivery modes to Zone using ZoneDeliveryModeValue as below

Linking delivery modes for UK zone

  1. # Delivery modes for UK zone
  2. INSERT_UPDATE ZoneDeliveryModeValue;deliveryMode(code)[unique=true];zone(code)[default='uk'][unique=true];currency(isocode)[unique=true];value;minimum[unique=true]
  3. ;premium; ;$usCurrency;17,99;0,00
  4. ;standard; ;$usCurrency;9,99;0,00
# Delivery modes for UK zone
INSERT_UPDATE ZoneDeliveryModeValue;deliveryMode(code)[unique=true];zone(code)[default='uk'][unique=true];currency(isocode)[unique=true];value;minimum[unique=true]
;premium; ;$usCurrency;17,99;0,00
;standard; ;$usCurrency;9,99;0,00

Linking delivery modes for USA zone

  1. # Delivery modes for USA zone
  2. INSERT_UPDATE ZoneDeliveryModeValue;deliveryMode(code)[unique=true];zone(code)[default='usa'][unique=true];currency(isocode)[unique=true];value; minimum[unique=true]
  3. ;premium; ;$usCurrency;19,99;0,00
  4. ;standard; ;$usCurrency;11,99;0,00
# Delivery modes for USA zone
INSERT_UPDATE ZoneDeliveryModeValue;deliveryMode(code)[unique=true];zone(code)[default='usa'][unique=true];currency(isocode)[unique=true];value; minimum[unique=true]
;premium; ;$usCurrency;19,99;0,00
;standard; ;$usCurrency;11,99;0,00

We need to assign these delivery modes to store using BaseStore2DeliveryModeRel as below

  1. # Assigning delivery modes to base store
  2. INSERT_UPDATE BaseStore2DeliveryModeRel;source(uid)[unique=true];target(code)[unique=true]
  3. ;mystore;premium
  4. ;mystore;standard
# Assigning delivery modes to base store
INSERT_UPDATE BaseStore2DeliveryModeRel;source(uid)[unique=true];target(code)[unique=true]

We have assigned 2 delivery modes to our store “mystore”

We will see these 2 delivery modes in our storefront when we access delivery modes using store.

Note : mystore should be the base store defined already using store.impex
Share this article on

Comment (2)

  1. Sir, I want to add the new field in registration page on the given hybris website.what are changes are to be made.plse let me known.

Leave a Comment

  • You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code lang=""> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong> <pre lang="" extra="">

    • Please answer this simple challenge to post your valuable comment *