Merge pull request #19527 from altairis-melina/nocategory

NEW : Add constant to hide categories in TakePos
This commit is contained in:
Laurent Destailleur 2022-01-19 02:30:52 +01:00 committed by GitHub
commit eb3bce9759
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1203,8 +1203,12 @@ if (!empty($conf->global->TAKEPOS_WEIGHING_SCALE)) {
} ?>"> } ?>">
<!-- Show categories --> <!-- Show categories -->
<div class="div4">
<?php <?php
if ($conf->global->TAKEPOS_HIDE_CATEGORIES == 1) {
print '<div class="div4" style= "display: none;">';
} else {
print '<div class="div4">';
}
$count = 0; $count = 0;
while ($count < $MAXCATEG) { while ($count < $MAXCATEG) {
?> ?>
@ -1242,12 +1246,15 @@ if (!empty($conf->global->TAKEPOS_WEIGHING_SCALE)) {
</div> </div>
<!-- Show product --> <!-- Show product -->
<div class="div5"> <div class="div5"<?php if ($conf->global->TAKEPOS_HIDE_CATEGORIES == 1) {
print ' style="width:100%;"';
} ?>>
<?php <?php
$count = 0; $count = 0;
while ($count < $MAXPRODUCT) { while ($count < $MAXPRODUCT) {
print '<div class="wrapper2" id="prodiv'.$count.'" ';
?> ?>
<div class="wrapper2" id='prodiv<?php echo $count; ?>' <?php if ($count == ($MAXPRODUCT - 2)) { <?php if ($count == ($MAXPRODUCT - 2)) {
?> onclick="MoreProducts('less');" <?php ?> onclick="MoreProducts('less');" <?php
} if ($count == ($MAXPRODUCT - 1)) { } if ($count == ($MAXPRODUCT - 1)) {
?> onclick="MoreProducts('more');" <?php ?> onclick="MoreProducts('more');" <?php