if ($error): ?>
Error:
=$error?>
else: ?>
=$part->get('description')?>
if ($part->get('url')): ?>
More information: =parse_url($part->get('url'), PHP_URL_HOST)?>
endif ?>
if ($part->get('type') == 'module'): ?>
Generate Part List
endif ?>
if ($part->get('type') == 'module' || $part->get('type') == 'assembly' || $part->get('type') == 'kit'): ?>
Component Parts
if (!empty($list->type_list)): ?>
Part |
Type |
Quantity |
foreach ($list->type_list AS $type => $data): ?>
foreach ($data AS $unique_id): ?>
$unique = $list->getUnique($unique_id); ?>
=$unique->get('name')?> |
=UniquePart::typeToEnglish($type)?> |
=$list->getUniqueQuantity($unique->id)?> =$unique->get('units')?> |
endforeach ?>
endforeach ?>
else: ?>
No parts found.
endif ?>
endif ?>
Suppliers
if (!empty($suppliers)): ?>
Name |
Info |
foreach ($suppliers AS $row): ?>
$supplier = $row['Supplier'] ?>
$spart = $row['SupplierPart'] ?>
$url = $spart->getBuyUrl() ?>
=$supplier->get('name')?> |
if ($url): ?>
=$spart->get('part_num')?> |
else: ?>
=$spart->get('part_num')?> |
endif ?>
endforeach ?>
else: ?>
No suppliers found.
endif ?>
Where is it used?
if (!empty($modules)): ?>
Module |
Subassembly |
foreach ($modules AS $row): ?>
$upart = $row['UniquePart'] ?>
$raw = $row['RawPart'] ?>
if (!$upart->id):
$parent = new RawPart($raw->get('parent_id'));
$upart = new UniquePart($parent->get('part_id'));
?>
=$upart->get('name')?> |
=$raw->get('raw_text')?> |
else: ?>
=$upart->get('name')?> |
=$upart->get('description')?> |
endif ?>
endforeach ?>
else: ?>
This part is not used anywhere.
endif ?>
Embed this part list:
endif ?>