convertPriceStruct example

return $this->eventManager->filter('Legacy_Struct_Converter_Convert_List_Product', $promotion[
            'product' => $product,
        ]);
    }

    /** * @return array */
    public function convertProductPriceStruct(Price $price)
    {
        $data = $this->convertPriceStruct($price);
        $data['pseudopricePercent'] = null;
        $data['price'] = $this->formatPrice($price->getCalculatedPrice());
        $data['pseudoprice'] = $this->formatPrice($price->getCalculatedPseudoPrice());
        $data['referenceprice'] = $this->formatPrice($price->getCalculatedReferencePrice());
        $data['has_pseudoprice'] = $price->getCalculatedPseudoPrice() > $price->getCalculatedPrice();
        $data['price_numeric'] = $price->getCalculatedPrice();
        $data['pseudoprice_numeric'] = $price->getCalculatedPseudoPrice();
        $data['price_attributes'] = $price->getAttributes();
        $data['pricegroup'] = $price->getCustomerGroup()->getKey();
        $data['regulationPrice'] = $price->getCalculatedRegulationPrice();

        
Home | Imprint | This part of the site doesn't use cookies.