ljackl
Forum Replies Created
-
Bump again, would be interested in an answer if possible
Bump
Forum: Plugins
In reply to: [WooCommerce Cart Stock Reducer] Hooks for when a product is reserved@jamesgol Thanks for letting me know & no rush, just wanted to check that the email had come through. Have a good weekend!
Forum: Plugins
In reply to: [WooCommerce Cart Stock Reducer] Hooks for when a product is reservedHi @jamesgol
I recently sent you a message to an email address from another old support thread regarding some paid work for this plugin. I didn’t hear back so I thought I’d try getting in touch here to see if the email came through to you?
If not, is there a better way for me to reach you now? I figured direct communication would be best rather than discussing via a support ticket.
Forum: Plugins
In reply to: [WooCommerce Cart Stock Reducer] Hooks for when a product is reservedThanks for everything James, the solution you provided above worked perfectly. I really appreciate your help on this one.
I’ll go ahead and mark this as resolved.- This reply was modified 5 years, 11 months ago by ljackl.
Forum: Plugins
In reply to: [WooCommerce Cart Stock Reducer] Hooks for when a product is reservedOh wow, thank you very much for that, I didn’t realise you could retrieve a reference to a plugin/integration like that. Very cool.
So I don’t need to touch the wc_csr_whitelist_get_stock_status or wc_csr_whitelist_get_stock_quantity functions?
Thank you very much for the solution. I’ll update the plugin, implement it and report back.
- This reply was modified 5 years, 11 months ago by ljackl.
Forum: Plugins
In reply to: [WooCommerce Cart Stock Reducer] Hooks for when a product is reservedOh okay yep I had a look at the function & replacing it seems like a fairly simple task.
If I understand what you’re saying correctly, the process be something like:
1. Use your new filter to add the ‘woostify_print_out_of_stock_label’ function to the whitelist.
2. Override the ‘woostify_print_out_of_stock_label’ in functions.php and check if the item has any real or virtual stock and change what the function returns accordinglyOnce I’ve added the function to the whitelist, how do you go about retrieving the real and virtual stock levels in the new version of the ‘woostify_print_out_of_stock_label’ function?
- This reply was modified 5 years, 11 months ago by ljackl.
Forum: Plugins
In reply to: [WooCommerce Cart Stock Reducer] Hooks for when a product is reservedApologies, I hadn’t realised this was custom functionality provided by the theme. I just took the label that was in the top left corner and centred it with css, assuming the label was a normal WooCommerce thing.
So am I understanding correctly when I say that this label is using default WooCommerce functionality but just being output over the top of the product image by the theme?
Regarding the solution, how exactly would something like this be implemented to provide the functionality I’d like to achieve?
Forum: Plugins
In reply to: [WooCommerce Cart Stock Reducer] Hooks for when a product is reservedThat is one option, however it looks confusing as the users would be told an item is “Sold Out” by the oos text but then that it is reserved but the pending order text.
Check out the screenshot here for how I have it looking currently: https://snipboard.io/n7OES5.jpg
The problem I have is that I want to leave products active on the site once they are sold. The reason being that if a customer wants return a product, they still have access to the product description so they can verify for themselves if the item was as described without needing to contact us. However, with the item still accessible on the site and listed as ‘Reserved’, other customers have waited extended periods for the items to come back in stock which is obviously quite annoying.
The functionality i’d like to achieve is:
1. A user adds something to cart and the item is marked as reserved.
– OOS text: ‘Reserved’
– Pending Order Text: On Hold
2. Once the item is sold, the OOS text changes to ‘Sold Out’The solution I have in my head is to set the OOS text to “Sold Out” in the theme settings but then override it while it’s on hold to say ‘Reserved’ instead.
Now that you mention the Pending Order Text though, is there perhaps something I can use there?Forum: Plugins
In reply to: [WooCommerce Cart Stock Reducer] Hooks for when a product is reservedHi James,
I’m using a theme called Woostify. I just spoke with their support team, who gave me the following code, which uses a built in WooCommerce filter:
add_filter('woocommerce_get_availability', 'availability_filter_func'); function availability_filter_func($availability) { $availability['availability'] = str_ireplace('Out of stock', 'Sold Out', $availability['availability']); return $availability; }So now that we’ve got the methodology down, what would you suggest is the best way to distinguish between a reserved item and a sold item?
As a total aside if it’s not too much trouble, I never can tell how people seem to know what the data structures being returned by these hooks contain, what the secret? I’m using this site to look them up: http://hookr.io/filters/woocommerce_get_availability/ but I must be missing something, as all I can see from that page is that i’m getting an array back.
Anyways, your help is as always appreciated!
- This reply was modified 5 years, 12 months ago by ljackl.
Forum: Plugins
In reply to: [WooCommerce Cart Stock Reducer] Hooks for when a product is reservedHi James,
The theme I’m using has a field in the customiser to change the Out of Stock text. I’ll ask the devs what they’re using and override it if I can.
What I need now is a way for determining whether an item is reserved by the cart stock reducer, or if it’s actually sold and no longer available. Do you have any idea on the best way to do that?
Forum: Plugins
In reply to: [WooCommerce Cart Stock Reducer] Error after woocommerce updateForum: Plugins
In reply to: [WooCommerce Cart Stock Reducer] Ajax add to cart supportHey,
All good, looking forward to it!
I’ll mark this as resolved now (apologies for the delay).
Forum: Plugins
In reply to: [WooCommerce Cart Stock Reducer] Error after woocommerce updateHey @jamesgol,
I seem to be having the same error, even after updating:
I have tried clearing my browser and Autoptimize plugin cache, and have now disabled it completely.
Any ideas?
Forum: Plugins
In reply to: [WooCommerce Cart Stock Reducer] Ajax add to cart supportHey James,
Understood, not a problem. Any idea on when such a feature may be available?
Will the plugin still function correctly if i keep AJAX add to card enabled, or is the page refresh required?
Kind regards,
Jack