diff --git a/src/Entity/Parts/Part.php b/src/Entity/Parts/Part.php index 1ebccd3b..2ea740b7 100644 --- a/src/Entity/Parts/Part.php +++ b/src/Entity/Parts/Part.php @@ -232,6 +232,7 @@ class Part extends AttachmentContainingDBElement /** * @var string * @ORM\Column(type="string") + * @Assert\Url() * @ColumnSecurity(prefix="manufacturer", type="string", placeholder="") */ protected $manufacturer_product_url = ''; diff --git a/templates/Parts/info/_main_infos.html.twig b/templates/Parts/info/_main_infos.html.twig index 65e507a6..cb46e13c 100644 --- a/templates/Parts/info/_main_infos.html.twig +++ b/templates/Parts/info/_main_infos.html.twig @@ -7,7 +7,15 @@ {% endif %}
-
{{ part.manufacturer.name ?? ""}}
+
{{ part.manufacturer.name ?? ""}} + {% if part.manufacturerProductUrl %} + + {{ part.manufacturerProductNumber }} + + {% else %} + {{ part.manufacturerProductNumber }} + {% endif %} +

{{ part.name }} {# You need edit permission to use the edit button #} {% if is_granted('edit', part) %} @@ -47,7 +55,7 @@ {% if min_order_amount < max_order_amount %} - {{pricedetail_helper.calculateAvgPrice(part, min_order_amount) | moneyFormat }} - {% endif %} + {% endif %} {% endif %}