Can't open Account and Cart in pimcore demo frontend on Pimcore localhost:2000 docker

Hey All,

I’m running Pimcore on docker based on this reference :

and I’m running on localhost:2000/en to open the Pimcore demo frontend.

In top navbar menu, when I open Shop , it works and goes to localhost:2000/en/shop.
even for one of the Shop Category like basketball, it goes to http://localhost:2000/en/shop/Basketball~c106

the same goes to landing pages, special function, and even search form.

But when I click on Account and Cart, why both of them can’t be opened?

they redirect to :

it seems that account and cart are not included to localhost:2000.

in layout.html.php , the navbar is set in this code :

<div class="navbar-wrapper">
    <?php
        $mainNavStartNode = $document->getProperty("mainNavStartNode");
        if(!$mainNavStartNode) {
            $mainNavStartNode = \Pimcore\Model\Document::getById(1);
        }
    ?>

    <div class="container">
        <div class="navbar navbar-inverse navbar-static-top">
            <div class="container">
                <div class="navbar-header">
                    <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
                        <span class="icon-bar"></span>
                        <span class="icon-bar"></span>
                        <span class="icon-bar"></span>
                    </button>
                    <a class="navbar-brand" href="<?= $mainNavStartNode; ?>">
                        <img src="/static/img/logo-white.svg" alt="pimcore Demo">
                    </a>
                </div>
                <div class="navbar-collapse collapse">
                    <?php
                        $mainNavigation = $this->navigation()->buildNavigation($document, $mainNavStartNode, null, function($page, $document) {
                            if($document->getProperty("templateType") == "shop" && $document->getProperty("globalRootCategory")) {
                                foreach($document->getProperty("globalRootCategory")->getChildren() as $category) {
                                    $page->addPage(new Pimcore\Navigation\Page\Document([
                                        "label" => $category->getName(),
                                        "id" => "category-" . $category->getId(),
                                        "uri" => $category->getDetailUrl(["document" => $document])
                                    ]));
                                }
                            }
                        });
                        echo $this->navigation()->menu()->renderMenu($mainNavigation, [
                            "maxDepth" => 1,
                            "ulClass" => "nav navbar-nav"
                        ]);
                    ?>

                    <ul class="nav navbar-nav navbar-right cart">
                        <?= $this->template('Includes/login.html.php', ["language" => $this->language]); ?>
                        <li><a href="<?= $this->url("cart", ["language" => $this->language, "action" => "list"]) ?>"><span class="glyphicon glyphicon-shopping-cart" aria-hidden="true"></span>  <?= $this->translate("general.mycart") ?></a></li>
                    </ul>


                    <form class="navbar-form navbar-right" role="search" action="<?= $this->pimcoreUrl(["prefix" => $this->language, "controller" => "shop", "action" => "search"], "action") ?>">
                        <div class="form-group">
                            <input type="text" class="form-control" name="term" placeholder="Search" value="<?= $this->escape($this->getParam("term")) ?>">
                        </div>
                        <button type="submit" class="btn btn-default">
                            <span class="glyphicon glyphicon-search" aria-hidden="true"></span>
                        </button>
                    </form>

                </div>
            </div>
        </div>
    </div>
</div>

Anybody can fix this?
Are there any issues in AccountController or ShopController ?

thanks before :blush:

that is some issue with symfony or pimcore not recognizing the port correctly… that will only happen with my docker images when you run them on port 2000. if you change it to 80, it works fine. You can also just add the missing port in the browser url bar to test these pages.

This demo is outdated. Since ~ 1 month we have a new demo!

hmm sir, would you tell me how to change port 2000 to 80?
should I re-install the pimcore docker-compose?
thanks :+1:

Wow, thanks christian :+1:

is it a car shop?

What’s the major or minor difference between old demo and new demo?
I guess perhaps this new demo has a different directory structure from demo-ecommerce.

Old demo from 2013 - New demo from 2019 — Many technical updates & features based on latest technology standards (Bootstrap 4 / Symfony 4). Have a look at https://demo.pimcore.fun/en/More-Stuff/Demo-Features

Read the docker compose docs please…