I'm trying to display the prices of my products inclusive of GST and have them update automatically when a modifier is changed. I've put the class .store_product_price_inc_tax
on a span that holds the price of the product, and it works just fine when products are first loaded into the page. But once more products are bought in using AJAX I'm getting the GST exclusive price.
What JS/Jquery code do I need to add to fire off a call to store.js to set .store_product_price_inc_tax
to the correct value when items are loaded in via AJAX?
UPDATED: with code example.
$( document ).ready( function(){
K.init();
$('#more-cards a').live('click', function(eve){
eve.preventDefault();
$(this).parent().addClass( "loading" );
$(this).children().replaceWith("<span>Fetching more goodness…</span>");
$.ajax({
url: "/store/fetch",
type: "GET",
dataType: "html",
cache: false,
success: function(data) {
displayMore(data);
}
});
});
});
K,init();
duplicates a single product multiple times by cloning the product form . Each clone has modifiers and a price associated to it.