eC-Gem: Featured Categories – I can't sort categories by id

Home Support eCommerce Gem eC-Gem: Featured Categories – I can't sort categories by id

Tagged: ,

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #17003
    Anonymous
    Inactive

    Greetings from Turkey 🙂

    “eC-Gem: Featured Categories widget” / I can’t sort categories by id

    #17008
    nirav
    Keymaster

    Hello Nuslu,

    Hope you are doing good!

    Unfortunately, the theme does not support the category sorting option. You will need to create the child theme and will need to write the additional code to customize the widget.

    Hope this helps!

    Have a great day ahead!

    Regards,
    Team ProDesigns

    #17015
    Anonymous
    Inactive

    Thanks you so much 🙂

    foreach ( $featured_cats as $term_id => $value ) {
    				        	$taxonomy 		= 'product_cat';
    				        	$term_details 	= get_term_by( 'id', $term_id, $taxonomy );
    				        	if( !empty( $term_details ) ){
    					        	$term_title 	= $term_details->name;
    				        		$term_link 		= get_term_link( $term_id, $taxonomy );
    				        		$thumbnail_id 	= get_term_meta( $term_id, 'thumbnail_id', true );
    				        		$image_url 		= wp_get_attachment_image_src( $thumbnail_id, 'shop_catalog');
    				        		if( !empty( $image_url ) ){
    				        			$cat_image = $image_url[0];
    				        		}else{
    				        			$cat_image = wc_placeholder_img_src();
    				        		} ?>
    				        		<li class="product-cat product">
    				        			<div class="product-thumb-wrap">
    				        				<img src="<?php echo esc_url( $cat_image ); ?>" alt="<?php echo esc_html( $term_title ); ?>">
    
    				        				<?php if( !empty( $view_details ) ){ ?>
    					        				<div class="add-to-cart-wrap view-details-wrap">
    					        					<a href="<?php echo esc_url( $term_link ); ?>" class="button btn-view-details"><?php echo esc_html( $view_details ) ?></a>
    					        				</div>
    				        				<?php } ?>
    				        			</div>
    				        			<div class="product-info-wrap">
    				        				<a href="<?php echo esc_url( $term_link ); ?>"><h4 class="featured-cat-title"><?php echo esc_html( $term_title ); ?><?php if( 1 === $show_counts ){ ?><span class="count"><?php echo ' ('.absint( $term_details->count ).')'; ?></span><?php } ?></h4></a>
    				        			</div>
    				        		</li>
    				        		<?php
    				        	}
    		                }

    Can you help with updating this code? if possible 🙂

    #17017
    Anonymous
    Inactive

    I don’t know how I did it but I did it.

    Thank you very much for your support and beautiful theme.

    I wish good work. 🙂

    #17065
    nirav
    Keymaster

    Hello There!

    Hope you are doing good!

    We are glad that you did it.
    Feel free to get in touch in case of any other query.

    Have a great weekend ahead!

    Regards,
    Team ProDesigns

Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.