Home › Forums › WoodMart support forum › problem with the “Products (grid or carousel)” Element
problem with the “Products (grid or carousel)” Element
- This topic has 6 replies, 3 voices, and was last updated 4 years, 11 months ago by
Aizaz Imtiaz Awan.
-
AuthorPosts
-
December 17, 2019 at 11:43 am #163736
gugamacParticipantHi,
i have again a problem with the “Products (grid or carousel)” Element. The search for product ID (Data source List of ID´s) is not working, when i type an ID, comes only pages/posts on the list and not the products ID list. Can you please help?
Greetings,
GustavoAttachments:
You must be logged in to view attached files.December 17, 2019 at 1:06 pm #163749
Aizaz Imtiaz AwanKeymasterHello,
I have test your site and I also noticed that Data source List of ID´s in product tab element not working fine. Its might be due to some of your third party plugin, your child theme or your custom code somewhere.
Because I have test the same element on my test site and when I choose data source as “List of Id’s” it display the post, products and pages. So I choose some products and it displaying just fine.
Also you can try data source “All Products” and then choose the specific categories to display the products of specific category.
Best Regards.
December 18, 2019 at 11:38 am #163897
gugamacParticipantHi,
i had this once before and you sent me this:
function woodmart_action_autocomplete(){
remove_filter( ‘vc_autocomplete_woodmart_products_include_callback’, ‘vc_include_field_search’, 10, 1 ); // Get suggestion(find). Must return an array
add_filter( ‘vc_autocomplete_woodmart_products_include_callback’, ‘vc_include_field_search_product’, 10, 1 ); // Get suggestion(find). Must return an array
}
add_action( ‘init’, ‘woodmart_action_autocomplete’, 500 );
function vc_include_field_search_product( $search_string ) {
$query = $search_string;
$data = array();
$args = array(
‘s’ => $query,
‘post_type’ => ‘product’,
);
$args[‘vc_search_by_title_only’] = true;
$args[‘numberposts’] = -1;
if ( 0 === strlen( $args[‘s’] ) ) {
unset( $args[‘s’] );
}
add_filter( ‘posts_search’, ‘vc_search_by_title_only’, 500, 2 );
$posts = get_posts( $args );
if ( is_array( $posts ) && ! empty( $posts ) ) {
foreach ( $posts as $post ) {
$data[] = array(
‘value’ => $post->ID,
‘label’ => $post->post_title,
‘group’ => $post->post_type,
);
}
}
return $data;
}But this don´t work now for the new Woodmart version.
We had before also same woodmart child theme and some plugins. Just updated to new version, and stops working fine… Please check.
Best regards,
GustavoDecember 19, 2019 at 5:58 am #164001
Aizaz Imtiaz AwanKeymasterHello,
Might be in the new version of the theme that code already included and you do not need to use it anymore.
Have you test it by excluding that code? Also if it still not working after excluding that code, Then deactivate all of your third party plugins, switch to your parent version of theme, and undo all of your custom Code and then check back. This will surely fix the issue.
In case if the issue is still there after doing all this, then remain the plugins as disable and let me troubleshoot your site with default plugins.
Best Regards.
May 21, 2020 at 10:55 am #196672
sophiemarquiseParticipantHello !
I have the same problem. When I’m using the Product tabs and I select Data-source List of ID’s : I can only select products by name but not by SKU or ID. How can I select products by SKU ? Because I have a lot of products with same name, and I need to be able to select them by SKU. Thanks !May 21, 2020 at 11:47 am #196704
sophiemarquiseParticipantThe problem comes from your “Product Tabs” element.
1. When I use the native WPbakery component (Tabs) and then I insert your “Product grid/carousel” item inside : I can select product by ID or SKU.
2. But when I use your “Product tabs” or “AJAX product tabs” I can’t select product by SKU or ID.Attachments:
You must be logged in to view attached files.May 21, 2020 at 12:06 pm #196717
Aizaz Imtiaz AwanKeymasterHello,
@sophiemarquise. Please create a separate topic and describe in detail what issue you are actually facing to check it myself and help you out accordingly.
Best Regards.
-
AuthorPosts
Tagged: products tabs list id, select by sku
The topic ‘problem with the “Products (grid or carousel)” Element’ is closed to new replies.
- You must be logged in to create new topics. Login / Register