Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Ecommerce bundle] Editing quantity from pimcore order details page updates the unit price but it should update total order price. #81

Open
pdchaudhary opened this issue Jul 29, 2020 · 0 comments

Comments

@pdchaudhary
Copy link

pdchaudhary commented Jul 29, 2020

Expected behavior

It should update total price not price of product.

Actual behavior

Editing quantity from pimcore order details page updates the unit price.

Steps to reproduce

  1. Order object
  2. Order details Tab
  3. In specific item from table and click on edit
  4. changing qunitity from edit modal

Code example

on editing orderitem it is calling below function and then qunitiy is chaning but order total price and order item's total price is not changing.

 public function itemChangeAmount(OrderItem $item, $amount)
    {
        // init
        $amount = floatval($amount);

        // add log note
        $note = $this->createNote($item);
        $note->setTitle(__FUNCTION__);
        $oldAmount = $item->getAmount();
        $note->addData('amount.old', 'text', $oldAmount);
        $note->addData('amount.new', 'text', $amount);

        // change
        $item->setAmount($amount);

        // save
        $item->save();
        $note->save();

        return $note;
    }

pdchaudhary referenced this issue in pdchaudhary/pimcore Jul 30, 2020
…and order item total

Issue : https://github.com/pimcore/pimcore/issues/6852
Editing quantity from pimcore order details page it is not updating order item total and order total so using this we can update order on chaning qunitiy,
pdchaudhary referenced this issue in pdchaudhary/pimcore Jul 30, 2020
Order not updating when quantity is updating in order details page from pimcore admin
Issue : https://github.com/pimcore/pimcore/issues/6852
Editing quantity from pimcore order details page it is not updating order item total and order total so using this we can update order on chaning qunitiy,
pdchaudhary referenced this issue in pdchaudhary/pimcore Jul 30, 2020
Order not updating when quantity is updating in order details page from pimcore admin
Issue : #6852
Editing quantity from pimcore order details page it is not updating order item total and order total so using this we can update order on chaning qunitiy,
@brusch brusch transferred this issue from pimcore/pimcore May 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants