News:

Support the VirtueMart project and become a member

Main Menu

product_ordered

Started by wbyers, July 20, 2017, 14:21:02 PM

Previous topic - Next topic

wbyers

Hello, We're having an issue with the product_ordered field filling when we don't want it to. It throws off our systems. Does anyone know why it would be triggering and when? As in what is there in the default system that makes it activiate?

Ghost

It increases when the product is ordered. It's part of stock management.

wbyers

Okay, is there anyway outside of core hacking to prevent it from firing? It's messing with customer's ability to make orders of our products. Because in our case it does not update when an order is actually made. It can sometimes be days before we have a change in product_ordered.

AH

Look at the order status codes in shop_>configuration

Change the stock handling setting of the statuses to the required setting

"Is available" - looks to be the setting you want
Regards
A

Joomla 3.10.11
php 8.0

wbyers

How does that solve product ordered being filled, positive or negative?

AH

QuoteHow does that solve product ordered being filled, positive or negative?

Because product_ordered is controlled by the setting.

When an order status is changed the "Stock handling" setting for the new status effects the change of the product_ordered value.

QuoteBecause in our case it does not update when an order is actually made. It can sometimes be days before we have a change in product_ordered.

If you want the value to change then look at your order status settings in admin.

If the value does not update then it is to do with the statuses you are using for your orders.








Regards
A

Joomla 3.10.11
php 8.0

wbyers

#6
Okay, so does "is available" enable the product_ordered field to change? Cause that's whats not on the confirmation status we are using. I'm assuming yes but I want to make sure before I begin changing things.

7/24/2017 -9:25
Okay ran a cancellation which is a status that has is available and it has not changed the product_ordered for the program. What should I have done instead?

AH

#7
There are 3 status options

Is available
Is reserved
Is removed

Depending on what the sequence of the order status has been will dictate what product ordered value is set to and what happens to the product_in_stock

Look at the status flow of your orders to determine what happens to the product_ordered figure.

Changing from one status to another that has the same "stock handling" setting will not change anything

Setting is available - should reduce product_ordered value by the item ordered quantity
Setting is reserved - should increase the product_ordered value by the item ordered quantity
Setting is removed - should reduce product_ordered value by the item ordered quantity

If the product_in_stock figure needs to be adjusted then it will be.

Regards
A

Joomla 3.10.11
php 8.0

wbyers

So if we just want the product to be interacted with without filling or changing product_ordered, we'd want to use is removed?

AH

Just updated my reply

You have to consider the changes of status

Then you will be able to determine what you need to set

Regards
A

Joomla 3.10.11
php 8.0

wbyers

Okay, but thing is at the moment the product ordered only rarely changes. My goal is to stop it from changing because it causes trouble for our stock system. Does any of those not fire a signal at all or do I just have the three options?

AH

"Does any of those not fire a signal at"

Not sure what you mean by that. Changing a status always looks at what it should do with product-ordered and product_in_stock.

And what it should do depends on the prior status.




It looks to me like you don't want to use the "is reserved" status

and therefore should only use :

Is removed

and/or

Is available

What trouble is it causing?





Regards
A

Joomla 3.10.11
php 8.0

wbyers

Basically, it effects product_in_stock like it's supposed to but we don't use product_ordered in any capacity and it doesn't change regularly. It seems to change and start getting affected by order statuses at random. going from swinging both positive or negative on a given product or set of products.

AH

#13
I suggest :

Use - "is available" for most statuses

and  use "Is removed" - for statuses that should remove stock from product_in_stock

Note: that this could mean more orders can be taken that stock available as "on order" will not be taken into consideration


Regards
A

Joomla 3.10.11
php 8.0

wbyers

Will that keep product_ordered from acting up?