Home Forums WoodMart support forum Some product pages are broken!

Some product pages are broken!

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

    ecom.france35
    Participant

    Hello,

    Our developer imports products from our suppliers via their API and when importing these products the pages are broken.

    Here is the URL of an imported product: https://tapisbazar.com/products/tapis-enzo-carbone

    Here is the URL of a NOT imported product: https://tapisbazar.com/products/assise-coussin-beige-o35-cm

    The products all use the same Elementor template.

    I disabled all non-essential plugins and it still doesn’t work so it’s not a plugin conflict.

    After changing theme it works so it is a problem with Woodmart.

    To be as efficient as possible, I left all non-essential plugins disabled + you have administrator access.

    Thanks in advance for your help!

    #529015

    Hello,

    Kindly switch to the parent theme on your website and check the problem.

    Best Regards.

    #529016

    ecom.france35
    Participant

    In fact, it works with parent theme.

    But in any case, I need child theme.

    How can we resolve it?

    #529026

    ecom.france35
    Participant

    I have just identified the source of the problem.

    The child theme works when I remove this code from function.php:

    // H4 ATC sticky title in p
    // 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’); ?>”>
    <p class=”wd-entities-title”><?php the_title(); ?></p>
    <?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: ?>
    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(); ?>

    <?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 );

    This is a php code that Woodmart support previously gave me to replace the product title on the ATC sticky from H4 to p.

    Please correct the code to resolve the bug.

    #529124

    Hung Pham
    Keymaster

    Hi ecom.france35,

    Thanks for reaching to us.

    Please provide FTP info (server, username, password, port) to Private Content area.

    I will check this problem for you.

    Regards,

    #529125

    ecom.france35
    Participant

    Please, check private content area

    #529182

    Hung Pham
    Keymaster

    Hi ecom.france35,

    Thanks for details.

    I re-enabled above function and Imported product still loading well https://tapisbazar.com/tapis-de-bain-noir Please note that function used to replace h4 tag to p only.

    I also that you added many custom functions and errors in Console log https://prnt.sc/jar6ZDsoMef4. Please comment out other functions, deactivate all plugins (except Required Plugins) and then reactivate them one by one. This makes it very easy to isolate the plugins / functions causing problems.

    Regards,

    #529309

    ecom.france35
    Participant

    Hello,

    The product charges well but the sticky add to cart has disappeared…

    #529426

    Hung Pham
    Keymaster

    Hi ecom.france35,

    I saw an errors in Console log on your site https://prnt.sc/Ljl7Wm582zYY

    You should switch to Parent theme, deactivate all plugins (except Required Plugins) and then reactivate them one by one. This makes it very easy to isolate the plugin causing problems.

    Regards,

    #529436

    ecom.france35
    Participant

    It’s not a problem of conflict plugins because when I switch to parent theme, sticky add to cart appear correctly.

    After, I checked and remove this code that your team gave me to modify sticky ATC title from H4 to p and issue is resolved :

    // H4 titre sticky ATC en p
    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’ ); ?>”>
    <p class=”wd-entities-title”><?php the_title(); ?></p>
    <?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 : ?>
    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(); ?>

    <?php Quick_Buy::get_instance()->output_quick_buy_button(); ?>
    <?php endif; ?>

    <?php do_action( ‘woodmart_sticky_atc_actions’ ); ?>
    </div>

    </div>
    </div>
    <?php
    }
    }

    SO please, give me a solution without bugs to modify the title of sticky ATC from H4 to p.

    #529680

    Hung Pham
    Keymaster

    Hi ecom.france35,

    I appreciate your patience.

    I tested again on my end with provided code, everything worked well.

    Would you mind if I remove Custom Code in functions.php in Child theme for further debug? I kindly recommend that you take a complete backup of your site before proceeding.

    Regards,

    #529703

    ecom.france35
    Participant

    Hi,

    I already remove Custom Code in functions.php in Child theme so no issue appear.

    BUT if I or you put the Custom Code in functions.php in Child theme, issue will appear so this code need to be changed.

    Please, I only need to change sticky ATC title tag from H4 to p.

    Thanks

    #529936

    Hung Pham
    Keymaster

    Hi ecom.france35,

    I’ve fixed your issue. Please check your site again.

    https://prnt.sc/T-fokZaGHFqa

    Regards,

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