Popup vindue
Hej,Jeg er ikke den store PHP haj, derfor håber jeg der er en der har tid at hjælpe herinde.
Beskrivelse:
Jeg har en lille fritidsshop. I forbindelse med betaling kan jeg vælge om der skal åbnes et nyt vindue eller om der skal komme en pop up. Problemet er at når jeg vælger nyt vindue kan jeg ikke se i Google hvad folk har købt. Det nye vidue kommer frem på siden hvor folk trykker ja til accept af handelsbetingelser. Når jeg vælger pop up skal kunden en side længere og skal trykke på endnu en knap.
Løsning & Spørgsmål:
1) På siden for handelsbetingeler (hvor der nu åbnes et nyt vindue) vil jeg gerne at der åbnes et popup vindue i stedet.
=> SP. Er der nogen der kan fortælle mig udfra nedenstående kode hvad jeg skal copy/paste for at dette kan ske?
2) Hvis det er muligt at gøre popup vinduet større ville det være fantastisk.
=> SP. Hvor reguleres størrelsen på popup vinduet?
Jeg har følgende kode vedr. betalingen:
<?php
require_once(CLASSPATH ."payment/ps_epay.cfg.php");
$url=basename($mosConfig_live_site);
function get_iso_code($code) {
switch ($code) {
case "DKK": return "208"; break;
}
return "XXX"; // return invalid code if the currency is not found
}
function calculateePayCurrency($order_id)
{
$db =& new ps_DB;
$currency_code = "208";
$q = "SELECT order_currency FROM #__vm_orders where order_id = " . $order_id;
$db->query($q);
if ($db->next_record()) {
$currency_code = get_iso_code($db->f("order_currency"));
}
return $currency_code;
}
echo $VM_LANG->_('VM_CHECKOUT_EPAY_PAYMENT_CHECKOUT_HEADER');
?>
<script type="text/javascript" src="http://www.epay.dk/js/standardwindow.js"></script>
<script type="text/javascript">
function printCard(cardId)
{
document.write ("<table border=0 cellspacing=10 cellpadding=10>");
switch (cardId) {
case 1: document.write ("<input type=hidden name=cardtype value=1>"); break;
case 2: document.write ("<input type=hidden name=cardtype value=2>"); break;
case 3: document.write ("<input type=hidden name=cardtype value=3>"); break;
case 4: document.write ("<input type=hidden name=cardtype value=4>"); break;
case 5: document.write ("<input type=hidden name=cardtype value=5>"); break;
case 6: document.write ("<input type=hidden name=cardtype value=6>"); break;
case 7: document.write ("<input type=hidden name=cardtype value=7>"); break;
case 8: document.write ("<input type=hidden name=cardtype value=8>"); break;
case 9: document.write ("<input type=hidden name=cardtype value=9>"); break;
case 10: document.write ("<input type=hidden name=cardtype value=10>"); break;
case 12: document.write ("<input type=hidden name=cardtype value=12>"); break;
case 13: document.write ("<input type=hidden name=cardtype value=13>"); break;
case 14: document.write ("<input type=hidden name=cardtype value=14>"); break;
case 15: document.write ("<input type=hidden name=cardtype value=15>"); break;
case 16: document.write ("<input type=hidden name=cardtype value=16>"); break;
case 17: document.write ("<input type=hidden name=cardtype value=17>"); break;
case 18: document.write ("<input type=hidden name=cardtype value=18>"); break;
case 19: document.write ("<input type=hidden name=cardtype value=19>"); break;
case 21: document.write ("<input type=hidden name=cardtype value=21>"); break;
case 22: document.write ("<input type=hidden name=cardtype value=22>"); break;
}
document.write ("</table>");
}
</script>
<form action="https://ssl.ditonlinebetalingssystem.dk/popup/default.asp" method="post" name="ePay" target="ePay_window" id="ePay">
<input type="hidden" name="merchantnumber" value="<?php echo EPAY_MERCHANTNUMBER ?>">
<input type="hidden" name="amount" value="<?php echo round($db->f("order_total")*100, 2 ) ?>">
<input type="hidden" name="currency" value="<?php echo calculateePayCurrency($order_id)?>">
<input type="hidden" name="orderid" value="<?php echo $order_id ?>">
<input type="hidden" name="ordretext" value="">
<?php
if (EPAY_CALLBACK == "1")
{
echo '<input type="hidden" name="callbackurl" value="' . $mosConfig_live_site . '/index.php?page=checkout.epay_result&accept=1&sessionid=' . $sessionid . '&option=com_virtuemart&Itemid=1">';
}
?>
<input type="hidden" name="accepturl" value="<?php echo $mosConfig_live_site ?>/index.php?page=checkout.epay_result&accept=1&sessionid=<?php echo $sessionid ?>&option=com_virtuemart&Itemid=1">
<input type="hidden" name="declineurl" value="<?php echo $mosConfig_live_site ?>/index.php?page=checkout.epay_result&accept=0&sessionid=<?php echo $sessionid ?>&option=com_virtuemart&Itemid=1">
<input type="hidden" name="group" value="<?php echo EPAY_GROUP ?>">
<input type="hidden" name="instant" value="<?php echo EPAY_INSTANT_CAPTURE ?>">
<input type="hidden" name="language" value="<?php echo EPAY_LANGUAGE ?>">
<input type="hidden" name="authsms" value="<?php echo EPAY_AUTH_SMS ?>">
<input type="hidden" name="authmail" value="<?php echo EPAY_AUTH_MAIL . (strlen(EPAY_AUTH_MAIL) > 0 && EPAY_AUTHEMAILCUSTOMER == 1 ? ";" : "") . (EPAY_AUTHEMAILCUSTOMER == 1 ? $user->user_email : ""); ?>">
<input type="hidden" name="windowstate" value="<?php echo EPAY_WINDOW_STATE ?>">
<input type="hidden" name="use3D" value="<?php echo EPAY_3DSECURE ?>">
<input type="hidden" name="addfee" value="<?php echo EPAY_ADDFEE ?>">
<input type="hidden" name="subscription" value="<?php echo EPAY_SUBSCRIPTION ?>">
<input type="hidden" name="MD5Key" value="<?php if (EPAY_MD5_TYPE == 2) echo md5( calculateePayCurrency($order_id) . round($db->f("order_total")*100, 2 ) . $order_id . EPAY_MD5_KEY)?>">
<?php
if (EPAY_CARDTYPES_1 == "1" && EPAY_CARDTYPES_0 != "1") echo "<script>printCard(1)</script>";
if (EPAY_CARDTYPES_2 == "1" && EPAY_CARDTYPES_0 != "1") echo "<script>printCard(2)</script>";
if (EPAY_CARDTYPES_3 == "1" && EPAY_CARDTYPES_0 != "1") echo "<script>printCard(3)</script>";
if (EPAY_CARDTYPES_4 == "1" && EPAY_CARDTYPES_0 != "1") echo "<script>printCard(4)</script>";
if (EPAY_CARDTYPES_5 == "1" && EPAY_CARDTYPES_0 != "1") echo "<script>printCard(5)</script>";
if (EPAY_CARDTYPES_6 == "1" && EPAY_CARDTYPES_0 != "1") echo "<script>printCard(6)</script>";
if (EPAY_CARDTYPES_7 == "1" && EPAY_CARDTYPES_0 != "1") echo "<script>printCard(7)</script>";
if (EPAY_CARDTYPES_8 == "1" && EPAY_CARDTYPES_0 != "1") echo "<script>printCard(8)</script>";
if (EPAY_CARDTYPES_9 == "1" && EPAY_CARDTYPES_0 != "1") echo "<script>printCard(9)</script>";
if (EPAY_CARDTYPES_10 == "1" && EPAY_CARDTYPES_0 != "1") echo "<script>printCard(10)</script>";
if (EPAY_CARDTYPES_11 == "1" && EPAY_CARDTYPES_0 != "1") echo "<script>printCard(11)</script>";
if (EPAY_CARDTYPES_12 == "1" && EPAY_CARDTYPES_0 != "1") echo "<script>printCard(12)</script>";
if (EPAY_CARDTYPES_14 == "1" && EPAY_CARDTYPES_0 != "1") echo "<script>printCard(14)</script>";
if (EPAY_CARDTYPES_15 == "1" && EPAY_CARDTYPES_0 != "1") echo "<script>printCard(15)</script>";
if (EPAY_CARDTYPES_16 == "1" && EPAY_CARDTYPES_0 != "1") echo "<script>printCard(16)</script>";
if (EPAY_CARDTYPES_17 == "1" && EPAY_CARDTYPES_0 != "1") echo "<script>printCard(17)</script>";
if (EPAY_CARDTYPES_18 == "1" && EPAY_CARDTYPES_0 != "1") echo "<script>printCard(18)</script>";
if (EPAY_CARDTYPES_19 == "1" && EPAY_CARDTYPES_0 != "1") echo "<script>printCard(19)</script>";
if (EPAY_CARDTYPES_21 == "1" && EPAY_CARDTYPES_0 != "1") echo "<script>printCard(21)</script>";
if (EPAY_CARDTYPES_22 == "1" && EPAY_CARDTYPES_0 != "1") echo "<script>printCard(22)</script>";;
?>
</form>
<script>open_ePay_window();</script>
<br>
<table border="0" width="100%"><tr><td><input type="button" onClick="open_ePay_window()" value="<?php echo $VM_LANG->_('VM_CHECKOUT_EPAY_BUTTON_OPEN_WINDOW') ?>"></td><td width="100%" id="flashLoader"></td></tr></table><br><br><br>
<?php echo $VM_LANG->_('VM_CHECKOUT_EPAY_PAYMENT_CHECKOUT_FOOTER') ?>
<br><br>
<img src="components/com_virtuemart/shop_image/ps_image/epay_images/epay_logo.gif" border="0">
<img src="components/com_virtuemart/shop_image/ps_image/epay_images/mastercard_securecode.gif" border="0">
<img src="components/com_virtuemart/shop_image/ps_image/epay_images/pci.gif" border="0">
<img src="components/com_virtuemart/shop_image/ps_image/epay_images/verisign_secure.gif" border="0">
<img src="components/com_virtuemart/shop_image/ps_image/epay_images/visa_secure.gif" border="0"> ;