Home › Forums › WoodMart support forum › Relocate bages between title and rating
Relocate bages between title and rating
- This topic has 12 replies, 2 voices, and was last updated 4 years, 3 months ago by Elise Noromit.
-
AuthorPosts
-
October 13, 2020 at 12:38 pm #232923
zurichParticipantHi!
How to relocate bages and swatches below title?
And “add to wishlist” button next to swatchesAttachments:
You must be logged in to view attached files.October 13, 2020 at 1:36 pm #232950
Elise NoromitMemberHello,
HTML structure does not allow solving it by custom CSS. Such modification requires complicated Woocommerce code customization which is not covered by our support.
Best Regards
October 13, 2020 at 1:50 pm #232961
zurichParticipantThe request is not about css.
I understand that it is impossible with css.
Please share a list of hooks for the standard product page.
Is it this one?
woocommerce_show_product_sale_flashOctober 14, 2020 at 7:06 am #233099
Elise NoromitMemberHello,
Here is the hook:
woocommerce_show_product_sale_flash
add_action( 'woocommerce_single_product_summary', array( $this, 'add_to_wishlist_single_btn' ), 33 );
woodmart/inc/integrations/woocommerce/modules/wishlist/class-ui.php
The first line is the sale label and the second is the Wishlist.
Best Regards
October 14, 2020 at 11:06 am #233184
zurichParticipantThank you!
But second snippet It throws php error
add_action( ‘woocommerce_single_product_summary’, array( $this, ‘add_to_wishlist_single_btn’ ), 33 );
October 15, 2020 at 8:19 am #233412
Elise NoromitMemberHello,
If you want to move the button, you need to use this code and insert your hook as shown:
add_action( 'YOUR_HOOK', array( XTS\WC_Wishlist\UI::get_instance(), 'add_to_wishlist_single_btn' ), 33 );
In order to delete the button from the place where is now located, you need to use this code:
remove_action( 'woocommerce_single_product_summary', array( XTS\WC_Wishlist\UI::get_instance(), 'add_to_wishlist_single_btn' ), 33 );
Best Regards
October 15, 2020 at 11:25 am #233474
zurichParticipantThank you!
I tried to use this snippet but it throws php error too.
add_action( 'wc_wishlist_hook', array( XTS\WC_Wishlist\UI::get_instance(), 'add_to_wishlist_single_btn' ), 33 );
Fatal error: Uncaught Error: Class ‘XTS\WC_Wishlist\UI’ not found
October 15, 2020 at 11:29 am #233481
zurichParticipantAnd when i try to remove action with this snippet
remove_action( 'woocommerce_single_product_summary', array( XTS\WC_Wishlist\UI::get_instance(), 'add_to_wishlist_single_btn' ), 33 );
This results in the following errorOctober 15, 2020 at 1:33 pm #233532
Elise NoromitMemberHello,
Please provide your FTP access to the private area.
Best Regards
October 15, 2020 at 1:38 pm #233533
zurichParticipantCredentials below
October 16, 2020 at 6:39 am #233694
Elise NoromitMemberHello,
Please remove all the code provided above and add this code to the Theme Settings > Custom CSS > Global:
.summary-inner .product-labels { display: inline-flex; position: static; flex-direction: row; vertical-align: middle; } .summary-inner .product-labels span:not(:last-child) { margin-right: 10px; } .summary-inner>.wd-wishlist-btn{ margin-bottom: 10px; }
And this code to the functions.php of the child theme:
add_action( 'wp', function(){ remove_action( 'woocommerce_single_product_summary', array( XTS\WC_Wishlist\UI::get_instance(), 'add_to_wishlist_single_btn' ), 33 ); remove_action( 'woocommerce_before_single_product_summary', 'woocommerce_show_product_sale_flash', 10 ); add_action( 'woocommerce_single_product_summary', array( XTS\WC_Wishlist\UI::get_instance(), 'add_to_wishlist_single_btn' ), 7 ); add_action( 'woocommerce_single_product_summary', 'woocommerce_show_product_sale_flash', 6 ); } );
Best Regards
October 16, 2020 at 10:51 am #233747
zurichParticipantGreat!
Thank you!October 16, 2020 at 11:46 am #233769
Elise NoromitMemberWe are always happy to help you, write to us when you have any difficulties or issues with our theme.
We would be grateful for 5 stars rate on http://themeforest.net/downloads in case you are satisfied with our theme and customer service
Thank you in advance
-
AuthorPosts
The topic ‘Relocate bages between title and rating’ is closed to new replies.
- You must be logged in to create new topics. Login / Register