Welcome to our Support Portal › Forums › WooCommerce Personalized Product Options Manager (PPOM) › [Textcounter Addon] Feature Request: Reduce Stock by Character/Word count
- This topic has 8 replies, 2 voices, and was last updated 4 years, 1 month ago by
nmedia.
-
AuthorPosts
-
October 8, 2019 at 8:53 am #13967
Lievelabels.nl
ParticipantI would also like to have the option to reduce the stock by character count.
So if the client would type: “*PPOM*”, stock would be reduced not by 1, but by 6!October 8, 2019 at 1:57 pm #13976nmedia
KeymasterHi,
it’s already added did you see Type option like:
https://drive.google.com/file/d/1EppJHq5DYPRv1pTbDqNzppzSqHbwpb0B/view?usp=sharingOctober 8, 2019 at 2:08 pm #13978Lievelabels.nl
ParticipantCounting by characters is already in the plugin, that I understand.
I want to reduce STOCK per counted word/character
So when I type: “Najeeb”, the stock of the main product needs to be reduced by 6 units, because your name has 6 characters…..October 8, 2019 at 2:29 pm #13982Lievelabels.nl
ParticipantThis stock reducting is very important for my site.
For example:
https://test.lievelabels.nl/product/houten-naamslinger-mdf/This product is needs to reduce stock for each character. This will save the customer major time, when they do not have to add each character as a separate product to the cart.
Max Character must also respect current stock, when current stock < max characters.
This would be an excellent addition.October 9, 2019 at 1:22 pm #13993Lievelabels.nl
ParticipantI guess this is a major change in the plugin, but I think it’s a real nice feature.
Scope:
When the counted words/characters > current stock, validation needs to fail
When added to the cart, we will need to store extra meta data.
We need to store the fact, that it’s a text counter, which needs to change the stock
We need to store the count itself, as we need to multiply the quantity by it.
When finalizing to order, we need to also validate the order against the stock again, before reducing it.
I’m trying to check if I can add the code myself, but I’m kinda stuck in the way PPOM adds meta to the cart (array with name and value). How can we add more data to this meta part.I think we/you can use parts of these functions (source)
-
This reply was modified 4 years, 1 month ago by
Lievelabels.nl. Reason: added code + source
October 9, 2019 at 2:37 pm #14000Lievelabels.nl
ParticipantIt seems I can add a field that we can post, but it is not added to the cart meta.
Is there somekind of check on the fields and the posted fields? I see some JSON in the header with PPOM data
[ppom_option_price] => [{\"label\":\"Slingertekst \",\"price\":\"20.93\",\"apply\":\"variable\",\"product_title\":\"Houten naamslinger - MDF\",\"data_name\":\"slingertekst\"}]
October 10, 2019 at 7:17 am #14006nmedia
KeymasterOk I see, well I think it’s a very specific feature and for such requirements, we recommend a customized solution. Sorry, but it can’t bee added as general feature.
October 10, 2019 at 7:32 am #14012Lievelabels.nl
Participant@nmedia, ok. I will think about it 🙂
October 13, 2019 at 5:01 am #14054nmedia
KeymasterSure.
-
This reply was modified 4 years, 1 month ago by
-
AuthorPosts
- You must be logged in to reply to this topic.