A
A
Alex Art2017-06-22 19:38:35
1C-Bitrix
Alex Art, 2017-06-22 19:38:35

Why doesn't the CalculationResult::setDescription method work?

Good day! I'm trying to write a Bitrix delivery module. To do this, I need to replace the description of this delivery method. I'm trying to do it in the following way

protected function calculateConcrete(\Bitrix\Sale\Shipment $shipment)
  {
    $result = new CalculationResult();
    $result->setDeliveryPrice(roundEx(525,SALE_VALUE_PRECISION));
    $result->setPeriodDescription('1 день');

    $result->setDescription(94949);

    return $result;
  }

As a result, setPeriodDescription and setDeliveryPrice are successfully set, but setDescription is ignored. That is, in the description of the delivery method, what is written in the method settings in the admin panel remains. $result->getDescription() after SET, successfully returns what was passed in the parameter, and the description from the settings is still displayed in the frontend.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question