Skip to content

Comments

Update redirect logic in theme.liquid to support query params in the storefront_hostname config property#19

Merged
calirvine merged 1 commit intovibe-redirect-themefrom
lovable-redirect-theme
Oct 14, 2025
Merged

Update redirect logic in theme.liquid to support query params in the storefront_hostname config property#19
calirvine merged 1 commit intovibe-redirect-themefrom
lovable-redirect-theme

Conversation

@calirvine
Copy link

@calirvine calirvine commented Oct 14, 2025

Why

Some partner platforms redirect includes a query param in the hostname property, but the current implementation does a simple string replace of the current hostname to the new with a path appended. Because it is in the query params section the path is simply appended to the last query parameter which is then not recognized by lovable.

Solution

Create URLs from the original URL + the storefront hostname and modify only targeted properties of each.

@calirvine calirvine force-pushed the lovable-redirect-theme branch from 3663768 to 668915a Compare October 14, 2025 19:07
@tizmagik
Copy link

tizmagik commented Oct 14, 2025

Let's have this PR go into a branch off of main instead of to main, name it vibe-redirect-theme

@calirvine calirvine changed the base branch from main to vibe-redirect-theme October 14, 2025 19:47
Copy link

@tizmagik tizmagik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's try it

@calirvine calirvine merged commit 6e2bfad into vibe-redirect-theme Oct 14, 2025
1 check passed
@calirvine calirvine deleted the lovable-redirect-theme branch October 14, 2025 19:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants