Hey there, thanks for reply. I tried your method to unhook from product buttons but it is not helping it is removing the design now button totally. Please suggest me an another way. the module does not have inbuilt options for button placement it by default is attaching itself top existing buy boxes i have no clue how to fix this thing any help would be great. thanks
}
}
if( $('.add .add-to-cart').prop('disabled') )
$('.cp-get-canvas').attr('disabled',true);
var body = document.querySelector('#add-to-cart-or-refresh');
var observer = new MutationObserver(function(mutations) {
mutations.forEach(function(mutation) {
if( $('.add .add-to-cart').prop('disabled') )
$('.cp-get-canvas').attr('disabled',true);
else
$('.cp-get-canvas').attr('disabled',false);
if( !$('.cp-get-canvas')[0] )
$("<button class='cp-get-canvas btn btn-primary'>{l s='Design me' mod='cdesigner'}</button>").insertAfter('.product-add-to-cart .add-to-cart');
if( allow_comb == '1') {
var $combinations_product = $('#add-to-cart-or-refresh .product-variants').html();
if( $.trim( $combinations_product ) != '' ) {
$('.list-combination-data>div>form.clone-form-comb').html( $combinations_product );
}
else
$('.update-opt').hide();
}
});
});
observer.observe( body, { childList: true , attributes: true });
});
$(document).on('click','#btn-instagram',function(){
window.open("https://api.instagram.com/oauth/authorize?client_id={$client_id|escape:'htmlall':'UTF-8'};redirect_uri={$redirect_URI|escape:'htmlall':'UTF-8'};scope=basic;response_type=code", "myWindow","menubar=no, status=no, scrollbars=no, menubar=no, width=400, height=300");
return false;
});
$("<button class='cp-get-canvas btn btn-primary'>{l s='Design me' mod='cdesigner'}</button>").insertAfter('.product-add-to-cart .add-to-cart');
$('body').append('<div id="wrap-phone-pop">'+$('#wrap-phone-dup').html()+'</div>');
$('#wrap-phone-dup').remove();
$('.overlay,.btn-close-pl').bind('click',function(){
$('.overlay,#wrap-phone-pop').fadeOut('pretty', function() {
$('.overlay').remove();
});
$('body').removeClass('ovhidden');
$('.list-combination-data').hide();
return false;
});
window.fbAsyncInit = function() {
FB.init({
appId : "{$app_id|escape:'htmlall':'UTF-8'}",
cookie : true,
xfbml : true,
version : 'v3.2'
});
};