Author Topic: product_ordered  (Read 1542 times)

wbyers

  • Jr. Member
  • **
  • Posts: 70
  • A beginner
product_ordered
« on: July 20, 2017, 14:21:02 pm »
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

  • Jr. Member
  • **
  • Posts: 422
Re: product_ordered
« Reply #1 on: July 20, 2017, 14:28:48 pm »
It increases when the product is ordered. It's part of stock management.

wbyers

  • Jr. Member
  • **
  • Posts: 70
  • A beginner
Re: product_ordered
« Reply #2 on: July 20, 2017, 14:31:37 pm »
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

  • Global Moderator
  • Sr. Member
  • *
  • Posts: 2898
  • VirtueMart Version: 3.4
Re: product_ordered
« Reply #3 on: July 20, 2017, 19:28:46 pm »
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.9.1
php 7.1

wbyers

  • Jr. Member
  • **
  • Posts: 70
  • A beginner
Re: product_ordered
« Reply #4 on: July 20, 2017, 19:34:44 pm »
How does that solve product ordered being filled, positive or negative?

AH

  • Global Moderator
  • Sr. Member
  • *
  • Posts: 2898
  • VirtueMart Version: 3.4
Re: product_ordered
« Reply #5 on: July 23, 2017, 11:26:56 am »
Quote
How 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.

Quote
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.

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.9.1
php 7.1

wbyers

  • Jr. Member
  • **
  • Posts: 70
  • A beginner
Re: product_ordered
« Reply #6 on: July 24, 2017, 14:34:51 pm »
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

  • Global Moderator
  • Sr. Member
  • *
  • Posts: 2898
  • VirtueMart Version: 3.4
Re: product_ordered
« Reply #7 on: July 24, 2017, 19:25:01 pm »
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.9.1
php 7.1

wbyers

  • Jr. Member
  • **
  • Posts: 70
  • A beginner
Re: product_ordered
« Reply #8 on: July 24, 2017, 19:32:26 pm »
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

  • Global Moderator
  • Sr. Member
  • *
  • Posts: 2898
  • VirtueMart Version: 3.4
Re: product_ordered
« Reply #9 on: July 24, 2017, 19:51:06 pm »
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.9.1
php 7.1

wbyers

  • Jr. Member
  • **
  • Posts: 70
  • A beginner
Re: product_ordered
« Reply #10 on: July 24, 2017, 20:03:55 pm »
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

  • Global Moderator
  • Sr. Member
  • *
  • Posts: 2898
  • VirtueMart Version: 3.4
Re: product_ordered
« Reply #11 on: July 24, 2017, 20:15:37 pm »
"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.9.1
php 7.1

wbyers

  • Jr. Member
  • **
  • Posts: 70
  • A beginner
Re: product_ordered
« Reply #12 on: July 24, 2017, 20:23:03 pm »
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

  • Global Moderator
  • Sr. Member
  • *
  • Posts: 2898
  • VirtueMart Version: 3.4
Re: product_ordered
« Reply #13 on: July 24, 2017, 20:31:04 pm »
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.9.1
php 7.1

wbyers

  • Jr. Member
  • **
  • Posts: 70
  • A beginner
Re: product_ordered
« Reply #14 on: July 24, 2017, 20:32:37 pm »
Will that keep product_ordered from acting up?