Home › Forums › WoodMart support forum › Relocate the wishlist button
Relocate the wishlist button
- This topic has 11 replies, 2 voices, and was last updated 4 years, 3 months ago by Elise Noromit.
-
AuthorPosts
-
October 10, 2020 at 9:28 pm #232317
preciseParticipantI 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.
October 11, 2020 at 8:10 am #232367
Elise NoromitMemberHello,
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
October 11, 2020 at 10:04 am #232381
preciseParticipantI 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.
October 12, 2020 at 8:08 am #232517
Elise NoromitMemberHello,
You need to change the design on hover in the Theme Settings > Shop page > Product Styles.
Best Regards
October 12, 2020 at 7:26 pm #232734
preciseParticipantI 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.
October 13, 2020 at 7:49 am #232836
Elise NoromitMemberHello,
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
October 13, 2020 at 11:53 pm #233046
preciseParticipantThanks 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.
October 14, 2020 at 7:52 am #233134
Elise NoromitMemberHello,
Copy the file into the child theme in the same route and make changes.
Best Regards f
October 14, 2020 at 8:46 am #233155
preciseParticipantI 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.
October 14, 2020 at 1:53 pm #233232
Elise NoromitMemberHello,
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
October 14, 2020 at 2:39 pm #233241
preciseParticipantadd_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.
October 15, 2020 at 8:25 am #233414
Elise NoromitMemberHello,
You need to install and activate the child theme and insert the code into the functions.php file.
Best Regards
-
AuthorPosts
- You must be logged in to create new topics. Login / Register