Search the Community
Showing results for tags 'searchprovider.php'.
-
sortowanie [Prestashop 1.7] Dodatkowe opcje sortowania
kzelazny posted a question in Wsparcie i pomoc użytkowników
Cześć wszystkim, Potrzebuję dodać kilka dodatkowych opcji sortowania w sklepie. Znalazłem 2 pliki odpowiedzialne za sortowanie, a przynajmniej tak mi się wydaję. Wprowadziłem zmiany ale niestety na stronie nic się nie zmienia... Jest ktoś w stanie pomóc? SearchProvider.php ŚCIEŻKA: /public_html/modules/ps_facetedsearch/src/Product/SearchProvider.php private function getAvailableSortOrders() { $sortNameAsc = new SortOrder('product', 'name', 'asc'); $sortNameDesc = new SortOrder('product', 'name', 'desc'); $sortDelivery24h = new SortOrder('product', 'price', 'desc'); $sortDelivery48h = new SortOrder('product', 'price', 'desc'); $sortDelivery3d = new SortOrder('product', 'price', 'desc'); $sortDelivery7d = new SortOrder('product', 'price', 'desc'); $sortPriceAsc = new SortOrder('product', 'price', 'asc'); $sortPriceDesc = new SortOrder('product', 'price', 'desc'); $translator = $this->module->getTranslator(); return [ $sortNameAsc->setLabel( $translator->trans('Nazwa, A do Z', [], 'Shop.Theme.Catalog') ), $sortNameDesc->setLabel( $translator->trans('Nazwa, Z do A', [], 'Shop.Theme.Catalog') ), $sortDelivery24h->setLabel( $translator->trans('Dostępność, wysyłka 24h', [], 'Modules.Facetedsearch.Shop') ), $sortDelivery48h->setLabel( $translator->trans('Dostępność, wysyłka 48h', [], 'Modules.Facetedsearch.Shop') ), $sortDelivery3d->setLabel( $translator->trans('Dostępność, wysyłka 3 dni', [], 'Modules.Facetedsearch.Shop') ), $sortDelivery7d->setLabel( $translator->trans('Dostępność, wysyłka 7 dni', [], 'Modules.Facetedsearch.Shop') ), $sortPriceAsc->setLabel( $translator->trans('Cena, rosnąco', [], 'Shop.Theme.Catalog') ), $sortPriceDesc->setLabel( $translator->trans('Cena, malejąco', [], 'Shop.Theme.Catalog') ), ]; } SortOrdersColletion.php ŚCIEŻKA: /public_html/src/Core/Product/Search/SortOrdersCollection.php public function getDefaults() { return [ (new SortOrder('product', 'name', 'asc'))->setLabel( $this->translator->trans('Nazwa, A do Z', array(), 'Shop.Theme.Catalog') ), (new SortOrder('product', 'name', 'desc'))->setLabel( $this->translator->trans('Nazwa, Z do A', array(), 'Shop.Theme.Catalog') ), (new SortOrder('product', 'name', 'desc'))->setLabel( $this->translator->trans('Dostępność, wysyłka 24h', array(), 'Shop.Theme.Catalog') ), (new SortOrder('product', 'name', 'desc'))->setLabel( $this->translator->trans('Dostępność, wysyłka 48h', array(), 'Shop.Theme.Catalog') ), (new SortOrder('product', 'name', 'desc'))->setLabel( $this->translator->trans('Dostępność, wysyłka 3 dni', array(), 'Shop.Theme.Catalog') ), (new SortOrder('product', 'name', 'desc'))->setLabel( $this->translator->trans('Dostępność, wysyłka 7 dni', array(), 'Shop.Theme.Catalog') ), (new SortOrder('product', 'price', 'asc'))->setLabel( $this->translator->trans('Cena, rosnąco', array(), 'Shop.Theme.Catalog') ), (new SortOrder('product', 'price', 'desc'))->setLabel( $this->translator->trans('Cena, malejąco', array(), 'Shop.Theme.Catalog') ), ]; }-
- prestashop1.7
- searchprovider.php
-
(and 1 more)
Tagged with: