• Resolved vishakhanehe

    (@vishakhanehe)


    Hi,

    I am looking for a way to add COD charges as per Vendors. Is there a way to
    add a field to the vendor shipping page, so that Vendor can charge if any user is ordering COD.

    Thank you!

Viewing 11 replies - 1 through 11 (of 11 total)
  • Hello @vishakhanehe ,

    If I understand correctly, you want to have an extra charge from the customer if they pay via COD. Is that right?

    Out of the box, there is no default way to add this setting under the vendor dashboard. It will require customization. The customization required for this to accomplish goes beyond the scope of this forum.

    Please take help from an expert or you can contact our customization team here.

    Thank you ??

    Thread Starter vishakhanehe

    (@vishakhanehe)

    Hey!

    Is there any reference of code or any plugin which I can refer to and can help me out because as per our vendors COD charges are different and via just COD charges on cart this is not achievable, Please guide me?

    Thanks!

    Hello @vishakhanehe ,

    At the moment I do not have any example to accomplish the exact what you need. It needs to be implemented in several parts & requires a professional to work on it.

    For example, to add an additional input field in the vendor dashboard you can see this article: https://wedevs.com/108107/how-to-add-extra-field-on-vendor-settings-page/

    You can use these filters to modify the vendor earning, commission:

    apply_filters( 'dokan_get_earning_by_product', $earning, $product, $context );
    apply_filters( 'dokan_order_admin_commission', $saved_fee, $order );
    apply_filters( 'dokan_get_earning_by_order', $earning );

    This discussion here will give you an idea of how you can add additional fees while only using WooCommerce: https://stackoverflow.com/questions/38382278/add-fee-based-on-specific-payment-methods-in-woocommerce

    Please get in touch with a developer to work on it or you have our paid customization service here.

    Thank you ??

    Thread Starter vishakhanehe

    (@vishakhanehe)

    Hi,
    Is there any hook available for dokan settings page?

    Hello @vishakhanehe ,

    You need to use several hooks to make a new field work. Check this example code: https://gist.github.com/nayemDevs/b629d4b1c27c794bdfb729ce6927069e

    Details about the code are here: https://wedevs.com/108107/how-to-add-extra-field-on-vendor-settings-page/

    Thank you ??

    Thread Starter vishakhanehe

    (@vishakhanehe)

    Hi @rur165,

    I checked the hook with the Github code which you have shared with me, but I am not able to fetch the custom field in any table. Can you please help in which table the ‘Website’ label is getting saved?

    Because I checked ‘$vendor_id’ and ‘$store_info’ but I am not able to fetch this ‘Website’ label anywhere.

    Please help.

    Thanks!

    Hello @vishakhanehe ,

    I believe you are trying to retrieve the information from the database table. I am unable to comment for the example code but the information from the store settings page is saved under the dokan_profile_settings meta key under the wp_usermeta table.

    I hope you find this useful.

    Thank you ??

    Thread Starter vishakhanehe

    (@vishakhanehe)

    Hi @rur165,
    In my wp_usermeta table there is nothing related to the custom field which I am creating in dokan_profile_settings. Sharing screenshots too. Please have a look.

    IMAGE of wp-usermeta table: https://ibb.co/nj23CDK
    IMAGE of Code: https://ibb.co/XsMHtGX
    On Dashboard: https://ibb.co/KXw79dG

    Although, I have created a new project with Dokan and Storefront.

    • This reply was modified 3 years, 6 months ago by vishakhanehe.
    • This reply was modified 3 years, 6 months ago by vishakhanehe.
    • This reply was modified 3 years, 6 months ago by vishakhanehe.

    Hello @vishakhanehe ,

    I have just tried the code found on the suggested URL & saved a value there. I can see the value is saved in the meta value as expected: https://prnt.sc/13i50vm

    I will recommend getting help from a professional developer to debug the implementation of the code on your site.

    Thank you ??

    Thread Starter vishakhanehe

    (@vishakhanehe)

    Hi @rur165,
    Thanks for your support. As I told you I need to create a custom field as per Vendors for COD. I created that too but there is something which is very weird happening. Although, I asked a developer too for the same but he is also not able to debug so asking for help from you if possible.

    On the cart page, when I click on the updated address then the whole page vanishes and I have to refresh but this is not supposed to be…

    Sharing my code too for the same: https://ibb.co/1sr2gbt

    Your help is very much required.

    Thanks!

    Hi @vishakhanehe,

    Thanks for your effort, but I’m sorry that debugging custom code is beyond our support policy.

    In that case, I will suggest you at first try the custom field code that you’ve been provided and later try your custom solution.

    I hope you will understand.

    Best Regards,

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘COD charges as per Vendors’ is closed to new replies.