Skip to content

Embed URL

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
$thisNode = $element['#node'];
//Finding the Key the Product1 is in
$product1Key = 0;
foreach ($header as $key=>$item) {
if (preg_match('/.*Product1.*/',$item)) {
$product1Key = $key;
}
}
$j=1;
for ($i=$product1Key;$i<=$product1Key+4;$i++) {
$fieldProduct = 'field_product'.$j;
$theProduct = $thisNode->$fieldProduct;
$productId = $theProduct[0]['nid'];
$productName = $theProduct[0]['safe']['title'];
$header[$i] = '<a href="'.base_path().'node/'.$productId.'">'.$productName.'</a>';
$j++;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.