Your account expired support, please renew to get your support.

HomePage Forums Themes Support Freshio – Organic & Food Store WordPress Theme Showing additional info to Products list

Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • #19547
    uzzy33
    Support Expired

    Hi,
    i would like to add Tags text into the Products list,
    like the second table on this webpage : https://madconsulting.ch/negozio/

    Thanks a lot

    #19550

    Do you mean to display more this list in category product page? https://ibb.co/8MQrjyp

    This customization is not currently available, we will custom charge you if you would like to add this customization. However, you need to be more specific about this requirement

    #19630
    uzzy33
    Support Expired

    in simply terms i would like to add tag info to all the products of the list beetween the title and the price on your widget.

    #19632
    uzzy33
    Support Expired

    I found the part i would like to change : content-widget-product.php (adding the tag information for any product )

    <div class=”product-content”>
    <?php do_action( ‘freshio_product_list_content_before’ ); ?>
    get_permalink() ); ?>”><span><?php echo wp_kses_post( $product->get_name() ); ?></span> <?php do_action( ‘freshio_product_list_title_after’ ); ?>
    <?php if ( ! empty( $show_rating ) ) : ?>
    <?php echo wc_get_rating_html( $product->get_average_rating() ); // PHPCS:Ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>
    <?php endif; ?>
    
    <span class=”tag”>
    <?php echo freshio_product_get_tag_html( $product ); // PHPCS:Ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>
    </span>
    
    <span class=”price”>
    <?php echo freshio_product_get_price_html( $product ); // PHPCS:Ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>
    </span>
    • This reply was modified 6 months, 2 weeks ago by Billy Nguyen.
    #19668

    No, you need to add the following code to your functions.php file (child-theme):

    add_action('woocommerce_after_shop_loop_item_title', 'freshio_fnc_custom_add_tags', 1);
    function freshio_fnc_custom_add_tags(){
    <span class="tag">
    <?php echo freshio_product_get_tag_html( $product );>
    </span>
    }
    #19681
    uzzy33
    Support Expired

    Thanks seems there is some error in your code i’ve tried to correct it but i’m facing a lot of issue,

    `add_action(‘woocommerce_after_shop_loop_item_title’, ‘freshio_fnc_custom_add_tags’, 1);
    function freshio_fnc_custom_add_tags(){ ?>
    <span class=”tag”>
    <?php echo freshio_product_get_tag_html( $product );
    ?>
    </span>
    <?php
    }

    Example : https://madconsulting.ch/negozio/

    #19682
    uzzy33
    Support Expired

    Fatal error: Uncaught Error: Call to undefined function freshio_product_get_tag_html() in /home/clients/4c49faf600e954852d23481dedc670cc/sites/tilog.ch/wp-content/themes/freshio-child/functions.php:69 Stack trace: #0 /home/clients/4c49faf600e954852d23481dedc670cc/sites/tilog.ch/wp-includes/class-wp-hook.php(307): freshio_fnc_custom_add_tags(”) #1 /home/clients/4c49faf600e954852d23481dedc670cc/sites/tilog.ch/wp-includes/class-wp-hook.php(331): WP_Hook->apply_filters(”, Array) #2 /home/clients/4c49faf600e954852d23481dedc670cc/sites/tilog.ch/wp-includes/plugin.php(474): WP_Hook->do_action(Array) #3 /home/clients/4c49faf600e954852d23481dedc670cc/sites/tilog.ch/wp-content/plugins/woocommerce/templates/content-product.php(57): do_action(‘woocommerce_aft…’) #4 /home/clients/4c49faf600e954852d23481dedc670cc/sites/tilog.ch/wp-includes/template.php(772): require(‘/home/clients/4…’) #5 /home/clients/4c49faf600e954852d23481dedc670cc/sites/tilog.ch/wp-content/plugins/woocommerce/includes/wc-core-functions.php(284): load_template in /home/clients/4c49faf600e954852d23481dedc670cc/sites/tilog.ch/wp-content/themes/freshio-child/functions.php on line 69

    #19683
    uzzy33
    Support Expired

    the child line functions.php on line 69 : freshio_product_get_tag_html( $product );

    #19706

    Oh sorry,

    Please go to Cpanel and fix this code to:

    
    add_action('woocommerce_after_shop_loop_item_title', 'freshio_fnc_custom_add_tags', 1);
    function freshio_fnc_custom_add_tags(){ global $product; ?>
    <?php echo wc_get_product_tag_list( $product->get_id(), ', ', '<span class="tagged_as">' . _n( 'Tag:', 'Tags:', count( $product->get_tag_ids() ), 'woocommerce' ) . ' ', '</span>' ); ?>
    }
    #19712
    uzzy33
    Support Expired

    Thanks a lot Billy,
    U re the Man!

    #19766

    Ok, let me know if you need to help and hope you will vote 5 stars for our team.

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

You must be logged in to reply to this topic.