Skip to content

[Bug] OrderDraftManager::recalculate — weight без умножения на count #375

Closed

Description

@Ibochkarev

Описание проблемы

При пересчёте draft:

$weight += $product->get('weight'); // без * count

В CartItemManager::calculateStatus, OrderFinalizeService, ManagerOrderCostRecalculator используется weight * count.

Шаги воспроизведения

  1. Добавить в корзину товар weight=1, count=3.
  2. Дождаться/вызвать recalculate draft.
  3. Сравнить msOrder.weight и cart.status.total_weight.

Ожидаемое поведение

msOrder.weight === 3 (и delivery weight_price от этого).

Фактическое поведение

OrderDraftManager.php ~157–160 пишет weight=1; status показывает 3. Доставка по весу на checkout занижена.

Дополнительный контекст

Однострочный фикс + регрессионный тест на вес.

Activity

  1. added
    priority: highВажно исправить в ближайшее время
    bugSomething isn't working
    on Jul 15, 2026
  2. added a commit that references this issue on Jul 28, 2026
    4345956
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingpriority: highВажно исправить в ближайшее время

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions