Last active
May 26, 2022 16:15
-
-
Save steveosoule/fdaa59733d3e0dd7c423a1a8fdd1672d to your computer and use it in GitHub Desktop.
Miva - Points and Loyalty Bonus for New Customers
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <mvt:comment> | |
| | | |
| | Points and Loyalty Bonus for New Customers | |
| | | |
| | Further Reading: https://docs.miva.com/how-to-guides/points-loyalty#functions | |
| | | |
| </mvt:comment> | |
| <mvt:assign name="l.just_created_customer_account" value="(g.Action EQ 'ICST' OR g.Action EQ 'ICSQ') AND NOT g.UI_Exception AND g.Basket:cust_id" /> | |
| <mvt:if expr="l.just_created_customer_account"> | |
| <mvt:assign name="l.settings:transaction:cust_id" value="g.Basket:cust_id" /> | |
| <mvt:assign name="l.settings:transaction:pending" value="0" /> | |
| <mvt:assign name="l.settings:transaction:descrip" value="'New Customer Point Bonus'" /> | |
| <mvt:assign name="l.settings:transaction:points" value="50" /> | |
| <mvt:item name="points" param="CustomerPointTransaction_Insert( l.settings:transaction )" /> | |
| <mvt:if expr="l.settings:transaction:id"> | |
| <p class="g-messages g-messages--success">Congratulations! You have received &mvte:transaction:points; points for creating a customer account!</p> | |
| </mvt:if> | |
| </mvt:if> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment