Product Registration Form
Cirina Solutions is an Astro/Strapi CMS site that provides warranty information and a form to register a product for multiple Malouf partner brands in one place. Product registration form submissions are sent via FormSpark to warranty@cirinasolutions.com. Changes to the form require dev support as the form is hard-coded in an Astro component in /components/forms/WarrantyForm.astro.
Brand and Product Select
The Register a Product page (Register single type in the Strapi CMS) includes a required list of brands to display in the brand dropdown of the product registration form. Each entry consists of a brand_name and brand_key. The brand_key is used to retrieve the brand’s product list in the product dropdown from its respective Strapi catalog site. In the case that a brand does not have a Strapi site or is unable to successfully retrieve its product list, OR in the case that a customer selects “Other Product NOT Listed” in the product dropdown, they will be required to enter a product name.
Product List API Call
In order to fetch a brand’s product list from its Strapi catalog site, you will need to complete the following steps:
-
Set an App-Level Environment Variable that points to the brand’s Strapi instance in the cirina-astro app in Digital Ocean under Settings > App-Level Environment Variables.
For example:
Key Value SALT_FLAT_URL URL for hosted Salt Flat Strapi instance -
Add the
brand_keyand environment variable to thegetBrandApiUrlswitch statement in/pages/register.astro:// This will need to be hard-coded when adding a new brand in Strapi const getBrandApiUrl = (key: string): string => { switch (key) { case 'salt-flat': return import.meta.env.SALT_FLAT_URL default: return '' } }