Jump to content
  • Posts

    1
  • Joined

  • Last visited

Profile Information

  • First Name
    Raph
  • Last Name
    Robin

[email protected]'s Achievements

Newbie

Newbie (1/14)

10

Reputation

  1. Problem: for those who don't permit out of stock purchase, choosing eg. size XL in the filters displays products without XL size available. Solution: Based on stock 1.6.0.14 Open modules/blocklayered/blocklayered.php Find: (line ~1840) $query_filters_where .= ' AND p.id_product IN (SELECT pa.`id_product` FROM `'._DB_PREFIX_.'product_attribute_combination` pac LEFT JOIN `'._DB_PREFIX_.'product_attribute` pa ON (pa.`id_product_attribute` = pac.`id_product_attribute`)'. Shop::addSqlAssociation('product_attribute', 'pa').' WHERE '.implode(' OR ', $sub_query).') '; Replace with: $query_filters_where .= ' AND p.id_product IN (SELECT pa.`id_product` FROM `'._DB_PREFIX_.'product_attribute_combination` pac LEFT JOIN `'._DB_PREFIX_.'product_attribute` pa ON (pa.`id_product_attribute` = pac.`id_product_attribute`)'. Shop::addSqlAssociation('product_attribute', 'pa').' JOIN `'._DB_PREFIX_.'stock_available` sa ON (sa.`id_product_attribute`=pac.`id_product_attribute` AND sa.`quantity`>0) WHERE '.implode(' OR ', $sub_query).') ';
×
×
  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More