[Solved] Checkout -> Summary -> Delivery Services don't have media attached

Questions around the TYPO3 integration and plugins
Forum rules
Always add your TYPO3, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
rowild

[Solved] Checkout -> Summary -> Delivery Services don't have media attached

Post by rowild » 18 Nov 2020, 07:50

In the summary step, the chosen delivery services are shown. "summary-body-standard" include the partial "client/html/checkout/standard/summary/service", which loops over the services:

Code: Select all

foreach( $this->service as $service )
and later checks if there is a media item attached:

Code: Select all

if( ( $url = $service->getMediaUrl() ) != '' ) 
but no image is shown, even though one is added in the BE (as type "icon"), which shows up correctly during checkout in the delivery section.

A `var_export($service->getMediaUrl())` is empty.
A `var_export($service)` does not give me any clue, whether there is a media item available (output below).

What am I doing wrong here?

Thank you!

Code: Select all

Aimeos\MShop\Order\Item\Base\Service\Standard::__set_state(array(
   'serviceItem' => NULL,
   'attributes' => 
  array (
  ),
   'attributesMap' => NULL,
   'price' => 
  Aimeos\MShop\Price\Item\Standard::__set_state(array(
     'currencyid' => 'EUR',
     'precision' => 2,
     'tax' => '0.0000',
     'prefix' => 'price.',
     'available' => true,
     'modified' => true,
     'bdata' => 
    array (
      'price.id' => '311',
      'price.siteid' => '1.',
      'price.type' => 'default',
      'price.currencyid' => 'EUR',
      'price.domain' => 'service',
      'price.label' => '',
      'price.quantity' => '1',
      'price.value' => '0.00',
      'price.costs' => '14.00',
      'price.rebate' => '0.00',
      'price.taxrates' => 
      array (
        '' => '0.00',
      ),
      'price.status' => '1',
      'price.mtime' => '2020-11-04 08:44:37',
      'price.editor' => 'rowild',
      'price.ctime' => '2020-11-04 08:44:37',
      '.currencyid' => 'EUR',
      '.precision' => 2,
      'price.taxflag' => '1',
    ),
     'listItems' => 
    array (
    ),
     'listRefItems' => 
    array (
    ),
     'listRmItems' => 
    array (
    ),
     'listPrepared' => false,
     'listRmMap' => 
    array (
    ),
     'listMap' => 
    array (
    ),
     'listMax' => 0,
     'propItems' => 
    array (
    ),
     'propRmItems' => 
    array (
    ),
     'propMax' => 0,
     'precision' => 2,
  )),
   'prefix' => 'order.base.service.',
   'available' => true,
   'modified' => true,
   'bdata' => 
  array (
    'order.base.service.siteid' => '1.',
    'order.base.service.code' => 'dhl',
    'order.base.service.name' => 'Zusendung per DHL',
    'order.base.service.type' => 'delivery',
    'order.base.service.serviceid' => '6',
  ),
))
Last edited by rowild on 18 Nov 2020, 08:05, edited 1 time in total.

rowild

Re: Checkout -> Summary -> Delivery Services don't have media attached

Post by rowild » 18 Nov 2020, 08:05

Ok - it seems the summary gets the media items only, when it is available as type "Standard" (not "icon").

Post Reply