- Posts: 171
- Thank you received: 9
Recalculate full order value
- pepecortez
-
Topic Author
- Offline
Less
More
11 years 2 months ago #207661
by pepecortez
Recalculate full order value was created by pepecortez
Hi Jerome!
I've made a small modification in hikamarket/ordermarket view to easily update/modify products in the order. It seems that everything works fine, products fields and the full net price is changed to the new one correctly, but the tax and the full gross price remains the same.
How can I force the component to recalculate the full gross price and the full tax of the order as well?
Thanks for your help and patience in advance!
Best Regards,
PePe
I've made a small modification in hikamarket/ordermarket view to easily update/modify products in the order. It seems that everything works fine, products fields and the full net price is changed to the new one correctly, but the tax and the full gross price remains the same.
How can I force the component to recalculate the full gross price and the full tax of the order as well?
Thanks for your help and patience in advance!
Best Regards,
PePe
Please Log in or Create an account to join the conversation.
11 years 2 months ago #207674
by Jerome
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.
Replied by Jerome on topic Recalculate full order value
Hi,
Well, I don't know what modifications you made exactly and what you want to reprocess exactly but if it's just the order full price and the order taxes ; you need to call the function of the HikaShop order class.
HikaMarket is processing special stuff, but if HikaShop already have code for that, I prefer to not rewrite and just use it
Regards,
Well, I don't know what modifications you made exactly and what you want to reprocess exactly but if it's just the order full price and the order taxes ; you need to call the function of the HikaShop order class.
HikaMarket is processing special stuff, but if HikaShop already have code for that, I prefer to not rewrite and just use it
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.
- pepecortez
-
Topic Author
- Offline
Less
More
- Posts: 171
- Thank you received: 9
11 years 2 months ago #207697
by pepecortez
Replied by pepecortez on topic Recalculate full order value
Yeah, I know I shouldn't overwrite it, but some parts needed to be do that unfortunately.
I tried to solve my problem with these lines, but with no luck:
I tried to solve my problem with these lines, but with no luck:
Code:
$orderClass = hikamarket::get('shop.class.order');
$order = $orderClass->loadFullOrder($order_id, true, false);
$orderClass->recalculateFullPrice($order);
Please Log in or Create an account to join the conversation.
11 years 2 months ago #207734
by Jerome
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.
Replied by Jerome on topic Recalculate full order value
Yes, and ?
That function works pretty well for me... I used it a lot of times in HikaMarket.
That function works pretty well for me... I used it a lot of times in HikaMarket.
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.
- pepecortez
-
Topic Author
- Offline
Less
More
- Posts: 171
- Thank you received: 9
11 years 2 months ago #207781
by pepecortez
Replied by pepecortez on topic Recalculate full order value
Oh... My logic stopped yesterday.
I just had to add the save line, and now everything works fine! Thanks!
I just had to add the save line, and now everything works fine! Thanks!
Code:
$orderClass->save($order);
Please Log in or Create an account to join the conversation.
11 years 2 months ago #207785
by Jerome
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.
Replied by Jerome on topic Recalculate full order value
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.
Moderators: Obsidev
Time to create page: 0.182 seconds