Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable custom "select store" view. #72

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

z7ealth
Copy link

@z7ealth z7ealth commented Aug 25, 2024

Enables to show a custom "select store" view when user access the application outside Shopify.

Enables to show a custom "select store" view when user access the application outside Shopify.
Added custom_select_store option to config
Copy link
Owner

@ericdude4 ericdude4 left a comment

Choose a reason for hiding this comment

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

Thank you for your PR! I've left a comment, interested in your thoughts.

@@ -71,13 +71,21 @@ defmodule Shopifex.Plug.ShopifySession do
end

defp respond_invalid(conn) do
web_module = get_web_module(Application.get_env(:shopifex, :custom_select_store, false))
Copy link
Owner

Choose a reason for hiding this comment

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

instead of introducing this extra flag in the config, I wonder if we can detect the presence of a "select-store.html" template within the web_module, if the web_module is provided? If the web_module is provided in the config and a select-store.html is not present, we should fall back to the Shopifex select-store.html.

Think this is possible?

Copy link
Author

Choose a reason for hiding this comment

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

Oh, ok ok, sounds like a better approach. I'll work on it!

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