- Posts: 86
- Thank you received: 3
Process affecting Quantity count of product
- magickarle
-
Topic Author
- Offline
Hi. I have an example:
I would like to have the quantity affected on product (in a specific category) based on a specific order status (triggered manually)
Is there a settings somewhere to do so?
Thanks
Please Log in or Create an account to join the conversation.
However, it's a question which interests me as well: how can a different order status (= other than "created" or "confirmed") be defined to affect product stock?
I imagine it could mean editing a core file, but that'd be okay for me, too.
Need help with customisations of layouts, style or other site development? PM me!
(Don't forget to turn on "E-mail notification of new messages" )
Please Log in or Create an account to join the conversation.
@lousyfool : If the option "Update the product stock on confirmed status" of the configuration is activated, the product stock will be decremented when the order status changed from the "created" order status to one of the statuses selected in the option "Invoice order statuses" (which by default contains both the "confirmed" and "shipped" order statuses).
Please Log in or Create an account to join the conversation.
Aaah, that's helpful to know - thanks for the info!
Maybe the option should then be named differently, maybe something like "Update the product stock on invoice order status" or so, as now it reads as if on "Yes" it's only the pre-defined "confirmed" status (or on "No" the "created" status - which requires to read documentation or help to find out).
What if I need yet another status to be the one decreasing the product stock? Sure, for all 'immediate' payment methods or the good old "first come, first serve" it's very okay to select "confirmed". But imagine 'pay later' methods such as bank transfer and "first PAY, first serve" strategy, especially with very limited or even unique products (all these factors being what I'm dealing with): I have an extra 'paid' order status - which is following the invoice order status, and not the same - which I'd like to be the one affecting product stock.
So again, how can I put the 'paid' status in place? Or any other non-"created" and non-"confirmed" status?
Makes me thinking that, in an ideal world, it'd be probably coolest if the option were a single dropdown with all order statuses in the system, hehehe, instead of only Yes/No...
Take that as a feature request, maybe?
Anyway, thanks again.
Need help with customisations of layouts, style or other site development? PM me!
(Don't forget to turn on "E-mail notification of new messages" )
Please Log in or Create an account to join the conversation.
- magickarle
-
Topic Author
- Offline
- Posts: 86
- Thank you received: 3
That<s what I did (deposit paied)
Please Log in or Create an account to join the conversation.
So, with the question raised, let's give Nicolas & team some time for a response... after all it's not a critical issue.
Need help with customisations of layouts, style or other site development? PM me!
(Don't forget to turn on "E-mail notification of new messages" )
Please Log in or Create an account to join the conversation.
@lousyfool: If you want to have the stock updated for a custom order status that you created, you can add it to the "Invoice order statuses" option of the configuration as I said in my previous message. I don't see the problem with that ?
Please Log in or Create an account to join the conversation.
This far it's well understood:
if "Update the product stock on invoice order status" = Yes, then it's whatever "Invoice order statuses" are.
Still leaves one - no, meanwhile two - questions open:
- Say I have "Invoice order statuses" set to only "confirmed" (because that's when I want the invoice issued), but I want the product stock updated at a 'later' order status named "paid" (because I want the product stock updated only then, not sooner), what do I do to make that happen?
- If I add both "confirmed" and "paid" to "Invoice order statuses" as you're suggesting: do I then have (PDF) invoices issued and/or going out twice, and stock updated twice too? :side:
Admittedly, I haven't tried it out. But you see, it's not clear, neither from option field names, nor from documentation... or, unfortunately, even from your posts here... but it would be nice if it were clear, of course.
So, thanks in advance for making it clear - here, and best also in documentation and backend field/option titles.
Need help with customisations of layouts, style or other site development? PM me!
(Don't forget to turn on "E-mail notification of new messages" )
Please Log in or Create an account to join the conversation.
1. There is no way to do that for now. One of our plans in the future is to have some kind of order statuses workflow where you have actions and order statuses to easily say what happens for which status all in one option. A bit like the checkout workflow system which defines the whole checkout experience with a lot of flexibility. Once we do that, you'll be able to do what you want.
2. No, the stock is only updated once, the first time. And if you set both paid and confirmed as "invoice order statuses", it just means that the invoice is available for both order statuses, but it's the same invoice.
Please Log in or Create an account to join the conversation.
1. Hmm, not even with a little (core) code modification?
Future plans sound good but will sure take a while. Again, it's not "critical", but with little product stock, any "pay later" method and so many abandoned orders it'd be great to have a short-term solution.
Not to mention that the present option/parameter field names are irritating if not even misleading, as mentioned.
2. Understood and appreciated.
Need help with customisations of layouts, style or other site development? PM me!
(Don't forget to turn on "E-mail notification of new messages" )
Please Log in or Create an account to join the conversation.
You can maybe create a plugin based on the function "onAfterOrderUpdate(&$order,&$do)" and when order status come from "created" to "confirmed" so re-increase the product stock.
Then still in this function, if the status come from "confirmed" to "paid" so decrease the product stock here.
Please Log in or Create an account to join the conversation.
This might be a way to go, but somehow I had hoped for a simpler code hack, i.e. wherever the invoice order status variable set in the backend causes the product stock to change, replacing it there with a "hardcoded" different order status as per user's wish.
Could you give me at least a pointer which file and section of it I'd need to look at? That would already save me quite a bit of time, I guess.
Thanks again!
Need help with customisations of layouts, style or other site development? PM me!
(Don't forget to turn on "E-mail notification of new messages" )
Please Log in or Create an account to join the conversation.
As a core hack, you can edit the function "save" in the file administrator/components/com_hikashop/classes/order.php
Please Log in or Create an account to join the conversation.
Case closed for me now. Many thanks again!
Need help with customisations of layouts, style or other site development? PM me!
(Don't forget to turn on "E-mail notification of new messages" )
Please Log in or Create an account to join the conversation.