markModifiedByApp example

if ($context->getTaxState() === CartPrice::TAX_STATE_GROSS) {
            return $currency->getGross();
        }

        return $currency->getNet();
    }

    private function overwrite(QuantityPriceDefinition $definition): void
    {
        if ($this->item instanceof LineItem) {
            $this->item->markModifiedByApp();

            $this->item->setPriceDefinition($definition);
        }

        $new = $this->priceStubs->calculateQuantity($definition$this->context);

        $this->price->overwrite(
            $new->getUnitPrice(),
            $new->getTotalPrice(),
            $new->getCalculatedTaxes(),
        );
    }
Home | Imprint | This part of the site doesn't use cookies.