Home Forums WoodMart support forum change the title of the product in wd-sticky panel

change the title of the product in wd-sticky panel

Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • #409803

    loralora
    Participant

    Hello

    1. How to change the title of the product, at the bottom of the floating menu.?
    Now it has “H4”. I need to change it to “div”

    <div class="wd-sticky-btn-info woodmart-sticky-btn-info">
    <h4 class="wd-entities-title"></h4>
    </div>

    How can I do it in code?
    How can I change this using a child theme?

    2. is there a solution, on the pages of “archives” and “taxonomies” to change the title of the products from H3 to div?

    How can I do it in code?
    How can I change this using a child theme?

    Thanks

    #410090

    Hello,

    Please check this file: inc/integrations/woocommerce/template-tags.php and find this functions: woodmart_sticky_single_add_to_cart

    Copy this function to the functions.php of the child theme and edit it as per your needs:

    if ( ! function_exists( 'woocommerce_template_loop_product_title' ) ) {
       function woocommerce_template_loop_product_title() {
          echo '<div class="wd-entities-title"><a href="' . get_the_permalink() . '">' . get_the_title() . '</a></div>';
       }
    }

    If you have any questions please feel free to contact us.

    Best Regards

    #411265

    Cal.97
    Participant

    Hello,

    I would like the H4 tag to be replaced by a p tag.
    I tried this solution:

    if ( ! function_exists( ‘woocommerce_template_loop_product_title’ ) ) {
    function woocommerce_template_loop_product_title() {
    echo ‘<p class=”wd-entities-title”>’ . get_the_title() . ‘</p>’;
    }
    }

    But it doesn’t work.
    Could you help me?

    #411445

    loralora
    Participant

    I, like the interlocutor above, also tried to insert a function into function.php – and it does not work. Is it possible that some action needs to be added?

    At the expense of redefining the inc/integrations/woocommerce/template-tags.php file.
    Can I make changes to this file by first placing it in mytheme/woocommerce/template-tags.php.? Will it work?

    #411923

    Hello,

    Please insert the site admin access into the Private content below the message area. We will check the reason this function does not work:

    woocommerce_template_loop_product_title

    You do not need copy the whole file:
    inc/integrations/woocommerce/template-tags.php

    You just need to copy the function and insert it into the functions.php of the child theme.

    Best Regards

    #418770

    loralora
    Participant

    ok please check

    #419398

    Hello,

    Our developers have checked and see everything works: https://monosnap.com/file/xuZc1Q9yHCyljYJisLVm6tgYJ5TqCq and https://monosnap.com/file/GTuIvSTlYAVAvecLJugurUD2oF2B8P

    Please clarify the issue.

    Best Regards

    #419585

    loralora
    Participant

    Hello
    Sorry, but you didn’t check that.
    we talked about the sticky card in the product.

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

    Hello,

    Please add this code to the functions.php of the child theme:

    if ( ! function_exists( 'woodmart_sticky_single_add_to_cart' ) ) {
    	function woodmart_sticky_single_add_to_cart() {
    		global $product;
    
    		if ( ! woodmart_woocommerce_installed() || ! is_product() || ! woodmart_get_opt( 'single_sticky_add_to_cart' ) ) {
    			return;
    		}
    
    		woodmart_enqueue_js_script( 'sticky-add-to-cart' );
    		woodmart_enqueue_inline_style( 'sticky-add-to-cart' );
    
    		if ( woodmart_get_opt( 'mobile_single_sticky_add_to_cart' ) ) {
    			woodmart_enqueue_inline_style( 'woo-mod-quantity-overlap' );
    		}
    
    		?>
    			<div class="wd-sticky-btn<?php echo woodmart_get_old_classes( ' woodmart-sticky-btn' ); ?>">
    				<div class="wd-sticky-btn-container container<?php echo woodmart_get_old_classes( ' woodmart-sticky-btn-container' ); ?>">
    					<div class="wd-sticky-btn-content<?php echo woodmart_get_old_classes( ' woodmart-sticky-btn-content' ); ?>">
    						<div class="wd-sticky-btn-thumbnail<?php echo woodmart_get_old_classes( ' woodmart-sticky-btn-thumbnail' ); ?>">
    							<?php echo woocommerce_get_product_thumbnail(); ?>
    						</div>
    						<div class="wd-sticky-btn-info<?php echo woodmart_get_old_classes( ' woodmart-sticky-btn-info' ); ?>">
    							<div class="wd-entities-title"><?php the_title(); ?></div>
    							<?php echo wc_get_rating_html( $product->get_average_rating() ); ?>
    						</div>
    					</div>
    					<div class="wd-sticky-btn-cart<?php echo woodmart_get_old_classes( ' woodmart-sticky-btn-cart' ); ?>">
    						<span class="price"><?php echo wp_kses_post( $product->get_price_html() ); ?></span>
    						<?php if ( $product->is_type( 'simple' ) ) : ?>
    							<?php woocommerce_simple_add_to_cart(); ?>
    						<?php else : ?>
    							<a href="<?php echo esc_url( $product->add_to_cart_url() ); ?>" class="wd-sticky-add-to-cart button alt<?php echo woodmart_get_old_classes( ' woodmart-sticky-add-to-cart' ); ?>">
    								<?php echo true == $product->is_type( 'variable' ) ? esc_html__( 'Select options', 'woodmart' ) : $product->single_add_to_cart_text(); ?>
    							</a>
    							<?php Quick_Buy::get_instance()->output_quick_buy_button(); ?>
    						<?php endif; ?>
    
    						<?php do_action( 'woodmart_sticky_atc_actions' ); ?>
    					</div>
    
    				</div>
    			</div>
    		<?php
    	}
    	add_action( 'woodmart_before_wp_footer', 'woodmart_sticky_single_add_to_cart', 999 );
    }

    Best Regards

    #421044

    loralora
    Participant

    This code breaks the product page
    Is there another solution?

    #421414

    Hello,

    Please provide the detailed steps with the screens to see want is wrong.

    Best Regard s

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