Home Forums WoodMart support forum Relocate the wishlist button

Relocate the wishlist button

Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
    Posts
  • #232317

    precise
    Participant

    I want to change the location of the wish list button. I tried to explain what I wanted to do in the photo I added. I was only going to do this with css codes, but it also seems to require a tiny kernel file replacement, but I couldn’t find the wishlist core file and set it in which div it should be displayed.

    https://ibb.co/j4cC0bP

    #232367

    Hello,

    Please add this code to the Theme Settings > Custom CSS > Global:

    .product-image-summary .cart {
        float: left;
        margin-right: 30px;
    }
    
    .woodmart-wishlist-btn{
    margin-top:15px;
    }

    Best Regards

    #232381

    precise
    Participant

    I want the wishlist div to be right after the add to cart button. The reason I want to do this is to be able to get more images on all devices with a cleaner css code.

    There is a screenshot link in the private content section.

    #232517

    Hello,

    You need to change the design on hover in the Theme Settings > Shop page > Product Styles.

    Best Regards

    #232734

    precise
    Participant

    I don’t want a change like that. I am satisfied with the style of product I chose and have made some customizations. How can I change where the wish list is created on the html side in the core code customization all I want? So which core file are the wishlist codes in? I want to interfere with this core file myself and I am aware of the risks. In the core file, it is enough to send the file and sample code piece that I can interfere with the request list. Thanks.

    #232836

    Hello,

    You will have to customize the code. Please find this file: woodmart/inc/integrations/woocommerce/modules/wishlist/class-ui.php

    And edit this functions as per your needs: add_to_wishlist_single_btn()

    Best Regards

    #233046

    precise
    Participant

    Thanks I solved my problem with this information. However, I do not want this situation to deteriorate after updates to the theme. So I want to use it in child theme, how can I do that?

    I created a file string in the private content section, added the wish list files and made the necessary changes, but it didn’t work.

    #233134

    Hello,

    Copy the file into the child theme in the same route and make changes.

    Best Regards f

    #233155

    precise
    Participant

    I did exactly this operation. However, the changes I made in the child theme do not happen. The same changes work when I do the main theme. The screenshot is contained in private content.

    #233232

    Hello,

    The first line is to delete the hook and the second line is a sample of how to add.

    Please copy the hooks into the functions.php of the child theme edit as per your needs and check.

    Best Regards

    #233241

    precise
    Participant

    add_action( ‘woocommerce_after_add_to_cart_button’, array( $this, ‘add_to_wishlist_single_btn’ ), 33 );

    This change in add_action on line 93 in the class-ui file is sufficient. So how do I export this to the function file in the child theme? All I want to use is the change to “woocommerce_after_add_to_cart_button” in the add_action command.

    #233414

    Hello,

    You need to install and activate the child theme and insert the code into the functions.php file.

    Best Regards

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