Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 570419
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T13:23:58+00:00 2026-05-13T13:23:58+00:00

In my application, i have: a table storing customers’ orders, and a table storing

  • 0

In my application, i have:

  • a table storing customers’ orders, and
  • a table storing order entries

so basically a one-to-many relationship between the orders table and the orders entries table (should be quite a common structure).

i have a page that display all of a customer’s orders (but not the entries). This part is simple, in my OrdersController, i have a viewAllOrdersAction which queries the DB, and send the results to the view for rendering.

Now, the next thing i want to do is, when the user clicks on a specific order, i want to go to a page which shows all the entries for that order.

i suppose i will need to add a viewOrderAction to the OrdersController which again queries the DB and send results to another view.

The question i have is regarding sending the orderId from the viewAllOrders page to the viewOrderAction and retrieving it there.

What is the right way to do this?

  1. Should i do a very simple form with a hidden orderId field and a link which does a submit? it does seem overkill…
  2. Or should i just compose a link URL with “?orderId=12345”? i would suppose this would be the better way, but how do i construct a URL with a GET param using the Zend_View’s URL helper (i.e. the $this->url(…) in a view)?

Thanks!

  • 1 1 Answer
  • 1 View
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T13:23:58+00:00Added an answer on May 13, 2026 at 1:23 pm

    Option 2 is the best bet and it would look something like:

    <?php echo $this->url(array('order_id' => $this->order->getId()), $viewOrderRouteName); ?>
    

    Now if you didnt have a named route with module, contorller, action speced then you could:

    <?php echo $this->url(array(
        'order_id' => $this->order->getId()
        'module' => 'customer',
        'controller' => 'order',
        'action' => 'viewOrder'
    ), 'default' ); ?>
    

    Assuming you have the default route enabled. Note this just ouputs the url not a full a tag so use in it as the href attrib or use sprintf to compose the tag… I think there is a generic html tag helper so you could use that as well.

    Now if you dont want to expose your order ids in the url you could come up with some sort of other params to select the order itself (although this would require a join query in your view order controller) like customer username && order date or what have you simialr to how you might see a blog permalink as a date && a title “slug”.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am writing a turbogears2 application. I have a table like this: class Order(DeclarativeBase):
I have an application where I move data from one table to another on
I have a table in a database which is used for storing application configuration
I have problem with my application. I have table report, there are 2 column
I have a table like this: Application,Program,UsedObject It can have data like this: A,P1,ZZ
I have a table from a vendor application that stores some xml data into
I am working on an auction web application. Now i have a table with
I use telerik tabstrip in my mvc 3 application. I have a table inside
I have an application that records activity in a table (Oracle 10g). The logging
I have an application which has a Projects table and a Users table. In

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.