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>
Learn how to build powerful custom workflows in Shopify Flow with expert guidance from ...
By Jacqui May 7, 2025Did You Know? May is named after Maia, the Roman goddess of growth and flourishing! ...
By JasonH May 2, 2025Discover opportunities to improve SEO with new guidance available from Shopify’s growth...
By Jacqui May 1, 2025