Jump to content

Creating an "Editable" Proposal Generator


aesthetics1

Recommended Posts

Hello again,

 

I'm trying to work out the right way to do this, and I'm wondering if some of you could give me some tips or point me into the right direction. Basically what I'm looking to create is an "editable" proposal generator to make things a bit easier around the office.

 

Basically you would have a landing page to select your product, select the options, add pricing, and plug a price into a lease payment generator that would spit out the math for the 12/24/.../60 month payment options.

 

I thought about just creating it all in PHP with html forms for all of the variables (customer name, which product, options, etc) and then using PHP to do the math for the lease payments (easy enough I think,) but the part where I'm having trouble is the actual printing and archiving of the proposal once it has been generated.

 

Ideally I would like it to fit perfect on a page every time, obviously, but there are other problems such as the header/footer parts coming out on the page (which I know is a client side thing that I can't really get around.)

 

Is there a better way to do all of this? Is there another language I should be looking at that would make this easier conceptually?

 

I'm sure a few of you have run across this "Editable Invoice" ( http://css-tricks.com/examples/EditableInvoice/ ...) I imagine it behaving similar to this (written with css, javascript.)

Link to comment
Share on other sites

This isn't difficult at all. You just need to have an HTML page that is "designed" for printing. You have a few options.

 

One solution is to have two different pages to present the data. One is used to display the "pretty" version that sits within the framework of the site graphics like all the other pages. The second is just for printing. So, you could have a button/link on the first page for "printable version" which will launch a new window of the second page without all the site graphics.

 

Another solution is one that I almost never see used - which is a shame because it is really slick. Within the CSS framework there is a property to set the "media" for display properties. One use for this is to have the page display differently based upon whether it is displayed in a computer browser or a hand-held device. However, one of the supported "media" is the "print" device. using this property you can set different style properties for elements based upon whether they are in the browser or in the print device.

 

What I have done in the past is set certain elements (header, navigation, footer, etc) to a display of "none" when the page is sent to the printer. So the user sees all the elements in the browser, but the printed page is not cluttered by those elements.

 

Here is a sample page displaying how it is used. View the page in your bwser and you will see both lines of text. But if you go to Print Preview or actually print the page, the second line is not displayed. You can even do the reverse and have it print things that are not displayed in the page such as the date if it is a report.

 

<html>
<head>
<style type="text/css">

/* media neutral styles go here */

@media print {
.noprint { display: none; }
}
</style>

</head>

<body>

<div>This will print</div>
<div class="noprint">This will NOT print</div>

</body>
</html>

Link to comment
Share on other sites

Thanks for the reply. The css media print property is how the editable invoice works as well (it hides the edit buttons etc when you print it.)

 

I'm not so much worried about making it "pretty" as I am with the ability to archive the proposals and pull them up later.

 

I guess I could store it all in mysql and pull them up through a search or "recent proposals" list.

 

I think that would be doable unless there is some other simpler way that I can't grasp.

 

Thanks for the suggestion.

Link to comment
Share on other sites

I'm not so much worried about making it "pretty" as I am with the ability to archive the proposals and pull them up later.

 

I guess I could store it all in mysql and pull them up through a search or "recent proposals" list.

 

Hmm, storing data in a database . . . what a novel idea! Yeah, here are always flat files, butif you have the ability to use a database you should absolutely go that route.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.