wuwanahq / wuwana2

🇪🇺 Wuwana v2 - A webapp to help users find local suppliers in Spain.
Mozilla Public License 2.0
2 stars 2 forks source link

404 page - Suggested companies #70

Closed levogirar closed 3 years ago

levogirar commented 3 years ago

We want to include a list of companies when the user land on a 404 page. Like the picture below:

Screen Shot 2020-12-26 at 12 03 26

Requirements

  1. Show max three companies .
  2. If no match, do not display the section.

Resource

Nils85 commented 3 years ago

Why max 3 companies?

levogirar commented 3 years ago

@Nils85 No particular reason, It just looks good on the design. We can add more for sure. Also, I want to use the same suggestions on the homepage for zero result pages. I added this to the homepage

<?php if ($companies['Counter'] > 0): ?>
    <section>
        <div class="search-title">
            <h2 style="margin:0"><?php echo TEXT[5] ?></h2>
            <div class="dropdown-caret mobile" onclick="showFilter()">
                <?php echo TEXT[14] ?>
                <img src="/static/icon/gray/chevron-down.svg" alt="">
            </div>
        </div>
        <div id="companies-list" class="box">
            <?php WebApp\ViewComponent::printCompanyCards($companies) ?>
        </div>
    </section>
    <input type="hidden" id="page-count" value="<?php echo $pageCount ?>"/>
    <a id="view-more-button" class="button-icon center" onclick="isPossibleToViewMore(<?php echo $jsParam ?>)">
        <img src="/static/icon/plus.svg" alt="">
        <?php echo TEXT[6] ?>
    </a>
<?php else: ?>
    <!-- TO DO: if 0 results, show suggestions similar to the 404 page -->
<?php endif ?>