-
Notifications
You must be signed in to change notification settings - Fork 204
/
specials.php
34 lines (26 loc) · 1003 Bytes
/
specials.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
<?php
/*
$Id$
CE Phoenix, E-Commerce made Easy
https://phoenixcart.org
Copyright (c) 2021 Phoenix Cart
Released under the GNU General Public License
*/
require 'includes/application_top.php';
require language::map_to_translation('specials.php');
$listing_sql = sprintf(<<<'EOSQL'
SELECT p.*, pd.*, m.*,
IF(s.status, s.specials_new_products_price, NULL) AS specials_new_products_price,
IF(s.status, s.specials_new_products_price, p.products_price) AS final_price,
p.products_quantity AS in_stock,
IF(s.status, 1, 0) AS is_special
FROM
products_description pd
INNER JOIN products p ON p.products_id = pd.products_id
LEFT JOIN manufacturers m ON p.manufacturers_id = m.manufacturers_id
LEFT JOIN specials s ON p.products_id = s.products_id
WHERE p.products_status = 1 AND s.status = 1 AND pd.language_id = %d
EOSQL
, (int)$_SESSION['languages_id']);
require $oscTemplate->map_to_template(__FILE__, 'page');
require 'includes/application_bottom.php';