[Resolved] generate blocks woocommerce integration?

Home Forums Support generate blocks woocommerce integration?

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #1202172
    johnaps

    Hello!
    I am currently trying out generateblocks! Gudos on the release, always happy for your developments in any kind of plugin!
    I just want to ask cause i have an ecommerce store (woocommerce)
    Can i use it on product pages? Like lets say elementor lets you costumize the body of product pages just as you want…? is there a way to do this? It would be superawesome i think!!

    #1204456
    David
    Staff
    Customer Support

    Hi there,

    not yet there isn’t. Maybe something for the future 😉

    #1205612
    johnaps

    Would be great! Maybe a workaround would be to make gutenberg take control of woocommerce product pages? Will look into it…

    #1206067
    David
    Staff
    Customer Support

    You can enable the Gutenberg editor on Single Products like so:

    // WP 5.0 Woo 3.4.1 or later
    // Edit Woo Product with Gutenberg
    function db_enable_gutenberg_single_product($editable, $post_type) {
    	if($post_type == 'product'){
    		$editable = true;
    	}
    	
    	return $editable;
    }
    add_filter('use_block_editor_for_post_type', 'db_enable_gutenberg_single_product', 10, 2);

    But this will only allow you to edit the Short Description.

    I would expect Woo has full product editing in its future scope.

    #1206549
    johnaps

    Found this and i am trying it out, leaving it here for other fellow happy generatepressors!~ (looks complete at first glance…)

    function wplook_activate_gutenberg_products($can_edit, $post_type){
    	if($post_type == 'product'){
    		$can_edit = true;
    	}
    	
    	return $can_edit;
    }
    add_filter('use_block_editor_for_post_type', 'wplook_activate_gutenberg_products', 10, 2);
    #1206586
    Leo
    Staff
    Customer Support

    Thanks for sharing 🙂

    #1569864
    melvin wang

    Hi Johnnaps,

    I’ve enabled gutenberg in Product by using the code below,

    function wplook_activate_gutenberg_products($can_edit, $post_type){
    	if($post_type == 'product'){
    		$can_edit = true;
    	}
    	
    	return $can_edit;
    }
    add_filter('use_block_editor_for_post_type', 'wplook_activate_gutenberg_products', 10, 2);

    Everything work well except the “Product Category” & “Product Tag” are missing at the at the product back end for editorial.

    View post on imgur.com

    Do you have the similar problem and any solution have you tried to make the “product category” and “product tag” appear?

    Notes: Im able to configure out the Rankmath, Reviews, and other fields. But only unable to configure the “Product Category” & “Product Tag”

    Thanks

    #1570003
    johnaps

    I think you can edit them from quick edit on “all products”

    #1570013
    melvin wang

    Hi johnaps,

    Thanks for your response. I appreciate it very much.

    TQ and have a nice day

    Regards,
    Melvin

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