Re: Create one age with on-sale products
Posted: Fri Jul 09, 2010 3:54 pm
Hi,
No problem
. I found the simple solution but i'm missing something here. I create a new dislpay file, new page layout and new Panel with some name of display file. Now it shoes the product but i'm missing something, a problem with mysql query.
please see it:
Here i want to pass products where vcstock in [|PREFIX|]product_variation_combinatios is more than 1. How can i add this sql to code????
I want to integrate something like this:
in the big code before this... Can you help me?
Thanks
No problem

please see it:
Code: Select all
$query = "
SELECT p.*, FLOOR(prodratingtotal/prodnumratings) AS prodavgrating, imageisthumb, imagefile, ".GetProdCustomerGroupPriceSQL().",
(SELECT COUNT(reviewid) FROM [|PREFIX|]reviews WHERE revstatus='1' AND revproductid=p.productid AND revstatus='1') AS numreviews,
(SELECT brandname FROM [|PREFIX|]brands WHERE brandid=p.prodbrandid) AS prodbrandname,
(SELECT COUNT(imageid) FROM [|PREFIX|]product_images WHERE imageprodid=p.productid AND imageisthumb=0) AS numimages
FROM [|PREFIX|]products p
LEFT JOIN [|PREFIX|]product_images pi ON (p.productid=pi.imageprodid)
WHERE p.prodvisible='1' AND prodprice < prodretailprice AND imageisthumb=0
ORDER BY imagesort ASC
";
I want to integrate something like this:
Code: Select all
SELECT vcoptionids FROM [|PREFIX|]product_variation_combinations
WHERE vcenabled = 1 AND vcstock > 0 AND vcproductid =p.productid
Thanks