Table of Contents |
---|
Overview
This tutorial will cover how to port existing [IfPurchase] HTML [/IfPurchased] snippets from your legacy Screen Branding Theme receipt over to the StoreFront Checkout. First
Legacy code
First let 's look at an example of the legacy code.
...
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
[IfPurchased=jdh-dvd-ah-md, jdh-sov-1x-ah-md, jdh-sov-90-ah-md,jdh-dvd-eh-yy, jdh-sov-1x-eh-yy, jdh-sov-90-eh-yy, jdh-dvd-rp-jd,jdh-sov-1x-rp-jd, jdh-sov-90-rp-jd] <center><b>Also:</b> check out our friend Dusan Milenkovic' fantastic Jazz Drum Transcription Book <a href=" http://dusanmilenkovic.com/promotional-video/" target="_blank">"The Magnificent Seven"</a>! <br>(Transcriptions of Solos by Jeff "Tain" Watts, Eric Harland, Bill Stewart & more)</center> [/IfPurchased] |
Porting Legacy to Velocity
Now let's port this over to Velocity code using the Order object that is available on the receipt page. So the first thing we need to do is create a Velocity if statement that has the multiple conditions and call $order.isPurchase("itemId") multiple times.
...