Line 12... |
Line 12... |
12 |
{
|
12 |
{
|
13 |
$url = $this->get_option('wpsg_mod_targo_url_test');
|
13 |
$url = $this->get_option('wpsg_mod_targo_url_test');
|
14 |
}
|
14 |
}
|
15 |
?>
|
15 |
?>
|
16 |
|
16 |
|
17 |
<p><?php echo __('Um den Betrag mit Targo zu bezahlen klicken Sie bitte auf folgendes Logo.', 'wpsg'); ?></p>
|
17 |
<p><?php echo __('Um den Betrag mit einer Finanzierung bei der TARGOBANK zu bezahlen, klicken Sie bitte auf folgendes Logo.', 'wpsg'); ?></p>
|
18 |
<p>
|
18 |
<p>
|
- |
|
19 |
<!--
|
19 |
<a title="<?php echo __('Mit Targo bezahlen', 'wpsg'); ?>" href="<?php echo $url; ?>">
|
20 |
<a title="<?php echo __('Mit Targo bezahlen', 'wpsg'); ?>" href="<?php echo $url; ?>">
|
20 |
<img src="<?php echo $this->getRessourceURL('gfx/targologo.png'); ?>" align="left" alt="<?php echo __('Mit Targo bezahlen', 'wpsg'); ?>" style="margin-right:7px;">
|
21 |
<img src="<?php echo $this->getRessourceURL('gfx/targologo.png'); ?>" align="left" alt="<?php echo __('Finanzierung bei Targo beantragen.', 'wpsg'); ?>" style="margin-right:7px;">
|
21 |
|
22 |
|
22 |
</a>
|
23 |
</a>
|
- |
|
24 |
-->
|
23 |
</p>
|
25 |
</p>
|
24 |
|
26 |
|
25 |
<form hidden class="wpsg_productform" id="wpsg_produktform" method="post" action="<?php echo $url ?>">
|
27 |
<form class="wpsg_productform" id="wpsg_produktform" method="post" action="<?php echo $url ?>">
|
- |
|
28 |
|
- |
|
29 |
<input type="image" name="image" src="<?php echo $this->getRessourceURL('gfx/targologo.png'); ?>" alt="<?php echo __('Finanzierung bei Targo beantragen.', 'wpsg'); ?>" style="margin-right:7px;">
|
- |
|
30 |
|
- |
|
31 |
<div style="display:none;">
|
26 |
<?php $o_id = $this->view['o_id'];
|
32 |
<?php $o_id = $this->view['o_id'];
|
27 |
$k_id = $this->view['k_id'];
|
33 |
$k_id = $this->view['k_id'];
|
28 |
$oOrder = wpsg_order::getInstance($o_id);
|
34 |
$oOrder = wpsg_order::getInstance($o_id);
|
29 |
$brutto = $oOrder->getAmount(WPSG_BRUTTO);
|
35 |
$brutto = $oOrder->getAmount(WPSG_BRUTTO);
|
30 |
$brutto = wpsg_round($brutto, 2);
|
36 |
$brutto = wpsg_round($brutto, 2);
|
Line 43... |
Line 49... |
43 |
$dl = $this->view['targoLink'];
|
49 |
$dl = $this->view['targoLink'];
|
44 |
|
50 |
|
45 |
$street = $oOrder-> getInvoiceStreetClear(true);
|
51 |
$street = $oOrder-> getInvoiceStreetClear(true);
|
46 |
$nr = $oOrder-> getInvoiceStreetNr();
|
52 |
$nr = $oOrder-> getInvoiceStreetNr();
|
47 |
|
53 |
|
48 |
|
- |
|
49 |
?>
|
54 |
?>
|
50 |
<?php ?>
|
55 |
<?php ?>
|
51 |
<?php ?>
|
56 |
<?php
|
- |
|
57 |
function toIso($string) {
|
- |
|
58 |
return mb_convert_encoding($string, "ISO-8859-1");
|
- |
|
59 |
}
|
- |
|
60 |
|
- |
|
61 |
?>
|
52 |
|
62 |
|
53 |
<br /><br />
|
63 |
<br /><br />
|
54 |
<b>Obligatorische Daten für Targobank</b><br />
|
64 |
<b>Obligatorische Daten für Targobank</b><br />
|
55 |
<input type="text" id="koop_id" name="koop_id" value="<?php echo $this->get_option('wpsg_mod_targo_koop_id');?>" placeholder="koop_id"><br />
|
65 |
<input type="text" id="koop_id" name="koop_id" value="<?php echo $this->get_option('wpsg_mod_targo_koop_id');?>" placeholder="koop_id"><br />
|
56 |
<input type="text" id="SessionID" name="sessionID" value="<?php echo session_id();?>" placeholder="sessionID"><br />
|
66 |
<input type="text" id="SessionID" name="sessionID" value="<?php echo session_id();?>" placeholder="sessionID"><br />
|
Line 59... |
Line 69... |
59 |
<input type="text" id="dealerText" name="dealerText" value="<?php echo $this->view['targoLink'];?>" placeholder="dealerText"><br />
|
69 |
<input type="text" id="dealerText" name="dealerText" value="<?php echo $this->view['targoLink'];?>" placeholder="dealerText"><br />
|
60 |
<input type="text" id="documentno" name="documentno" value="<?php echo $this->view['o_id'];?>" placeholder="documentno"><br />
|
70 |
<input type="text" id="documentno" name="documentno" value="<?php echo $this->view['o_id'];?>" placeholder="documentno"><br />
|
61 |
|
71 |
|
62 |
|
72 |
|
63 |
<b>Optionale Daten für Targobank</b><br />
|
73 |
<b>Optionale Daten für Targobank</b><br />
|
64 |
<input type="text" id="dealerShopURL" name="dealerShopURL" value="" placeholder="dealerShopURL"><br />
|
74 |
<input type="text" id="dealerShopURL" name="dealerShopURL" value="<?php echo $this->get_option('wpsg_mod_targo_dealerShopURL');?>" placeholder="dealerShopURL"><br />
|
65 |
<input type="text" id="dealerAbortURL" name="dealerAbortURL" value="" placeholder="dealerAbortURL"><br />
|
75 |
<input type="text" id="dealerAbortURL" name="dealerAbortURL" value="<?php echo $this->get_option('wpsg_mod_targo_dealerAbortURL');?>" placeholder="dealerAbortURL"><br />
|
66 |
<input type="text" id="hash" name="hash" value="" placeholder="hash">(hashkey)<br />
|
76 |
<input type="text" id="hash" name="hash" value="" placeholder="hash">(hashkey)<br />
|
67 |
<input type="text" id="" name="" value="" placeholder=""><br />
|
77 |
<input type="text" id="" name="" value="" placeholder=""><br />
|
68 |
|
78 |
|
69 |
|
79 |
|
70 |
<b>Adressdaten aus Kundendaten</b><br />
|
80 |
<b>Adressdaten aus Kundendaten</b><br />
|
- |
|
81 |
<?php
|
- |
|
82 |
$titel = $oCustomer->getTitle();
|
- |
|
83 |
$isotitel = '';
|
- |
|
84 |
if (($titel == "Herr") || ($titel == "Frau")) $isotitel = toIso($titel);
|
- |
|
85 |
?>
|
- |
|
86 |
<input type="text" id="surname" name="gender" value="<?php echo $isotitel;?>" placeholder="titel"><br />
|
71 |
<input type="text" id="surname" name="surname" value="<?php echo $oCustomer->getName();?>" placeholder="surname"><br />
|
87 |
<input type="text" id="surname" name="surname" value="<?php echo toIso($oCustomer->getName());?>" placeholder="surname"><br />
|
72 |
<input type="text" id="firstname" name="firstname" value="<?php echo $oCustomer->getFirstname();?>" placeholder="firstname"><br />
|
88 |
<input type="text" id="firstname" name="firstname" value="<?php echo toIso($oCustomer->getFirstname());?>" placeholder="firstname"><br />
|
73 |
<input type="text" id="street" name="street" value="<?php echo $oOrder->getInvoiceStreetClear(true);?>" placeholder="street"><br />
|
89 |
<input type="text" id="street" name="street" value="<?php echo toIso($oOrder->getInvoiceStreetClear(true));?>" placeholder="street"><br />
|
74 |
<input type="text" id="streetnumber" name="streetnumber" value="<?php echo $oOrder->getInvoiceStreetNr();?>" placeholder="streetnumber"><br />
|
90 |
<input type="text" id="streetnumber" name="streetnumber" value="<?php echo toIso($oOrder->getInvoiceStreetNr());?>" placeholder="streetnumber"><br />
|
75 |
<input type="text" id="zip" name="zip" value="<?php echo $oCustomer->getZip();?>" placeholder="zip"><br />
|
91 |
<input type="text" id="zip" name="zip" value="<?php echo toIso($oCustomer->getZip());?>" placeholder="zip"><br />
|
76 |
<input type="text" id="city" name="city" value="<?php echo $oCustomer->getCity();?>" placeholder="city"><br />
|
92 |
<input type="text" id="city" name="city" value="<?php echo toIso($oCustomer->getCity());?>" placeholder="city"><br />
|
77 |
<input type="text" id="telnocode" name="telnocode" value="" placeholder="vorwahl"><br />
|
93 |
<input type="text" id="telnocode" name="telnocode" value="" placeholder="vorwahl"><br />
|
78 |
<input type="text" id="telno" name="telno" value="<?php echo $oCustomer->getPhone();?>" placeholder="telno"><br />
|
94 |
<input type="text" id="telno" name="telno" value="<?php echo toIso($oCustomer->getPhone());?>" placeholder="telno"><br />
|
79 |
<input type="text" id="birthday" name="birthday" value="<?php echo $oCustomer->getBirthdate("Y-m-d");?>" placeholder="birthday"><br />
|
95 |
<input type="text" id="birthday" name="birthday" value="<?php
|
- |
|
96 |
|
- |
|
97 |
$dt = $oCustomer->getBirthdate("Y-m-d");
|
- |
|
98 |
|
- |
|
99 |
if ($oCustomer->geb == '0000-00-00' || strtotime($dt) === false)
|
- |
|
100 |
{
|
- |
|
101 |
|
- |
|
102 |
echo '';
|
- |
|
103 |
|
- |
|
104 |
}
|
- |
|
105 |
else
|
- |
|
106 |
{
|
- |
|
107 |
|
- |
|
108 |
echo $oCustomer->getBirthdate("Y-m-d");
|
- |
|
109 |
|
- |
|
110 |
}
|
- |
|
111 |
|
- |
|
112 |
?>" placeholder="birthday"><br />
|
80 |
<input type="text" id="email" name="email" value="<?php echo $oCustomer->getEMail();?>" placeholder="email"><br />
|
113 |
<input type="text" id="email" name="email" value="<?php echo toIso($oCustomer->getEMail());?>" placeholder="email"><br />
|
81 |
|
114 |
|
82 |
<input type="submit" id="submit" name="submit" value="submit" >
|
115 |
<input type="submit" id="submit" name="submit" value="submit" >
|
83 |
|
116 |
|
- |
|
117 |
</div>
|
84 |
</form>
|
118 |
</form>
|
85 |
|
119 |
|
86 |
|
120 |
|
87 |
<?php if ($this->get_option('wpsg_mod_targo_autostart') == '1') { ?>
|
121 |
<?php if ($this->get_option('wpsg_mod_targo_autostart') == '1') { ?>
|
88 |
<script type="text/javascript">/* <![CDATA[ */
|
122 |
<script type="text/javascript">/* <![CDATA[ */
|
89 |
|
123 |
|
90 |
jQuery(document).ready(function() {
|
124 |
jQuery(document).ready(function() {
|
91 |
window.setTimeout(function() {
|
125 |
window.setTimeout(function() {
|
92 |
location.href = "<?php echo $url;?>";
|
126 |
//location.href = "<?php echo $url;?>";
|
- |
|
127 |
jQuery('#submit').trigger("click");
|
93 |
}, 1000);
|
128 |
}, 1000);
|
94 |
} );
|
129 |
} );
|
95 |
|
130 |
|
96 |
/* ]]> */</script>
|
131 |
/* ]]> */</script>
|
97 |
<?php } ?>
|
132 |
<?php } ?>
|
98 |
|
133 |
|