daily pastebin goal
56%
SHARE
TWEET

Untitled

a guest Jan 15th, 2019 63 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <style>
  2.               .amp {
  3.                 font-size:1px;
  4.                 color:#fff;
  5.                 display: table-cell;
  6.               }
  7.             </style>
  8.             <span class="amp">%%[</span>
  9.             <style>
  10.               .code_none{
  11.                 display:none;
  12.               }
  13.             </style>
  14.               <table border="0" cellpadding="0" cellspacing="0" width="600" align="center" class="db-container block-bg">
  15.     <tr>
  16.         <td>
  17.             <table border="0" cellpadding="0" cellspacing="0" width="100%" align="center" class="db-wrapper-padding block-bg">
  18.                 <tr>
  19.                     <td width="100%" class="db-full-width text-body text-align-center border-bottom p20top"><span class="p20bottom" style="display: block;">Products we think you'll enjoy...</span></td>
  20.                 </tr>
  21.             </table>
  22.             <table border="0" cellpadding="0" cellspacing="0" width="100%" class="db-wrapper-padding">
  23.                 <tr>
  24.                     <td width="33%" class="db-full-width text-body p25top p10right p25left">
  25.                             <br>
  26.                             <div class="p5bottom"><span class="font18"><b>Product Name</b></span></div>
  27.                             This is the coolest product you will ever use.
  28.                             <table width="100%" class="db-full-width">
  29.                                 <tr>
  30.                                     <td class="p5top"><span class="text-button-color font18"><b>$45</b></span></td>
  31.                                 </tr>
  32.                             </table>
  33.                     </td>
  34.                     <td width="33%" class="db-full-width text-body p25top p10right p10left">
  35.                             <br>
  36.                             <div class="p5bottom"><span class="font18"><b>Product Name</b></span></div>
  37.                             This is the coolest product you will ever use.
  38.                             <table width="100%" class="db-full-width">
  39.                                 <tr>
  40.                                     <td class="p5top"><span class="text-button-color font18"><b>$45</b></span></td>
  41.                                 </tr>
  42.                             </table>
  43.                     </td>
  44.                     <td width="33%" class="db-full-width text-body p25top p25right p10left">
  45.                             <br>
  46.                             <div class="p5bottom"><span class="font18"><b>Product Name</b></span></div>
  47.                             This is the coolest product you will ever use.
  48.                             <table width="100%" class="db-full-width">
  49.                                 <tr>
  50.                                     <td class="p5top"><span class="text-button-color font18"><b>$45</b></span></td>
  51.                                 </tr>
  52.                             </table>
  53.                     </td>
  54.                 </tr>
  55.             </table>
  56.             <table border="0" cellpadding="0" cellspacing="0" width="100%" class="db-wrapper-padding">
  57.                 <tr>
  58.                     <td class="db-full-width-padding-bottom text-body text-align-center p15top p20bottom">
  59.                         <table width="100%" class="db-full-width">
  60.                             <tr>
  61.                                 <td class="text-align-center"><a href="" target="_blank" class="button-link button-link_button-color">Shop Now</a></td>
  62.                             </tr>
  63.                         </table>
  64.                     </td>
  65.                 </tr>
  66.             </table>
  67.         </td>
  68.     </tr>
  69. </table>
  70.               <span class="amp">]%%</span>
  71.             <div class="code_none">
  72.               %%[ /* Generate three random numbers within the contraints of the DE */ var @rowCount, @high, @halfX, @half, @first, @second, @third set @rowCount = DataExtensionRowCount('NTO Products for Smart Blocks') set @halfX = Divide(@rowCount,2) /* Since @halfX can be a decimal we need to round up */ set @half = FormatNumber(@halfX,'N0') set @first = Random(1,Subtract(@half,1)) set @second = Random(Add(@half,1),@rowCount) set @third = Random(Add(@first,1),Subtract(@second,1)) /* Retrieve each matching row and assign variables */ var @rowset1, @row1, @product1name, @product1desc, @product1price, @product1image set @rowset1 = LookupRows('NTO Products for Smart Blocks','id',@first) set @row1 = Row(@rowset1,1) set @product1name = Field(@row1,'name') set @product1desc = Field(@row1,'description') set @product1price = Field(@row1,'price') set @product1image = Field(@row1,'imageUrl') var @rowset2, @row2, @product2name, @product2desc, @product2price, @product2image set @rowset2 = LookupRows('NTO Products for Smart Blocks','id',@second) set @row2 = Row(@rowset2,1) set @product2name = Field(@row2,'name') set @product2desc = Field(@row2,'description') set @product2price = Field(@row2,'price') set @product2image = Field(@row2,'imageUrl') var @rowset3, @row3, @product3name, @product3desc, @product3price, @product3image set @rowset3 = LookupRows('NTO Products for Smart Blocks','id',@third) set @row3 = Row(@rowset3,1) set @product3name = Field(@row3,'name') set @product3desc = Field(@row3,'description') set @product3price = Field(@row3,'price') set @product3image = Field(@row3,'imageUrl') ]%%<table border="0" cellpadding="0" cellspacing="0" width="600" align="center" class="db-container block-bg"><tr><td><table border="0" cellpadding="0" cellspacing="0" width="100%" align="center" class="db-wrapper-padding block-bg"><tr><td width="100%" class="db-full-width text-body text-align-center border-bottom p20top"><span class="p20bottom" style="display: block;">Products we think you'll enjoy...</span></td></tr></table><table border="0" cellpadding="0" cellspacing="0" width="100%" class="db-wrapper-padding"><tr><td width="33%" class="db-full-width text-body p25top p10right p25left"> <img src="%%= v(@product1image) =%%" width="100%" height="170" class="db-photo" style="display: block; object-fit: cover;"><br><div class="p5bottom"><span class="font18"><b>%%= v(@product1name) =%%</b></span></div> %%= v(@product1desc) =%%<table width="100%" class="db-full-width"><tr><td class="p5top"><span class="text-button-color font18"><b>$%%= v(@product1price) =%%</b></span></td></tr></table></td><td width="33%" class="db-full-width text-body p25top p10right p25left"> <img src="%%= v(@product2image) =%%" width="100%" height="170" class="db-photo" style="display: block; object-fit: cover;"><br><div class="p5bottom"><span class="font18"><b>%%= v(@product2name) =%%</b></span></div> %%= v(@product2desc) =%%<table width="100%" class="db-full-width"><tr><td class="p5top"><span class="text-button-color font18"><b>$%%= v(@product2price) =%%</b></span></td></tr></table></td><td width="33%" class="db-full-width text-body p25top p10right p25left"> <img src="%%= v(@product3image) =%%" width="100%" height="170" class="db-photo" style="display: block; object-fit: cover;"><br><div class="p5bottom"> <span class="font18"><b>%%= v(@product3name) =%%</b></span></div> %%= v(@product3desc) =%%<table width="100%" class="db-full-width"><tr><td class="p5top"> <span class="text-button-color font18"><b>$%%= v(@product3price) =%%</b></span></td></tr></table></td></tr></table><table border="0" cellpadding="0" cellspacing="0" width="100%" class="db-wrapper-padding"><tr><td class="db-full-width-padding-bottom text-body text-align-center p15top p20bottom"><table width="100%" class="db-full-width"><tr><td><a href="" target="_blank" class="button-link button-link_button-color">Shop Now</a></td></tr></table></td></tr></table></td></tr></table>
  73.             </div>
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top