I have a Filter Product Filter in index.php and i would like to load with jquery only the products, when Filtering, so if i select "Sony" as a Brand, i like without a pager reload to show sony products. (with page reload everything works as expected)
So in my external file (/ext/scripts/ajax_filter.php) i want to make the HTML Code to show.
Code: Select all
if($_POST['jquery_action'] == "show_products"){
$listing_sql = "SELECT p.products_id, p.products_price, p.verfuegbarkeit, p.energie_label, p.energie_label_image, p.products_tax_class_id, p.products_image, p.products_ordered, p.products_date_added, p2c.categories_id, pd.products_name, m.manufacturers_id,m.manufacturers_name,cd.categories_name,p.verfuegbarkeit AS in_stock FROM products p INNER JOIN products_description pd ON p.products_id = pd.products_id INNER JOIN products_to_categories p2c ON p.products_id = p2c.products_id INNER JOIN categories_description cd ON p2c.categories_id = cd.categories_id LEFT JOIN manufacturers m ON p.manufacturers_id = m.manufacturers_id where p.products_status = '1' and p.manufacturers_id = m.manufacturers_id AND (m.manufacturers_id = '83' OR m.manufacturers_id = '172') and p.products_id = p2c.products_id and pd.products_id = p2c.products_id and pd.language_id = '2' and cd.language_id = '2' and p2c.categories_id = '22' ORDER BY products_bestseller DESC";
ob_start();
include $GLOBALS['Template']->map(DIR_FS_CATALOG . 'includes/modules/content/index_products/cm_ip_product_listing_v2.php');
$_POST['html'] = ob_get_clean();
}
echo json_encode($_POST);Code: Select all
<b>Notice</b>: Undefined variable: content_width in <b>/mnt/lamp-www-data/beta_shop/includes/modules/content/index_products/templates/tpl_cm_ip_product_listing_v2.php</b> on line <b>1</b><br />
cm-ip-product-listing">
<br />
<b>Notice</b>: Undefined variable: num_list in <b>/mnt/lamp-www-data/beta_shop/templates/default/includes/components/product_listing.php</b> on line <b>13</b><br />
<br />
<b>Warning</b>: Division by zero in <b>/mnt/lamp-www-data/beta_shop/includes/system/versioned/1.0.8.4/split_page_results.php</b> on line <b>66</b><br />