Guest User

Untitled

a guest
Jun 20th, 2018
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.72 KB | None | 0 0
  1. $products_cart_limit = 0;
  2. $limit_query = "SELECT
  3. IF(ps.products_cart_limit IS NULL, p.products_cart_limit, ps.products_cart_limit)
  4. as products_cart_limit
  5. FROM " . TABLE_PRODUCTS . " p
  6. LEFT JOIN " . TABLE_PRODUCTS_STORES . " ps
  7. ON (p.products_id = ps.products_id AND ps.stores_id = '" . STORE_ID . "')
  8. WHERE p.products_id = '" . (int)$products_id . "'";
  9. $limit_result = tep_db_query($limit_query);
  10. if (tep_db_num_rows($limit_result)) {
  11. $limit_array = tep_db_fetch_array($limit_result);
  12. $products_cart_limit = $limit_array['products_cart_limit'];
  13. }
Add Comment
Please, Sign In to add comment