A PHP Error was encountered

Severity: Warning

Message: Invalid argument supplied for foreach()

Filename: models/Catmodel.php

Line Number: 182

Backtrace:

File: /home/ugyismegveszel/public_html/back/app/models/Catmodel.php
Line: 182
Function: _error_handler

File: /home/ugyismegveszel/public_html/back/app/libraries/Cat.php
Line: 116
Function: getProductsCount

File: /home/ugyismegveszel/public_html/back/app/controllers/CatController.php
Line: 48
Function: getProductsCount

File: /home/ugyismegveszel/public_html/index.php
Line: 354
Function: require_once

A PHP Error was encountered

Severity: Warning

Message: Cannot modify header information - headers already sent by (output started at /home/ugyismegveszel/public_html/back/system/core/Exceptions.php:283)

Filename: core/Common.php

Line Number: 570

Backtrace:

File: /home/ugyismegveszel/public_html/back/app/models/Catmodel.php
Line: 205
Function: query

File: /home/ugyismegveszel/public_html/back/app/libraries/Cat.php
Line: 116
Function: getProductsCount

File: /home/ugyismegveszel/public_html/back/app/controllers/CatController.php
Line: 48
Function: getProductsCount

File: /home/ugyismegveszel/public_html/index.php
Line: 354
Function: require_once

Database Error

A Database Error Occurred

Error Number: 1064

You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ') ) c' at line 15

SELECT COUNT(*) AS count FROM ( SELECT DISTINCT product_id, pn_content, product_sku, product_price, pu_url , (SELECT pd_price FROM sm_shop_product_discounts WHERE pd_product_id = product_id AND pd_start_date <= 1590773097 AND pd_end_date >= 1590773097 ORDER BY pd_start_date DESC, pd_price DESC LIMIT 1) AS discountPrice ,IF( ( product_stock > 0 OR product_stock_out > 0 ) OR ( product_stock_manager IS NULL ), 1, 0) AS is_stock_ready FROM sm_shop_product_to_categories JOIN sm_shop_products ON ptc_product_id = product_id JOIN sm_shop_product_names ON pn_product_id = product_id AND pn_language_id = 1 JOIN sm_shop_product_urls ON pu_product_id = product_id AND pu_language_id = 1 WHERE product_status = 1 AND product_trashed IS NULL AND ( ( product_stock > 0 OR product_stock_out > 0 ) OR ( product_stock_manager IS NULL ) OR ( product_pre_order IS NOT NULL ) ) AND ptc_category_id IN ( ) ) c

Filename: models/Catmodel.php

Line Number: 205