Advertisement
Guest User

Untitled

a guest
Jun 23rd, 2017
543
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 4.54 KB | None | 0 0
  1. <div id="receipt" class="shopp">
  2. <table class="transaction">
  3.     <tr><th>Comanda num&#259;rul:</th><td><?php shopp('purchase','id'); ?></td></tr>   
  4.     <tr><th>Data:</th><td><?php shopp('purchase','date'); ?></td></tr>     
  5. </table>
  6.  
  7. <table class="labels"><tr>
  8. <td><fieldset class="billing">
  9.     <legend>Facturat c&#259;tre</legend>
  10.     <address><h4><?php shopp('purchase','firstname'); ?> <?php shopp('purchase','lastname'); ?></h4><br />
  11.     <?php shopp('purchase','address'); ?><br />
  12.     <?php shopp('purchase','xaddress'); ?>
  13.     <?php shopp('purchase','city'); ?> <?php shopp('purchase','state'); ?> <?php shopp('purchase','postcode'); ?><br />
  14.     <?php shopp('purchase','country'); ?></address>
  15. </fieldset></td>
  16. <?php if (shopp('purchase','hasfreight')): ?>
  17. <td><fieldset class="shipping">
  18.         <legend>Livrat c&#259;tre</legend>
  19.         <address><h4><?php shopp('purchase','firstname'); ?> <?php shopp('purchase','lastname'); ?></h4><br />
  20.         <?php shopp('purchase','shipaddress'); ?><br />
  21.         <?php shopp('purchase','shipxaddress'); ?>
  22.         <?php shopp('purchase','shipcity'); ?>, <?php shopp('purchase','shipstate'); ?> <?php shopp('purchase','shippostcode'); ?><br />
  23.         <?php shopp('purchase','shipcountry'); ?></address>
  24.        
  25.         <p>Transport: <?php shopp('purchase','shipmethod'); ?></p>
  26. </fieldset></td>
  27. <?php endif; ?>
  28. </tr></table>
  29.  
  30. <?php if (shopp('purchase','hasitems')): ?>
  31. <table class="order widefat cart">
  32.     <thead>
  33.     <tr class="head">
  34.         <th scope="col" class="item">Produse</th>
  35.         <th scope="col">Cantitate</th>
  36.         <th scope="col" class="money">Pre&#355; produs</th>
  37.         <th scope="col" class="money">Total</th>
  38.     </tr>
  39.     </thead>
  40.  
  41.     <?php while(shopp('purchase','items')): ?>
  42.         <tr>
  43.             <td><?php shopp('purchase','item-name'); ?><?php shopp('purchase','item-options','before= – '); ?><br />
  44.                 <?php shopp('purchase','item-sku')."<br />"; ?>
  45.                 <?php shopp('purchase','item-download'); ?>
  46.                 <?php shopp('purchase','item-addons-list'); ?>
  47.                 </td>
  48.             <td><?php shopp('purchase','item-quantity'); ?></td>
  49.             <td class="money"><?php shopp('purchase','item-unitprice'); ?></td>
  50.             <td class="money"><?php shopp('purchase','item-total'); ?></td>
  51.         </tr>
  52.        
  53.          <?
  54.  
  55.         // SEND EMAIL DESIGNER
  56.  
  57.         $prodid = shopp('purchase','item-product','return=true');
  58.  
  59.         shopp('catalog','product','id='.$prodid.'&load=false');
  60.  
  61.         if(shopp('product','found','load=tags')) {
  62.  
  63.             while(shopp('product','tags')) {
  64.  
  65.                 $textemail = "Comanda data de ".shopp('purchase','firstname','return=true')."\r\n\r\n";
  66.  
  67.                 $textemail .= "Produsul: ".shopp('product','name','return=true')."";               
  68.  
  69.                 if(shopp('product','tagged','id=1')) {
  70.  
  71.                     $toemail = "camelianedelcu@gmail.com";
  72.  
  73.                 } else if(shopp('product','tagged','id=2')) {
  74.  
  75.                     $toemail = "ralucagheorghe88@yahoo.com";                   
  76.  
  77.                 } else if(shopp('product','tagged','id=3')) {
  78.  
  79.                     $toemail = "iulius_curt@yahoo.com";    
  80.                    
  81.                 } else if(shopp('product','tagged','id=4')) {
  82.  
  83.                     $toemail = "theorion7@yahoo.com";                  
  84.  
  85.                 }
  86.  
  87.                 mail($toemail,"Wallsticker - ".shopp('product','name','return=true'),$textemail);
  88.  
  89.             }
  90.  
  91.         }
  92.  
  93.         //while(shopp('product','categories')) { …
  94.  
  95.         //;
  96.  
  97.        
  98.  
  99.         ?>
  100.  
  101.     <?php endwhile; ?>
  102.  
  103.     <tr class="totals">
  104.         <th scope="row" colspan="3" class="total">Subtotal</th>
  105.         <td class="money"><?php shopp('purchase','subtotal'); ?></td>
  106.     </tr>
  107.     <?php if (shopp('purchase','hasdiscount')): ?>
  108.     <tr class="totals">
  109.         <th scope="row" colspan="3" class="total">Discount</th>
  110.         <td class="money">-<?php shopp('purchase','discount'); ?></td>
  111.     </tr>
  112.     <?php endif; ?>
  113.     <?php if (shopp('purchase','hasfreight')): ?>
  114.     <tr class="totals">
  115.         <th scope="row" colspan="3" class="total">Transport</th>
  116.         <td class="money"><?php shopp('purchase','freight'); ?></td>
  117.     </tr>
  118.     <?php endif; ?>
  119.     <?php if (shopp('purchase','hastax')): ?>
  120.     <tr class="totals">
  121.         <th scope="row" colspan="3" class="total">Tax</th>
  122.         <td class="money"><?php shopp('purchase','tax'); ?></td>
  123.     </tr>
  124.     <?php endif; ?>
  125.     <tr class="totals">
  126.         <th scope="row" colspan="3" class="total">Total</th>
  127.         <td class="money"><?php shopp('purchase','total'); ?></td>
  128.     </tr>
  129. </table>
  130.  
  131.  
  132. <?php if(shopp('purchase','has-data')): ?>
  133.     <ul>
  134.     <?php while(shopp('purchase','orderdata')): ?>
  135.         <?php if (shopp('purchase','data','echo=0') == '') continue; ?>
  136.         <li><strong><?php shopp('purchase','data','name'); ?>:</strong> <?php shopp('purchase','data'); ?></li>
  137.     <?php endwhile; ?>
  138.     </ul>
  139.    
  140. <?php endif; ?>
  141.    
  142.  
  143. <?php else: ?>
  144.     <p class="warning">Nu au fost gasite produse pentru această tranzacţie.</p>
  145. <?php endif; ?>
  146. </div>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement