{source}<?php

$app = JFactory::getApplication();
$doc = JFactory::getDocument();
$images = false;
if ($images) {
$doc->addStyleSheet(JUri::base(true) . '/modules/mod_ersd_typeahead_search/assets/css/module.css?ver=1.2');
} else {
$doc->addStyleSheet(JUri::base(true) . '/modules/mod_ersd_typeahead_search/assets/css/modulecss.css?ver=1.2');
}

if (!class_exists( 'VmConfig' )) require(JPATH_ROOT .'/administrator/components/com_virtuemart/helpers/config.php');
VmConfig::loadConfig();
vmLanguage::loadJLang('mod_virtuemart_cart', true);
vmLanguage::loadJLang('com_virtuemart', true);
vmJsApi::jQuery();

$numberincrease = 1;
?>

<script type="text/javascript">
jQuery(document).ready(function($) {

function initTypeAhead(control, optsHash) {
$(control).typeahead(optsHash);
}

var taOptsHash = {
input: '.js-typeahead-product_name',
minLength: 3,
maxItem: false,
dynamic: true,
highlight: true,
hint: true,
group: true,
cache: false,
compression: true,
cancelButton: true,
debug: true,
emptyTemplate: "No results found for <b>{{query}}</b>",
template: function () {
return '<span class="ui blue small label">{{display}}</span>';
},
source: {
product: {
template: function (query, item) {
var color = "green";
var stock_status = "checkmark";
if (item.available_stock <= 0) {
color = "red";
stock_status = "warning";
}
return '<span class="title" style="color: ' + color + ';">{{display}} </span><i class="icon-' + stock_status + '" style="color: ' + color + ';"></i>';
},
ajax: {
type: "GET",
path: "product",
url: "<?php echo JUri::base(true);?>/autocomplete_typeahead.php?",
data: {
q: "{{query}}",
i: true,
u: true,
c: true
},
dataType: "json",
}
}
},
callback: {
onShowLayout: function (node, query) {
node.attr('placeholder', 'search product name ...');
node.closest('form').find('.typeahead__list').css('max-height', $(window).height() - 200 + "px");
},
onHideLayout: function (node, query) {
node.attr('placeholder', 'Search');
},
onResult: function (node, query, result, resultCount) {
if (query === "") return;

var text = "";
if (result.length > 0 && result.length < resultCount) {
text = "Showing <strong>" + result.length + "</strong> of <strong>" + resultCount + '</strong> elements matching "' + query + '"';
} else if (result.length > 0) {
text = 'Showing <strong>' + result.length + '</strong> elements matching "' + query + '"';
} else {
text = 'No results matching "' + query + '"';
}
$('#result-container').html(text);

},
onLayoutBuiltBefore: function (node, query, result, resultHtmlList) {
resultHtmlList.find('li[data-search-group="product"]').remove();
return resultHtmlList;
},
onClickAfter: function (node, a, item, event) {

node.closest('.row_article').find('.cell_sku .js-typeahead-product_sku').val(item.product_sku).text(item.product_sku);

var replaceImage = '';
if (typeof item.file_url === "undefined"){
replaceImage = '' +
'<img src="/images/70x70.png" alt="" class="product-image" style="min-height: 70px;">' + ' ';
} else {
replaceImage = '<a title="' + item.display + '" rel="catproduct_images_0" href="' + item.product_url + '">' +
'<img src="' + item.file_url + '" alt="' + item.display + '" class="product-image">' + '</a> ';
}
node.closest('.row_article').find('.cell_image').html(replaceImage);

node.closest('.row_article').find('.cell_priceWithoutTax span.PricepriceWithoutTax').text(item.baseprice);
node.closest('.row_article').find('.cell_salesPrice span.PricesalesPrice').text(item.basepricewithtax);
node.closest('.row_article').find('input.catproduct_product_datas').replaceWith(item.product_datas);

if (item.available_stock <= 0) {
node.closest('.row_article').find('.cell_quantity a.notify').replaceWith('<a href="' + item.product_url + '/notify" class="btn btn-notify btn-info btn-md" title="Notify Me" target="_top" rel="no-follow">Notify Me</a>');

node.closest('.row_article').find('.cell_quantity div.quantities').addClass( "hide" );
} else {
node.closest('.row_article').find('.cell_quantity div.quantities').removeClass( "hide" );
node.closest('.row_article').find('.cell_quantity a.btn-notify').addClass( "hide" );
}
},
onCancel: function (node, item, event) {
var replaceImage = '<a title="" rel="catproduct_images_0" href="/">' +
'<img src="/" alt="" class="product-image" style="min-height: 70px;">' + '</a> ';
node.closest('.row_article').find('.cell_image').html(replaceImage);

node.closest('.row_article').find('.cell_sku .js-typeahead-product_sku').val('').text('');
node.closest('.row_article').find('.cell_priceWithoutTax span.PricepriceWithoutTax').text('0.00');
node.closest('.row_article').find('.cell_salesPrice span.PricesalesPrice').text('0.00');
node.closest('.row_article').find('.cell_quantity input').val('0').text('0');
node.closest('.row_article').find('input.catproduct_product_datas').replaceWith('<input type="hidden" data-product_id="0" data-product_name="" data-product_weight="0.0000" data-product_weight_uom="KG" data-product_length="0.0000" data-product_width="0.0000" data-product_height="0.0000" data-product_lwh_uom="M" data-product_in_stock="0" data-baseprice="0" data-basepricewithtax="0" data-pricewithouttax="0" data-salesprice="0" data-taxamount="0" data-discountamount="0" data-sum_product_weight="0" data-sum_baseprice="0" data-sum_basepricewithtax="0" data-sum_taxamount="0" data-sum_discountamount="0" data-sum_pricewithouttax="0" data-sum_salesprice="0" data-min_order_level="0" data-max_order_level="0" data-product_box="0" data-group_id="1" data-def_group_qty="0" class="catproduct_product_datas">');
//form[name='catproduct_form'] .cell_quantity input")
changeQuantity(node.closest('.row_article').find('.cell_quantity input'));
}
}
};

var taOptsSkuHash = {
input: '.js-typeahead-product_sku',
minLength: 2,
maxItem: false,
dynamic: true,
highlight: true,
hint: true,
group: true,
cache: false,
compression: true,
cancelButton: true,
debug: true,
emptyTemplate: "No results found for <b>{{query}}</b>",
template: function () {
return '<span class="ui blue small label">{{display}}</span>';
},
source: {
product: {
template: function (query, item) {
var color = "green";
var stock_status = "checkmark";
if (item.available_stock <= 0) {
color = "red";
stock_status = "warning";
}
return '<span class="skurow" style="color: ' + color + ';">' +
'<span class="sku">{{display}} </span>' +
'<span class="title">{{product_name}} </span>' +
'<i class="icon-' + stock_status + '" style="color: ' + color + ';"></i>' +
'</span>';

},
ajax: {
type: "GET",
path: "product",
url: "<?php echo JUri::base(true);?>/autocomplete_typeahead.php?",
data: {
q: "{{query}}",
i: true,
u: true,
c: true,
s: "sku"
},
dataType: "json",
}
}
},
callback: {
onShowLayout: function (node, query) {
node.attr('placeholder', 'search product sku ...');
node.closest('form').find('.typeahead__list').css('max-height', $(window).height() - 200 + "px");
},
onHideLayout: function (node, query) {
node.attr('placeholder', 'Search');
},
onResult: function (node, query, result, resultCount) {
if (query === "") return;

var text = "";
if (result.length > 0 && result.length < resultCount) {
text = "Showing <strong>" + result.length + "</strong> of <strong>" + resultCount + '</strong> elements matching "' + query + '"';
} else if (result.length > 0) {
text = 'Showing <strong>' + result.length + '</strong> elements matching "' + query + '"';
} else {
text = 'No results matching "' + query + '"';
}
$('#result-container').html(text);

},
onLayoutBuiltBefore: function (node, query, result, resultHtmlList) {
resultHtmlList.find('li[data-search-group="product"]').remove();
return resultHtmlList;
},
onClickAfter: function (node, a, item, event) {

node.closest('.row_article').find('.cell_name .js-typeahead-product_name').val(item.product_name).text(item.product_name);

var replaceImage = '';
if (typeof item.file_url === "undefined"){
replaceImage = '' +
'<img src="/images/70x70.png" alt="" class="product-image" style="min-height: 70px;">' + ' ';
} else {
replaceImage = '<a title="' + item.display + '" rel="catproduct_images_0" href="' + item.product_url + '">' +
'<img src="' + item.file_url + '" alt="' + item.display + '" class="product-image">' + '</a> ';
}
node.closest('.row_article').find('.cell_image').html(replaceImage);
node.closest('.row_article').find('.cell_priceWithoutTax span.PricepriceWithoutTax').text(item.baseprice);
node.closest('.row_article').find('.cell_salesPrice span.PricesalesPrice').text(item.basepricewithtax);

node.closest('.row_article').find('input.catproduct_product_datas').replaceWith(item.product_datas);

if (item.available_stock <= 0) {
node.closest('.row_article').find('.cell_quantity a.notify').replaceWith('<a href="' + item.product_url + '/notify" class="btn btn-notify btn-info btn-md" title="Notify Me" target="_top" rel="no-follow">Notify Me</a>');

node.closest('.row_article').find('.cell_quantity div.quantities').addClass( "hide" );
} else {
node.closest('.row_article').find('.cell_quantity div.quantities').removeClass( "hide" );
node.closest('.row_article').find('.cell_quantity a.btn-notify').addClass( "hide" );
}
},
onCancel: function (node, item, event) {
var replaceImage = '<a title="" rel="catproduct_images_0" href="/">' +
'<img src="/" alt="" class="product-image" style="min-height: 70px;">' + '</a> ';
node.closest('.row_article').find('.cell_image').html(replaceImage);
node.closest('.row_article').find('.cell_name .js-typeahead-product_name').val('').text('');
node.closest('.row_article').find('.cell_priceWithoutTax span.PricepriceWithoutTax').text('0.00');
node.closest('.row_article').find('.cell_salesPrice span.PricesalesPrice').text('0.00');
node.closest('.row_article').find('.cell_quantity input').val('0').text('0');
node.closest('.row_article').find('input.catproduct_product_datas').replaceWith('<input type="hidden" data-product_id="0" data-product_name="" data-product_weight="0.0000" data-product_weight_uom="KG" data-product_length="0.0000" data-product_width="0.0000" data-product_height="0.0000" data-product_lwh_uom="M" data-product_in_stock="0" data-baseprice="0" data-basepricewithtax="0" data-pricewithouttax="0" data-salesprice="0" data-taxamount="0" data-discountamount="0" data-sum_product_weight="0" data-sum_baseprice="0" data-sum_basepricewithtax="0" data-sum_taxamount="0" data-sum_discountamount="0" data-sum_pricewithouttax="0" data-sum_salesprice="0" data-min_order_level="0" data-max_order_level="0" data-product_box="0" data-group_id="1" data-def_group_qty="0" class="catproduct_product_datas">');
changeQuantity(node.closest('.row_article').find('.cell_quantity input'));
}
}
};

initTypeAhead('.js-typeahead-product_name', taOptsHash);
initTypeAhead('.js-typeahead-product_sku', taOptsSkuHash);

var counter = 0;

$("#addrow").on("click", function () {
for (var i = 1; i <= 5; i++) {
var newRow = $('<tr class="row_article" id="row_article' + counter + '">');
var cols = '';

cols += '<td class="cell_image"></td>';
cols += '<td class="cell_sku" data-title="Product SKU">' +
'<div class="typeahead__container">' +
' <div class="typeahead__field">' +
' <div class="typeahead__query">' +
' <input class="js-typeahead-product_sku form-control" id="product_sku' + counter + '" name="keyword" type="search" placeholder="Search product sku" autocomplete="off">' +
' </div>' +
' <div class="typeahead__button hide">' +
' <button type="submit">' +
' <i class="typeahead__search-icon fa fa-smart-search"></i>' +
' </button>' +
' </div>' +
' </div>' +
'</div>' +
'</td>';
cols += '<td class="cell_name" data-title="Product Name">' +
'<div class="typeahead__container">' +
' <div class="typeahead__field">' +
' <div class="typeahead__query">' +
' <input class="js-typeahead-product_name form-control" id="product_name' + counter + '" name="keyword" type="search" placeholder="Search product name" autocomplete="off">' +
' </div>' +
' <div class="typeahead__button hide">' +
' <button type="submit">' +
' <i class="typeahead__search-icon fa fa-smart-search"></i>' +
' </button>' +
' </div>' +
' </div>' +
'</div>' +
'</td>';
cols += '<td class="cell_priceWithoutTax" data-title="Price" data-type="currency">' +
' <div class="priceWithoutTax_text">' +
' <div class="PricepriceWithoutTax vm-display vm-price-value">' +
' <span class="vm-price-desc"></span>' +
' <span class="PricepriceWithoutTax">£ 0.00</span>' +
' </div>' +
' </div>' +
'</td>';
cols += '<td class="cell_salesPrice" data-title="Price with VAT" data-type="currency">' +
' <div class="salesPrice_text">'+
' <div class="PricesalesPrice vm-display vm-price-value">'+
' <span class="vm-price-desc"></span>'+
' <span class="PricesalesPrice">£ 0.00</span>'+
' </div>'+
' </div>'+
'</td>';
cols += '<td class="cell_quantity clearfix is-list" data-title="Quantity">'+
' <div class="quantities">'+
' <span class="quantity-box-cont quantity-box"><input class="quantity-input" size="2" name="quantity[]" value="0" type="text"></span>'+
' <span class="quantity-controls-cont quantity-controls">'+
' <button type="button" class="quantity-controls quantity-plus"><i class="icon-arrow-up"></i></button>'+
' <button type="button" class="quantity-controls quantity-minus"><i class="icon-arrow-down"></i></button>'+
' </span>'+
' </div>'+
' <a class="notify hide"/>'+
'</td>';
cols += '<td class="cell_sum_taxAmount" data-title="Tax" data-type="currency"><span>£ 0.00</span></td>';
cols += '<td class="cell_sum_priceWithoutTax" data-title="Price" data-type="currency"><span>£ 0.00</span></td>';
cols += '<td class="cell_sum_salesPrice" data-title="Price with VAT" data-type="currency"><span>£ 0.00</span></td>';
cols += '<input type="hidden" data-product_id="0" data-product_name="" data-product_weight="0.0000" data-product_weight_uom="KG" data-product_length="0.0000" data-product_width="0.0000" data-product_height="0.0000" data-product_lwh_uom="M" data-product_in_stock="0" data-baseprice="0" data-basepricewithtax="0" data-pricewithouttax="0" data-salesprice="0" data-taxamount="0" data-discountamount="0" data-sum_product_weight="0" data-sum_baseprice="0" data-sum_basepricewithtax="0" data-sum_taxamount="0" data-sum_discountamount="0" data-sum_pricewithouttax="0" data-sum_salesprice="0" data-min_order_level="0" data-max_order_level="0" data-product_box="0" data-group_id="1" data-def_group_qty="0" class="catproduct_product_datas">';

// data-toggle="modal" data-target="#confirm-delete"
cols += '<td><input type="button" class="ibtnDel btn btn-md btn-danger " value="Delete"></td>';
newRow.append(cols);
$('table.catproducttable').append(newRow);
//$('#product_name' + counter).val('').trigger('input.typeahead')
//$('#product_name' + counter).typeahead();
initTypeAhead('#product_name' + counter, taOptsHash);
initTypeAhead('#product_sku' + counter, taOptsSkuHash);

// handle users pressing enter key
$("form[name='catproduct_form'] #row_article" + counter + " input").keydown(function (e) {
if (e.keyCode == 13) {
var inputs = $(this).parents("form").eq(0).find(":input");
if (inputs[inputs.index(this) + 1] != null) {
inputs[inputs.index(this) + 1].focus();
}
e.preventDefault();
return false;
}
});

// what about updating the controls
$("form[name='catproduct_form'] #row_article" + counter + " .cell_quantity input").click( function() {
changeQuantity(this);
});
$("form[name='catproduct_form'] #row_article" + counter + " .cell_quantity button").click( function() {
changeQuantity(this);
});
$("form[name='catproduct_form'] #row_article" + counter + " .cell_quantity input").change( function() {
changeQuantity(this);
});
$("form[name='catproduct_form'] #row_article" + counter + " .cell_addToCart .addtocart-button").click( function() {
handleToCart_VM3(this);
return false;
});
$("form[name='catproduct_form'] #row_article" + counter + " .cell_addToCartEach .addtocart-button").click( function() {
handleToCartOne_VM3(this);
return false;
});
$("#row_article" + counter + " .cell_customfields :input").click(function () {
row = $(this).parents(".row_article").find("[name='quantity[]']");
getPrice(row);
});

counter++;
}
});

// delete row waz yer
$('table.catproducttable').on('click', '.ibtnDel', function (event) {
tr = $(this).closest('tr');
p_data = tr.find(".catproduct_product_datas").data();
productname = p_data.product_name;
if (parseInt(p_data.product_name.length) > 0) {
$('#confirm-delete .bootmodal-body p').replaceWith('<p>Are you sure you want to delete ' + productname + ' ?</p>');
} else {
$('#confirm-delete .bootmodal-body p').replaceWith('<p>Are you sure you want to delete this line?</p>');
}
$('#confirm-delete').modal('show').one('click', '.delete-line', function(e) {
tr.remove();
//counter -= 1;
$('#confirm-delete').modal('hide');
});
});


});
</script>

