Eshop 9 XSLT šablony: Porovnání verzí
Z Podpora.nextis.cz
(Založena nová stránka s textem „==XSLT Email Objednávky== ====Ukázka==== <syntaxhighlight lang="xml"> <?xml version="1.0" encoding="UTF-8" ?> <xsl:transform xmlns:xsl="http://www.w3.or…“) |
(Žádný rozdíl)
|
Verze z 16. 7. 2019, 09:23
XSLT Email Objednávky
Ukázka
<?xml version="1.0" encoding="UTF-8" ?>
<xsl:transform xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="2.0">
<xsl:output method="html" doctype-public="XSLT-compat" omit-xml-declaration="yes" encoding="UTF-8" indent="yes" />
<xsl:template match="/">
<html>
<head>
<title></title>
<meta charset="utf-8" />
<style type="text/css">
body {
font-family: Arial, Helvetica, sans-serif;
color: black;
font-size: 11px;
line-height: 16px;
padding: 0px;
margin: 0px;
}
table.border {
border-bottom: 1px solid #d9d9d9;
border-left: 1px solid #d9d9d9;
}
table.border td {
border-top: 1px solid #d9d9d9;
border-right: 1px solid #d9d9d9;
}
table.border td.empty-col {
border-top: 1px solid white;
}
table.border td.empty-last-col {
border-top: 1px solid white;
border-right: 1px solid white;
}
table.border-top {
border-top: 1px solid #d9d9d9;
}
.green {
color: green;
}
</style>
</head>
<body>
<div>
<font size="3"><b>Potvrzení objednávky <xsl:value-of select="OrderComplete/OrderNumber" /></b></font>
</div>
<div>Děkujeme za objednávku. Níže naleznete detaily Vaší objednávky.</div><br />
<table cellspacing="0" cellpadding="5" border="0" width="100%" bgcolor="white" class="border">
<tr>
<td bgcolor="#f7f7f7" colspan="4">
<center><b>Fakturační údaje</b></center>
</td>
</tr>
<tr>
<td bgcolor="#f7f7f7" width="20%"><b>Jméno, název</b></td>
<td width="30%">
<xsl:value-of select="OrderComplete/BillingCompanyName" />
</td>
<td width="20%" bgcolor="#f7f7f7"><b>Ulice</b></td>
<td width="30%">
<xsl:value-of select="OrderComplete/BillingStreet" />
</td>
</tr>
<tr>
<td bgcolor="#f7f7f7"><b>Město</b></td>
<td>
<xsl:value-of select="OrderComplete/BillingCity" />
</td>
<td bgcolor="#f7f7f7"><b>PSČ</b></td>
<td>
<xsl:value-of select="OrderComplete/BillingZipCode" />
</td>
</tr>
<tr>
<td bgcolor="#f7f7f7"><b>Stát</b></td>
<td colspan="3">
<xsl:value-of select="OrderComplete/BillingState" />
</td>
</tr>
</table>
<table cellspacing="0" cellpadding="0" width="100%" height="20">
<tr>
<td></td>
</tr>
</table>
<table cellspacing="0" cellpadding="5" border="0" width="100%" bgcolor="white" class="border">
<tr>
<td bgcolor="#f7f7f7" colspan="4">
<center><b>Dodací údaje</b></center>
</td>
</tr>
<tr>
<td bgcolor="#f7f7f7" width="20%"><b>Jméno, název</b></td>
<td width="30%">
<xsl:value-of select="OrderComplete/DeliveryCompanyName" />
</td>
<td width="20%" bgcolor="#f7f7f7"><b>Ulice</b></td>
<td width="30%">
<xsl:value-of select="OrderComplete/DeliveryStreet" />
</td>
</tr>
<tr>
<td bgcolor="#f7f7f7"><b>Město</b></td>
<td>
<xsl:value-of select="OrderComplete/DeliveryCity" />
</td>
<td bgcolor="#f7f7f7"><b>PSČ</b></td>
<td>
<xsl:value-of select="OrderComplete/DeliveryZipCode" />
</td>
</tr>
<xsl:choose>
<xsl:when test="OrderComplete/IsCompany = 'true'">
<tr>
<td bgcolor="#f7f7f7"><b>Stát</b></td>
<td>
<xsl:value-of select="OrderComplete/DeliveryState" />
</td>
<td bgcolor="#f7f7f7"><b>IČ</b></td>
<td>
<xsl:value-of select="OrderComplete/BillingCompanyID" />
</td>
</tr>
<xsl:choose>
<xsl:when test="not(OrderComplete/BillingCompanyForeignVATNumber = '')">
<tr>
<td bgcolor="#f7f7f7"><b>DIČ</b></td>
<td>
<xsl:value-of select="OrderComplete/BillingCompanyVATNumber" />
</td>
<td bgcolor="#f7f7f7"><b>IČ DPH</b></td>
<td>
<xsl:value-of select="OrderComplete/BillingCompanyForeignVATNumber" />
</td>
</tr>
</xsl:when>
<xsl:otherwise>
<tr>
<td bgcolor="#f7f7f7"><b>DIČ</b></td>
<td colspan="3">
<xsl:value-of select="OrderComplete/BillingCompanyVATNumber" />
</td>
</tr>
</xsl:otherwise>
</xsl:choose>
</xsl:when>
<xsl:otherwise>
<tr>
<td bgcolor="#f7f7f7"><b>Stát</b></td>
<td colspan="3">
<xsl:value-of select="OrderComplete/DeliveryState" />
</td>
</tr>
</xsl:otherwise>
</xsl:choose>
</table>
<xsl:if test="OrderComplete/IsDeliveryAddressDifferent = 'true'">
<table cellspacing="0" cellpadding="0" width="100%" height="20">
<tr>
<td></td>
</tr>
</table>
<table cellspacing="0" cellpadding="5" border="0" width="100%" bgcolor="white" class="border">
<tr>
<td bgcolor="#f7f7f7" colspan="4">
<center><b>Dodací údaje</b></center>
</td>
</tr>
<tr>
<td bgcolor="#f7f7f7" width="20%"><b>Jméno, název</b></td>
<td width="30%">
<xsl:value-of select="OrderComplete/DeliveryCompanyName" />
</td>
<td width="20%" bgcolor="#f7f7f7"><b>Ulice</b></td>
<td width="30%">
<xsl:value-of select="OrderComplete/DeliveryStreet" />
</td>
</tr>
<tr>
<td bgcolor="#f7f7f7"><b>Město</b></td>
<td>
<xsl:value-of select="OrderComplete/DeliveryCity" />
</td>
<td bgcolor="#f7f7f7"><b>PSČ</b></td>
<td>
<xsl:value-of select="OrderComplete/DeliveryZipCode" />
</td>
</tr>
<tr>
<td bgcolor="#f7f7f7"><b>Stát</b></td>
<td colspan="3">
<xsl:value-of select="OrderComplete/DeliveryState" />
</td>
</tr>
</table>
</xsl:if>
<table cellspacing="0" cellpadding="0" width="100%" height="20">
<tr>
<td></td>
</tr>
</table>
<table cellspacing="0" cellpadding="5" border="0" width="100%" bgcolor="white" class="border">
<tr>
<td bgcolor="#f7f7f7" colspan="4">
<center><b>Kontaktní informace</b></center>
</td>
</tr>
<tr>
<td bgcolor="#f7f7f7" width="20%"><b>Telefon</b></td>
<td width="30%">
<xsl:value-of select="OrderComplete/PhoneNumber" />
</td>
<td width="20%" bgcolor="#f7f7f7"><b>Email</b></td>
<td width="30%">
<xsl:value-of select="OrderComplete/Email" />
</td>
</tr>
</table>
<table cellspacing="0" cellpadding="0" width="100%" height="20">
<tr>
<td></td>
</tr>
</table>
<table cellspacing="0" cellpadding="5" border="0" width="100%" bgcolor="white" class="border">
<tr>
<td bgcolor="#f7f7f7" colspan="4">
<center><b>Další nastavení</b></center>
</td>
</tr>
<tr>
<td bgcolor="#f7f7f7" width="20%"><b>Způsob doručení</b></td>
<td width="30%">
<xsl:value-of select="OrderComplete/TransportMethod" />
</td>
<td width="20%" bgcolor="#f7f7f7"><b>Platba</b></td>
<td width="30%">
<xsl:value-of select="OrderComplete/PaymentTypeName" />
</td>
</tr>
<tr>
<td bgcolor="#f7f7f7"><b>Poznámka</b></td>
<td colspan="3">
<xsl:value-of select="OrderComplete/Notes" />
</td>
</tr>
</table>
<table cellspacing="0" cellpadding="0" width="100%" height="20">
<tr>
<td></td>
</tr>
</table>
<table cellspacing="0" cellpadding="0" width="100%" height="20">
<tr>
<td></td>
</tr>
</table>
<table cellspacing="0" cellpadding="5" border="0" width="100%" bgcolor="white" class="border">
<tr>
<td bgcolor="#f7f7f7"><b>Kód</b></td>
<td bgcolor="#f7f7f7"><b>Výrobce</b></td>
<td bgcolor="#f7f7f7"><b>Název</b></td>
<td bgcolor="#f7f7f7" width="1%"><b>Množství</b></td>
<td bgcolor="#f7f7f7"><b>K dod.</b></td>
<td bgcolor="#f7f7f7"><b>K obj.</b></td>
<td bgcolor="#f7f7f7" width="1%"><b>Sleva</b></td>
<td bgcolor="#f7f7f7"><b>Cena za MJ bez DPH</b></td>
<td bgcolor="#f7f7f7"><b>Cena za MJ s DPH</b></td>
<td bgcolor="#f7f7f7"><b>Celkem bez DPH</b></td>
<td bgcolor="#f7f7f7"><b>Celkem s DPH</b></td>
</tr>
<xsl:for-each select="OrderComplete/Items/OrderCompletProductItem">
<tr>
<td>
<xsl:value-of select="GroupCode" />
</td>
<td>
<xsl:value-of select="Manufacturer" />
</td>
<td>
<xsl:value-of select="Name" />
</td>
<td>
<xsl:value-of select="Amount" />
</td>
<td>
<xsl:value-of select="AmountToDeliver" />
</td>
<td>
<xsl:value-of select="AmountToOrder" />
</td>
<td>
<xsl:value-of select="DiscountInPercent" />%</td>
<td>
<xsl:value-of select="PurchasePricePerPiece" />
<xsl:value-of select="/OrderComplete/CurrencyCode" />
</td>
<td>
<xsl:value-of select="PurchasePricePerPieceWithVAT" />
<xsl:value-of select="/OrderComplete/CurrencyCode" />
</td>
<td>
<xsl:value-of select="RetailPricePerPiece" />
<xsl:value-of select="/OrderComplete/CurrencyCode" />
</td>
<td>
<xsl:value-of select="RetailPricePerPieceWithVAT" />
<xsl:value-of select="/OrderComplete/CurrencyCode" />
</td>
</tr>
<xsl:if test="not(ReturnInformations = '')">
<tr>
<td colspan="11">
<xsl:value-of select="ReturnInformations" />
</td>
</tr>
</xsl:if>
<xsl:if test="not(Surcharges = '')">
<tr>
<td colspan="11">
<div>
<b>Příplatky</b>
<xsl:for-each select="Surcharges/OrderCompletProductSurchargeItem">
<div>
<xsl:value-of select="Name" /> -
<span>
<xsl:value-of select="PurchasePricePerPiece" />
<xsl:value-of select="/OrderComplete/CurrencyCode" />
(
<xsl:value-of select="PurchasePricePerPieceWithVAT" />
<xsl:value-of select="/OrderComplete/CurrencyCode" />)
</span>
</div>
</xsl:for-each>
</div>
</td>
</tr>
</xsl:if>
</xsl:for-each>
</table>
<table cellspacing="0" cellpadding="0" width="100%" height="20">
<tr>
<td></td>
</tr>
</table>
<table cellspacing="0" cellpadding="5" border="0" width="100%" bgcolor="white" class="border">
<tr>
<td bgcolor="#f7f7f7"></td>
<td bgcolor="#f7f7f7" width="20%"><b>bez DPH</b></td>
<td bgcolor="#f7f7f7" width="20%"><b>s DPH</b></td>
</tr>
<tr>
<td><b>Celková cena</b></td>
<td>
<xsl:value-of select="OrderComplete/TotalPurchasePrice" />
<xsl:value-of select="OrderComplete/CurrencyCode" />
</td>
<td>
<xsl:value-of select="OrderComplete/TotalPurchasePriceWithVAT" />
<xsl:value-of select="OrderComplete/CurrencyCode" />
</td>
</tr>
</table>
<br />
<div>
V případě nesrovnalostí v objednávce, nás prosím co nejrychleji kontaktujte na níže uvedených
kontaktech.
</div>
<br /><br /><br />
<table cellspacing="0" cellpadding="0" width="100%" height="20" class="border-top">
<tr>
<td></td>
</tr>
</table>
<div>
<b>Mega super parts s.r.o.</b><br /><br />
Krmelínská 934/4<br />
700 20 Ostrava - Hrabová<br />
Česká republika<br /><br />
<b>Email</b><br />
info@somedomain.cz
</div>
</body>
</html>
</xsl:template>
</xsl:transform>