Results 1 to 10 of 25

Hybrid View

  1. #1
    Join Date
    Nov 2008
    Posts
    36
    Plugin Contributions
    0

    Default Re: Sort order :: specials products

    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.

  2. #2
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: Sort order :: specials products

    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!

  3. #3
    Join Date
    Nov 2008
    Posts
    36
    Plugin Contributions
    0

    Default Re: Sort order :: specials products

    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

  4. #4
    Join Date
    Nov 2008
    Posts
    36
    Plugin Contributions
    0

    Default Re: Sort order :: specials products

    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 !
    Attached Thumbnails Attached Thumbnails Click image for larger version. 

Name:	categories_description_table.jpg 
Views:	217 
Size:	30.9 KB 
ID:	8849   Click image for larger version. 

Name:	categories_table.jpg 
Views:	207 
Size:	43.8 KB 
ID:	8850   Click image for larger version. 

Name:	products_descriptions_table.jpg 
Views:	212 
Size:	43.2 KB 
ID:	8851  

    Click image for larger version. 

Name:	products_table.jpg 
Views:	214 
Size:	8.8 KB 
ID:	8852  

  5. #5
    Join Date
    Nov 2008
    Posts
    36
    Plugin Contributions
    0

    Default Re: Sort order :: specials products

    I try in this way but nothing change, all the specials products are displayed at oance

    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"

    Nobody ken help mee, please !

  6. #6
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: Sort order :: specials products

    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!

  7. #7
    Join Date
    Nov 2008
    Posts
    36
    Plugin Contributions
    0

    Default Re: Sort order :: specials products

    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

 

 

Similar Threads

  1. v154 Randomize sort order for Specials or Featured
    By bravo685 in forum General Questions
    Replies: 1
    Last Post: 8 Sep 2015, 12:20 PM
  2. Reverse sort order of products
    By TecBrat in forum Templates, Stylesheets, Page Layout
    Replies: 5
    Last Post: 11 Mar 2011, 09:39 PM
  3. Specials Box - sort order
    By skype55 in forum Setting Up Specials and SaleMaker
    Replies: 1
    Last Post: 24 Feb 2008, 03:47 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg