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>
Dropshipping, a high-growth, $226 billion-dollar industry, remains a highly dynamic bus...
By JasonH Nov 27, 2024Hey Community! It’s time to share some appreciation and celebrate what we have accomplis...
By JasonH Nov 14, 2024In today’s interview, we sat down with @BSS-Commerce to discuss practical strategies f...
By JasonH Nov 13, 2024