{source}
<!-- Modal -->
<div id="myModal" class="modal fade" role="dialog">
<div class="modal-dialog">
<!-- Modal content-->
<div class="modal-content">
<div class="modal-header">
<h4 class="modal-title">Congrats!</h4>
</div>
<div class="modal-body" style="text-align: center; padding: 10px;">
<p style="color: green; font-size: x-large;">Produktet er tilføjet til indkøbskurven.</p>
<div id="hideMsg">
"Fortsæt at shoppe" in <span>5</span> Seconds
</div>
</div>
<div class="modal-footer" style="border-top: 0 !important;">
<button id="continue_shopping" type="button" class="btn btn-primary" onclick="location.reload();">Fortsæt at shoppe</button>
<button type="button" class="btn btn-secondary" onclick="window.location.href='/index.php/dk/shop-all/cart.html'">Gå til kurv</button>
</div>
</div>
</div>
</div>
<script type="text/javascript">
function hide_message() {
// Number of seconds counter starts at is what's in the span
var timer, counter = jQuery("#hideMsg span").text();
// Delay the fadeout counter seconds
jQuery('#hideMsg').delay(counter * 1000).fadeOut('fast');
// Update countdown number every second... and count down
timer = setInterval(function() {
jQuery("#hideMsg span").html(--counter);
if (counter == 0) { clearInterval(timer)};
}, 1000);
}
function set_data(product_id) {
var data = "quantity[]="+1+"&virtuemart_product_id[]="+product_id;
jQuery.ajax({
url: "index.php?option=com_virtuemart&nosef=1&view=cart&task=addJS",
method: 'GET',
data: data,
success: function(data){
jQuery('#myModal').modal('show');
setTimeout(function () {
jQuery('#continue_shopping').focus();
}, 100);
hide_message();
setTimeout(function(){
jQuery("#continue_shopping").click();
},5000);
}
});
}
</script>
<table style="width: 100%;">
<tbody>
<tr style="height: 38px;">
<td style="height: 38px;" colspan="3">
<h2>Tilbehør</h2>
</td>
</tr>
<tr style="height: 30px;">
<td style="height: 15px;" colspan="2"><hr />
<h4>Strømforsyninger</h4>
</td>
<td> </td>
</tr>
<tr style="height: 30px;">
<td>Plug-in Power Supply 24V / 12W</td>
<td><a title="Plug-in Power Supply 24V / 12W" href="https://www.actcom.dk/index.php/dk/shop-all.html?keyword=11021&view=category&option=com_virtuemart&virtuemart_category_id=0&Itemid=961" target="_blank" rel="noopener noreferrer">WT11021</a></td>
<td><button id="myaddtocart" class="btn btn-primary" style="padding: .25rem .5rem !important; font-size: 1.2rem !important; line-height: 1.5 !important; border-radius: .2rem !important;" type="button" onclick="set_data('961');">Tilføj til kurv</button></td>
</tr>
<tr style="height: 30px;">
<td>Plug-in Power Supply, 24V / 750mA DC with Euro, US and UK plug</td>
<td><a title="Power Supply" href="https://www.actcom.dk/index.php/dk/shop-all.html?keyword=58813&view=category&option=com_virtuemart&virtuemart_category_id=0&Itemid=962" target="_blank" rel="noopener noreferrer">WT58813</a></td>
<td><button id="myaddtocart" class="btn btn-primary" style="padding: .25rem .5rem !important; font-size: 1.2rem !important; line-height: 1.5 !important; border-radius: .2rem !important;" type="button" onclick="set_data('962');">Tilføj til kurv</button></td>
</tr>
<tr style="height: 30px;">
<td>Power Supply for DIN rail mount, 24V / 630mA DC
(merchandise, 2-year manufacturer’s guarantee)</td>
<td><a title="Power Supply" href="https://www.actcom.dk/index.php/dk/shop-all.html?keyword=11080&view=category&option=com_virtuemart&virtuemart_category_id=0&Itemid=965" target="_blank" rel="noopener noreferrer">WT11120</a></td>
<td><button id="myaddtocart" class="btn btn-primary" style="padding: .25rem .5rem !important; font-size: 1.2rem !important; line-height: 1.5 !important; border-radius: .2rem !important;" type="button" onclick="set_data('965');">Tilføj til kurv</button></td>
</tr>
<tr style="height: 30px;">
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr style="height: 30px;">
<td style="height: 15px;" colspan="2"><hr />
<h4>Mekanisk tilbehør</h4>
</td>
<td> </td>
</tr>
<tr style="height: 30px;">
<td>Monteringsbeslag til vægmontering</td>
<td><a title="Monteringsbeslag til vægmontering" href="https://www.actcom.dk/index.php/dk/shop-all.html?keyword=58812&view=category&option=com_virtuemart&virtuemart_category_id=0&Itemid=970" target="_blank" rel="noopener noreferrer">WT58812</a></td>
<td><button id="myaddtocart" class="btn btn-primary" style="padding: .25rem .5rem !important; font-size: 1.2rem !important; line-height: 1.5 !important; border-radius: .2rem !important;" type="button" onclick="set_data('970');">Tilføj til kurv</button></td>
</tr>
<tr style="height: 30px;">
<td>19" Din skinne</td>
<td><a title="Din skinne" href="https://www.actcom.dk/index.php/dk/shop-all.html?keyword=58813&view=category&option=com_virtuemart&virtuemart_category_id=0&Itemid=971" target="_blank" rel="noopener noreferrer">WT58813</a></td>
<td><button id="myaddtocart" class="btn btn-primary" style="padding: .25rem .5rem !important; font-size: 1.2rem !important; line-height: 1.5 !important; border-radius: .2rem !important;" type="button" onclick="set_data('971');">Tilføj til kurv</button></td>
</tr>
</tbody>
</table>