Home Forums WoodMart support forum Relocate bages between title and rating

Relocate bages between title and rating

Viewing 13 posts - 1 through 13 (of 13 total)
  • Author
    Posts
  • #232923

    zurich
    Participant

    Hi!
    How to relocate bages and swatches below title?
    And “add to wishlist” button next to swatches

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

    Hello,

    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

    #232961

    zurich
    Participant

    The 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_flash

    #233099

    Hello,

    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

    #233184

    zurich
    Participant

    Thank you!

    But second snippet It throws php error

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

    #233412

    Hello,

    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

    #233474

    zurich
    Participant

    Thank 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

    #233481

    zurich
    Participant

    And 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 error

    #233532

    Hello,

    Please provide your FTP access to the private area.

    Best Regards

    #233533

    zurich
    Participant

    Credentials below

    #233694

    Hello,

    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

    #233747

    zurich
    Participant

    Great!
    Thank you!

    #233769

    We 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

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

The topic ‘Relocate bages between title and rating’ is closed to new replies.