Skip to main content

Add Custom Cart Selectors for Theme Compatibility

Use Advanced theme compatibility when your Shopify theme replaces cart HTML and the RP Local Delivery Date picker disappears, appears in

Use Advanced theme compatibility when your Shopify theme replaces cart HTML
and the RP Local Delivery Date picker disappears, appears in the wrong place,
or does not return after a quantity or item change.

These settings add theme-specific CSS selectors without editing theme code.
Built-in selectors remain active.

Advanced theme compatibility fields for additional cart selectors

Before you start

  • Confirm RPDelivery Date App Embed is enabled on the live theme.

  • Confirm the picker works with at least one eligible product before the cart
    updates.

  • Use a private browser window for testing.

  • Ask your theme developer or RP Local Delivery Date Support for the selectors
    if you are not comfortable inspecting HTML.

Do not paste HTML, Liquid, JavaScript, tokens, customer information, or an
entire cart element into a selector field. Enter one CSS selector per line.

Open Advanced theme compatibility

  1. In Shopify admin, open Apps → RP Local Pickup & Delivery.

  2. Open Settings → Shopify App Settings.

  3. Scroll to Advanced theme compatibility.

  4. Keep this page open while you inspect and test the cart in another tab.

Choose a stable placement selector

The placement selector identifies an element near the cart summary. The app
inserts the picker immediately before the first matching element.

  1. Open the full cart page with an eligible product in the cart.

  2. Right-click the cart summary near the terms checkbox or checkout button and
    select Inspect.

  3. Look for a stable id, custom element, or descriptive class that remains
    after changing the cart quantity.

  4. Prefer a selector scoped to the cart summary, such as:

  5. In Additional cart widget placement selectors, enter the selector on
    its own line.

Avoid generated section IDs, line-item IDs, product IDs, variant IDs, or class
names that contain changing build hashes. Do not add a selector already shown
in the built-in selector list.

Choose a cart refresh container

The refresh selector identifies the cart area that the theme updates or
replaces after an AJAX cart change.

  1. In the browser inspector, identify the stable parent around the cart
    summary or cart contents that changes when quantity or items change.

  2. In Additional cart refresh containers, enter that selector on its own
    line. For example:

  3. Leave the add-item and remove-item fields empty unless Support or your theme
    developer gives you selectors for custom controls that the app does not
    detect automatically.

  4. Select Save.

Test the change

  1. Open a new private or incognito window.

  2. Add an eligible product and open the full cart page.

  3. Confirm the delivery or pickup picker appears in the intended location.

  4. Select a method, location, date, and time when required.

  5. Change a quantity, remove an item, and add an item.

  6. Confirm exactly one picker remains after every cart update.

  7. Confirm checkout stays disabled while required information is missing and
    becomes available after a valid selection is saved.

  8. Test the standard checkout button and each enabled accelerated control,
    including Shop Pay and Google Pay. A recognized wallet click must be stopped
    while the required selection is missing or stale and allowed after the app
    has current backend approval.

  9. Repeat the test on mobile and in the cart drawer if the theme has one.

Optional debug logging

Enable Enable selector debug logging only while troubleshooting. Reload the
cart and open the browser console. Useful messages include:

  • Cart widget mounted — the app found a matching placement selector.

  • Cart widget anchor not found; selectors tried — none of the placement
    selectors matched the current cart HTML.

Disable debug logging and save again after testing.

Troubleshooting

The picker still does not appear

  • Hard-refresh the cart or test in a new private window.

  • Confirm you saved the setting on the correct store and are testing the live
    theme.

  • Paste the selector into document.querySelector('SELECTOR') in the browser
    console. A valid placement selector should return one visible element, not
    ​null. Replace SELECTOR with the selector text; do not run code supplied by
    an unknown party.

  • Confirm the cart contains a product covered by an active delivery or pickup
    profile.

The picker disappears after quantity or item changes

  • Confirm the refresh-container selector matches the element that the theme
    replaces, not only a child inside it.

  • Confirm the placement selector also exists in the refreshed HTML.

  • If the console reports that the anchor was not found, inspect the refreshed
    cart rather than the initial page markup.

The picker appears twice

Remove the custom selector you just added and save. Check for an old manual
installation or another app block before adding more selectors. Contact
Support if duplicate pickers remain.

Checkout remains disabled

Do not remove the checkout guard. Confirm the picker is visible and complete
all required fields. If the message says delivery-date selection is
unavailable, collect the cart URL, theme name, screenshot, console message, and
time of the attempt for Support.

Shop Pay or Google Pay bypasses the required selection

The app automatically guards Shopify's exposed Shop Pay and Google Pay wallet
controls after the app embed and picker load. If a wallet opens without the
required selection, verify that the picker loaded first and that the theme did
not replace or wrap the wallet in a custom control. Add the stable custom
control selector under Additional checkout buttons, save, and test again
in a private window. Do not enter Shopify-generated session values or wallet
credentials as selectors.

Remove or reset the customization

Delete the custom selector lines from the relevant fields and select Save.
The app will return to its maintained built-in selectors. No theme-code removal
is required.

Related guides

Did this answer your question?