Multi Vendor Marketplace Plugin | WCFM Marketplace › Forums › WCFM – Ultimate › Shipping Classes
- This topic has 11 replies, 2 voices, and was last updated 6 years, 5 months ago by WCFM Forum.
- AuthorPosts
- June 1, 2018 at 1:50 pm #24127daleParticipant
We are using WCMp and as you know it only provides one shipping class to the vendor but this is very limiting as the vendor needs different classes due to varied products and shipping destinations.
I have been in touch with WCMp and they provided a function to allow the vendor to access all shipping classes available however it doesn’t work. It works with their core plugin but not with WCMFM. Are you able to provide a similar function that would work with WCFM?
- June 1, 2018 at 5:50 pm #24143WCFM ForumMember
Hi,
Kindly use this function for the purpose –
function wcmarketplace_custom_product_shipping_class( $product_shipping_class ) { $product_shipping_class = get_terms( 'product_shipping_class', array('hide_empty' => 0)); return $product_shipping_class; } add_filter( 'wcfm_product_shipping_class', 'wcmarketplace_custom_product_shipping_class', 150 );
Thank You
- June 1, 2018 at 7:44 pm #24152daleParticipant
Thank you. That works! Is it possible to modify it so it only shows shipping classes specified by the site admin? It now shows each vendor’s shipping class as well as the overall shipping classes set up in Woocommerce. If the site has 100 vendors this list is going to get very long!
- June 2, 2018 at 3:04 am #24162WCFM ForumMember
Hi,
Yes off course, you may do anything with shipping classes in this function and return the allowed classes.
Thank You
- June 4, 2018 at 11:32 am #24268daleParticipant
So can you modify the function so it doesn’t show all the vendors shipping classes?
- June 4, 2018 at 11:45 am #24270WCFM ForumMember
Hi,
By default it was there like same, only returning logged in vendor’s shipping class.
Can you please know me, which shipping classes you are looking to be here?
Thank You
- June 4, 2018 at 1:33 pm #24277daleParticipant
The shipping classes wanted are just the ones created by the site admin in Woocommerce. On the attached screenshot the ones marked in yellow are vendor shipping classes which we don’t want.
- June 5, 2018 at 2:57 pm #24367daleParticipant
In case I wasn’t clear – after adding the function it shows ALL vendor’s shipping classes, not just the logged in vendor
- June 6, 2018 at 9:18 pm #24416WCFM ForumMember
Hi,
I have already give you code snippet for the purpose.
Kindly modify that and add some filter/restriction to meet your exact requirement.
Further customization on this comes under our paid service. If you are interested then we can do that for you.
Thank You
- June 7, 2018 at 10:38 am #24421daleParticipant
Thank you. Our developer looked at it and can’t tell how you are differentiating the shipping entries and what the parameters are. What is your charge for customizing this?
- June 7, 2018 at 1:49 pm #24429WCFM ForumMember
Hi,
I am not very clear with this – “how you are differentiating the shipping entries and what the parameters are. ”
What exactly you want to know?
$product_shipping_class = get_terms( ‘product_shipping_class’, array(‘hide_empty’ => 0));
It returns all WC shipping classes. You have to manipulate with this list and return only required once.
By default, WCFM also do the same and return only vendor’s shipping class. But you want to have Admin added class as well, so just return those.
Well, our development cost for this will be $100 USD.
Thank You
- June 17, 2018 at 11:40 am #24998WCFM ForumMember
Hi,
Any update on this?
Please know me if you require any from me on this!
Thank You
- AuthorPosts
- The topic ‘Shipping Classes’ is closed to new replies.