Page 2 of 4 FirstFirst 1234 LastLast
Results 11 to 20 of 36
  1. #11
    Join Date
    Mar 2008
    Posts
    23
    Plugin Contributions
    0

    Default Re: Can specials be sorted?

    Random sorting of Specials? Anyone?

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

    Default Re: Can specials be sorted?

    Have you peeked in the specials module for specials_index.php where it uses: ExecuteRandomMulti

    You could alter the specials.php to utilize something similar with a little bit of tweaking ...
    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!

  3. #13
    Join Date
    Mar 2008
    Posts
    23
    Plugin Contributions
    0

    Default Re: Can specials be sorted?

    I have no idea how to do that. I'm not a coder.

    Quote Originally Posted by Ajeh View Post
    Have you peeked in the specials module for specials_index.php where it uses: ExecuteRandomMulti

    You could alter the specials.php to utilize something similar with a little bit of tweaking ...
    Are you talking about this line?
    PHP Code:
    if ($specials_index_query != ''$specials_index $db->ExecuteRandomMulti($specials_index_queryMAX_DISPLAY_SPECIAL_PRODUCTS_INDEX); 
    Do I paste it in the other file exactly the same way? Where is specials.php, the other guy told me to edit main_template_vars.php. Sorry, I'm really more of a hardware girl. Wires make sense, code doesn't!

    Tracy

  4. #14
    Join Date
    Jan 2009
    Posts
    12
    Plugin Contributions
    0

    Default Re: Can specials be sorted?

    How do I modify the below code to sort by model number?

    ORDER BY s.specials_date_added DESC";

    ############################################################____

    ORDER BY s.specials_????? DESC";


    Thanks

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

    Default Re: Can specials be sorted?

    Seeing the whole SQL line would help to determine how to change the ORDER ...
    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
    Oct 2010
    Posts
    53
    Plugin Contributions
    0

    Default Re: Can specials be sorted?

    Hi all..
    Ive been trying to sort my specials page by sort_order with the following code but it keeps returning an unknown column error. My apologies, im not a programmer, but im assuming a need to define the column some how??? Please help...


    $specials_query_raw = "SELECT p.products_id, p.products_image, pd.products_name,
    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 sort_order, s.specials_date_added DESC";
    1054 Unknown column 'sort_order' in 'order clause'
    in:
    [SELECT p.products_id, p.products_image, pd.products_name, p.master_categories_id FROM (zen_products p LEFT JOIN zen_specials s on p.products_id = s.products_id LEFT JOIN zen_products_description pd on p.products_id = pd.products_id ) INNER JOIN zen_categories_description cd ON (p.master_categories_id = cd.categories_id AND cd.language_id=1 AND cd.categories_description LIKE '%-###### Net 02-%') 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 = 1 ORDER BY sort_order, s.specials_date_added DESC limit 99]

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

    Default Re: Can specials be sorted?

    Your error message and the SELECT that you posted do not match ...

    Are you sure you are getting the SELECT from where the error is being generated?
    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. #18
    Join Date
    Oct 2010
    Posts
    53
    Plugin Contributions
    0

    Default Re: Can specials be sorted?

    thats interesting..
    the only change i made was to add "sort_order" to the line :
    ORDER BY sort_order, s.specials_date_added DESC";
    the orig was
    ORDER BY s.specials_date_added DESC";

    and thats the error that followed...

    Quote Originally Posted by Ajeh View Post
    Your error message and the SELECT that you posted do not match ...

    Are you sure you are getting the SELECT from where the error is being generated?

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

    Default Re: Can specials be sorted?

    Could you go to the Tools ... Developers Tool Kit ... and in the bottom input box try a search on:
    INNER JOIN

    and select Catalog/Admin and click search ...

    what file(s) come up?

    Then a search on:
    cd.categories_description

    what file(s) come up?

    do any contain a SELECT similar to the one you posted that displays in the error message?

    If you read your SELECT statement then read the error message, you will notice there are things in the error message that are not even referenced in the SELECT ...
    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. #20
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: Can specials be sorted?

    Also, you have:
    sort_order

    in the WHERE ... if this is from the table:
    products

    that should be:
    p.products_sort_order

    NOTE: the p is not really needed as it is unique but it helps with clarity ...

    NOTE: If you added a new field to the table:
    specials

    for sort order, make sure that you spelled it correctly ...
    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 4 FirstFirst 1234 LastLast

Similar Threads

  1. Can not access customer information in admin when sorted
    By ErinBeth80 in forum General Questions
    Replies: 2
    Last Post: 4 Aug 2011, 07:12 PM
  2. Can't insert specials
    By mikelouw in forum General Questions
    Replies: 2
    Last Post: 15 Dec 2009, 10:01 AM
  3. Can I ad a restriction on a discount voucher so it can't be used on specials?
    By annav in forum Discounts/Coupons, Gift Certificates, Newsletters, Ads
    Replies: 0
    Last Post: 28 Aug 2009, 08:45 AM
  4. a sorted list?
    By scooter in forum Templates, Stylesheets, Page Layout
    Replies: 4
    Last Post: 28 Dec 2008, 11:37 PM
  5. product sorted by customer id
    By joegimeno in forum Setting Up Categories, Products, Attributes
    Replies: 0
    Last Post: 4 Nov 2006, 08:53 PM

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