close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Warning: Cannot modify header information

Thread began 2/20/2013 8:57 am by info445899 | Last modified 2/22/2013 6:59 am by Jason Byrnes | 899 views | 3 replies |

info445899

Warning: Cannot modify header information

Hello,
I'm getting this Warning: Cannot modify header information error just on the remote server when I click on the Add to cart button, and won't load the cart page. On the local server it looks ok. Can you help out? Thanks!

tende_ecart.php?categoria=tenda&style=Colors%20STYLE

Attached Files
tende_ecart.zip
Sign in to reply to this post

Jason ByrnesWebAssist

the headers already sent error is caused by having output on the page before the header function is called.

in your case, you have the code for the ecart add to cart button behavior in the HTML body of the page.

the add to cart button code should be in the head of the page before the doctype tag, not in the HTML body.


by adding it in the HTML body, there is already HTML output to the page before the add to cart button calls the header function to perform the redirect. this is causing the error.

Sign in to reply to this post

info445899

Thanx for your reply.
I put the ecart code within html because I had made a query within a query in order to show all the different product colours. Is there a workaround, maybe with ob_start? or javascript in order to load the cart page? The cart loads properly with all the selected products but it just won't load the cart page.

Sign in to reply to this post

Jason ByrnesWebAssist

use another products recordset in the head of the page that will be used by eCart, that way eCart does not need to be in the body of the page.

Sign in to reply to this post

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...