How to move and size public store Search Box

2 years ago
Hello,

I'm using nopCommerce with source.

Where would I go in the code to move the public store search box and resize it?

Thanks,
Tony
2 years ago
Hello,

You have to go searchbox.cshtml file.

base on that class you could resize it..!!
2 years ago
Hello,

I searched my system.  There are only two _SearchBox.cshtml files.  they are in these locations:

\Presentation\Nop.Web\Views\Boards
\Presentation\Nop.Web\obj\Release\net461\win7-x86\PubTmp\Out\Views\Boards

There are no files without the underscore (_).

They are identical files and they contain this:

<div class="search-box forum-search-box">
    <form asp-route="Search" method="get">
        <div class="basic">
            <input type="text" class="search-box-text" id="forums-small-searchterms" name="searchterms"  placeholder="@T("Forum.SearchForumsTooltip")" />
            <input type="submit" value="@T("Forum.SearchButton")" class="button-2 search-box-button" />
        </div>
        <div class="advanced">
            @Html.RouteLink(T("Forum.AdvancedSearch").Text, "Search", new { adv = true }, new { title = T("Forum.AdvancedSearch").Text })
        </div>
    </form>
</div>


I could be wrong, but it looks like they are for the Forums function.

I don't know how I would use them.

Thanks,
Tony
2 years ago
I am taking about this search box.

Please look at this picture.

https://ibb.co/hP6TMT

under nop.web/views/catalog.
2 years ago
Oh.  I see.  I think you are looking at version 3.90.

I'm sorry I did not say that I am using 4.00.  That file does not exist as your graphic indicates.

Thanks,
Tony
2 years ago
Hello,

No problem.

IF you are using v4 than look at here

https://github.com/nopSolutions/nopCommerce/tree/develop/src/Presentation/Nop.Web/Views/Shared/Components/SearchBox
2 years ago
I did start to look at that file.

I managed to change the size of the search box using the styles.css in my theme.

I think I can use the css to position it, I just need to figure out how to do it.

Thanks,
Tony
2 years ago
Glad to know you figured out your issue.
2 years ago
Actually, I only figured out how to size the search box.

I think I'm going to post to the HTML, XHTML, CSS, Design Questions forums to ask how to move it using CSS.

Thanks,
Tony
2 years ago
sure please post..!!