2022-12-09_Ch010: disabled deal counter with min price as deal counter is not precise in some views (search, terms, ..) /ci/app/Views/archives/products.php /ci/app/Traits/ProductsTrait.php fetchProducts() query 2023-01-02_Ch-020: join on table has been moved to implementation and is conditioned on requested field /ci/app/Traits/ProductsTrait.php fetchProducts() query /ci/app/Models/ProductsModel.php getProductsByField() + getProductsByFields() 2023-01-02_Ch-021: removed pager from Search results to avoid double query for counting /ci/app/Controllers/Search.php 2023-01-02_Ch-022: removed fields from fetchProducts(), e.g. description field is not indexed and doubles query time /ci/app/Traits/ProductsTrait.php 2023-01-08_Ch-023: order/sort is in Controller /ci/app/Models/ProductsModel.php /ci/app/Controllers/Search.php 2023-01-15: changes to adapt with Api throw new \CodeIgniter\Exceptions\PageNotFoundException( lang('Error.noTerm', [$term_id]) ); (new \App\Libraries\HelpResponse())->respondNotFound( lang('Error.noTerm', [$term_id]) ); $page = (int)(($this->request->getVar('page')!==null) ? $this->request->getVar('page') : 1) -1; //limit ie ?page=1 would be set to page=0; $page = (int)((\Config\Services::request()->getVar('page')!==null) ? \Config\Services::request()->getVar('page') : 1) -1; //limit ie ?page=1 would be set to page=0; 2023-01-18: moved some fields from sources to sources_feed in /importer/library/class.import.php so.source_feed_url, so.source_feed_root, pa.parser_file f.feed_url AS source_feed_url, f.feed_root AS source_feed_root, pa.parser_file 2023-02-01: using 'COALESCE(shipping_cost, source_cart_shipping) AS shipping_cost' to return costs instead of 'shipping_cost' only /ci/app/Models/ProductsModel.php #57 2024-11-26: additional check on `LEFT JOIN " . self::TBL_FEEDS . "` was added as `AND (f.site_id = rsiso.site_id OR f.site_id IS NULL)` and a `site_id` was added to `sources_feed` table. This allow to separate feeds by site and keep a single entry in sources associated to multiple sites. When `site_id` is NULL it would be fetched by any site associated to it. /importer/library/class.import.php retrieveSources() #223 | retrieveSourceSingle() #253 2024-11-27: additional check in query `AND f.import = :import` to allow import only some feeds instead of all /importer/library/class.import.php retrieveSources() #227 | retrieveSourceSingle() #259 2024-12-20: moving 'import' and 'date_last_import' from 'sources' to 'rel_site_sources' as the first is now shared across multiple sites /importer/import.php setSourceImportBy* deprecated and replaced by setRelSiteSourceImportBy* /importer/library/class.import.php retrieveSources() and retrieveSources() so.import -> rsiso.import 2024-12-25: Search query replacing `$results->like('name', $searchTerm);` with `` after adding FULLTEXT index in db name+description Revert "2023-01-08_Ch-023": order search now in getProductsSearched() Adding a fallback to MATCH AGAINST as LIKE in Search.php dataIndex() /app/Models/ProductsModel.php 2024-12-31: new fetchProductsBase in /Traits/ProductsTrait.php to be used without where clauses in getProductsRandom() and getProductsMostViewed() 2025-01-11: removed "brand" from /importer/library/record.product.php as logic was moved long time ago to separate table 2025-01-11: added RETURNING to INSERT in /importer/library/class.baseimport.php `insertOnDuplicate()` and importer/library/class.connection.php `prepare()` 2025-01-27: movin database config to new dedicated envs, this involved deep changes in structure ci/app/Config/Database.php restoring default value: `public $defaultGroup = YWW_DBGROUP;` >> `public $defaultGroup = 'default';` ci/app/Config/Database.php removed custom configs `public $shopPet` and `public $shopFarma` ci/.env.* new files named based on YWW_DBGROUP (from ci/app/Common.php), new env config is just as ci/public/index.php loading config from dedicated env `(new CodeIgniter\Config\DotEnv(ROOTPATH))->load();` >> `(new CodeIgniter\Config\DotEnv(ROOTPATH, '.env.' . YWW_DBGROUP))->load();` 2025-02-06: changing structure to work in subfolders and not only in domains/subdomains 2025-02-07: currency locale format from env as `app.currencyLocale = nl_NL` in `config('App')->currencyLocale`