我们要感谢 APAC Insider 在 2021 至 2023 年新加坡商业大奖中将 Runaway Digital Solutions 评为“东南亚最佳电子商务资源提供商”。

如何自动给通过 PayNow 支付的顾客发放奖励折扣券

分享这个帖子

Do you want to reward your customers for paying by PayNow?

Use the code below to input under Theme Editor > Functions.php to create an auto generated voucher for your customers who pay by PayNow.

Click on the code image for clearer view.

Note that in order for this to work, you need to only select PayNow payment for your HitPay Payment Gateway, and use other payment gateways for other payment methods.

Step 1: Input a code to Add coupon code to order confirmation email for Paynow payment method

Make sure you have changed your payment method title to “HitPay Payment Gateway” (see line 59 of code).

To confirm, go to WooCommerce > Settings > Payment.

Select the HitPay Payment Gateway and check the Title. You may either copy your own title into this code or change your title to “HitPay Payment Gateway” for this to work.

Step 2: Auto Generate the Coupon Code

In this code, it follows the “If rule” at line 59. It happens only IF the payment method is “HitPay Payment Gateway”, which is your payment gateway to facilitate PayNow payments.

So, if customers use PayNow payments, this code will run. 

It will automatically create a discount coupon that has the following rules:

Not applicable for individual use, meaning it can be passed on to anyone to use (line 74)

Not limited to any products (line 75)

Does not exclude any products (line 76)

Usage limit of 1 time only (line 77)

Expires 6 months after creation (line 78)

Applies before tax (line 79)

Is not a free shipping coupon (line 80)

Line 81 code for “echo” means this line will be shown to your customers in their order confirmation email. You can edit this line however you want, but do not change these 2 names “$amount” and “$coupon_code”. 

Step 3: Add text for PAYNOW Coupon incentives at Checkout Page

You need to add a text to inform your customers about this reward should they choose to pay by PayNow.

To edit the text line, simply change what’s after “echo” at line 89 in the example above.

Step 4: Inform selected customers about PayNow Coupon at Thank you page

After a customer has made payment by PayNow, he will be directed to the Thank you page on your website.

You should include a line to inform him to look out for his coupon code in his order confirmation email.

Again, feel free to rephrase the line by editting the part after “echo” in line 97.

作者

发表评论

您的电子邮箱地址不会被公开。 必填项已用*标注

更多探索

Lazada 商店设置 2022 最全面指南

如果您正在考虑为您的电子商务业务设置自己的 Lazada 商店,本指南适合您。也许,一件令人沮丧的事情

×

你好!

单击以下我们的代表之一在WhatsApp上聊天或向我们发送电子邮件至 adaleow@runaway.com.sg

× 我怎么帮你?