Yes, and i have:
index.php?main_page=product_info&cPath=120&products_id=1923
and the product with id=1923 is on specials
In database i have: on table products: master_categories_id=0 (all are 0)
Yes, and i have:
index.php?main_page=product_info&cPath=120&products_id=1923
and the product with id=1923 is on specials
In database i have: on table products: master_categories_id=0 (all are 0)
Last edited by xergos055; 17 Feb 2011 at 01:12 AM.
Try this ... you have the code in there twice at least:
Code:$specials_query_raw = "SELECT p.products_id, p.products_image, pd.products_name, pd.products_description, p.master_categories_id, cd.categories_id FROM (" . TABLE_PRODUCTS . " p LEFT JOIN " . TABLE_CATEGORIES_DESCRIPTION . " cd on cd.categories_id = 120 and cd.categories_name = 'Aparatori' LEFT JOIN " . TABLE_SPECIALS . " s on p.products_id = s.products_id LEFT JOIN " . TABLE_PRODUCTS_DESCRIPTION . " pd on p.products_id = pd.products_id ) WHERE p.products_id = s.products_id and p.products_id = pd.products_id and p.products_status = '1' AND s.status = 1 AND p.master_categories_id = 120 AND pd.language_id = :languagesID ORDER BY s.specials_date_added DESC";
Linda McGrath
If you have to think ... you haven't been zenned ...
Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!
Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here
Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!
Nothing ...
I think the interogation in database is wrong..
I'm not sure if the code i made for interogation is ok.
All i want is that:
I'will put in the specials page the links with products categorys.
If the visitors want to see if in category with the name:
ex. category 1 is products with spacials price, click on that category.
I dont want in the specials page the specials products to be displayed all mixed.
The original code from tpl_specials_default.php is that:
$specials_query_raw = "SELECT p.products_id, p.products_image, pd.products_name, pd.products_description, p.master_categories_id
FROM (" . TABLE_PRODUCTS . " p
LEFT JOIN " . TABLE_SPECIALS . " s on p.products_id = s.products_id
LEFT JOIN " . TABLE_PRODUCTS_DESCRIPTION . " pd on p.products_id = pd.products_id )
WHERE p.products_id = s.products_id and p.products_id = pd.products_id and p.products_status = '1'
AND s.status = 1
AND pd.language_id = :languagesID
ORDER BY s.specials_date_added DESC";
Last edited by xergos055; 17 Feb 2011 at 02:23 AM. Reason: More explications
I put pictures in the database tables from which I consider to be extracted, in order to display the specials products per category. Hope you can help me solve this problem !
I try in this way but nothing change, all the specials products are displayed at oance
Nobody ken help mee, please !PHP Code:$specials_query_raw = "SELECT p.products_id, p.products_image, pd.products_name, pd.products_description, p.master_categories_id, cd.categories_description, c.categories_id
FROM (" . TABLE_PRODUCTS . " p
LEFT JOIN " . TABLE_SPECIALS . " s on p.products_id = s.products_id
LEFT JOIN " . TABLE_PRODUCTS_DESCRIPTION . " pd on p.products_id = pd.products_id
LEFT JOIN " . TABLE_CATEGORIES_DESCRIPTION . " cd on cd.categories_id = 120
LEFT JOIN " . TABLE_CATEGORIES . " c on c.categories_id = 120 )
WHERE p.products_id = s.products_id and p.products_id = pd.products_id and p.products_status = '1'
AND s.status = 1 AND cd.categories_id = '120' AND c.categories_id = '120'
AND pd.language_id = :languagesID
ORDER BY s.specials_date_added DESC";
Let's step back a minute ...
Where are you when you want the Specials to show for a specific categories_id ...
Are you trying to *always* limit it to 120 or is that an example ...
Be very specific in the details about what you are trying to do ...
Linda McGrath
If you have to think ... you haven't been zenned ...
Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!
Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here
Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!
I'm on the specials page. I have a drop down menu with the products categoris (not subcategoris).
If i select the categori Adidas with id=21, i want to view all the specials products from that categori