Page 2 of 3 FirstFirst 123 LastLast
Results 11 to 20 of 25
  1. #11
    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:	214 
Size:	30.9 KB 
ID:	8849   Click image for larger version. 

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

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

    Click image for larger version. 

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

  2. #12
    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 !

  3. #13
    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: v1.5.5]
    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!

  4. #14
    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

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

    Default Re: Sort order :: specials products

    What variable are you storing the categories_id to when the dropdown is used?

    How do you have the dropdown written?
    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: v1.5.5]
    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!

  6. #16
    Join Date
    Nov 2008
    Posts
    36
    Plugin Contributions
    0

    Default Re: Sort order :: specials products

    What variable are you storing the categories_id to when the dropdown is used?

    How do you have the dropdown written

    Yes i have the categories_id in variable

    PHP Code:
    <b>Selectati categoria </b><br>
    <
    select name="categorie" class="input" style="width=495;" id="p0" onChange="this.form.submit()" >
    <
    option value="Select categori" SELECTED></option>
    <
    OPTION VALUE="120">Categorie1
    <OPTION VALUE="121">Categorie2
    <OPTION VALUE="88">Categorie3
    <OPTION VALUE="118">Categorie4
    </select>
    </
    FORM

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

    Default Re: Sort order :: specials products

    I resolve in that way:
    $valoare_id = "id from master category";
    ex: $valoare_id = "21";

    PHP Code:
     $specials_query_raw "SELECT s.products_id, d.products_name,pp.products_image, s.specials_new_products_price, s.status, p.categories_id, c.categories_name, c1.parent_id
                           FROM (
                           specials AS s
                           LEFT JOIN products_to_categories AS p ON s.products_id = p.products_id
                           LEFT JOIN products AS pp ON s.products_id = pp.products_id
                           LEFT JOIN categories_description AS c ON p.categories_id = c.categories_id
                           LEFT JOIN products_description AS d ON s.products_id = d.products_id
                           LEFT JOIN categories AS c1 ON p.categories_id = c1.categories_id
                                )
                           WHERE s.status =1 and c1.parent_id = 
    $valoare_id 
                           ORDER BY s.specials_date_added DESC"

    but i have a problem.

    If i have specials products in to an category without subcategory, i mean if i have specials directly in the main category that products is not displayed. Is any way to resolv this problem ?
    Last edited by xergos055; 17 Feb 2011 at 09:58 PM.

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

    Default Re: Sort order :: specials products

    And if you use the categories_id in the products_to_categories table such as:
    WHERE s.status =1 and p.categories_id = $valoare_id
    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: v1.5.5]
    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!

  9. #19
    Join Date
    Nov 2008
    Posts
    36
    Plugin Contributions
    0

    Default Re: Sort order :: specials products

    If I use in that way is work for the categori without subcategory , but the specials products from categori with subcategori is not displayed.

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

    Default Re: Sort order :: specials products

    You may need to make some customization to use one method for the SELECT when in a Category with subcategories and one method when in a Category with Products ...
    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: v1.5.5]
    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!

 

 
Page 2 of 3 FirstFirst 123 LastLast

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

Bookmarks

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
Zen-Cart, Internet Selling Services, Klamath Falls, OR