Forum Replies Created
- AuthorPosts
andreasenglowski
ParticipantThis reply has been marked as private.andreasenglowski
ParticipantHi,
any news here?
Thanks in advance,
Andiandreasenglowski
ParticipantThis reply has been marked as private.andreasenglowski
ParticipantThis reply has been marked as private.andreasenglowski
ParticipantThis reply has been marked as private.andreasenglowski
ParticipantMany thanks!!!
March 1, 2019 at 2:25 pm in reply to: Create dynamic variable that contains vendor name for email subject #50761andreasenglowski
ParticipantHey, i got it working ๐
Heres my code:
add_filter( ‘woocommerce_email_format_string’ , ‘filter_email_format_string’, 20, 2 );
function filter_email_format_string( $string, $email ) {
// Get the instance of the WC_Order object
$order = $email->object;// Additional wanted placeholders in the array of find / relace pairs
$additional_placeholders = array(
‘{custom_one}’ => __(‘Mein Platzhalter’,’woocommerce’),
‘{vendor_link}’ => advi_get_vendor_link( $order ),
‘{vendor_name}’ => advi_get_vendor_name( $order ),
);// return the clean string with new replacements
return str_replace( array_keys( $additional_placeholders ), array_values( $additional_placeholders ), $string );
}function advi_get_vendor_name( $order ) {
global $WCFM, $WCFMmp;
$order_item = $order->get_items();foreach( $order_item as $product ) {
$productIDs[] = $product[‘product_id’];
$productID = $product[‘product_id’];
}
$vendor_id = $WCFM->wcfm_vendor_support->wcfm_get_vendor_id_from_product( $productID );
//This line return Link to Shop
//$shop_name = $WCFM->wcfm_vendor_support->wcfm_get_vendor_store_by_vendor( $vendor_id );
$store_user = wcfmmp_get_store( $vendor_id );
$store_info = $store_user->get_shop_info();
//$store_name = isset( $store_info[‘store_name’] ) ? esc_html( $store_info[‘store_name’] ) : __( ‘N/A’, ‘wc-multivendor-marketplace’ );
$store_name = $store_info[‘store_name’];//return $productIDs[0];
return $store_name;
}Thanks ๐
March 1, 2019 at 12:19 pm in reply to: Create dynamic variable that contains vendor name for email subject #50740andreasenglowski
ParticipantHi,
the vendor name should be displayed depending on the order (so it should be the name of the vendor who is selling the product in that order).
Eg: customer purchsases one product โmyProductโ from vendor โmyVendorโ.
E-mail should say: thanks for ordering with myVendor.But there must be some way to get vendor information from WCOrder object, cause the vendor info (vendor store name plus url) is added to order confirmation email inside the table with order details in product info (see screenshot).
What about
โ$WCFM->wcfm_vendor_support->wcfm_get_vendor_id_from_product()โ?
can i get vendor id from order with that function?thanks,
andiAttachments:
You must be logged in to view attached files.March 1, 2019 at 10:28 am in reply to: Create dynamic variable that contains vendor name for email subject #50719andreasenglowski
ParticipantDid find that code:
add_filter( ‘woocommerce_email_format_string’ , ‘filter_email_format_string’, 20, 2 );
function filter_email_format_string( $string, $email ) {
// Get the instance of the WC_Order object
$order = $email->object;// Additional wanted placeholders in the array of find / relace pairs
$additional_placeholders = array(
‘{vendor}’ => CODE GOES HERE // <=== HERE
);// return the clean string with new replacements
return str_replace( array_keys( $additional_placeholders ), array_values( $additional_placeholders ), $string );
}Where i just need to get the vendor name from the order object. is that possbile?
andreasenglowski
ParticipantSorry please delete the old post above (#47902). Three more question since my customer changed his mind:
– Just in general: Would it possible to remove the whole Availability tab?
– Is it possible to change even more fields in the Availability tab? Please see Screen1
– Is it possible to remove the fields with the label and if customer can pick resource (on creation of bookable when resource is enabled)? Please see Screen2Thanks in advance,
AndiAttachments:
You must be logged in to view attached files.andreasenglowski
ParticipantHi,
many thanks, everything is working just perfect but now my client did ask to remove the whole availabity tab. Is that possible that too?
If not, would it be possible to add some custom text in the availibity tab before or after the fields?Thanks in advance,
Andiandreasenglowski
ParticipantOh sorry i was mistaking, its inside the resource management. Did attach you screenshots, hope that helps to clear things out ๐
Thank you very much and have a nice day!
Attachments:
You must be logged in to view attached files.andreasenglowski
ParticipantThanks man you too! Just realized that theres one more small i want to get rid off: is it possible to remove the quantity field from the bookable product resource tab? Many many thanks!!
andreasenglowski
ParticipantOkay thanks. can you tell me how i do create my own order status? Sorry if its a stupid question ๐
Thanks in advance,
Andiandreasenglowski
ParticipantThats what i was looking for!
Thank you very very much, great support!!
Best regards,
Andiandreasenglowski
Participantblazing fast thanks man <3
oh and one small last thinge which is not about bookable produkt but is it possible to remove the โtabs managerโ tab? did look in groups permissions but did not find it… than i am all happy ๐
andreasenglowski
ParticipantDid mark them for you, please see screenshot.
Many thanks
Attachments:
You must be logged in to view attached files.andreasenglowski
Participantthank you so much, its working great! now is there also a filter to remove fields of availability tab for bookable product?
thanks in advance
Attachments:
You must be logged in to view attached files.andreasenglowski
ParticipantOkay sorry if its stupid but can you give a quick help on how to use the filter? For example remove min duration and max duration.
Thanks in advance,
Andiandreasenglowski
ParticipantWow thats great thanks for fast reply thats exactly what i was looking for. One last question: is it safe to change the code in the class-wcfm-wcbookings.php or how do i use the filter? Sorry if this question is nebish…
Thanks,
AndiFebruary 8, 2019 at 10:38 am in reply to: Add HTML / Shortcode after Header on Vendor Shop page #47225andreasenglowski
ParticipantHi, sorry if i wasnt descriptive enough. The problem is that its not coming after header its before header. guess i have to change the priority… will check and let you know ๐
thanks,
andiandreasenglowski
ParticipantHi, sorry did double check and did find the mistake. Sorry for bothering! So i just need to rename it and i am all done ๐
Thanks in advance,
AndiFebruary 5, 2019 at 5:16 pm in reply to: Add HTML / Shortcode after Header on Vendor Shop page #46777andreasenglowski
ParticipantMany many thanks, its working but not as expected since the html comes before the header. Do you have a idea?
Thanks in advance,
AndiAttachments:
You must be logged in to view attached files.andreasenglowski
ParticipantHey,
sorry for late reply. Lol now after i did update everything to latest version the shop button disappeared completly. Not sure what happened. I had that code snippet in my function php
add_filter( ‘wcfmmp_store_bp_menu_classes’, function( $classes ) {
return ‘wcfm_custom_hide’;
});to remove the store tab. but i did delete the code but still no tab to store. dashboard tab is available.
do you have a idea?
all the best,
AndiFebruary 4, 2019 at 9:15 am in reply to: Add HTML / Shortcode after Header on Vendor Shop page #46522andreasenglowski
ParticipantHi, thanks for blazing fast reply. No not really comfortable, can you help me by giving an example? For example if i just want to add “<h3> my heading </h3>” right under the header of the vendor page. would be great ๐ and sorry for stupid question ^^
Thanks
- AuthorPosts