There is a bunch of Wordpress + WooCommerce. The purchase plugin is installed in 1 click, which opens a pop-up window.
There is also a slider (slick slider) connected "externally" from WordPress and the "Similar products" are spinning in the slider. The problem is that when you click the buy button in 1 click, the slider container is taken as the base and the form goes out of sight if it is not the 6th the product Has anyone come across such a question.
You can see it here. The "Order" button in the block similar products

    1 answer 1

    To get started, fix the broken markup.

    <div class="price-wrap"> <span class="price"><span class="amount">900&nbsp;<span class=rur >&#x440;<span>&#x443;&#x431;.</span></span></span></span> </a> 

    Replace it with:

     <div class="price-wrap"> <span class="price"><span class="amount">900&nbsp;<span class="rur">&#x440;<span>&#x443;&#x431;.</span></span></span></span> </div> 

    Secondly, replace in this code
    (file /wp-content/plugins/buy-one-click-woocommerce/js/form.js ):

     jQuery(document).on('click', 'a.clickBuyButton', function (e) { e.preventDefault(); var zixnAjaxUrl = getAjaxUrl(); var butObj = this; var urlpost = window.location.href; var productid = jQuery(butObj).attr('data-productid'); //alert(productid); jQuery.ajax({ type: "POST", url: zixnAjaxUrl, async: false, data: { action: 'getViewForm', urlpost: urlpost, productid: productid }, success: function (response) { // console.log(response); jQuery('#formOrderOneClick').remove(); jQuery(butObj).after(response); jQuery('.popup, .overlay').css('opacity', '1'); jQuery('.popup, .overlay').css('visibility', 'visible'); } }); }); 

    var butObj = this; on var butObj = $('body');

    • Thanks for the decision! Only it turns out the plugin does not take the data of the selected product, but the product that is on the page. And about the markup, this is what Vukomers gives out. - Vladimir Andreev