Skip to content

Store Pickup

Module: Magenx_StorePickupGraphQl

Adds an In-Store Pickup shipping method. At checkout the shopper chooses it, then picks one of your stores. The same store list feeds the store locator on the Contact page.

Store list shown after choosing In-Store Pickup at checkout
Choosing a pickup store at checkout.
  • In-Store Pickup is an ordinary shipping carrier, so it appears in the shipping-method list like any other.
  • When the order is placed with it, the order’s shipping address becomes the store’s address, with the shopper as recipient. Invoices and shipments then point at the store.
  • The shopper’s own address stays on the cart, so shipping rates and tax are still calculated from it.
  • If the shopper picked a store but then chose another shipping method, the store choice is ignored.
  • The store’s name and address are read from configuration when shown, so editing a store also updates how past orders display it.
  1. Go to Stores > Configuration > Sales > Delivery Methods > In-Store Pickup. It sits with the other carriers because it is one.
  2. Set Enabled to Yes and set the title and price.
  3. Add your stores in Store Locations: code, name, street, city, region, postcode, country, phone, hours, latitude and longitude.

Latitude and longitude place the store on the Contact page map. The map also needs NEXT_PUBLIC_GOOGLE_MAPS_API_KEY on the storefront.

Set up

  1. The merchant switches pickup on, sets title, name and price, and adds stores in an editor that fits all fields.
  2. The storefront sees pickup on and its title.

Choose pickup

  1. The shopper enters an address; shipping methods include pickup.
  2. They choose pickup and a store; the storefront stores the code on the cart.
  3. The cart returns the full store address; clearing the code removes the choice.

Place the order

  1. If the order uses the pickup method and has a code, the code is copied to the order and the shipping address becomes the store's (store name as company, shopper as recipient).
  2. If the order uses another method, or is virtual, a code on the cart is ignored.

After the order

  1. The customer's order shows the pickup store.
  2. Changing a store's address later updates how past orders display it.

Store locator

  1. A stores page lists the same stores with coordinates for a map.

These always hold:

  • An order carries a store code if and only if it was placed with the pickup method and a store was chosen.
  • A pickup order's shipping address is the chosen store's address.
  • A non-pickup order's address is never changed.
  • Only configured codes are stored.
  • Displayed store = current settings for the stored code; no copy is kept.
  • Invoices and shipments of a pickup order carry the store address.
SituationWhat happens
Store chosen, then a delivery method chosen.Shipped to the shopper; no code on the order.
Pickup chosen without a store.Order placed with the shopper's address (open question).
Store removed after an order used it.Order's store shows nothing; address on the order stays.
Region name not in the country's list.Free-text region kept.
Virtual cart with a code.Ignored.
Another customer's cart.Refused.
  • Guests and customers; physical carts; store views with pickup on.
  • Stock per store, or hiding stores that cannot fulfil the cart.
  • Pickup time slots or "ready for pickup" notifications.
  • Pickup fees per store.
  • Distance sorting on the server.
Terminal window
composer require magenxcommerce/module-store-pickup-graph-ql
bin/magento module:enable Magenx_StorePickupGraphQl
bin/magento setup:upgrade
bin/magento setup:di:compile # production mode only
bin/magento cache:flush
  • PHP ~8.4.0||~8.5.0, Magento 2.4.8.

Stores > Configuration > Sales > Delivery Methods

In-Store Pickup

SettingDefaultScopeNotes
Enabled
carriers/magenx_storepickup/active
NoStore viewYes/No. Offers "In-Store Pickup" as a shipping method and enables the storefront store picker.
Title
carriers/magenx_storepickup/title
In-Store PickupStore viewText. Carrier heading shown to the shopper.
Method Name
carriers/magenx_storepickup/name
In-Store PickupStore viewText. Method label shown next to the title.
Store Locations
carriers/magenx_storepickup/locations
emptyStore viewText. Physical stores customers can collect from. "Code" must be a unique, stable identifier (e.g. "berlin-mitte"). Latitude/Longitude are optional and used for the map on the Contact page.
Sort Order
carriers/magenx_storepickup/sort_order
15Store viewText.

storePickupLocations needs no sign-in, so guests can pick up too. setStorePickupLocationOnCart only accepts a configured store code; pass an empty code to clear it.

Queries

storePickupLocations(enabled_only: Boolean = true): [StorePickupLocation]

The merchant's physical stores that offer in-store pickup, configured under Stores → Configuration → Sales → Shipping Methods → In-Store Pickup. Never cached: the answer is private to the signed-in customer.

ArgumentTypeDescription
enabled_onlyBoolean = trueKept for forward compatibility; every configured location is currently returned.

Mutations

setStorePickupLocationOnCart(input: SetStorePickupLocationOnCartInput!): SetStorePickupLocationOnCartOutput

Record which physical store the shopper will collect the order from. Pass a null/empty location_code to clear it.

ArgumentTypeDescription
inputSetStorePickupLocationOnCartInput!

Fields added to Magento types

FieldTypeDescription
Cart.store_pickup_locationStorePickupLocationThe pickup store attached to this cart, or null when the order ships to an address.
CustomerOrder.store_pickup_locationStorePickupLocationThe pickup store the order will be / was collected from, or null for a shipped order.
StoreConfig.store_pickup_enabledBooleanWhether in-store pickup is offered (the In-Store Pickup carrier is active).
StoreConfig.store_pickup_titleStringThe label shown for the in-store pickup option.

Types

input SetStorePickupLocationOnCartInput - Defines which pickup store is attached to a cart.
FieldTypeDescription
cart_idString!The masked cart id.
location_codeStringThe `code` of a configured StorePickupLocation, or null/empty to clear the selection.
type SetStorePickupLocationOnCartOutput - The updated cart after a pickup location is set or cleared.
FieldTypeDescription
cartCart!
type StorePickupLocation - A single physical store that offers in-store pickup.
FieldTypeDescription
codeString!Stable identifier for the location, used when attaching it to a cart.
nameString!Display name of the store.
streetStringStreet address.
cityStringCity.
regionStringRegion / state.
postcodeStringPostal / ZIP code.
country_idStringTwo-letter ISO country code.
phoneStringContact phone number.
hoursStringOpening hours (free text).
latitudeFloatLatitude for map display.
longitudeFloatLongitude for map display.
TermMeaning
Pickup methodThe shipping method for collecting in store.
Pickup storeCode, name, street, city, region, postcode, country, phone, hours, latitude, longitude.
Store codeStable identifier of a pickup store, kept on cart and order.
ChoiceThe store code on a cart.
Stale choiceA store code on a cart whose shipping method is not pickup.