change state of copied order

  • Posts: 30
  • Thank you received: 0
7 years 7 months ago #266643

-- HikaShop version -- : 264
-- Joomla version -- : 36
-- PHP version -- : 7

Hello,

how can I change the state of a copied order. At the moment the state of the new order is set like in the old order. But instead of status "paid" I need "new order" .

Is this possible?

Regards,
Syno

Please Log in or Create an account to join the conversation.

  • Posts: 82865
  • Thank you received: 13372
  • MODERATOR
7 years 7 months ago #266658

Hi,

On the listing of the orders you can change the status of all the orders, even the copied ones:
monosnap.com/file/YHHAv8sIN4L59ca2hV1aOCVrisU7xL

Please Log in or Create an account to join the conversation.

  • Posts: 30
  • Thank you received: 0
7 years 7 months ago #266697

Hello Nicolas,

thank you for your answer. Yes I know that I can change the state manually. What I meant is the initial state of the copied order. If I copy an order with the state "paid" the new order also has the state "paid" and this state is recorded in the orders history. I need the the initial state of the copied order to be "new"and this should be in recorded in the history.

Regards,
Syno

Please Log in or Create an account to join the conversation.

  • Posts: 82865
  • Thank you received: 13372
  • MODERATOR
7 years 7 months ago #266701

Hi,

There is no system for that. The goal of the copy function is to create a duplicate, not to change some things along the way.
That would require modifications of the copy process.
More precisely, you'd have to modify the code of the function "copyOrder" in the file administrator/components/com_hikashop/classes/order.php
I suppose you could try adding such code before the save:
$order->order_status = "created";

The following user(s) said Thank You: syno

Please Log in or Create an account to join the conversation.

  • Posts: 30
  • Thank you received: 0
7 years 7 months ago #266818

Hello Nicolas,

thank you for your answer. This is exactly what I needed!

Thank you for the great support!

Regards,
Syno

Please Log in or Create an account to join the conversation.

Time to create page: 0.061 seconds
Powered by Kunena Forum