Sheena Deoduco
Forum Replies Created
-
Hi @ocussac
Looks like you are using the Divi module in displaying the cart details. Unfortunately we don’t have full integrations with Divi builder yet.
We recommend using default cart page or using woocommerce shortcode: [woocommerce_cart] to solve your issue.Could you try replacing the cart elements with the shortcode only?
You can add this using text or code module to your page editor.Let me know if you encounter any issues.
Best Regards,
Hi @daining1298
We don’t have full integrations with bulk editing plugins.
When updating wholesale prices with lots of products. We recommend using CSV import.
For premium users, please email us directly at [email protected] ??
Cheers,
Hi @braanmcbrutal,
When you set the wholesale pricing. Did you set this under “wholesale_customer_wholesale_price” meta?
If so, kindly send us an email at [email protected] so we can check this further.
Looking forward to hearing from you.
Ward Regards,
Sorry have nothing in particular.
You might need to explore plugins that has product restriction on the checkout process.
If you have no other concerns. We’ll close off this thread ??
Thanks for providing your snippet. I reused it and managed to display the PO number.
Please try this one on your functions.phpadd_action('woocommerce_thankyou', 'action_checkout_order_processed', 10, 1); function action_checkout_order_processed( $order_id ) { // get an instance of the order object $order = wc_get_order( $order_id ); global $woocommerce; $prodhtml="<br><b>Product Details</b> <br>"; foreach ( $order->get_items() as $item_id => $item ) { $product_id = $item->get_product_id(); $itemsbox=get_post_meta($product_id,'itemsbox',true); $prodhtml.="Product Name : ".$item->get_name()."<br>"; $prodhtml.="Product Qty : ".$item->get_quantity()."<br>"; $variation_id = $item->get_variation_id(); //then display the PO fieldname $po = get_post_meta( $order->get_id() , 'igfw_purchase_order_number', true ); if($variation_id) { $prodhtml.="Product SKU : ".get_post_meta( $variation_id, '_sku', true )."<br>"; } else { $prodhtml.="Product SKU : ".get_post_meta( $product_id, '_sku', true )."<br>"; } $prodhtml.="Custom Slug : ".$order->get_meta('ref_custom_slug')."<br>"; $prodhtml.="Sales Rep : ".$order->get_meta('ref_affiliate_name')."<br>"; $prodhtml.="<br>"; } $mailer = $woocommerce->mailer(); $html=''; $html.="<h3 style='text-align:center'>J2 Medical Supply Pick Ticket</h3><b>Order Details</b> : <br>"; $html.="Order Id: ".$order_id."<br>"; $html.="First Name: ".$order->get_shipping_first_name()."<br>"; $html.="Last Name: ".$order->get_shipping_last_name()."<br>"; $html.="Company: ".$order->get_shipping_company()."<br>"; $html.="Payment Method: ".$order->get_payment_method_title()."<br>"; //THIS IS WHERE I'D LIKE TO PLACE THE PO NUMBER if( ! empty($po) ) { $html.="Purchase Order Number: ".$po."<br>"; } $html.="<br><b>Order Amount</b>: <br>"; $html.="Total before tax/shipping: $".$order->get_subtotal()."<br>"; $html.="<br><b>Shipping Address</b> : <br>"; $html.="Address: ".$order->get_shipping_address_1()."<br>"; $html.="City: ".$order->get_shipping_city()."<br>"; $html.="State: ".$order->get_shipping_state()."<br>"; $html.="Zipcode: ".$order->get_shipping_postcode()."<br>"; $html.="Shipping Method: ".$order->get_shipping_method()."<br>"; $shipping = $order->get_shipping_total(); $html.="Shipping Cost: $".$order->get_shipping_total()."<br>"; $html.=$prodhtml; $headers = "From: J2 Medical Supply <[email protected]>\n"; $message = $mailer->wrap_message( // // Message head and message body. sprintf( __( 'Order %s received' ), $order->get_order_number() ), $html ); // Client email, email subject and message. $mailer->send('[email protected]', sprintf( __( 'New Order #%s Pick Ticket' ), $order_id ), $html,$headers ); }
Custom email output: https://prnt.sc/Lj6OuVfH7ij4
Hopefully this works on you ??
Sorry for the slow response.
Were you able to retrieve the order ID? Could you try the snippet below and add this into your custom email:
//Woo retrieve order ID global $woocommerce, $post; $order = new WC_Order($post->ID); $order_id = $order->get_id(); //then display the PO fieldname $po = get_post_meta( $order_id , 'igfw_purchase_order_number', true ); if( ! empty($po) ) echo '<p><strong>Purchase Order Number:</strong> ' . $po. '</p>'; }
Reference link.
Unfortunately, the hook above this thread only works on Woocommerce emails.
- This reply was modified 2 years, 7 months ago by Sheena Deoduco.
Kindly replace the code above with this code snippet below:
add_action( 'woocommerce_email_before_order_table', 'add_order_email_instructions', 10, 2 ); function add_order_email_instructions( $order, $sent_to_admin ) { if ( ! $sent_to_admin ) { $order_id = method_exists( $order, 'get_id' ) ? $order->get_id() : $order->id; $po = get_post_meta( $order_id , 'igfw_purchase_order_number', true ); if( ! empty($po) ) echo '<p><strong>Purchase Order Number:</strong> ' . $po. '</p>'; } }
The custom field can be seen above the order table and won’t send to the admin email to avoid the duplication.
Reference link here.
Customer Email: https://prnt.sc/6WQ3fb0UyUeZ
Hi @darkmatter661 @gordonlangley
Please add this code on your child-theme/themes functions.php to display the purchase number in your customer’s email notification.
/** * Add a custom field (in an order) to the emails */ add_filter( 'woocommerce_email_order_meta_fields', 'custom_woocommerce_email_order_meta_fields', 10, 3 ); function custom_woocommerce_email_order_meta_fields( $fields, $sent_to_admin, $order ) { $fields['igfw_purchase_order_number'] = array( 'label' => __( 'PO #' ), 'value' => get_post_meta( $order->id, 'igfw_purchase_order_number', true ), ); return $fields; }
Woocommerce reference link here.
Admin email: https://prnt.sc/TAjuzpSvkMnL
Customer email: https://prnt.sc/6FCtV3Ro2XwN