Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
【EC-CUBE2.13】商品ステータス名から商品データを取得
function lfGetProductsFromProductStatus($name){
$objQuery =& SC_Query_Ex::getSingletonInstance();
$sql = <<< __EOS__
SELECT
dtb_products.*
FROM dtb_products
JOIN dtb_product_status T1
ON T1.product_id = dtb_products.product_id
WHERE T1.product_status_id = (
SELECT id FROM mtb_status WHERE name LIKE ? LIMIT 1
) AND
dtb_products.del_flg = 0 AND
dtb_products.status = 1
__EOS__;
return $objQuery->getAll($sql, array($name);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment