close ad
Databridge V2 with MySQLi support IS Now Available!
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues


Add to Cart Button...

Thread began 1/22/2013 6:03 pm by daniel279790 | Last modified 1/24/2013 4:20 am by daniel279790 | 632 views | 4 replies |


Add to Cart Button...

Hi There

I'm having trouble with my Add to Cart Button. I want it to redirect to my Cart when clicked. But instead it just reloads the same page.

Looking on these forums it looks like a common problem, but I've tried all the potential solutions - removing spaces, adding @session_commit(); to the redirect bit etc etc. But nothing seems to be working.

Any solutions would be great.

I'm using PHP Ecart 4.5.2.

The dynamanic page is...

And I want it to redirect to...

Many Thanks in advanced.

Sign in to reply to this post

Jason ByrnesWebAssist

i'll need a copy of your pages so i can examine the code.

Sign in to reply to this post


Hi Jason

I've attached them. The page with the Add to Cart Button is customise/choose/choose.php

Many Thanks

Attached Files
Sign in to reply to this post

Jason ByrnesWebAssist

add the following code at line 1 to turn on error reporting:



i bet you get the headers already sent error.

at line 89, you include the init.php file:

in the init.php file, you have some HTML that is being generated.

this HTML is being output to the page before the doctype tag (it also includes it's own doctype tag, causing 2 doctypes, and head sections which is bad HTML format) , and also before the header function to redirect the page.

the header function will fail if there is any output on the page before it.

Sign in to reply to this post


Thanks for the help Jason

I think I was being too clever for my own good with the creation of the init.php file, I'm going to go back to basics and try again, hopefully the re-diredct will work then. :)

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





Ease of use


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...