Loading

To understand the parameters and helper methods, read the articles certificate generating and features of the helper generateOneCertificate.

Automatic certificate creation can be organized in various places on the site. This will help you encourage people to make purchases in your store.

Let's look at examples of certificate generation:

Certificates in Notifications

We are going to give a certificate every time when order get state Completed.

Open page Shop - Settings - Notifications - Order was marked as completed (Customer).

Find block with code:


Below insert generatore code.


The result should be similar to

If you want certificates to be created for an order amount of 500 or more (in the primary currency), you should add the appropriate condition:


When using generators in notifications, we recommend using user validation if you are working through the helper generateOneCertificate.

Certificates in Mailer

You can use certificate in application Mailer.

1) Create block with any ID. For example, open page Site - Blocks and create block giftcertificates.mailer.

Insert one of the following constuctions to generate the certificate.

Private user certificate:


Certificate attached by email:


Certificate with user validation:


2) Copy only block ID. Following the example, it should be giftcertificates.mailer.

3) Paste into the mail content:


You need to replace only giftcertificates.mailer. Don't change other code.

When using generators in Mailer, we recommend using user validation if you are working through the helper generateOneCertificate.

Certificates on the page of the successful purchase

We are going to give the certificate with free product to all customers, who placed an order for the amount of $700 (primary currency). Also add limitations to certificate: minimal order sum and lifetime.

Open template checkout.success.html on the page Shop - Storefront - Templates.

Paste the code in any place that is convenient for you:


Certificates on home page

We are going to give certificate for all customers from the group VIP

1) Fing ID of VIP group. To do this, open application Contacts and group VIP. The contact category ID will be displayed in the browser's address bar.

At this example this is 4.

2) Open the template home.html on the page Shop - Storefront - Templates.

3) Paste the code in any place that is convenient for you:


Read more about the method contactInCategory in the article available helpers.

Certificates on product page

We are going to create certificate on the product page. Certificate will be generated only once per user.

Ope the template product.html (or product.cart.html) on the page Shop - Storefront - Templates.

Let's pretend that ID of desired product 25.

Paste the code in any place that is convenient for you:


If you can't find the appropriate output place, consult the developer of the design theme.

Posted: November 15, 2020
0
Feedback form

Fill the form, and we will contact you.

Your name:
Email
Message: