News:

You may pay someone to create your store, or you visit our seminar and become a professional yourself with the silver certification

Main Menu

How can I add an orderitem in BE of VM 3.0.19.6

Started by Jörgen, February 21, 2017, 10:23:36 AM

Previous topic - Next topic

Jörgen

Hello

I am using

VM 3.0.19.6
Joomla 3.6.5
PHP 5.6.30

I want to add an extra order item to an existing order. In VM 3.0.18 this was done with the add button below order items. This was not really straight forward and I actually have newer figured out how to get the stock to work when adding a new order item. Sometimes it updated stock sometimes not. But it was possible to add a new order item.

I have tried the following three scenarios in VM 3.0.19.6 but I don´t seem to make it work.


  • Clicking on New/Add gives a new copy of the first order item. Updating (F5) the order "deletes" the item.
  • Clicking on New/Add gives a copy of the first order item. Clicking save gives another order item copy.
  • Clicking on New/Add gives a copy of the first order item. Clicking Edit and editing the new item before save, saves the edited order item.

None of thoose gives me the oppurtunity to add a "real" order item. There is no chance to set a item id for the product. In the database there is null saved as product item id. This makes it of course impossible to get a correct stock change when I add a new order item.

What am I missing ? Because I can not make it work.

regards

Jörgen @ Kreativ Fotografi


Joomla 3.9.18
Virtuemart 3.4.x
Olympiantheme Hera (customized)
This reflects current status when viewing old post.

Milbo

Quote from: Jörgen on February 21, 2017, 10:23:36 AM
I have tried the following three scenarios in VM 3.0.19.6 but I don´t seem to make it work.


  • Clicking on New/Add gives a new copy of the first order item. Updating (F5) the order "deletes" the item.
  • Clicking on New/Add gives a copy of the first order item. Clicking save gives another order item copy.
  • Clicking on New/Add gives a copy of the first order item. Clicking Edit and editing the new item before save, saves the edited order item.

All these buttons are just javascript. Using F5 always removes anything as long you did not store the order. Yes "New" just copies the last line, the idea is, it should copy what you marked before (not written). The Button "edit" allows you to edit the order items. So the normal way is "new", then "edit", then "save". But all order items are plain, dumb data. This has legal reasons. Orders must store the plain data. The idea is to add an extra field, which allows to set the product id, later it can be enhanced with search and dropdown to select a product.

Quote from: Jörgen on February 21, 2017, 10:23:36 AM
None of thoose gives me the oppurtunity to add a "real" order item. There is no chance to set a item id for the product. In the database there is null saved as product item id.
You can create a new itemid. But the ItemId of the order is NOT a productId !

Quote from: Jörgen on February 21, 2017, 10:23:36 AM
This makes it of course impossible to get a correct stock change when I add a new order item.

What am I missing ? Because I can not make it work.

Good point with the inventory. You missed nothing, it is just not written yet.
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

AH

The limitations of effective and simple product addition in VM2/3 compared with the previous VM1.1 option - which allows a search and select from existing items with the ability to adjust the values read in at that time -  has been raised back in June 2013

http://forum.virtuemart.net/index.php?topic=112187.msg405590#msg405590

Regards
A

Joomla 4.4.5
php 8.1

Jörgen

Hello

Thanks for the reply.

Adding an order item has worked, but a bit quirky. In earlier versions (can only can only compare with VM VM 3.0.8), You
got the oppurtunity to change the virtuemart_product_id, I wrongly referred to  product item id. If You filled out the correct virtuemart_product_id You got the product description filled out, but not prices. In some cases, I can not remember in which order I changed the order status for the line, You could actually get the stock update to work.

There are two other things that happen when You press the Save button for the order item line.


  • An e-mail goes to the customer. I was trying to change some order lines in an order that had been sent, but where the order sum was wrong. I made some try and error before I got it right. which resulted in five emails sent to the customer. This was a nice customer and he called me up and just explained what happened without getting upset.
  • As soon as You press Save You get faulty VAT calulations. An order that is correct gets EXTRA VAT added for some reason, whether the order is finalized or not. This results in an extra amount of work before You get the sums right again and a couple of emails to the customer, not very amusing. This does not happen when You press the order update button or the save order head button.


I will wait for the update then and make the stock update manually in the mean time.

regards

Jörgen @ Kreativ Fotografi
Joomla 3.9.18
Virtuemart 3.4.x
Olympiantheme Hera (customized)
This reflects current status when viewing old post.

Milbo

Quote from: Jörgen on February 23, 2017, 10:50:56 AM
Hello

Thanks for the reply.

Adding an order item has worked, but a bit quirky. In earlier versions (can only can only compare with VM VM 3.0.8), You
got the oppurtunity to change the virtuemart_product_id,

Yeh, I thought I wrote it already that way. I wonder why it is not there anylonger. Someone reminds, when it worked?


Quote from: Jörgen on February 23, 2017, 10:50:56 AM
An e-mail goes to the customer. I was trying to change some order lines in an order that had been sent, but where the order sum was wrong.
I wonder, there is a checkbox for,.. you need to deselect it. Did you?
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

Jörgen

Hello


No in that view there is no such checkbox. In the order list view there is such a thing, and it is unchecked.

With "Update order status" there is such a checkbox, but only when You activate Update order status, so in this case it is hidden.

When i use the "Save order header" no email is sent, which would be the right thing also for the order lines.

Having the option to send an email is more natural only for the "update order status" option, not for every change on a order item line.

Hope it is understandable.

regards

Jörgen @ Kreativ Fotografi

Joomla 3.9.18
Virtuemart 3.4.x
Olympiantheme Hera (customized)
This reflects current status when viewing old post.

Milbo

"With "Update order status" there is such a checkbox, but only when You activate Update order status, so in this case it is hidden."

Yeh but it could be, that it is used.
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

lindapowers

#7
Quote from: Jörgen on February 23, 2017, 10:50:56 AM
Hello

Thanks for the reply.

Adding an order item has worked, but a bit quirky. In earlier versions (can only can only compare with VM VM 3.0.8), You
got the oppurtunity to change the virtuemart_product_id, I wrongly referred to  product item id. If You filled out the correct virtuemart_product_id You got the product description filled out, but not prices. In some cases, I can not remember in which order I changed the order status for the line, You could actually get the stock update to work.

There are two other things that happen when You press the Save button for the order item line.


  • An e-mail goes to the customer. I was trying to change some order lines in an order that had been sent, but where the order sum was wrong. I made some try and error before I got it right. which resulted in five emails sent to the customer. This was a nice customer and he called me up and just explained what happened without getting upset.
  • As soon as You press Save You get faulty VAT calulations. An order that is correct gets EXTRA VAT added for some reason, whether the order is finalized or not. This results in an extra amount of work before You get the sums right again and a couple of emails to the customer, not very amusing. This does not happen when You press the order update button or the save order head button.


I will wait for the update then and make the stock update manually in the mean time.

regards

Jörgen @ Kreativ Fotografi

We find more safe to cancel the original order and create one for your customer directly from the frontend mainly cause we never managed to get correct calculations for editing orders and If I remember correctly shipping costs were not editable neither payment method.

We use these plugin directly to log in as the customer and just create a frontend order with correct products so it gets calculations ok, ofc this is only valid if you use payment methods like bank transfer or cash on delivery https://extensions.joomla.org/extension/master-user/

We never managed to easily edit orders in VM2/3, only the customer note cause if we touch any other value the entire order gets wrong calculations. Hopefully it will improve in the future.

Milbo

#8
You dont need this plugin, it is part of the core. The switch is in the cart.

back to topic
I enhanced the js, but blocked sending of emails.
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

AH

QuoteWe find more safe to cancel the original order and create one for your customer directly from the frontend

IMHO - That is not a realistic business solution when an order consists of maybe 15-20 items and you only need to add 1
Regards
A

Joomla 4.4.5
php 8.1

Jörgen

Quote from: Milbo on February 25, 2017, 10:37:46 AM
You dont need this plugin, it is part of the core. The switch is in the cart.
Yes correct, It works great. I use this when I get customers that don´t want to use a computer or as a service for them :)

Quote from: Milbo on February 25, 2017, 10:37:46 AM
back to topic
enhanced the js, but blocked sending of emails.

Great. :)
Have You also looked at the strange recalculation of the VAT? The first time the order is saved by the customer the calculation is correct. But as soon as I save an order line the total VAT calculations add some extra VAT to the order total. This has happened during the years and got corrected at some stage, but not it seems to be back, with a new twist. Extra VAT lines at the bottom of the order view.

In which version vill this be included?

Thank You for some great work, VM3 is getting to be a pretty stable shop :)

regards

Jörgen @ Kreativ Fotografi
Joomla 3.9.18
Virtuemart 3.4.x
Olympiantheme Hera (customized)
This reflects current status when viewing old post.

lindapowers

#11
Quote from: AH on February 25, 2017, 11:59:06 AM
QuoteWe find more safe to cancel the original order and create one for your customer directly from the frontend

IMHO - That is not a realistic business solution when an order consists of maybe 15-20 items and you only need to add 1

Well to start these feature is touching the limit of legal terms in many countries. You can't modify an invoice adding or deleting elements without creating a new invoice number at least here, maybe editing the order only could be allowed which is what is talked here  but I won't make you sleep with tons of offtopic legal terms.

Login in to customer accounts doesn't sound good neither in that sense so correct but boring sounds to cancel the order and use the core feature to select the shopper and create a new order.

Since reality is that editing the order would be ideal I hope we reach the point of VM1 where this was quite simple and possible so nice to see these feature improved.

Quote from: Jörgen on February 25, 2017, 12:42:22 PM
Thank You for some great work, VM3 is getting to be a pretty stable shop :)

Jörgen @ Kreativ Fotografi

I agree, really looking forward for the next VM stable release, must be the most tested and with most fixes and addons in years.

And about the topic itself please don't forget the payment methods and shipping cause the numbers can be modified but not the chosen shipment or payment. I think I read Milbo some time ago mention that those come from plugins and is more complicated.

Jörgen

Quote from: lindapowers on February 25, 2017, 15:10:51 PM
I agree, really looking forward for the next VM stable release, must be the most tested and with most fixes and addons in years.

And about the topic itself please don't forget the payment methods and shipping cause the numbers can be modified but not the chosen shipment or payment. I think I read Milbo some time ago mention that those come from plugins and is more complicated.

Yes, I know, I have never edited this. But there is a way. If the order isn´t confirmed You can set the order status to pending and use the plugin from Daycounts "Finalizeorder" and make the customer complete the order with a new payment. This is possible with the standard payment and when the PayPal payment has been cancelled or otherwise still show pending.

regards

Jörgen @ Kreativ Fotografi
Joomla 3.9.18
Virtuemart 3.4.x
Olympiantheme Hera (customized)
This reflects current status when viewing old post.