Pārlūkot izejas kodu

redirect already used trial version

andre 4 gadi atpakaļ
vecāks
revīzija
029e57af14
2 mainītis faili ar 25 papildinājumiem un 3 dzēšanām
  1. 8 3
      checkout.tpl
  2. 17 0
      removedoubletrial.tpl

+ 8 - 3
checkout.tpl

@@ -1,7 +1,12 @@
-{foreach from=$products item=cycle}
-    {$cycle.billingcycle}<hr>
+{foreach from=$products item=product}
+    {$product.billingcycle}<hr>
+    {if ($product.billingcycle eq 'free') && in_array($product.pid, $clientPids)}
+        {assign var=doubleTrials value=$doubleTrials+' '+$product.productinfo.name}
+    {/if}
 {/foreach}
-{if $smarty.post.onepageorder == "1" && $smarty.post.checkcredit == "0"}
+{if isset($doubleTrials)}
+    {include file="./removedoubletrial.tpl"}
+{elseif $smarty.post.onepageorder == "1" && $smarty.post.checkcredit == "0"}
 
     <script>
         // Define state tab index value

+ 17 - 0
removedoubletrial.tpl

@@ -0,0 +1,17 @@
+<div class="alert alert-danger" style="width:60%;">
+    {$LANG.noAdditionalTrial}
+</div>
+<table width="60%" border="0">
+    <tr>
+        <td style="text-align: center;">
+            <a href="{$WEB_ROOT}/submitticket.php?step=2&deptid=1&subject={$LANG.tryagain} {$product.name}" class="btn btn-primary">
+                {$LANG.tryagain}
+            </a>
+        </td>
+        <td style="text-align: center;">
+            <a href="{$WEB_ROOT}/cart.php?gid={$productinfo.gid}" class="btn btn-primary">
+                {$LANG.buyFullVersion}
+            </a>
+        </td>
+    </tr>
+</table>