Home Forums WoodMart support forum Data source Product with NEW label not displayed

Data source Product with NEW label not displayed

Viewing 24 posts - 1 through 24 (of 24 total)
  • Author
    Posts
  • #285219

    fitmick25
    Participant

    Hello team

    Thank you for the upgrade you made so that the new products are automatically assigned with the “new” label.

    I was able to build my layout and improve the visibility of my products thanks to this but unfortunately after an update of Woocommerce I had to cancel everything because

    The products element (grid and carousel) does not work anymore with ( data source : Products with NEW label) . no product is considered as new. same thing for AJAX products tabs

    it now displays only the 3 products that I had manually assigned previously as new before your 6. theme update and now the more than 250 new products are not displayed anymore. ( see image )

    Thank you

    #285333

    Artem Temos
    Keymaster

    Hello,

    If you are using our new option that adds the “New” label automatically, then you need to simply order products by ID or date in DESC order. That mechanism should show the same “New” products.

    Kind Regards

    #285537

    fitmick25
    Participant

    Hi.

    even this way it doesn’t work.

    It’s not a problem with the settings but a real bug

    Before the woocommerce update it worked perfectly

    the recent products with the label “new” were displayed randomly in a carousel in the shop page

    and in the different categories of the shop I had set a carousel that displayed the new products of the corresponding category .

    the Automatic “New” label period is set to 30 days.

    Now nothing, all the carousel are empty as if there were no new products.

    It’s like woodmart core can’t find the product date in the database.

    Thanks

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

    Artem Temos
    Keymaster

    You need to disable “data source : Products with NEW label” from your carousel and simply sort products by data in Desc order. That would work if you use the new automatic option

    #285545

    fitmick25
    Participant

    this does not work !!!!!!

    I said above it’s not about settings

    #285546

    Artem Temos
    Keymaster

    Please, send us your admin access so we can check how it works when you use this option.

    #285562

    fitmick25
    Participant

    yes

    #285569

    Artem Temos
    Keymaster

    This account doesn’t have full administrators rights and we can’t check Theme Settings.

    #285573

    fitmick25
    Participant

    #285574

    Artem Temos
    Keymaster

    It looks like products are always randomly ordered. Could you please temporarily disable all external plugins and switch to the child theme so we can check?

    #285576

    fitmick25
    Participant

    done

    #285591

    Artem Temos
    Keymaster

    It seems to be working correctly now. Please, check from your side.

    #285604

    fitmick25
    Participant

    a

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

    Artem Temos
    Keymaster

    This option should work either automatically set from Theme Settings or for each product separately. But you can’t display both types of “New” products at the same time, unfortunately. Or you will need to show two separate products elements on the page: one ordered by date (with all new labels from Theme Settings) and another one that has “New” labels set manually for each product.

    #285611

    fitmick25
    Participant

    yes it is possible because it was working perfectly!

    it’s only after the Woocommerce update that it stopped working

    #285612

    Artem Temos
    Keymaster

    Please, send us your FTP access we will try to apply one more workaround to this.

    #285613

    fitmick25
    Participant

    i dont want manually set product as new. i dont use it.

    #285614

    fitmick25
    Participant

    b

    #291862

    fitmick25
    Participant

    Hi again !

    Here I have started a 1000% clean installation for you.
    there are no elements or links imported from my current site

    I simply installed
    wodmart theme
    woocommerce
    elementor

    I created 4 new products

    and 4 old products

    on the homepage there are 2 product grids

    the first one as product grid, datasource : all products, all products are displayed and as you can see the label new has been automatically added for recent products.

    the 2nd one as product grid , datasource : product with NEW label, no product is displayed. as I said it worked for a while but not anymore

    as you can see it’s exactly the same problem i have on my website same problem.

    I hope you can fix this quickly

    Thanks in advance

    I provide you all the access .wordpress, ftp, db

    #291993

    Artem Temos
    Keymaster

    Hello,

    We have made changes to your website. Could you please test how it works now?

    Kind Regards

    #292110

    fitmick25
    Participant

    Yes, it works again!

    Thank you very much.

    #292121

    Artem Temos
    Keymaster

    Try to edit the file woodmart/inc/integrations/elementor/elements/products/products.php and replace the following part

    if ( 'new' === $settings['post_type'] ) {
    	$query_args['meta_query'][] = array(
    		'relation' => 'OR',
    		array(
    			'key'     => '_woodmart_new_label',
    			'value'   => 'on',
    			'compare' => 'IN',
    		),
    		array(
    			'key'     => '_woodmart_new_label_date',
    			'value'   => date( 'Y-m-d' ), // phpcs:ignore
    			'compare' => '>',
    			'type'    => 'DATE',
    		),
    	);
    }

    with this one

    if ( 'new' === $settings['post_type'] ) {
    	$days = woodmart_get_opt( 'new_label_days_after_create' );
    	if ( $days ) {
    		$query_args['date_query'] = array(
    			'after' => date( 'Y-m-d', strtotime( '-' . $days . ' days' ) ),
    		);
    	} else {
    		$query_args['meta_query'][] = array(
    			'relation' => 'OR',
    			array(
    				'key'     => '_woodmart_new_label',
    				'value'   => 'on',
    				'compare' => 'IN',
    			),
    			array(
    				'key'     => '_woodmart_new_label_date',
    				'value'   => date( 'Y-m-d' ), // phpcs:ignore
    				'compare' => '>',
    				'type'    => 'DATE',
    			),
    		);
    	}
    }
    #292128

    fitmick25
    Participant

    I edited the file, it’s all good, it works perfectly 🙂

    Thank you for your help and service

    Have a nice day

    #292135

    Artem Temos
    Keymaster

    Great, you are welcome! 🙂

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

The topic ‘Data source Product with NEW label not displayed’ is closed to new replies.