Stu
Forum Replies Created
-
I have this turned off
Forum: Plugins
In reply to: [Products Coming Soon for WooCommerce] Additional feature….@fahadmahmood Yes I would like to be able to enter the stock (that is in transit) so the user can maybe see that as part of the message i.e. ‘In Transit 2 Units’. The 2 units should not be able to be ordered at this stage though. When the items arrive in the UK then our stock person just needs to uncheck the ‘in transit’ button and the 2 units go live for sale (removes a step for them as they now don’t have to enter a stock volume on receipt). Users must still be able to use the wishlist / notify me options they have on zero stock items. Hope that helps and thanks for taking time to follow up.
Forum: Plugins
In reply to: [WooCommerce] Set custom order status in Woocommerce backendGenius!
Phew – I’ve lost sleep on that one! Once again indebted to you for your time and efforts. Only trek I added was to set the loop in the drop down so the custom status isn’t at the bottom of the list (just from a workflow point of view it made sense to me to do that).
Sure this code will help others.
6 out of 5 stars π
…now if I can only figure out how to set a product category to only show in the backend for filtering purposes without adding yet another plug in π
Thank You!!!!
Forum: Plugins
In reply to: [WooCommerce] Set custom order status in Woocommerce backendReally appreciate your input once again and coming at it from a different angle was a great idea.
Unfortunately it produces the same result as my original code – new orders come through as ‘Processing’ and are not changed to our newly created status.
Seems there are a lot of ‘old’ solutions for previous iterations of WC that have worked in the past similar to what we both tried.
I’m hung up on the “$order->update_status( ‘custom-status’ );” line – I’ve tried set_status but same issue – just not convinced new WC version are allowing this update?
Forum: Plugins
In reply to: [WooCommerce] Exclude Out Of Stock Items From [Product} ShortcodeRashed,
If you fancy another challenge here is my latest problem
https://ww.wp.xz.cn/support/topic/set-custom-order-status-in-woocommerce-backend/
Another βsimpleβ problem that seems to evade me!
- This reply was modified 5 years, 3 months ago by Stu.
Forum: Plugins
In reply to: [WooCommerce] Exclude Out Of Stock Items From [Product} ShortcodeRashed,
Just got chance to look at this and all I can say is a massive THANKYOU! Works like a charm. been banging my head against a wall for so long with this (maybe not seeing the wood for the trees). IF I could award you 5 stars I would. Appreciate your time and efforts.
Forum: Plugins
In reply to: [WooCommerce] Exclude Out Of Stock Items From [Product} ShortcodeThanks Rashed,
When I use the above code in my function php file it does nothing to the products shortcode.
Here is my shortcode layout:
[products limit=”20″ columns=”4″ category=”christmas” on_sale=”true” paginate=”true”]
I was expecting maybe to have to add an extra argument to the code i.e.
[products limit=”20″ columns=”4″ category=”christmas” on_sale=”true” paginate=”true” Stockstatus = “instuck”]
but you think the php should be limiting results with no additional argument?
Just doesn’t work for me
Maybe i wasn’t clear. The field mapping tool within the plugin does not have these fields available to select as ‘receiving’ fields. So while I could create an attribute to store a GTIN value i can’t map it to an exportable field in the plugin.
Hi @mahiwahi
FYI – I ended up uninstalling the plugin. It was clashing with too many other things. In the end I just added code to the function.php file that ordered my store front by availability (which is all I needed from this plugin).
Here is the code….
// Add custom sorting options
function filter_woocommerce_get_catalog_ordering_args( $args ) {
$orderby_value = isset( $_GET[‘orderby’] ) ? wc_clean( $_GET[‘orderby’] ) : apply_filters( ‘woocommerce_default_catalog_orderby’, get_option( ‘woocommerce_default_catalog_orderby’ ) );
if ( $orderby_value == ‘availability’ ) {
$args[‘orderby’] = ‘meta_value_num’;
$args[‘order’] = ‘DESC’;
$args[‘meta_key’] = ‘_stock’;
}
return $args;
}
add_filter( ‘woocommerce_get_catalog_ordering_args’, ‘filter_woocommerce_get_catalog_ordering_args’, 10, 1 );function custom_woocommerce_catalog_orderby( $sortby ) {
$sortby[‘availability’] = ‘Availability’;
return $sortby;
}
add_filter( ‘woocommerce_default_catalog_orderby_options’, ‘custom_woocommerce_catalog_orderby’, 10, 1 );
add_filter( ‘woocommerce_catalog_orderby’, ‘custom_woocommerce_catalog_orderby’, 10, 1 );// Optional: use for debug purposes (display stock quantity)
function action_woocommerce_after_shop_loop_item() {
global $product;
echo wc_get_stock_html( $product );
}
add_action( ‘woocommerce_after_shop_loop_item’, ‘action_woocommerce_after_shop_loop_item’, 10, 0 );
// End of add custom sorting options