Home Forums WoodMart support forum Affiliate/external product button not working correctly on Sticky add to cart

Affiliate/external product button not working correctly on Sticky add to cart

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #591708

    ewvanginkel
    Participant

    For reviews I use affiliate/external products. And I also use the ‘Sticky add to cart’ footer element.
    However, when I click on the link, it hoovers to the Product button on top of the page instead of following the external link.

    I can’t find the cause in the source code, because the button is a link.

    I switched the ‘AJAX Add to cart’ option off, but that doesn’t make a difference.

    What causes the issue and how can I solve it? Thanks in advance!

    #591748

    Hello,

    Sorry to hear about the inconvenience. Kindly, please share your Site WP-ADMIN Login details in the Private Content field so that we can check this concern on your Site and help you out accordingly.

    Best Regards

    #591859

    ewvanginkel
    Participant

    Thanks, check private content

    #592070

    Hello,

    Please try to add this code to the child theme in the functions.php file.

    add_action(
    	'wp_enqueue_scripts',
    	function() {
    		ob_start();
    		?>
    		jQuery(document).ready(function() {
    			if ( jQuery('.single-product-page').hasClass('product-type-external') ) {
    				jQuery('.wd-sticky-add-to-cart').off('click');
    			}
    		});
    		<?
    		$script = ob_get_clean();
    
    		wp_add_inline_script( 'wd-sticky-add-to-cart', $script );
    	},
    	30
    );

    Best Regards.

    #592119

    ewvanginkel
    Participant

    That works, thank you very much!!

    #592208

    Most Welcome!!!.

    I’m so happy to hear you are pleased with the Theme and Support. XTEMOS strives to deliver the best customer experience, and it makes our day to hear we have accomplished that.

    We count ourselves lucky to have you as a customer. You can always reach us at any time. We are always here to help you.

    Thanks for contacting us.
    Have a great day.

    Topic Closed.
    Best Regards.

Viewing 6 posts - 1 through 6 (of 6 total)

The topic ‘Affiliate/external product button not working correctly on Sticky add to cart’ is closed to new replies.