diff --git a/local/modules/Beds24/Beds24/Beds24FormFieldsTrait.php b/local/modules/Beds24/Beds24/Beds24FormFieldsTrait.php index de00b329..41d1f52b 100644 --- a/local/modules/Beds24/Beds24/Beds24FormFieldsTrait.php +++ b/local/modules/Beds24/Beds24/Beds24FormFieldsTrait.php @@ -36,12 +36,6 @@ trait Beds24FormFieldsTrait { $searchParameters = new Beds24\SearchParameters($request); - $capaciteMax = '5'; - $productId = $request->getProductId(); - if ($productId === "16") - $capaciteMax = 8; - - $formBuilder // -- Username and passwords ------------------------------------------------------------------------------- ->add( @@ -70,11 +64,6 @@ trait Beds24FormFieldsTrait ] ] ) - ->add( - 'capacite_max', - 'text', - ['data' => $capaciteMax] - ) ->add( 'adults', 'text', diff --git a/local/modules/Beds24/templates/frontOffice/default/hook/product.details-top.html b/local/modules/Beds24/templates/frontOffice/default/hook/product.details-top.html index aae96d0a..ad7763ec 100644 --- a/local/modules/Beds24/templates/frontOffice/default/hook/product.details-top.html +++ b/local/modules/Beds24/templates/frontOffice/default/hook/product.details-top.html @@ -30,9 +30,15 @@ {/form_field} - {form_field field="capacite_max"} - {assign var="capacite_max" value={$data}} - {/form_field} + + {assign var="capacite_max" value=5} + {loop type="feature" name="feature-loop" title="Nre max. de personnes"} + {loop type="feature_value" name="feature-value-loop" feature={$ID} product={$product}} + {loop type="feature-availability" name="feature-av-loop" id={$FEATURE_AV_ID}} + {assign var="capacite_max" value={$TITLE}} + {/loop} + {/loop} + {/loop} {form_field field="adults"}