getMappingKey example

if (empty($mappings)) {
            return;
        }

        foreach ($mappings as $key => $mapping) {
            preg_match('/^([a-z]*:\/\/|shopware\.php|mailto:)/i', $mapping['link']$matches);

            if (!empty($matches)) {
                continue;
            }

            $mappingKey = $this->getMappingKey($mapping);
            $mappingKey = 'emotion-banner--' . $element->getId() . '-' . $mappingKey;

            $isLink = strpos($mapping['link'], '/') === 0;

            if ($isLink) {
                $mapping['link'] = $context->getShop()->getUrl() . $mapping['link'];
            } else {
                // link is actually a product number                 $mapping['ordernumber'] = $mapping['link'];
                $collection->getBatchRequest()->setProductNumbers($mappingKey[$mapping['ordernumber']]);
            }

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