Diff
555
556
556
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_images i on (p.products_id = i.for_id and i.images_groups_id = :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), :table_products_description pd where'); |
|
21 | 21 | | $Qproduct->bindTable(':table_products', TABLE_PRODUCTS); |
  |
22 | | - | $Qproduct->bindTable(':table_images', TABLE_IMAGES); |
| |
| 22 | + | $Qproduct->bindTable(':table_products_images', TABLE_PRODUCTS_IMAGES); |
|
23 | 23 | | $Qproduct->bindTable(':table_products_description', TABLE_PRODUCTS_DESCRIPTION); |
| |
24 | 24 | | |
| |
25 | 25 | | if (is_numeric($id) || ereg('[0-9]+[{[0-9]+}[0-9]+]*$', $id)) { |
| |
|
|
 |
… |
|
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(':images_groups_id', $osC_Image->getID('default')); |
| |
| 34 | + | $Qproduct->bindInt(':products_images_groups_id', $osC_Image->getID('default')); |
|
35 | 35 | | $Qproduct->bindInt(':language_id', $osC_Language->getID()); |
| |
36 | 36 | | $Qproduct->execute(); |
| |
37 | 37 | | |
| |
|
|
 |
… |
|
246 | 246 | | function &getListingNew() { |
| |
247 | 247 | | global $osC_Database, $osC_Language, $osC_Image; |
| |
248 | 248 | | |
  |
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_images i on (p.products_id = i.for_id and i.images_groups_id = :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'); |
| |
| 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 | 250 | | $Qproducts->bindTable(':table_products', TABLE_PRODUCTS); |
| |
251 | 251 | | $Qproducts->bindTable(':table_manufacturers', TABLE_MANUFACTURERS); |
  |
252 | | - | $Qproducts->bindTable(':table_images', TABLE_IMAGES); |
| |
| 252 | + | $Qproducts->bindTable(':table_products_images', TABLE_PRODUCTS_IMAGES); |
|
253 | 253 | | $Qproducts->bindTable(':table_products_description', TABLE_PRODUCTS_DESCRIPTION); |
  |
254 | | - | $Qproducts->bindInt(':images_groups_id', $osC_Image->getID('default')); |
| |
| 254 | + | $Qproducts->bindInt(':products_images_groups_id', $osC_Image->getID('default')); |
  |
255 | 255 | | $Qproducts->bindInt(':language_id', $osC_Language->getID()); |
| |
256 | 256 | | $Qproducts->setBatchLimit($_GET['page'], MAX_DISPLAY_PRODUCTS_NEW); |
| |
257 | 257 | | $Qproducts->execute(); |
|