getPriceColumns example


    protected function getOnSalePriceColums()
    {
        $template = 'IFNULL(listing_price.%s, onsale_listing_price.%s) %s';

        return implode(
            ',',
            array_map(
                function D$column) use ($template) {
                    return sprintf($template$column$column$column);
                },
                $this->listingPriceHelper->getPriceColumns()
            )
        );
    }

    /** * @return \Doctrine\DBAL\Query\QueryBuilder */
    protected function createListingPriceTable(Criteria $criteria, ShopContextInterface $context)
    {
        $selection = $this->listingPriceHelper->getSelection($context);

        
'`percent`',
        ];
    }

    /** * @return string */
    private function getPriceSwitchColumns()
    {
        $template = 'IFNULL(customerPrice.%s, defaultPrice.%s) as %s';
        $switch = [];
        foreach ($this->getPriceColumns() as $column) {
            $switch[] = sprintf($template$column$column$column);
        }

        $switch[] = 'defaultPrice.articleID as product_id';
        $switch[] = 'defaultPrice.articledetailsID as variant_id';

        return implode(',', $switch);
    }

    /** * Get the columns for the price group prices. * * @return string */
Home | Imprint | This part of the site doesn't use cookies.