<div class="alert alert-info alert-dismissible">
<a href="#" class="close" data-dismiss="alert">&times;</a>
<p><i class="fa fa-info-circle info"></i>
Welcome to our Online order form. </p>
<p>
<ul>
<li>Search for products using Product Name or Products SKU. Once you've selected your product change the product quantity to the amount you want to order</li>
<li>In Stock products will be highlighted in <span class="green bold">green</span>, out of stock products will be highlighted in <span class="red bold">red</span></li>
<li>If you want to add more lines to your order click the 'Add row' button.</li>
<li>When you are ready to add all your order lines to the cart, click 'Add to Cart'.</li>
</ul>
</p>
</div>
<form ax:nowrap="1" action="index.php" method="post" name="catproduct_form" class="catproduct_form" onsubmit="event.preventDefault();">
<input type="hidden" class="catproduct_main_data" data-currency_symbol="£" data-currency_decimal_place="2" data-currency_decimal_symbol="." data-currency_thousands="" data-add_parent_from_original="0" data-product_weight_uom_parent="KG">
<table style="width:100%;" class="catproducttable">
<caption>Order form</caption>
<thead>
<tr>
<th class="cell_image col-sm-1" scope="col">Product Image</th>
<th class="cell_sku col-sm-1" scope="col">Product SKU</th>
<th class="cell_name col-sm-3" scope="col">Product Name</th>
<th class="cell_priceWithoutTax col-sm-1" scope="col" data-type="currency">Price</th>
<th class="cell_salesPrice col-sm-1" scope="col" data-type="currency">Price with VAT</th>
<th class="cell_quantity col-sm-1" scope="col">Quantity</th>
<th class="cell_sum_taxAmount col-sm-1" scope="col" data-type="currency">Tax</th>
<th class="cell_sum_priceWithoutTax col-sm-1" scope="col" data-type="currency">Price</th>
<th class="cell_sum_salesPrice col-sm-1" scope="col" data-type="currency">Price with VAT</th>
<th class="cell_action col-sm-1" scope="col"></th>
</tr>
</thead>
<tbody>
<tr class="row_article">
<td class="cell_image">
<a title="" rel="catproduct_images_0">
<img src="/images/70x70.png" alt="" class="product-image">
</a>
</td>
<td class="cell_sku" data-title="Product SKU">
<div class="typeahead__container">
<div class="typeahead__field">
<div class="typeahead__query">
<input class="js-typeahead-product_sku form-control product_sku_<?php echo $numberincrease; ?>" name="keyword" type="search" placeholder="Search product sku" autocomplete="off">
</div>
<div class="typeahead__button hide">
<button type="submit">
<i class="typeahead__search-icon fa fa-smart-search"></i>
</button>
</div>
</div>
</div>
</td>
<td class="cell_name" data-title="Product Name">
<div class="typeahead__container">
<div class="typeahead__field">
<div class="typeahead__query">
<input class="js-typeahead-product_name form-control product_name_<?php echo $numberincrease; ?>" name="keyword" type="search" placeholder="Search product name" autocomplete="off">
</div>
<div class="typeahead__button hide">
<button type="submit">
<i class="typeahead__search-icon fa fa-smart-search"></i>
</button>
</div>
</div>
</div>
</td>
<td class="cell_priceWithoutTax" data-title="Price" data-type="currency">
<div class="priceWithoutTax_text">
<div class="PricepriceWithoutTax vm-display vm-price-value">
<span class="vm-price-desc"></span>
<span class="PricepriceWithoutTax">£ 0.00</span>
</div>
</div>
</td>
<td class="cell_salesPrice" data-title="Price with VAT" data-type="currency">
<div class="salesPrice_text">
<div class="PricesalesPrice vm-display vm-price-value">
<span class="vm-price-desc"></span>
<span class="PricesalesPrice">£ 0.00</span>
</div>
</div>
</td>
<td class="cell_quantity clearfix is-list" data-title="Quantity">
<div class="quantities">
<span class="quantity-box-cont quantity-box"><input class="quantity-input product_quantity_<?php echo $numberincrease; ?>" size="2" name="quantity[]" value="0" type="text"></span>
<span class="quantity-controls-cont quantity-controls">
<button type="button" class="quantity-controls quantity-plus"><i class="icon-arrow-up"></i></button>
<button type="button" class="quantity-controls quantity-minus"><i class="icon-arrow-down"></i></button>
</span>
</div>
<a class="notify hide"/>
</td>
<td class="cell_sum_taxAmount" data-title="Tax" data-type="currency">
<span>£ 0.00</span>
</td>
<td class="cell_sum_priceWithoutTax" data-title="Price" data-type="currency">
<span>£ 0.00</span>
</td>
<td class="cell_sum_salesPrice" data-title="Price with VAT" data-type="currency">
<span>£ 0.00</span>
</td>
<td></td>
<input type="hidden" data-product_id="0" data-product_name="" data-product_weight="0.0000" data-product_weight_uom="KG" data-product_length="0.0000" data-product_width="0.0000" data-product_height="0.0000" data-product_lwh_uom="M" data-product_in_stock="0" data-baseprice="0" data-basepricewithtax="0" data-pricewithouttax="0" data-salesprice="0" data-taxamount="0" data-discountamount="0" data-sum_product_weight="0" data-sum_baseprice="0" data-sum_basepricewithtax="0" data-sum_taxamount="0" data-sum_discountamount="0" data-sum_pricewithouttax="0" data-sum_salesprice="0" data-min_order_level="0" data-max_order_level="0" data-product_box="0" data-group_id="1" data-def_group_qty="0" class="catproduct_product_datas">
</tr>
<tr class="row_article">
<td class="cell_image">
<a title="" rel="catproduct_images_1">
<img src="/images/70x70.png" alt="" class="product-image">
</a>
</td>
<td class="cell_sku" data-title="Product SKU">
<div class="typeahead__container">
<div class="typeahead__field">
<div class="typeahead__query">
<input class="js-typeahead-product_sku form-control product_sku_<?php echo $numberincrease++; ?>" name="keyword" type="search" placeholder="Search product sku" autocomplete="off">
</div>
<div class="typeahead__button hide">
<button type="submit">
<i class="typeahead__search-icon fa fa-smart-search"></i>
</button>
</div>
</div>
</div>
</td>
<td class="cell_name" data-title="Product Name">
<div class="typeahead__container">
<div class="typeahead__field">
<div class="typeahead__query">
<input class="js-typeahead-product_name form-control" name="keyword" type="search" placeholder="Search product name" autocomplete="off">
</div>
<div class="typeahead__button hide">
<button type="submit">
<i class="typeahead__search-icon fa fa-smart-search"></i>
</button>
</div>
</div>
</div>
</td>
<td class="cell_priceWithoutTax" data-title="Price" data-type="currency">
<div class="priceWithoutTax_text">
<div class="PricepriceWithoutTax vm-display vm-price-value">
<span class="vm-price-desc"></span><span class="PricepriceWithoutTax">£ 0.00</span>
</div>
</div>
</td>
<td class="cell_salesPrice" data-title="Price with VAT" data-type="currency">
<div class="salesPrice_text">
<div class="PricesalesPrice vm-display vm-price-value">
<span class="vm-price-desc"></span><span class="PricesalesPrice">£ 0.00</span>
</div>
</div>
</td>
<td class="cell_quantity clearfix is-list" data-title="Quantity">
<div class="quantities">
<span class="quantity-box-cont quantity-box"><input class="quantity-input" size="2" name="quantity[]" value="0" type="text"></span>
<span class="quantity-controls-cont quantity-controls">
<button type="button" class="quantity-controls quantity-plus"><i class="icon-arrow-up"></i></button>
<button type="button" class="quantity-controls quantity-minus"><i class="icon-arrow-down"></i></button>
</span>
</div>
<a class="notify hide"/>
</td>
<td class="cell_sum_taxAmount" data-title="Tax" data-type="currency"><span>£ 0.00</span></td>
<td class="cell_sum_priceWithoutTax" data-title="Price" data-type="currency"><span>£ 0.00</span></td>
<td class="cell_sum_salesPrice" data-title="Price with VAT" data-type="currency"><span>£ 0.00</span></td>
<td></td>
<input type="hidden" data-product_id="0" data-product_name="" data-product_weight="0.0000" data-product_weight_uom="KG" data-product_length="0.0000" data-product_width="0.0000" data-product_height="0.0000" data-product_lwh_uom="M" data-product_in_stock="0" data-baseprice="0" data-basepricewithtax="0" data-pricewithouttax="0" data-salesprice="0" data-taxamount="0" data-discountamount="0" data-sum_product_weight="0" data-sum_baseprice="0" data-sum_basepricewithtax="0" data-sum_taxamount="0" data-sum_discountamount="0" data-sum_pricewithouttax="0" data-sum_salesprice="0" data-min_order_level="0" data-max_order_level="0" data-product_box="0" data-group_id="1" data-def_group_qty="0" class="catproduct_product_datas">
</tr>
<tr class="row_article">
<td class="cell_image">
<a title="" rel="catproduct_images_2">
<img src="/images/70x70.png" alt="" class="product-image">
</a>
</td>
<td class="cell_sku" data-title="Product SKU">
<div class="typeahead__container">
<div class="typeahead__field">
<div class="typeahead__query">
<input class="js-typeahead-product_sku form-control" name="keyword" type="search" placeholder="Search product sku" autocomplete="off">
</div>
<div class="typeahead__button hide">
<button type="submit">
<i class="typeahead__search-icon fa fa-smart-search"></i>
</button>
</div>
</div>
</div>
</td>
<td class="cell_name" data-title="Product Name">
<div class="typeahead__container">
<div class="typeahead__field">
<div class="typeahead__query">
<input class="js-typeahead-product_name form-control" name="keyword" type="search" placeholder="Search product name" autocomplete="off">
</div>
<div class="typeahead__button hide">
<button type="submit">
<i class="typeahead__search-icon fa fa-smart-search"></i>
</button>
</div>
</div>
</div>
</td>
<td class="cell_priceWithoutTax" data-title="Price" data-type="currency">
<div class="priceWithoutTax_text">
<div class="PricepriceWithoutTax vm-display vm-price-value">
<span class="vm-price-desc"></span><span class="PricepriceWithoutTax">£ 0.00</span>
</div>
</div>
</td>
<td class="cell_salesPrice" data-title="Price with VAT" data-type="currency">
<div class="salesPrice_text">
<div class="PricesalesPrice vm-display vm-price-value">
<span class="vm-price-desc"></span><span class="PricesalesPrice">£ 0.00</span>
</div>
</div>
</td>
<td class="cell_quantity clearfix is-list" data-title="Quantity">
<div class="quantities">
<span class="quantity-box-cont quantity-box"><input class="quantity-input" size="2" name="quantity[]" value="0" type="text"></span>
<span class="quantity-controls-cont quantity-controls">
<button type="button" class="quantity-controls quantity-plus"><i class="icon-arrow-up"></i></button>
<button type="button" class="quantity-controls quantity-minus"><i class="icon-arrow-down"></i></button>
</span>
</div>
<a class="notify hide"/>
</td>
<td class="cell_sum_taxAmount" data-title="Tax" data-type="currency"><span>£ 0.00</span></td>
<td class="cell_sum_priceWithoutTax" data-title="Price" data-type="currency"><span>£ 0.00</span></td>
<td class="cell_sum_salesPrice" data-title="Price with VAT" data-type="currency"><span>£ 0.00</span></td>
<td></td>
<input type="hidden" data-product_id="0" data-product_name="" data-product_weight="0.0000" data-product_weight_uom="KG" data-product_length="0.0000" data-product_width="0.0000" data-product_height="0.0000" data-product_lwh_uom="M" data-product_in_stock="0" data-baseprice="0" data-basepricewithtax="0" data-pricewithouttax="0" data-salesprice="0" data-taxamount="0" data-discountamount="0" data-sum_product_weight="0" data-sum_baseprice="0" data-sum_basepricewithtax="0" data-sum_taxamount="0" data-sum_discountamount="0" data-sum_pricewithouttax="0" data-sum_salesprice="0" data-min_order_level="0" data-max_order_level="0" data-product_box="0" data-group_id="1" data-def_group_qty="0" class="catproduct_product_datas">
</tr>
<tr class="row_article">
<td class="cell_image">
<a title="" rel="catproduct_images_3">
<img src="/images/70x70.png" alt="" class="product-image">
</a>
</td>
<td class="cell_sku" data-title="Product SKU">
<div class="typeahead__container">
<div class="typeahead__field">
<div class="typeahead__query">
<input class="js-typeahead-product_sku form-control" name="keyword" type="search" placeholder="Search product sku" autocomplete="off">
</div>
<div class="typeahead__button hide">
<button type="submit">
<i class="typeahead__search-icon fa fa-smart-search"></i>
</button>
</div>
</div>
</div>
</td>
<td class="cell_name" data-title="Product Name">
<div class="typeahead__container">
<div class="typeahead__field">
<div class="typeahead__query">
<input class="js-typeahead-product_name form-control" name="keyword" type="search" placeholder="Search product name" autocomplete="off">
</div>
<div class="typeahead__button hide">
<button type="submit">
<i class="typeahead__search-icon fa fa-smart-search"></i>
</button>
</div>
</div>
</div>
</td>
<td class="cell_priceWithoutTax" data-title="Price" data-type="currency">
<div class="priceWithoutTax_text">
<div class="PricepriceWithoutTax vm-display vm-price-value">
<span class="vm-price-desc"></span>
<span class="PricepriceWithoutTax">£ 0.00</span>
</div>
</div>
</td>
<td class="cell_salesPrice" data-title="Price with VAT" data-type="currency">
<div class="salesPrice_text">
<div class="PricesalesPrice vm-display vm-price-value">
<span class="vm-price-desc"></span>
<span class="PricesalesPrice">£ 0.00</span>
</div>
</div>
</td>
<td class="cell_quantity clearfix is-list" data-title="Quantity">
<div class="quantities">
<span class="quantity-box-cont quantity-box"><input class="quantity-input" size="2" name="quantity[]" value="0" type="text"></span>
<span class="quantity-controls-cont quantity-controls">
<button type="button" class="quantity-controls quantity-plus"><i class="icon-arrow-up"></i></button>
<button type="button" class="quantity-controls quantity-minus"><i class="icon-arrow-down"></i></button>
</span>
</div>
<a class="notify hide"/>
</td>
<td class="cell_sum_taxAmount" data-title="Tax" data-type="currency">
<span>£ 0.00</span>
</td>
<td class="cell_sum_priceWithoutTax" data-title="Price" data-type="currency">
<span>£ 0.00</span>
</td>
<td class="cell_sum_salesPrice" data-title="Price with VAT" data-type="currency">
<span>£ 0.00</span>
</td>
<td></td>
<input type="hidden" data-product_id="0" data-product_name="" data-product_weight="0.0000" data-product_weight_uom="KG" data-product_length="0.0000" data-product_width="0.0000" data-product_height="0.0000" data-product_lwh_uom="M" data-product_in_stock="0" data-baseprice="0" data-basepricewithtax="0" data-pricewithouttax="0" data-salesprice="0" data-taxamount="0" data-discountamount="0" data-sum_product_weight="0" data-sum_baseprice="0" data-sum_basepricewithtax="0" data-sum_taxamount="0" data-sum_discountamount="0" data-sum_pricewithouttax="0" data-sum_salesprice="0" data-min_order_level="0" data-max_order_level="0" data-product_box="0" data-group_id="1" data-def_group_qty="0" class="catproduct_product_datas">
</tr>
<tr class="row_article">
<td class="cell_image">
<a title="" rel="catproduct_images_4">
<img src="/images/70x70.png" alt="" class="product-image">
</a>
</td>
<td class="cell_sku" data-title="Product SKU">
<div class="typeahead__container">
<div class="typeahead__field">
<div class="typeahead__query">
<input class="js-typeahead-product_sku form-control" name="keyword" type="search" placeholder="Search product sku" autocomplete="off">
</div>
<div class="typeahead__button hide">
<button type="submit">
<i class="typeahead__search-icon fa fa-smart-search"></i>
</button>
</div>
</div>
</div>
</td>
<td class="cell_name" data-title="Product Name">
<div class="typeahead__container">
<div class="typeahead__field">
<div class="typeahead__query">
<input class="js-typeahead-product_name form-control" name="keyword" type="search" placeholder="Search product name" autocomplete="off">
</div>
<div class="typeahead__button hide">
<button type="submit">
<i class="typeahead__search-icon fa fa-smart-search"></i>
</button>
</div>
</div>
</div>
</td>
<td class="cell_priceWithoutTax" data-title="Price" data-type="currency">
<div class="priceWithoutTax_text">
<div class="PricepriceWithoutTax vm-display vm-price-value">
<span class="vm-price-desc"></span>
<span class="PricepriceWithoutTax">£ 0.00</span>
</div>
</div>
</td>
<td class="cell_salesPrice" data-title="Price with VAT" data-type="currency">
<div class="salesPrice_text">
<div class="PricesalesPrice vm-display vm-price-value">
<span class="vm-price-desc"></span>
<span class="PricesalesPrice">£ 0.00</span>
</div>
</div>
</td>
<td class="cell_quantity clearfix is-list" data-title="Quantity">
<div class="quantities">
<span class="quantity-box-cont quantity-box"><input class="quantity-input" size="2" name="quantity[]" value="0" type="text"></span>
<span class="quantity-controls-cont quantity-controls">
<button type="button" class="quantity-controls quantity-plus"><i class="icon-arrow-up"></i></button>
<button type="button" class="quantity-controls quantity-minus"><i class="icon-arrow-down"></i></button>
</span>
</div>
<a class="notify hide"/>
</td>
<td class="cell_sum_taxAmount" data-title="Tax" data-type="currency">
<span>£ 0.00</span>
</td>
<td class="cell_sum_priceWithoutTax" data-title="Price" data-type="currency">
<span>£ 0.00</span>
</td>
<td class="cell_sum_salesPrice" data-title="Price with VAT" data-type="currency">
<span>£ 0.00</span>
</td>
<td></td>
<input type="hidden" data-product_id="0" data-product_name="" data-product_weight="0.0000" data-product_weight_uom="KG" data-product_length="0.0000" data-product_width="0.0000" data-product_height="0.0000" data-product_lwh_uom="M" data-product_in_stock="0" data-baseprice="0" data-basepricewithtax="0" data-pricewithouttax="0" data-salesprice="0" data-taxamount="0" data-discountamount="0" data-sum_product_weight="0" data-sum_baseprice="0" data-sum_basepricewithtax="0" data-sum_taxamount="0" data-sum_discountamount="0" data-sum_pricewithouttax="0" data-sum_salesprice="0" data-min_order_level="0" data-max_order_level="0" data-product_box="0" data-group_id="1" data-def_group_qty="0" class="catproduct_product_datas">
</tr>
</tbody>
<tfoot>
<tr style="padding:15px;">
<td colspan="10" style="text-align: left;">
<input type="button" class="btn btn-lg btn-block " id="addrow" value="Add Rows" />
</td>
</tr>
<tr class="row_total row_total_taxAmount">
<td colspan="9">VAT</td>
<td class="total_taxAmount" data-title="VAT">
<span>£ 0.00</span>
</td>
</tr>
<tr class="row_total row_total_priceWithoutTax">
<td colspan="9">Total price :</td>
<td class="total_priceWithoutTax" data-title="Total price :">
<span>£ 0.00</span>
</td>
</tr>
<tr class="row_total row_total_salesPrice">
<td colspan="9">Total price with VAT :</td>
<td class="total_salesPrice" data-title="Total price with VAT :">
<span>£ 0.00</span>
</td>
</tr>
<tr class="row_addtocart">
<td colspan="10" class="cell_addToCart" align="right">
<span class="addtocart-button" style="float:right;">
<input type="submit" name="addtocart" class="btn btn-invert btn-addtocart btn-lg addtocart-button" value="Add to Cart" title="Add to Cart">
</span>
</td>
</tr>
<tr class="row_gotocart">
<td colspan="10" class="cell_addToCart" align="right">
<span class="gotocart-button" style="float:right;">
<div class="show_cart">
<a style="float:right;" href="/my-cart" rel="nofollow">Show Cart</a>
</div>
</span>
</td>
</tr>
</tfoot>
</table>
<input name="option" value="com_virtuemart" type="hidden">
<input name="view" value="cart" type="hidden">
<input name="task" value="addJS" type="hidden">
<input name="format" value="json" type="hidden">
</form>
<div class="bootmodal fade" id="quick-add-to-cart" tabindex="-1" role="dialog" aria-labelledby="cartLabel" aria-hidden="true" style="z-index:9000;">
<div class="bootmodal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
<div class="bootmodal-dialog-title" id="cartLabel"><span class="product-added-title">Product successfully added</span></div>
</div>
<div class="bootmodal-body">
<p></p>
</div>
<div class="bootmodal-footer">
<button class="btn btn-base" data-dismiss="modal" aria-hidden="true">Close</button>
</div>
</div>
<div class="bootmodal fade" id="confirm-delete" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true" style="z-index:9000;">
<div class="bootmodal-dialog">
<div class="bootmodal-content">
<div class="bootmodal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
<div class="bootmodal-dialog-title" id="cartLabel"><span class="product-added-title">Confirm Delete</span></div>
</div>
<div class="bootmodal-body">
<p>Are you sure you want to delete this line?</p>
</div>
<div class="bootmodal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
<a class="btn btn-danger btn-ok delete-line">Delete</a>
</div>
</div>
</div>
</div>
<div class="bootmodal fade" id="confirm-submit" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true" style="z-index:9000;">
<div class="bootmodal-dialog">
<div class="bootmodal-content">
<div class="bootmodal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
<div class="bootmodal-dialog-title" id="cartLabel"><span class="product-added-title">Confirm Add to Cart</span></div>
</div>
<div class="bootmodal-body">
<p>Are you sure you want to add to cart?</p>
</div>
<div class="bootmodal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">No</button>
<a id="submit-confirmed" class="btn btn-success btn-ok add-to-cart">Yes</a>
</div>
</div>
</div>
{/source}