WCFM and WCMP are not the same plugin.
We use WCMP and the snippet which I sent you I'd received from WCMP developers. Do you have suggestion for WCMP?
Thanks in advance
I recommend to write to authors of WCFM
we use regular WCFM function for products
$WCFMmp->template->get_template( apply_filters( 'wcfmp_store_default_template', 'store/wcfmmp-view-store-products.php', $store_tab ), array( 'store_user' => $store_user, 'store_info' => $store_info ), '', apply_filters( 'wcfmp_store_default_template_path', '', $store_tab ) );
So, it's not controled by theme
I added this code using the Code Snippets plugin (as I added snippets for other things), but it doesn't work.
Do you have any suggestions?
Yes, it looks fine
You can use it in functions.php
https://rehubdocs.wpsoul.com/docs/rehub-theme/child-themes/how-to-customize-your-theme/
Сб, 9 окт. 2021 г. в 19:53, Sizam Support Help Desk <
sizamtheme+E9PZbBO4GrJl6XVWYk0y@mail.support-hub.io>:
They sent us the snippet (and the comment below) , but we have the same issue. Do you have any suggestion how to change the snippet?
function _additional_woo_query( $query ) {
if ( wcmp_is_store_page() ) {
$products = array();
$store_id = wcmp_find_shop_page_vendor();
$vendor = get_wcmp_vendor($store_id);
$vendor_product_ids = wp_list_pluck( $vendor->get_products_ids(), 'ID' );
if( isset($vendor_product_ids) && !empty($vendor_product_ids) ) {
$query->set('post__in',$vendor_product_ids );
}
}
}
add_action( 'pre_get_posts', '_additional_woo_query', 999 );
The above code will help you to show the all products on vendor shop page.
If this code is not working then please add your custom code. Using below filter you can change the product query.
Kindly ask to your theme developer.
this function can help you to show some information on store page, but it will not help to show hidden products, because product loop is controlled by plugin. You need to ask option to change product loop of store page (not just function to detect store page)
We use WC Marketplace (not WCFM).
They told us you could tell us which hooks we could use?
To show hidden product on shop page you can use below function to check is this a shop page or not.
if (wcmp_is_store_page())
Kindly ask your theme developer to check the page before add their code.
I think yes, I recommend to ask authors of WCFM for a snippet how to show hidden products ONLY on store pages. They should have it
When the "Hide Duplicate Products" action is done it will actually set product visibility to "hide from catalog and search" to all products with the same SKU except for the one with the lowest price.
Product visibility is WooCommerce taxonomy, so would it be possible to make use one of the WordPress' hooks, most likely pre_get_posts or parse_query, to alter global query object and display products which are hidden (essentially belong to hidden categories) on shop pages like shop/shop1 (that is dc_vendor_shop taxonomy - WC Marketplace plugin) ?
you can't deactivate products from general shop page and keep them on store pages. You can deactivate them globally only or keep them visible
Hi Igor,
Do you have any update how to show products on their shop pages and not to make duplicates products (with same SKU) on category page?
I'm not sure that we understood each other.
Product X has SKU 123 and this product is sold by shop 1 - price 100, shop 2 - price 200, shop 3 - price 300 (price comparison marketplace).
On the product page we want 3 prices (100, 200 and 300), names of shops that sell this product and this product will be displayed on first shop's page with price 100, on second shop's page with price 200 and on third shop's page price 300.
Also, not to duplicate the products with same SKU on category page like product X - 100, product X - 200 and product X - 300 (3 times the product with the same sku). We resolved this with 'Hide duplicated products with same SKU' but why this option also removed products from shops pages (it's looks like shop 2 and shop 3 don't have this product for selling)?
*Under Woocommerce -> Status -> Tools -> Hide button for 'Hide duplicated
products -This tool will hide products which have identical SKU *
second added products with the same sku disappeared from shop page.
The only function of "Woocommerce -> Status -> Tools -> Hide button for
'Hide duplicated" is removing products with the same SKU from shop. So, you
used it, tool hided products, so, why do you ask why it's not available?
Don't use this tool if you want to keep all products. You can edit product
and make it available for shop again
https://monosnap.com/file/5F45YDIhryljfjHpRzWrXpdbt73DWC
.vendor_store_details{display:none}
you can place this in theme options - general options - custom css
2. I guess because you used tool to hide all duplicate products with more
bigger price
we are not able to check without direct links
Hi Igor,
After hiding duplicate products with the same SKU and selected product layout - Compare Prices by sku on the product page shows 2 vendors logo and their prices, not vendor names in the table?
There's only one vendor under the table, why? (maybe to hide this html element with css)
If I select a brand for product, the vendor's logo is not displayed, only brand logo?
I found issue, if I click on the first price - vendor 1 store link, the product is on the vendor 1 store page, but if I click on the second price - vendor 2 store link this product is not shown on the vendor 2 store page. Is this issue related to the theme or WCMp?
If I open another products the same things with another link for vendors stores.
currently - yes.
Hi Igor,
Button solved the issue :)
Under Woocommerce -> Status -> Tools -> Hide button for 'Hide duplicated products -This tool will hide products which have identical SKU after import via WPAI.'
We need to do this after adding any product with the same sku?
enable RH woo tool plugin
Now in Woocommerce - settings - status you can find button to merge duplicated SKU on products
Hi,
The ReHub theme is great. We use WCMp and products with same sku will be sold by more vendors.
We have installed RH Woo Tools and prices are fine on the product page (layouts: Compare Prices by sku or Compare Prices with shortcode).
How to display only one product with minimal price on category page (if there are more than one products with the same sku)?
In WCMp settings we checked Allow multiple vendors to sell the same product. Buyers can choose their preferred vendor. and Show SPMV products by Min Price.
Regards
Additional Info
Link on page with issue: _
Sorry, but my answer is the same. For all compatible vendor plugins we have no customization in product loop and we use direct functionality of vendor plugins