Page 1 of 3 123 LastLast
Results 1 to 10 of 25
  1. #1
    Join Date
    Nov 2008
    Posts
    36
    Plugin Contributions
    0

    Default Sort order :: specials products

    Hi !

    Is some one to show me how ken i put on specials page an drop down menu with category of my products page, and if i select one category to show mee the products with special price (specials products from that category) ?

    I working on this option a week unsuccessfully.

    Please help someone!

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

    Default Re: Sort order :: specials products

    How ken i put in this conditions to show me the specials products from the categori with id=120 ?

    $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";

    Please help !

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

    Default Re: Sort order :: specials products

    Nobody ?

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

    Default Re: Sort order :: specials products

    I try to show the special products from category with id=120, and i using that interogation to mysql:

    $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_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 )
    WHERE p.products_id = s.products_id and p.products_id = pd.products_id and p.products_status = '1' and cd.categories_id = 120
    AND s.status = 1
    AND cd.categories_id = 120
    AND pd.language_id = :languagesID
    ORDER BY s.specials_date_added DESC";

    The results the same "IN THE SPECIAL PAGE I HAVE ALL TLE PRODUCTS WITH SPECIALS PRICE" is not show the products with SPECIAL PRICE from category with id 120

    Anyone ken help me please !

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

    Default Re: Sort order :: specials products

    To limit the Specials to categories_id on that select, use:
    AND p.master_categories_id = 120

    vs the:
    AND cd.categories_id = 120

    This forces the Master Category of the products table to be 120 ...
    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. #6
    Join Date
    Nov 2008
    Posts
    36
    Plugin Contributions
    0

    Default Re: Sort order :: specials products

    I'change :

    $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 p.master_categories_id = 120
    AND s.status = 1
    AND p.master_categories_id = 120
    AND pd.language_id = :languagesID
    ORDER BY s.specials_date_added DESC";

    and now I no longer show any product in specials page .

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

    Default Re: Sort order :: specials products

    Check the Products that you think are on Special and in categories_id 120 and see if they also are using the master_categories_id 120 in the products table ...
    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!

  8. #8
    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.

  9. #9
    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: 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!

  10. #10
    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

 

 
Page 1 of 3 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