Forum Replies Created

Viewing 14 Topics - 1 through 14 (of 14 total)
Author Posts
Bryan Bryan

I solved the problem. I used the following code to set the seller variable

$seller = dokan_get_seller_id_by_order( $sub->ID );

I hope this helps someone.

July 2, 2015 at 3:03 am in reply to: add order item meta 53975
Bryan Bryan

I have solved the issue. I am not sure if there is a better way to do this than what I did.

Please let me know if there is a better way to do this with a different hook!?!?

What I did was include the following code:

function add_sub_order_item_meta($order_id) {
    $sub_orders = get_children( array( 'post_parent' => $order_id, 'post_type' => 'shop_order' ) );
    if ( $sub_orders ) {
        foreach ($sub_orders as $sub) {
            $order = new WC_Order( $sub->ID );
			
			//get the order items
			$order_item = $order->get_items();
			
			foreach( $order_item as $item_id => $product ) {
				//get values for vars
				$addMeta = 'some value';
                                //add new meta
				wc_add_order_item_meta($item_id, '_meta_key', $addMeta, false);
			}
        }
    }
}
add_action('woocommerce_payment_complete', 'add_sub_order_item_meta', 10, 1);
June 25, 2015 at 8:29 pm in reply to: Adding metadata to product form 53212
Bryan Bryan

Issue solved, I simply needed to add the following dokan hooks before function x_add_fields_save( $post_id ):

add_action( ‘dokan_process_product_meta’, ‘x_add_fields_save’ );
add_action( ‘dokan_new_product_added’, ‘x_add_fields_save’ );

Works like magic!

June 25, 2015 at 7:29 pm in reply to: Stripe Connect Local Host Activation Error 53206
Bryan Bryan

That worked. Thanks

June 24, 2015 at 9:16 pm in reply to: Stripe Connect Local Host Activation Error 53025
Bryan Bryan

I did that several times prior to submitting a ticket. The problem persist. I have re-downloaded the addon from my account and have installed it and attempted to activate it several times.

April 27, 2015 at 12:50 am in reply to: Creating a dashboard page 42385
Bryan Bryan

I got it working. the code you provided worked fine, I made a syntax error. Thank you for your help on this issue.

April 25, 2015 at 8:22 pm in reply to: Creating a dashboard page 42259
Bryan Bryan

This works!!! The only issue now is that the active tab is not highlighted. I have used the following code within the mytab.php file:

‘mytab’ ) ); ?>

If I change ‘mytab’ to another menu name such as ‘settings’, the ‘settings’ tab will display as active, it only seems to not work for the new tab. What could be causing the the “My Tab” to not display as the active tab?

Thanks for getting this working as well as it is by the way.

April 24, 2015 at 8:46 am in reply to: Creating a dashboard page 42176
Bryan Bryan

The tab appears, however when I click on it it states “That page cannot be found”. Is there a specific location within these files that I need to add this code to. Also I am using the most recent version of the Dokan theme with the plugin if this helps any.

April 18, 2015 at 8:17 pm in reply to: Creating a dashboard page 41706
Bryan Bryan

No worries.

April 17, 2015 at 6:45 pm in reply to: Creating a dashboard page 41606
Bryan Bryan

Any luck on this?

April 15, 2015 at 6:37 pm in reply to: Creating a dashboard page 41428
Bryan Bryan

I have placed this file in a new plugin file. There is another file within that same plugin file which activates the plugin and includes this file. I have not changed any of the core dokan files.
website\wp-content\plugins\new-plugin\this-file.php

Everything is working it is just the css and perhaps some js that is not loading. There are a lot of css and js files loaded on the dashboard pages and I am having a hard time figuring out which ones need to be included in the new dashboard page.

April 15, 2015 at 2:34 am in reply to: Creating a dashboard page 41347
Bryan Bryan

The following code is what I have currently come up with. This code will create a new dashboard menu item and connects that link to a page that has been created with shortcode. Additionally this code check to see if the user is logged in and allowed to sell items.

The only thing that I cannot seem to get working are the styles and scripts associated with the dashboard page. What are the styles and scripts that I would need to load to get this new page looking like the others?

__( ‘New Tab’, ‘dokan’),
‘icon’ => ‘‘,
‘url’ => get_permalink( $page_id )
);

return $urls;
}

add_filter( ‘dokan_get_dashboard_nav’, ‘x_dokan_new_nav’ );

/*
*
*Redirect the user if they are not logged in
*
*/
function x_dash_redirect(){
if ( ! is_user_logged_in() && is_page( ‘new-dashboard-page’ )) {
wp_safe_redirect( home_url().’/my-account’ );
exit;
}
}

add_action( ‘template_redirect’, ‘x_dash_redirect’ );

/*
*
*Shortcode for page
*
*/
function x_new_dashboard_content(){

$user_id = get_current_user_id();

?>

‘test’ ) ); ?>



Test!

April 10, 2015 at 7:50 am in reply to: Location Based Filter 41034
Bryan Bryan

Yes, Yes and Yes. I am trying to figure out how I am going to do this right now with the Dokan plugin. If I am unable to do this, I will likely need to find a new multi-vendor plugin.

April 7, 2015 at 8:16 pm in reply to: woocommerce extensions not working with dokan 40844
Bryan Bryan

I downloaded, installed and activated the “Photos Product Tab” plugin and when I logged in as a test vendor I was unable to see a tab for photos. I also browsed as a guest and there was no tab. I checked the settings and noticed that when I check the setting to allow the photo tab and update the change does not stay, the box becomes unchecked.

I was hoping that other woocommerce plugins would appear on the users front-end dashboard while adding or editing products.

Viewing 14 Topics - 1 through 14 (of 14 total)