Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| v:2.0:gift_cards [2024/11/11 13:56] – [Provisioning the gift card] adam | v:2.0:gift_cards [2024/11/12 15:57] (current) – [Creating the gift card product] adam | ||
|---|---|---|---|
| Line 16: | Line 16: | ||
| You can also allow customers to purchase gift cards through your store, and have the generated gift card code sent to the recipient automatically. | You can also allow customers to purchase gift cards through your store, and have the generated gift card code sent to the recipient automatically. | ||
| - | In the admin, when editing the gift card you want to allow customers to purchase, check the checkbox to "Allow customers to buy this gift card". This will show you additional options for specifying the gift cards SKU (this will be used within your add to cart later), as well as setting the minimum and maximum amount that a customer can elect to purchase as a balance on the gift card (leave these as 0 to specify | + | In the admin, when editing the gift card you want to allow customers to purchase, check the checkbox to "Allow customers to buy this gift card". This will show you additional options for specifying the gift cards SKU (this will be used within your add to cart later), as well as setting the minimum and maximum amount that a customer can elect to purchase as a balance on the gift card (note that if you specify |
| When setting up the product, you can use an existing category for your gift card or create a new category. You’ll need to pass this category with the add-to-cart, | When setting up the product, you can use an existing category for your gift card or create a new category. You’ll need to pass this category with the add-to-cart, | ||
| - | ===== Configure category email ===== | + | {{ : |
| + | |||
| + | === Configure category email === | ||
| When gift cards are provisioned for a customer, an email is sent to the recipient email specified with the product. You will need to configure this email in one of the categories on your store - using this category as part of your add to cart. | When gift cards are provisioned for a customer, an email is sent to the recipient email specified with the product. You will need to configure this email in one of the categories on your store - using this category as part of your add to cart. | ||
| Line 26: | Line 28: | ||
| It is up to you whether you create a new Foxy category specifically for your gift cards, or just use an existing category like the Default category. | It is up to you whether you create a new Foxy category specifically for your gift cards, or just use an existing category like the Default category. | ||
| - | ====== Create email template | + | === Create email template === |
| First, if you haven' | First, if you haven' | ||
| - | 1. In the Foxy admin, navigate to Settings > Emails, and within the " | + | - In the Foxy admin, navigate to Settings > Emails, and within the " |
| - | 1. In the popup that appears, give the template a description like "Gift Card Email" (this is just an internal identifier for you), and select the "Send this email" option if it's not already selected. Then, give it a " | + | |
| - | 1. You can leave the rest of the settings as default to use our default email template (pictured below), or you can see some further details on customising the template if desired on this page. | + | |
| - | 1. Click " | + | |
| + | {{ : | ||
| - | {{:v:2.0:gift_cards_provisioning.png?400|}} | + | {{ :v:2.0:gift_card_email_template.png?direct& |
| - | ====== Update Foxy categories | + | === Update Foxy categories === |
| Once you have the email template created - head over to the " | Once you have the email template created - head over to the " | ||
| Note that if you're selling gift cards, you likely will not want to capture a shipping address from the customer. You can do this by setting the " | Note that if you're selling gift cards, you likely will not want to capture a shipping address from the customer. You can do this by setting the " | ||
| + | |||
| + | {{ : | ||
| + | ==== Creating the gift card product ==== | ||
| + | To allow customers to purchase the gift card, you will need to create an add to cart form on your own website. It will work just like [[v: | ||
| + | * '' | ||
| + | * '' | ||
| + | * '' | ||
| + | * '' | ||
| + | * '' | ||
| + | * '' | ||
| + | |||
| + | Here is an example of an add to cart form: | ||
| + | < | ||
| + | <form method=" | ||
| + | <input type=" | ||
| + | <input type=" | ||
| + | <input type=" | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | <input type=" | ||
| + | </ | ||
| + | </ | ||
| + | |||
| + | <WRAP center round tip 90%> | ||
| + | * The '' | ||
| + | * If you're using the DEFAULT category for your gift card email, you don't need to pass a category. | ||
| + | * Optionally, you can also pass in '' | ||
| + | </ | ||
| + | |||
| + | === Set gift card versus customer specified balance === | ||
| + | |||
| + | When selling a gift card - you may want to only offer specific balance options, allow the customer to specify their own balance, or a combination of the both. | ||
| + | |||
| + | To offer set amounts, in your add to cart form, you can simply specify the '' | ||
| + | |||
| + | If you want to allow the customer to specify their own amounts though, you can add the '' | ||
| + | |||
| + | <WRAP center round important 90%> | ||
| + | Note that if a customer attempts to add a gift card to their cart that is below the minimum or above the maximum amount, the add to cart will fail and an error message will be shown noting that the gift card balance is outside the allowed amount. | ||
| + | </ | ||
| + | |||
| ===== Creating a gift card via the API ===== | ===== Creating a gift card via the API ===== | ||
| Line 59: | Line 104: | ||
| The '' | The '' | ||
| - | ==== Creating the gift card product ==== | ||
| - | You will create a gift card add-to-cart link or form on your own website using the [[v: | ||
| - | Here is an example of a product form: | + | ==== Setting up the notification email via the API ==== |
| - | < | + | |
| - | <form method=" | + | |
| - | <input type=" | + | |
| - | <input type=" | + | |
| - | < | + | |
| - | < | + | |
| - | < | + | |
| - | <input type=" | + | |
| - | <input type=" | + | |
| - | </ | + | |
| - | </ | + | |
| - | + | ||
| - | The matching code in the example above will result in the product showing in the cart with a product name of " | + | |
| - | + | ||
| - | <note tip> | + | |
| - | * The '' | + | |
| - | * If you're using the DEFAULT category for your gift card email, you don't need to pass a category. | + | |
| - | * Optionally, you can also pass in '' | + | |
| - | </ | + | |
| - | + | ||
| - | When setting up the product, you can use an existing category for your gift card or create a new category. You'll need to pass this category with the add-to-cart, | + | |
| - | + | ||
| - | See the following section for setting up the gift card email. | + | |
| - | + | ||
| - | ==== Setting up the notification email ==== | + | |
| - | + | ||
| - | < | + | |
| Currently, to set up the notification email to the gift recipient, you'll need to create a new email template for the store by POSTing to the Foxy API's '' | Currently, to set up the notification email to the gift recipient, you'll need to create a new email template for the store by POSTing to the Foxy API's '' | ||
| Line 95: | Line 111: | ||
| <code json> | <code json> | ||
| { | { | ||
| - | " | + | " |
| " | " | ||
| } | } | ||
| Line 112: | Line 128: | ||
| } | } | ||
| </ | </ | ||
| - | |||
| - | <note tip>For tips on customizing the gift card email, you can see our article here: [[v: | ||
| ===== Notes & Considerations ===== | ===== Notes & Considerations ===== | ||