Order editing

  • Posts: 30
  • Thank you received: 1
10 years 2 months ago #171313

-- HikaShop version -- : 2.3.2
-- HikaMarket version -- : 1.4.3
-- Joomla version -- : 2.5.24
-- PHP version -- : 5.3.29

After editing the order in frontend. Adding a product for example.

The TVA is updated but the value of coupon code and payment are not updated
take.ms/jF6f8
In my case payment/coupon code are set in % of the Total

Do you know a way to update them too ?
Thanks

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

  • Posts: 26158
  • Thank you received: 4028
  • MODERATOR
10 years 2 months ago #171335

Hi,

In HikaMarket or in HikaShop, the order management works the same.
When you edit an existing order, you process a manual operation. HikaShop or HikaMarket won't reprocess the discount price so if you want to change it, you need to edit the discount value.
The discount can be applied on specific products, on specific categories, on the shipping (or not) ; so it's not possible to recalculate the discount price without having the full configuration of the discount (which could be changed since the order has been made).

That's why, you need to edit it manually ; because you edit the order content manually.

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.
The following user(s) said Thank You: inetis

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

  • Posts: 30
  • Thank you received: 1
10 years 2 months ago #171937

Thanks for the reply.
I'll try to code something to have the automatic calculation of Shipping/Coupon when we do a manual editing
I have a project where the client have always the same discounts.

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

  • Posts: 26158
  • Thank you received: 4028
  • MODERATOR
10 years 2 months ago #171943

Hi,

You can use the HikaShop trigger "onBeforeOrderUpdate".
In this trigger you will have the update content of the order and the old content too.
So you can see if the order price/products changed and update the discount value + reprocess the full price.
www.hikashop.com/support/support/documen...#onBeforeOrderUpdate

Thanks to this trigger, you will be compatible with the all kind of updates (Front-end with HikaMarket ; back-end with HikaShop).

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

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

  • Posts: 30
  • Thank you received: 1
10 years 2 months ago #171946

Thanks to have show me the right direction.
I love triggers :)

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

Moderators: Obsidev
Time to create page: 0.061 seconds
Powered by Kunena Forum