Results 1 to 3 of 3
  1. #1
    Join Date
    Jun 2009
    Location
    Brisbane, QLD AUS
    Posts
    210
    Plugin Contributions
    0

    Default Class splitPageResults

    Hi all,

    Out of necessity I have had to develop a number of custom forms for data entry and retrieval by store members. The data is then displayed in an identical fashion to the order summary as show on the default "account page" (identified by account_default), with 3 exceptions:

    a) the number of records displayed is much larger than the default of 3 as used in the order summary
    b) i have created a search form which can be used to restrict the number of records returned
    c) i am using the built in pagination as defined in the class "splitPageResults" to tidy up the results (the db stores over 13,000 records for this data).

    This third point is the kicker, and while I am sure my question requires only a simple change in my thinking, I feel a bit stuck so will ask anyway.

    When a search is executed via the form, and more than one page of results is displayed, the form brings in the data originally submitted (form is posted back to the same page) populating the fields appropriately, however the links to each page of results do not resubmit the form, hence navigating to subsequent pages scraps the original query and the links kind of become redundant.

    Any ideas on how best to pass the original form data to the page links without modifying the original class or it's contained functions?

    Apologies in advance if this seems like a dopey question, or one that I perhaps should not even post on this forum...

    Cheers
    Andrejs

  2. #2
    Join Date
    Jun 2009
    Location
    Brisbane, QLD AUS
    Posts
    210
    Plugin Contributions
    0

    Default Re: Class splitPageResults

    ok, so i've now sort of discovered how the "display_links" function works, and i'm guessing that as this code lies in my template file, it is the best one to edit.

    was simply going to pass the form parameters to the url query string, and handle it this way, unless of course anyone else has a better idea?

    one question here though, i added parameters to the end of the zen_get_all_get_params() function nested within the display_links() function and it seemed to break the exclusion of the "page" parameter (i.e. url query string returned was page=1&page=2). when i add them to the beginning it doesn't break. why is this (not that it's terribly important to me right now...)?

  3. #3
    Join Date
    Jun 2009
    Location
    Brisbane, QLD AUS
    Posts
    210
    Plugin Contributions
    0

    Default Re: Class splitPageResults

    My apologies for posting this, seems I just needed to think a bit harder.

    Unless I've missed something, my own solution in the previous post has worked well for me, albeit a little bulky (lots of checking to see whether the $_POST() or the $_GET() variable needs to be used).

    Thanks anyway!

 

 

Similar Threads

  1. v151 splitPageResults
    By niccol in forum General Questions
    Replies: 0
    Last Post: 28 Mar 2013, 04:02 PM
  2. modification to splitPageResults?
    By damiantaylor in forum General Questions
    Replies: 1
    Last Post: 5 Jun 2011, 08:59 PM
  3. splitPageResults
    By quentinjs in forum Customization from the Admin
    Replies: 7
    Last Post: 29 Dec 2006, 02:33 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