/** * Finnes EPD-lenke et eller annet sted på produktet? * - Sjekker ALLE postmeta-felt (inkl. ACF / custom felter) * - Sjekker post_content (beskrivelse) * - Sjekker dokumentlisten (norlux_documents) hvis dere bruker den * - Sjekker PDF-vedlegg som matcher EPD_*.pdf * - Arver fra varianter hvis produktet er variabelt */ function nlx_product_has_epd( int $product_id ): bool { // Treffer "EPD_*.pdf" (case-insensitivt). Slapper også av rundt skilletegn. $epd_url_regex = '/(?:^|[\/_-])EPD[^"\s<>]*\.pdf/i'; // 0) Hvis variabelt produkt: arve fra varianter if ( 'product' === get_post_type( $product_id ) ) { $product = wc_get_product( $product_id ); if ( $product && $product->is_type( 'variable' ) ) { foreach ( $product->get_children() as $vid ) { if ( nlx_product_has_epd_single( (int) $vid, $epd_url_regex ) ) { return true; } } } } // 1) Sjekk selve produktet if ( nlx_product_has_epd_single( $product_id, $epd_url_regex ) ) { return true; } return false; } /** * Sjekker én post-ID (produkt/variant). */ function nlx_product_has_epd_single( int $post_id, string $epd_url_regex ): bool { // A) Sjekk dokument-liste hvis brukt $docs = get_post_meta( $post_id, 'norlux_documents', true ); if ( ! empty( $docs ) ) { $blob = is_scalar( $docs ) ? (string) $docs : wp_json_encode( $docs ); if ( stripos( $blob, 'EPD' ) !== false || preg_match( $epd_url_regex, $blob ) ) { return true; } } // B) Sjekk ALLE postmeta-felter for EPD_*.pdf $all_meta = get_post_meta( $post_id ); foreach ( $all_meta as $key => $values ) { foreach ( (array) $values as $v ) { $blob = is_scalar( $v ) ? (string) $v : wp_json_encode( $v ); if ( preg_match( $epd_url_regex, $blob ) ) { return true; } } } // C) Sjekk innholdet (beskrivelse / kort beskrivelse ligger ofte i meta, men tar post_content også) $post = get_post( $post_id ); if ( $post && ! empty( $post->post_content ) ) { if ( preg_match( $epd_url_regex, $post->post_content ) ) { return true; } } // D) Sjekk PDF-vedlegg som er "attached" til posten $attachments = get_attached_media( 'application/pdf', $post_id ); if ( ! empty( $attachments ) ) { foreach ( $attachments as $att ) { $url = wp_get_attachment_url( $att->ID ); $file = get_post_meta( $att->ID, '_wp_attached_file', true ); if ( ($url && preg_match( $epd_url_regex, $url )) || ($file && preg_match( $epd_url_regex, (string) $file )) ) { return true; } } } return false; } Alba Pendant E27 Max 40W Brass Ø400mm 3m cable | Norlux

Alba Pendant E27 Max 40W Brass Ø400mm 3m cable

  • Pendant lamp with 3 meter cable
  • 40 cm in diameter
  • E27 socket (light bulb sold separately)
Read more
Product number: 118045-4 Assortment status: Backorder item Category:
CE markedIP20: Indoor use.Insulation class 2: Double insulated and should not be connected to ground.Application: Indoor

Product info

DESCRIPTION

Suspended ceiling pendant with a visible light source behind curved brass-colored metal wires. The pendants provide a delicate light with an exciting shadow pattern.

E27 light bulb is not included and is sold separately.

Assembly

Documentation

SPECIFICATIONS

ELECTRICAL DATA

Dimming type

Depending on light source

Voltage [V]

230V 50Hz

Insulation class

2

Base

E27

Max power, light source [W]

40

Product

IP rating

IP20

Color

Brass

Width [mm]

400

Height [mm]

380

Weight [kg]

3.08

LIGHTING

Light source

Light source not included

ASSEMBLY / CONNECTION

Assembly

Pendulum