Skip Navigation

[Resolved] Integration with WC Marketplace

This support ticket is created 6 years, 5 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 -
- 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 -

Supporter timezone: Europe/London (GMT+00:00)

This topic contains 9 replies, has 2 voices.

Last updated by domenicoS 6 years, 4 months ago.

Assisted by: Nigel.

Author
Posts
#917752
screenshot-01.jpg

Hi,
I installed Toolset plugin to have th possibility to manage fronted field to build/edit program in wc Marketplace.

I've created a group of customfield able to appears on Product.

If I opena the WC Marketplace dasboard:

1) i don't see this fields
2) I see also tha t when I create a custom field for product, the section of WC marketplac have some visibility problem (I don't see section subdived in section but all in one view)

Please, can you help me?

#917878

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

Hi Domenico

I'm not familiar with the WC Marketplace plugin.

I have installed it on a test WC site, but I don't see anything that looks like the screenshot you shared.

What should I do to set up WC Marketplace so that I can see the problem you are describing?

If I edit products using the normal product post edit screen I don't see any problems, the product custom fields I created in Types are visible.

#917917

Hi Nigel,

I've created a custom field grup and I've associed it to "poducts" (of woocommerce of course).

1) in the the admin I see correctly the group. That's means it works fine. The problem is in the frontend dashboard of WC Marketplace, becaouse I don't see any custom fields. I try with others similar plug-in as but in no one works.I tried to disactivate all plugins, change theme but no success. The same problem I have on post, not only on product.

2) Furthermore I've a view problem. This view problem arises when I associate the group to a product. There is some confilct when I active a product fileds group, not to other post type.

You have not to set partucular feature on WC Marketplace.

3) For your information: these a plugin conflict between Toolset forms and Ultimate member plugin

#917935

I hear WC Marketplace team, and maybe there ia an issue with the last version 3.0.1. of Types.
I tried with 2.3.2 version and I see the Custom fileds group, but I've however the view problem

#918218

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

Sorry, as I said, I'm not familiar with WC Marketplace.

I see that it has created a page Vendor Dashboard, is that the page where I should be able to see the problem.

Logged in as an administrator it tells me to log out and then requires me to log in as something else.

Can you describe the steps I need to see the problem, please.

Regarding your other questions, can you please report them in other threads, we have a one-issue per thread policy in the forum to help other users find solutions to similar problems.

If your question 2 about the issue with Views specifically happens when using WC Marketplace, then you can give me further details here and I'll investigate it at the same time.

#918605

Hi,
The problem was about of the version (3.0.1). The other team are working on it to fix the view and display issue.
So, thanks a lot for the moment about this issue. Should be solved in few days.
For your information, Wc marketplace works to display the dashboard only if you are register as Vendor (not as admin).
When you create a custom field associate to "product" it will be automaticly added to Product Manage page in the vendor dasboard. With Types version 2.3.2 it works, not with 3.0.1. But, as I said, they are working on it.

Ok, I will report the other question (plugin conflict on the threads).

I kindly ask you just another question. I create a user custom field. The Wc marketplace plugin give to each vendor a specific shop page: hidden link

It is not a fix page where I can work with a templete, but a page created with a variable permalink. So, I can't work on it with Layout. I have find the php templete of the page, and I wolud like to work on it to add the custom filed. I'm not so expert in php lenaguage.

How can I add a string of the custom field?
Can you please share an example of a code to add a custom field string in php?

Should b very usefull for me!

This is the actual code of the templete:

<?php
/**
 * The Template for displaying products in a product category. Simply includes the archive template.
 *
 * Override this template by copying it to yourtheme/dc-product-vendor/taxonomy-dc_vendor_shop.php
 *
 * @author 		WC Marketplace
 * @package 	WCMp/Templates
 * @version   2.2.0
 */
global $WCMp;
if ( ! defined( 'ABSPATH' ) ) {
	exit; // Exit if accessed directly
}
// Get vendor 
$vendor = get_wcmp_vendor_by_term(get_queried_object()->term_id);
if(!$vendor){
    // Redirect if not vendor
    wp_safe_redirect(get_permalink( woocommerce_get_page_id( 'shop' ) ));
    exit();
}
$is_block = get_user_meta($vendor->id, '_vendor_turn_off' , true);
if($is_block) {
	get_header( 'shop' ); ?>
	<?php
		/**
		 * woocommerce_before_main_content hook
		 *
		 * @hooked woocommerce_output_content_wrapper - 10 (outputs opening divs for the content)
		 * @hooked woocommerce_breadcrumb - 20
		 */
		do_action( 'woocommerce_before_main_content' );
	?>

		<?php if ( apply_filters( 'woocommerce_show_page_title', true ) ) : ?>

			<h1 class="page-title"><?php woocommerce_page_title(); ?></h1>

		<?php endif; ?>

		<?php do_action( 'woocommerce_archive_description' ); 
		$block_vendor_desc = apply_filters('wcmp_blocked_vendor_text', __('Site Administrator has blocked this vendor', 'dc-woocommerce-multi-vendor'), $vendor);
		?>
		<p class="blocked_desc">
			<?php echo esc_attr($block_vendor_desc); ?>
		<p>
		<?php
		/**
		 * woocommerce_after_main_content hook
		 *
		 * @hooked woocommerce_output_content_wrapper_end - 10 (outputs closing divs for the content)
		 */
		do_action( 'woocommerce_after_main_content' );
	?>

	<?php
		/**
		 * woocommerce_sidebar hook
		 *
		 * @hooked woocommerce_get_sidebar - 10
		 */
		do_action( 'woocommerce_sidebar' );
	?>

<?php get_footer( 'shop' ); 
	
} else {
	wc_get_template( 'archive-product.php' );
}
#918701

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

Thanks for the clarification about how it is expected to work.

To output user fields with PHP is fairly simple, we describe it here: https://toolset.com/documentation/customizing-sites-using-php/creating-custom-user-profiles/#displaying-custom-user-fields

To output a field for the current user, you might do so like this, for example:

<?php
echo types_render_usermeta( 'my-field', array( 'user_current' => 'true' ) );
?>

You can see examples on the list of Types fields here: https://toolset.com/documentation/customizing-sites-using-php/functions/

#918954
screenshot.jpg

Hi Nigel,

I try with this:
<p>Line:<?php echo(types_render_usermeta( "line-slug", array( ) )); ?>

Doesn't works

I attached the srcreenshot of the custom field (saved as user field)

Can you help me?

#919271

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

Where did you add the PHP code?

That line should output the value of a Types custom user field with a slug of "line-slug" for the current user.

So, to output anything the user needs the custom field "line-slug" set with some value, and you need to have inserted the line of PHP in a reasonable place in the PHP template which is used to render the page where you intend for the field to appear.

#921354

Thank you