Home New Guten Forums WoodMart support forum Shop page cart button issue again #215051

Shop page cart button issue again #215051

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #230421

    tcsg.toth
    Participant

    Hello,
    In my shop page there is 2 style of the cart button and its a bit annoying. Sometimes it has the text with “add to cart” and sometimes just icon.. How can I set it to be constant icon? Photos attached about 2 products which next to each other.

    Last time I got an answer for this:
    jQuery(‘.woodmart-hover-base’).each(function () {
    var $el = jQuery(this),
    $elBtn = $el.find(‘.woodmart-add-btn’);
    $el.addClass(‘add-small-content’);
    $elBtn.addClass(‘wd-action-btn wd-add-cart-btn wd-style-icon’);
    });

    But its just solve the issue for that lines which has next to sidebar, but the other lines still facing this issue.. What can I do? Because its not professional at all.

    Attachments:
    You must be logged in to view attached files.
    #230441

    Artem Temos
    Keymaster

    Hello,

    Try to replace the code with the following one instead

    function smallBtn(){
    	jQuery('.woodmart-hover-base').each(function () {
    		var $el = jQuery(this),
    				$elBtn = $el.find('.woodmart-add-btn');
    		$el.addClass('add-small-content');
    		$elBtn.addClass('wd-action-btn wd-add-cart-btn wd-style-icon');
    	});
    }
    smallBtn();
    jQuery(document).on('pjax:end', function () {
    	smallBtn();
    });

    Regards

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