Diff
556
583
583
product.php
  |
17 | 17 | | global $osC_Database, $osC_Services, $osC_Language, $osC_Image; |
| |
18 | 18 | | |
| |
19 | 19 | | if (!empty($id)) { |
  |
20 | | - | $Qproduct = $osC_Database->query('select p.products_id as id, p.products_quantity as quantity, p.products_price as price, p.products_tax_class_id as tax_class_id, p.products_date_added as date_added, p.products_date_available as date_available, p.manufacturers_id, pd.products_name as name, pd.products_description as description, pd.products_model as model, pd.products_keyword as keyword, pd.products_tags as tags, pd.products_url as url, i.image from :table_products p left join :table_products_images i on (p.products_id = i.products_id and i.products_images_groups_id = :products_images_groups_id), :table_products_description pd where'); |
| |
| 20 | + | $Qproduct = $osC_Database->query('select p.products_id as id, p.products_quantity as quantity, p.products_price as price, p.products_tax_class_id as tax_class_id, p.products_date_added as date_added, p.products_date_available as date_available, p.manufacturers_id, pd.products_name as name, pd.products_description as description, pd.products_model as model, pd.products_keyword as keyword, pd.products_tags as tags, pd.products_url as url, i.image from :table_products p left join :table_products_images i on (p.products_id = i.products_id and i.products_images_groups_id = :products_images_groups_id and i.default_flag = :default_flag), :table_products_description pd where'); |
|
21 | 21 | | $Qproduct->bindTable(':table_products', TABLE_PRODUCTS); |
| |
22 | 22 | | $Qproduct->bindTable(':table_products_images', TABLE_PRODUCTS_IMAGES); |
| |
23 | 23 | | $Qproduct->bindTable(':table_products_description', TABLE_PRODUCTS_DESCRIPTION); |
| |
|
|
 |
… |
|
31 | 31 | | } |
| |
32 | 32 | | |
| |
33 | 33 | | $Qproduct->appendQuery('and p.products_status = 1 and p.products_id = pd.products_id and pd.language_id = :language_id'); |
  |
34 | | - | $Qproduct->bindInt(':products_images_groups_id', $osC_Image->getID('default')); |
| |
| 34 | + | $Qproduct->bindInt(':products_images_groups_id', $osC_Image->getID('product_info')); |
| |
| 35 | + | $Qproduct->bindInt(':default_flag', 1); |
|
35 | 36 | | $Qproduct->bindInt(':language_id', $osC_Language->getID()); |
| |
36 | 37 | | $Qproduct->execute(); |
| |
37 | 38 | | |
| |
|
|
 |
… |
|
246 | 247 | | function &getListingNew() { |
| |
247 | 248 | | global $osC_Database, $osC_Language, $osC_Image; |
| |
248 | 249 | | |
  |
249 | | - | $Qproducts = $osC_Database->query('select p.products_id, p.products_price, p.products_tax_class_id, p.products_date_added, pd.products_name, pd.products_keyword, m.manufacturers_name, i.image from :table_products p left join :table_manufacturers m on (p.manufacturers_id = m.manufacturers_id) left join :table_products_images i on (p.products_id = i.products_id and i.products_images_groups_id = :products_images_groups_id), :table_products_description pd where p.products_status = 1 and p.products_id = pd.products_id and pd.language_id = :language_id order by p.products_date_added desc, pd.products_name'); |
| |
| 250 | + | $Qproducts = $osC_Database->query('select p.products_id, p.products_price, p.products_tax_class_id, p.products_date_added, pd.products_name, pd.products_keyword, m.manufacturers_name, i.image from :table_products p left join :table_manufacturers m on (p.manufacturers_id = m.manufacturers_id) left join :table_products_images i on (p.products_id = i.products_id and i.products_images_groups_id = :products_images_groups_id and i.default_flag = :default_flag), :table_products_description pd where p.products_status = 1 and p.products_id = pd.products_id and pd.language_id = :language_id order by p.products_date_added desc, pd.products_name'); |
|
250 | 251 | | $Qproducts->bindTable(':table_products', TABLE_PRODUCTS); |
| |
251 | 252 | | $Qproducts->bindTable(':table_manufacturers', TABLE_MANUFACTURERS); |
| |
252 | 253 | | $Qproducts->bindTable(':table_products_images', TABLE_PRODUCTS_IMAGES); |
| |
253 | 254 | | $Qproducts->bindTable(':table_products_description', TABLE_PRODUCTS_DESCRIPTION); |
| |
254 | 255 | | $Qproducts->bindInt(':products_images_groups_id', $osC_Image->getID('default')); |
  |
| 256 | + | $Qproducts->bindInt(':default_flag', 1); |
  |
255 | 257 | | $Qproducts->bindInt(':language_id', $osC_Language->getID()); |
| |
256 | 258 | | $Qproducts->setBatchLimit($_GET['page'], MAX_DISPLAY_PRODUCTS_NEW); |
| |
257 | 259 | | $Qproducts->execute(); |
|