For the complete documentation index, see llms.txt. This page is also available as Markdown.

upload-dialog-login-form

Let shoppers sign in from the upload dialog

The upload dialog can now show a login form, so an anonymous shopper can sign in without leaving the dialog and immediately browse their saved galleries.

Overview

The login form behaves like the login modal already used in the design tool and takes the same four configuration options. It is off by default and is enabled per component, because sites that run the upload dialog from outside Pixfizz — a Shopify storefront, for example — also need an external login URL configured.

How to enable it

Setlogin-modal-enabled="true"on the component. On a Pixfizz storefront, this on its own is enough.If the dialog runs outside Pixfizz (for example, a Shopify storefront), setlogin-modal-external-urlto your external login page.Optionally, addlogin-modal-forgotten-password-urlandlogin-modal-registration-urlto show those links next to the fields.

How it works

On a Pixfizz storefront

The shopper signs in inline, inside the dialog, and their saved galleries appear immediately. You only needlogin-modal-enabled="true".

On an external site (for example, Shopify)

The dialog does not sign the shopper in inline. It opens the login page you set inlogin-modal-external-urlin a new browser window or tab, and the shopper returns to the dialog once they have signed in. Without that URL, the login form has nowhere to send them.

Configuration options

Option

Required

What it does

login-modal-enabled

To show the form

Renders the login form in the dialog. Off by default.

login-modal-external-url

On external sites

The login page opened in a new window or tab when the dialog runs outside Pixfizz (for example, Shopify).

login-modal-forgotten-password-url

Optional

Adds a "Forgot password?" link next to the fields. Omit it and the link is hidden.

login-modal-registration-url

Optional

Adds a "Register" link next to the fields. Omit it and the link is hidden.

Where to set them

The option names change slightly depending on where you configure them.

Set on

Attribute format

Example

<px-upload-dialog>

dashes

login-modal-enabled="true"

PhotoPrints component

underscores

login_modal_enabled: 'true'

<px-image-upload>,<px-multi-image-upload>

dashes, prefixed withupload-dialog-

upload-dialog-login-modal-enabled="true"

On the upload dialog directly

<px-upload-dialog login-modal-enabled="true" login-modal-external-url="<https://example.com/pages/login>" login-modal-forgotten-password-url="<https://example.com/account/forgotten-password>" login-modal-registration-url="<https://example.com/account/register>"> </px-upload-dialog>​

In the PhotoPrints component

Same options, with dashes replaced by underscores. A working example lives in the PhotoPrints snippet in the Shopper theme.{% render 'photo-prints', login_modal_enabled: 'true', login_modal_external_url: '<https://example.com/pages/login>' %}​

On the image upload components

<px-image-upload>and<px-multi-image-upload>pass the settings down to the dialog they open, so prefix each option withupload-dialog-.<px-multi-image-upload upload-dialog-login-modal-enabled="true" upload-dialog-login-modal-external-url="<https://example.com/pages/login>"> </px-multi-image-upload>​

Translations

Ten new translation keys were added for this form. They sit at the bottom of the<px-upload-dialog>table in Admin > CMS > Web Components Translations.

Last updated