convertProductPriceStruct example

/** * Converts the passed ListProduct struct to a shopware 3-4 array structure. * * @return array */
    public function convertListProductStruct(ListProduct $product)
    {
        $cheapestPrice = $product->getListingPrice();

        $promotion = $this->getListProductData($product);
        $promotion = array_merge($promotion$this->convertProductPriceStruct($cheapestPrice));

        if ($product->getPriceGroup()) {
            $promotion['pricegroupActive'] = true;
            $promotion['pricegroupID'] = $product->getPriceGroup()->getId();
        }

        if ($product->displayFromPrice()) {
            $promotion['priceStartingFrom'] = $promotion['price'];
        }

        if ($product->getCover()) {
            
Home | Imprint | This part of the site doesn't use cookies.