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 .....' Error ?

Thread began 10/12/2015 7:23 am by s.joiner74419001 | Last modified 10/22/2015 12:03 pm by Ray Borduin | 3610 views | 23 replies |

s.joiner74419001

'Warning: Cannot modify header information .....' Error ?

I am trying to set up the first part of an Application process where a payment is required so I am using Ecart, incidentally I will be requesting help via a support ticket once I have taken the project as far as I can.

( Ray might recall helping me back in May for a membership application using Ecart for 'lease-assn.org' which was similar to this project.)

I have so far:-
Created an Ecart object.
Added the 'Add to Cart' behaviour to the submit button of my Application form.
I have created a Display Cart page with a 'Checkout Button'
And last of all I have run the 'Checkout Wizard' to create the pages.

On testing I am submitting the application then clicking the 'Checkout button' and it directs to the checkout page with an error as follows: -

Warning: Cannot modify header information - headers already sent by (output started at E:\Domains\r\rtmf.org.uk-20218885\user\htdocs\checkout_f.php:138) in E:\Domains\r\rtmf.org.uk-20218885\user\htdocs\confirm_f.php on line 116.

I am pretty sure there aren't any white spaces between tags so what else can cause this error?

Subsequently I thought also because I do not require shipping it should skip this page As this is what happens in my previous project.

Ive attached the files I thought might be relevant.

Thanks in advance.

Sign in to reply to this post

Ray BorduinWebAssist

The code on lines 491 to 504 needs to be moved to the top of the page after line 18. I think that should solve the error and you won't actually see the shipping fields it will go straight to paypal.

Sign in to reply to this post
Did this help? Tips are appreciated...

s.joiner74419001

That solved it. Thanks Ray. Now that is all working I have an advanced issue I need help with as follows.

The membership will be for a block of flats with a base fee of £10.00 and then £1.00 per flat in the block. For example a block of 50 flats will be £10.00 plus £50.00 totalling a cost of £60. I am unsure of the best way to set this up. It currently only has the £10.00 as the charge. I have the two columns in the DB table as 'base_charge' and 'price_per_flat'.

Thanks in advance.

Sign in to reply to this post

Ray BorduinWebAssist

Add another column to the shopping cart for "BaseCharge" and then bind the per flat price to the price in the cart. Then update the TotalPrice calculation
from: [Price] * [Quantity]
to: [BaseCharge] + ([Price] * [Quantity])

Sign in to reply to this post
Did this help? Tips are appreciated...

s.joiner74419001

Thanks for this Ray. Im now having difficulties in feeding the correct amount into the 'Quantity column. I have tried binding the amount from the value given in the application form but it stops the cart from working.

This is what I have:-

the product (membership) is in a Database table which the following columns. [ item_id, item_name, base_charge, per_flat_price, quantity, meta_keywords, meta_description ] If I create a recordset using this table only its fine but the quantity value is wrong as it is always 1. The quantity needs to be determined by the 'number of flats' the user enters in the application form ( where the 'Add to Cart' behaviour is attached )

I have tried joining the DB table that holds the value and then binding the value to the 'Quantity' column but it seems to break the cart function and just enters the form into the database but doesn't direct to the 'cart display page'

My thinking is that it is trying to retrieve a value that isn't there yet possibly.


Any ideas!

Thanks in advance!

Sign in to reply to this post

s.joiner74419001

I have re-created the Cart and re-run the Checkout Wizard and I am now getting the following error when I 'SESSION' dump to the 'checkout_failure.php' page.

array(14) { ["WAENCRYPTEDRETURNUSED"]=> bool(false) ["WAENCRYPTEDRETURNSUCCESS"]=> bool(false) ["WAVT_membersapplication_282_Errors"]=> string(0) "" ["members_id"]=> int(37) ["fed_properties_id"]=> int(37) ["rtm_companies_id"]=> int(0) ["federation_membership_Items"]=> string(187) "1|WAECART|fed_membership|WAECART|RTMF Membership Application|WAECART||WAECART|0|WAECART|1|WAECART|1|WAECART|10|WAECART|144482601202159984|WAECART|0|WAECART|11|WAECART|1 fed_membership (1)" ["WAEC_ContinueRedirect"]=> string(35) "/federation/members_application.php" ["eCart_PPECO_System"]=> string(2) "US" ["WA_BillingAgreements"]=> array(0) { } ["PayPal_ECO_Token"]=> string(0) "" ["ECO_Auth_Request"]=> string(1431) "djoiner_api1.rtm-conference.org.ukFUM46UM86DP5DTH4AujtnJOrxiDW0WQ2M-4VewOYXb0xAbso9bKB478nxEWC4mmxLDGEARLq63.0http://www.rtmf.org.uk/pp_confirm_f.phphttp://www.rtmf.org.uk/cart.php?ppcancel=1SoleBillingSale11.0011fed_membership111Sale" ["ECO_Auth_Result"]=> string(2176) "2015-10-14T13:37:59ZFailure977471803c54eTransaction refused because of an invalid argument. See additional error messages for details.The totals of the cart item amounts do not match order amounts.10413Error63.018308778" ["fed_membership_Items"]=> string(187) "1|WAECART|fed_membership|WAECART|RTMF Membership Application|WAECART||WAECART|0|WAECART|1|WAECART|1|WAECART|10|WAECART|144482926266754904|WAECART|0|WAECART|11|WAECART|1 fed_membership (1)" }

Help Please.

I have attached relevant pages.

Sign in to reply to this post

Ray BorduinWebAssist

On confirm_f.php update line 56 to:
$WA_PP_ECO_Do_itemized[1][$nextIndex] = "".$fed_membership->DisplayInfo("TotalPrice") ."";

on line 59 change it to:
$WA_PP_ECO_Do_itemized[1][$nextIndex] = "".$fed_membership->DisplayInfo("Quantity") ." " . $fed_membership->DisplayInfo("Name") ."";

on line 65 update it to:
$WA_PP_ECO_Do_itemized[1][$nextIndex] = "1";

Then you will have to update the same three lines on pp_confirm_f.php lines 95, 98,107

Sign in to reply to this post
Did this help? Tips are appreciated...

s.joiner74419001

binding tab disappeared from insert record window.

Thanks Ray, before I try this. I am experiencing an error on my Laptop with insert record behaviour. When I either select from the window or double click a current behaviour, the bindings tab on the insert record pop-out window has disappeared. ( see attachment )

Any ideas?

Sign in to reply to this post

s.joiner74419001

Quantity value

Thanks Ray, that solved the error. Did you see my previous post (#5) regarding the Quantity value? I need help with this.

Regards

Sign in to reply to this post

Ray BorduinWebAssist

Can I see a copy of the add to cart page that has the wrong quantity getting added? I'll have to look at it to see what is wrong.

Sign in to reply to this post
Did this help? Tips are appreciated...
loading

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