Results 1 to 10 of 159

Hybrid View

  1. #1
    Join Date
    Jan 2007
    Location
    Los Angeles, California, United States
    Posts
    10,021
    Plugin Contributions
    32

    Default Re: Products Pagination - Support Thread

    Quote Originally Posted by earth-friendly View Post
    Hi. Thanks for your help! I looked at the /includes/modules/pages/advanced_search_result/header_php.php page, and I do see the DISTINCT keyword:
    $select_str = "SELECT DISTINCT " . $select_column_list .
    " m.manufacturers_id, p.products_id, pd.products_name, p.products_price, p.products_tax_class_id, p.products_price, p.products_qty_box_status, p.master_categories_id ";
    so it doesn't look like I have not modified that file in the way you suspected.
    I did try something else. I removed the advanced_search_result from "other pages to link", in the Products Pagination configuration page, just to see if I still had the problem when I turned off the Products Pagination for that page, and I do still have the problem. I had added a linked product with "fiber" in the title, and when I do a search for "fiber", it kicks the results into a new page, and I have a blank page displayed for the 5th page.
    So, it looks like the Products Pagination mod is unrelated to the problem I am having, and it is caused by something else. I wonder if it is caused by one of the mods I have installed, or if it is a general issue for Zencart. Anyway, I'm sorry to bother you with this. I thought I would try your forum first, because your mod does affect the header text on the advanced search results page, but it seems that the info that you use comes from somewhere else.

    Thanks again for your help, and for a great mod!
    Not a general issue for Zen Cart.. you have a mod which has done this.. suggest that if you compare the search template page and header to the Zen Cart defaults.. You might want to start a new topic to get more help..
    My Site - Zen Cart & WordPress integration specialist
    I don't answer support questions via PM. Post add-on support questions in the support thread. The question & the answer will benefit others with similar issues.

  2. #2
    Join Date
    Apr 2014
    Location
    NJ
    Posts
    59
    Plugin Contributions
    0

    Default Re: Products Pagination - Support Thread

    I'm looking at the file includes/classes/split_page_results.php.
    I see the lines:

    Code:
    //-bof-product pagination
    //    if (strpos($query_lower, 'distinct') || strpos($query_lower, 'group by')) {
        if ((strpos($query_lower, 'distinct') || strpos($query_lower, 'group by')) && is_numeric($count_key)) {
    //-eof-product_pagination
          $count_string = 'distinct ' . zen_db_input($count_key);
        } else {
          $count_string = zen_db_input($count_key);
        }

    I turned debugging on in the file (set $debug=true in splitPageResults function), and I printed out $count_key, as well as the queries which already get printed out when $debug is true.
    I see:

    Code:
    count_key=p.products_id
    
    count_query=select count(p.products_id) as total FROM (products p LEFT JOIN manufacturers m USING(manufacturers_id), products_description pd, categories c, products_to_categories p2c ) LEFT JOIN meta_tags_products_description mtpd ON mtpd.products_id= p2c.products_id AND mtpd.language_id = 1 WHERE (p.products_status = 1 AND p.products_id = pd.products_id AND pd.language_id = 1 AND p.products_id = p2c.products_id AND p2c.categories_id = c.categories_id AND ((pd.products_name LIKE '%fiber%' OR p.products_model LIKE '%fiber%' OR m.manufacturers_name LIKE '%fiber%' OR (mtpd.metatags_keywords LIKE '%fiber%' AND mtpd.metatags_keywords !='') OR (mtpd.metatags_description LIKE '%fiber%' AND mtpd.metatags_description !='')) ))
    so it is calling is_numeric(p.products_id) which is returning false, and it is not getting 'DISTINCT' in the query.
    I tried replacing the new code with the commented-out code:
    I changed

    Code:
     if ((strpos($query_lower, 'distinct') || strpos($query_lower, 'group by')) && is_numeric($count_key)) {
    back to

    Code:
    if (strpos($query_lower, 'distinct') || strpos($query_lower, 'group by')) {
    and I see the correct results.
    So I'm wondering if I can just change that line back to the original line.
    I have just been making these changes in my test site, but I wonder if you could check to see if it makes sense to make this change.
    Perhaps the call to is_numeric fixed something else, and this might break it in some other way.

    Thanks very much for your help!

  3. #3
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    13,956
    Plugin Contributions
    96

    Default Re: Products Pagination - Support Thread

    Quote Originally Posted by earth-friendly View Post
    I'm looking at the file includes/classes/split_page_results.php.
    I see the lines:

    Code:
    //-bof-product pagination
    //    if (strpos($query_lower, 'distinct') || strpos($query_lower, 'group by')) {
        if ((strpos($query_lower, 'distinct') || strpos($query_lower, 'group by')) && is_numeric($count_key)) {
    //-eof-product_pagination
          $count_string = 'distinct ' . zen_db_input($count_key);
        } else {
          $count_string = zen_db_input($count_key);
        }
    ...
    Hmm, you appear to have a down-level version of the /includes/classes/split_page_results.php file modification. What I've got in the current Products Pagination distribution shows the following on that line:
    Code:
        if ((strpos($query_lower, 'distinct') || strpos($query_lower, 'group by')) && $count_key != '*') {  /*v1.4.7c*/

  4. #4
    Join Date
    Apr 2014
    Location
    NJ
    Posts
    59
    Plugin Contributions
    0

    Default Re: Products Pagination - Support Thread

    Thanks so much for the info! I'm really sorry--I had looked at the description of the newer versions of the mod, but it didn't look like they fixed this specific issue, so I didn't upgrade. I made the change you suggested, and it now works fine! I will be upgrading with all the changes very soon. Thanks again for being so responsive, and for creating a great mod! I really appreciate all your help!

  5. #5
    Join Date
    Apr 2014
    Location
    NJ
    Posts
    59
    Plugin Contributions
    0

    Default Re: Products Pagination - Support Thread

    Hi. I want to thank you again for this wonderful mod! It really makes my website look nice.

    I'm currently adding a new set of templates to my store to make it look nice on a mobile device. I'm wondering if either
    - you have used your mod on a mobile site, and you could tell me what I would need to add to the mobile templates to make it work
    There are 3 files in the mod, in includes/templates/YOUR TEMPLATE/templates. I could figure out what changes were made to those templates for the mod, and make them to my mobile templates, or
    - would I need to disable your mod when someone is on a mobile device, and if so, any suggestions on how to do that?

    Thanks in advance for your advice on this!

  6. #6
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    13,956
    Plugin Contributions
    96

    Default Re: Products Pagination - Support Thread

    Good point, earth-friendly; depending on the number of "intermediate" links you've got in the pagination, it can look "really ugly" when you get to a smaller screen size.

    I'll look into making a small change to the Previous/Intermediate/Next links' generation, adding a class to the different links' types so that you can style away (i.e. display: none;) those intermediate links on the smaller screen sizes.

  7. #7
    Join Date
    Apr 2014
    Location
    NJ
    Posts
    59
    Plugin Contributions
    0

    Default Re: Products Pagination - Support Thread

    I just got this working in the mobile templates on my test site.
    If possible, I'd like to make a couple of changes to the display, but just for the mobile templates, not for my regular templates.
    The problem is that I think the changes need to be made in includes/functions/extra_functions/products_pagination_functions.php, and that file is not template-specific. There is only one version of the functions.
    Right now, on my regular site, I am displaying the pagination as 4 different elements, as follows:
    Showing 1-48 (of 232 items) < 1 2 3 ... 5 > Page: 1 Items per Page: 48
    So for the second element, < 1 2 3 ... 5 > :
    you can click on a number to go to that page, or < or > to go to the previous or next page.
    The third element, Page: 1, is a pulldown menu where you can go to a specific page,
    And the fourth element is a pulldown menu, where you choose how many items to display per page.
    On the regular site, these all fit on one line.
    But on my iphone, in portrait mode, they are currently taking up 3 lines.

    mobile-pagination-2.JPG

    For the mobile site, I'd like to make the following changes:
    Display the first element on one line
    Don't display the second element at all
    Display the third and fourth elements on the next line.
    Even if I leave off the 2nd element, there is no way to fit the other 3 elements on 1 line on an iphone in portrait mode.
    (I'd prefer to fit it all on one line, so if you have any suggestions on how to do that, that would be great!)

    So, is this possible, to modify the functions, so that it generates the display one way for the regular site and a different way for the mobile site?
    Perhaps along the lines of what you were saying, I could use styles to display things differently on the 2 different sites?
    Or, do you have any better suggestions on how I can display this on a mobile device?
    Thanks very much!

 

 

Similar Threads

  1. Compare multiple products - support thread
    By willie bee in forum Addon Templates
    Replies: 37
    Last Post: 9 Jan 2020, 08:25 PM
  2. v154 All Products Virtual -- No Shipping [Support Thread]
    By lat9 in forum All Other Contributions/Addons
    Replies: 16
    Last Post: 22 Jul 2019, 12:04 PM
  3. v153 Linked Products Report [Support Thread]
    By lat9 in forum All Other Contributions/Addons
    Replies: 11
    Last Post: 11 Jun 2015, 09:52 PM
  4. Products Disclaimer Support Thread
    By clydejones in forum All Other Contributions/Addons
    Replies: 12
    Last Post: 2 Jun 2010, 11:29 PM
  5. Products/Categories URLs Exporter Support Thread
    By joshuayang in forum All Other Contributions/Addons
    Replies: 2
    Last Post: 28 Mar 2010, 05:33 PM

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