nginx001 Posted March 8, 2022 Share Posted March 8, 2022 Hello, I have a question. I writed a new module it shows products by code: protected function getProducts(){ $customer = $this->context->customer->id; $sql = 'SELECT p.* FROM `'._DB_PREFIX_.'product` p ORDER id ASC LIMIT 0,10'; $products = Db::getInstance()->executeS($sql); $assembler = new ProductAssembler($this->context); $presenterFactory = new ProductPresenterFactory($this->context); $presentationSettings = $presenterFactory->getPresentationSettings(); $presenter = new ProductListingPresenter( new ImageRetriever( $this->context->link ), $this->context->link, new PriceFormatter(), new ProductColorsRetriever(), $this->context->getTranslator() ); $products_for_template = []; foreach ($products as $rawProduct) { $products_for_template[] = $presenter->present( $presentationSettings, $assembler->assembleProduct($rawProduct), $this->context->language ); } return $products_for_template; } Above code return products which I can pass to file with product template on product list. I would like show a facet navigation on the page where theses products will be show. It is possiiblity? Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now