Skip to content
This repository has been archived by the owner on Oct 18, 2023. It is now read-only.

Commit

Permalink
Added fix for array to string ocnversion notice. (#97)
Browse files Browse the repository at this point in the history
  • Loading branch information
bibliophileaxe authored and malachy-mcconnell committed Nov 1, 2018
1 parent 662087b commit a0a646c
Showing 1 changed file with 13 additions and 6 deletions.
19 changes: 13 additions & 6 deletions modules/acm_sku/src/Plugin/AcquiaCommerce/SKUType/Configurable.php
Original file line number Diff line number Diff line change
Expand Up @@ -645,12 +645,19 @@ public function cartName(SKU $sku, array $cart, $asString = FALSE) {
}
}

// Create name from label parts.
$cartName = sprintf(
'%s (%s)',
$cart['name'],
implode(', ', $label_parts)
);
// If the cart name has already been constructed and is rendered as a link,
// use the title directly.
if (!empty($cart['name']['#title'])) {
$cartName = $cart['name']['#title'];
}
else {
// Create name from label parts.
$cartName = sprintf(
'%s (%s)',
$cart['name'],
implode(', ', $label_parts)
);
}

if (!$asString) {
$display_node = $this->getDisplayNode($parent_sku);
Expand Down

0 comments on commit a0a646c

Please sign in to comment.