Quantcast
Channel: Programmierung - Shopware Community Forum
Viewing all articles
Browse latest Browse all 2871

Attribut aus Attribute/Customer Model mit getAttribute()->fromArray($data) holen?

$
0
0

Hallo,


folgendes Problem: Ich brauche aus dem Attribute/Customer Model ein Attribut für einen bestimmten $customer. Ich kenne von diesem Attribut nur den Namen.

        // Get Customer
        $customerModel = Shopware()->Models()->getRepository('Shopware\Models\Customer\Customer');
        /** @var  $customer \Shopware\Models\Customer\Customer */
        $customer = $customerModel->findOneBy(array('id' => $user));
        /** @var  $attribute \Shopware\Models\Attribute\Customer */
        $attribute = $customer->getAttribute()->fromArray($data);

Kann ich nun auf das Attribut mit der Methode fromArray($data) zugreifen bzw. dieses holen?

Welche Form muss dann das $data-Array haben?


Viewing all articles
Browse latest Browse all 2871

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>