All things Shopify and commerce
We have a developer attempting to add a configuration tool to our site. The tool uses javascript and the developer has created a landing page containing the code, however it will not load if you click "view page" on desktop, it does load on mobile.
here is a link to the page
https://blueovalindustries.com/pages/lloyd-mats-velourtex
This is all I see on the backend
any help is appreciated!
Here is the code:
<script src="//ctiapi.com/js/angular-app/widget/cti-widget.js"></script> <script type="text/javascript">
// <![CDATA[
(function() {
var options = {
apiKey:"lxY48CZyDQ5DstudOAhfOH7Xl3NGc0lk",
brandCode:"CLRB",
productLineCode:"VT",
container:"appContainer",
postBackUrl:"/cart/add",
};
Configurator.init(options);
})();
// ]]>
</script>
<div id="appContainer">
<div align="center" id="showLoader" class="clearfix mar-t20 text-center"><img alt="Loading..." src="//ctiapi.com/images/ajax-loader.gif"></div>
</div>
<script type="text/javascript">
// <![CDATA[
var items = [];
var addItem = function(item,callback) {
var params = {
type: 'POST',
url: '/cart/add.js',
data: jQuery.param(item),
dataType: 'json',
success: function() {
if ((typeof callback) === 'function') {
callback();
}
},
error: function(XMLHttpRequest, textStatus) {
Shopify.onError(XMLHttpRequest, textStatus);
}
};
jQuery.ajax(params);
};
var processQ = function() {
if (items.length) {
var request = items.shift();
addItem(request,processQ);
} else {
document.location.href = '/cart';
}
};
var myContainer = document.getElementById("appContainer");
myContainer.addEventListener('addToCartCompleted',
function (event) {
var form = jQuery("#postBackForm");
jQuery("#postBackForm input[name^='id']").each(function(i) {
items[i] = {id:jQuery(this).val(),quantity:1,properties:{}};
});
jQuery("#postBackForm input[name^='Desc']").each(function(i) {
items[i]['properties']['Description'] = jQuery(this).val();
});
jQuery("#postBackForm input[name^='Lloyd']").each(function(i) {
items[i]['properties']['Lloyd_Code'] = jQuery(this).val();
});
processQ();
}, false
);
// ]]>
</script>
User | RANK |
---|---|
45 | |
44 | |
42 | |
28 | |
21 |
On our Shopify Expert Marketplace, you can find many trusted third party developers and fr...
By Arno Nov 27, 2023You've downloaded the Search & Discovery app from the Shopify App store, and as you're ...
By Skye Nov 8, 2023The year-end shopping season is just around the corner. Is a flash sale on your radar? Are...
By Jasonh Nov 6, 2023