WC Lovers

WooCommerce Frontend Manager - Multivendor marketplace vendor dashboard

We're shifting our Forum based support to a more dedicated support system!

We'll be closing our Forum support from 10th June, 2020 and move to Email Support assistance.

  • If you are a WCFM premium add-ons user, contact us- here
  • Want to know more before buying our add-ons? Send Pre sale queries- here
  • If you are a WCFM free user, please open a support ticket at WordPress.org
  • For WCFM App related queries, reach us- here
From now the forum will be read-only!

Forum Replies Created

Viewing 8 posts - 51 through 58 (of 58 total)
  • Author
    Posts
  • in reply to: Hiding product manage tabs and calculating rates #42504
    hello4
    Participant

    Please see the attached screenshot. I am trying to set that up but so far I’ve had no luck. I use this to update it from the admin dashboard which works fine, but for this to work the product needs to be approved/published from admin dashboard:

    //Calculate and set base and block costs
    add_action( ‘woocommerce_process_product_meta_booking’, ‘modify_bookable_product_costs’, 100, 1 );

    function modify_bookable_product_costs( $product_id ){
    // Get an instance of the WC_Product object
    $product = wc_get_product( $product_id );

    // We check that we have a block cost before
    if ( $product->get_block_cost() > 0 ){
    // Calculation
    $new_booking_cost = ( $product->get_block_cost() * 0.05 ) + 100;

    $product->set_cost( $new_booking_cost ); // Set the new calculated cost in the product
    $product->save(); // Save the product data

    //Adjusting cost for 8 days
    $pricing = array(
    array(
    ‘type’ => ‘blocks’,
    ‘cost’ => 0.875,
    ‘modifier’ => ‘times’,
    ‘base_cost’ => $new_booking_cost,
    ‘base_modifier’ => ‘equals’,
    ‘from’ => 2,
    ‘to’ => 2
    )
    );

    update_post_meta( $product_id, ‘_wc_booking_pricing’, $pricing );
    }
    }

    Basically, all I want is to save the data that I pass to $pricing array, when vendors submits their products for approval.

    Thanks and regards,

    Attachments:
    You must be logged in to view attached files.
    in reply to: Mobile Number verification during Vendor Registration #42468
    hello4
    Participant

    Hello,

    Is this feature only available in pro version?

    Thanks and regards,

    in reply to: Hiding product manage tabs and calculating rates #42466
    hello4
    Participant

    Hello again,

    One last question relate to this. Is there a way to add a pricing range when vendors submit their details? Your customised plugin extension has this which I thought would work to add a range but I couldn’t get that to work:

    if( isset( $cost_fields[‘_wc_booking_cost_rules’] ) ) {
    $cost_fields_rules = array ( 0 => array ( ‘type’ => ‘days’, ‘from_custom’ => ”, ‘to_custom’ => ”, ‘from_months’ => ”, ‘to_months’ => ”, ‘from_weeks’ => ”, ‘to_weeks’ => ”, ‘from_days’ => ‘1’, ‘to_days’ => ‘7’, ‘from_time’ => ”, ‘to_time’ => ”, ‘from_count’ => ”, ‘to_count’ => ”, ‘base_modifier’ => ”, ‘base_cost’ => 3000, ‘block_modifier’ => ”, ‘block_cost’ => 5000 ) );
    $cost_fields[‘_wc_booking_cost_rules’][‘value’] = $cost_fields_rules;
    }

    in reply to: Hiding product manage tabs and calculating rates #42355
    hello4
    Participant

    Hello there,

    First code worked without any issues. I had to make a couple of changes for the second to get work. Actually it is relate to something that I wanted to mention before. Have you noticed that on product manage screen that you are using ‘base cost’ and ‘block costs’ the other way around? Please see the screenshot. https://goo.gl/ya4Q72 Hopefully you can fix this in a future release.

    Many thanks for the help!

    in reply to: Hiding product manage tabs and calculating rates #42176
    hello4
    Participant

    Hello,

    Thanks for the quick reply.

    Regarding the tabs, when I hide the Booking Options and Availability tabs using CSS, it hides those tabs but the page doesn’t load with the focus to Costs tab (https://goo.gl/zc62Ve). Here’s my CSS code:

    #wcfm_products_manage_form_availability_head, #wcfm_products_manage_form_booking_options_head {
    display: none;
    }

    Unfortunately I couldn’t figure out how to calculate the base cost using the entered block cost either so any help on that also highly appreciated.

    Thanks and regards,

    in reply to: Link commission withdrawal to booking statuses #41797
    hello4
    Participant

    Hello again,

    Any updates on this?

    Thanks and regards,

    in reply to: Mark cash on delivery (COD) commissions as unpaid #41449
    hello4
    Participant

    It works… Many thanks for the quick and great support.

    in reply to: Link commission withdrawal to booking statuses #41444
    hello4
    Participant

    Hello,

    It could be either ‘Complete’ or ‘Delivered’ (it’s a custom booking status).

    Thanks and in advance.

Viewing 8 posts - 51 through 58 (of 58 total)