Skip to content

Instantly share code, notes, and snippets.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<script type="text/javascript" src="https://services.codeweavers.net/v2/script/FinancePlugin?key=YOUR_API_KEY_HERE"></script>
<script type='text/javascript'>
function loadPlugin() {
codeweavers.main({
pluginContentDivId: 'PLUGIN_DIV_ID',
vehicle: {
type: 'car',
registration: {
year: 2002,
plate: '51'
}
vehicle: {
stockId: "STOCK1234"
}
vehicle: {
type: 'car',
identifier: '57294',
identifierType: 'CAPSHORTCODE',
isNew: false,
cashPrice: '9695',
imageUrl: 'www.MyUrl.co.uk/Image/car.jpg',
linkBackUrl: 'www.MyUrl.co.uk/car',
mileage: '12123',
registration: { },
registration: {
date: '2014-01-01',
number: 'BT02BCY'
}
registration: {
date: '2013-02-07'
}
options: {
dontCalculateOnLoad: false,
disableAutomaticRecalculation: false,
recalculationFadeSpeed: 100,
recalculationFadeAmount: 100
}
codeweavers.main({
pluginContentDivId: 'PLUGIN_DIV_ID',
vehicle: { },
dealer: 'Codeweavers Associated Plugin Dealer',
emailFunction: function (emailer) { },
defaultParameters: { },
customerReference: 'customerReference',
options: { },
onSuccessfulCalculation: function (calculations) { },
});
emailFunction: function (emailer) {
emailer.send({ }); // Required - This will send the email.
}