File Upload variants and template options

Allows uploading an arbitrary file to a variant/template option.

  • File type can be restricted using the HTML accept attribute: https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/accept

  • The default allowed file types are set up in the px-option snippet. By default PDF and image files (any format) are allowed.

  • In liquid you can get the URL to download the uploaded file using: {{ orderline.chosen_options['<code>'].uploaded_file.url }}

    {{ orderline.chosen_variants['<code>'].uploaded_file.url }}

  • Requires updating two snippets in the CMS (find the latest version on shopper24):

    • product/px-option

    • product/design-now

Last updated