- This topic has 1 reply, 2 voices, and was last updated 11 years, 9 months ago by .
Viewing 2 posts - 1 through 2 (of 2 total)
Viewing 2 posts - 1 through 2 (of 2 total)
- You must be logged in to reply to this topic.
Support site for Tips and Tricks HQ premium products
by
Tips and Tricks HQ Support Portal › Forums › WP eStore Forum › WP eStore Troubleshooting › estore seems to be preventing a small custom script from loading
Tagged: ajax conflict, JavaScript conflict, jquery conflict
i have a script to load an XML file, for some reason it is not loading the file when i enable estore cart.
setInterval(checkForSongUpdates, 10000);
var oldLastSongSeen = 0;
function checkForSongUpdates() {
$.ajax({
type: "GET",
url: "PATHTOFILE",
dataType: 'xml',
async: false,
success: function(data) {
var newLastSongSeen = $(data).find('air_time').text();
if (oldLastSongSeen != newLastSongSeen) {
$.ajaxSetup({ cache: false });
getNewLatestSong();
oldLastSongSeen = newLastSongSeen;
} else {
oldLastSongSeen = newLastSongSeen;
}
}
});
};
function getNewLatestSong() {
$(document).ready(function() {
$("#responsecontainer").load("PATHTOFILE");
$.ajaxSetup({ cache: false });
});
}
im not exactly sure what could be causing the issue, but i have narrowed it down to the function
wp_eStore_add_footer_code()
in wp_eStore1.php if i comment out the following my script will work but i am not sure of the issues this may cause.
eStore_load_t_and_c_jquery();
eStore_load_shipping_var_change_warning_jquery();
eStore_load_cart_qty_change_jquery();
thank you for any assistance or suggestions.
Sean
Hi Sean, eStore’ won’t prevent any JavaScript from loading. The javascript code in all of our plugins are error free. If there is an error in the other JavaScript code then it can conflict with the JS code from eStore and act weird. Please post a link to the page where you have above mentioned situation so I can go and view the page the source and give you more details.