chrometweaks.org

Can I put PHP into my index.html page in a shared hosting environment on iPage?

Click Here To View All Answers...


First question I have is Can I put PHP into my index.html page in a shared hosting environment on iPage? Many thanks for any response. Another question... After I installed the random order number contribution, if the buyer selects PayPal as the payment option, it works by assigning the order number 0 to it. When the next PayPal buyer tries to place an order, they get this error code:.

1062 - Duplicate entry '0' for key 1.

Insert into orders (customers_id, customers_name, customers_company, customers_street_address, customers_suburb, customers_city...............

This only happens with PayPal, not my other payment gateway/credit card..

Any clues as to why the PayPal payment option would prevent it from assigning the order a number other than 0??? Better yet, why is it reverting to 0 after each sale???.

Help!!!..

Comments (108)

The answer is Yes, although you might wanna make sure and wait for another commenter to confirm my answer as I am unsure. Better yet, why don't you call the iPage guys because they can answer your iPage question better...

Comment #1

Do you have the held orders contrib installed ?

Comment #2

No, but I think I'd like to have the Held Orders contrib. I might consider adding this one eventually after I get this solved..

I'm using PayPal IPN 0.981, I think, would that make a difference. The random number works great for all the orders except PayPal. I did try to go in and can the "0" to a different number, but I lose all the info to the "0" order, i.e., customer name, etc...

Comment #3

Didn't get an email that you had replied - sorry..

Can you let me have the url of the paypal contrib you have installed..

Thanx...

Comment #4

Here's the contribution (I think)...it's been so long ago....

Http://www.oscommerc...tributions,1352.

Should I just upgrade and forget the problem? If so, which one should I upgrade to? There's several others..

I love the random order idea (until I get lots each day), so I'd want a PayPal that was compatible..

TIA..

Comment #5

Try using this code (replacing ALL existing) in (store)root/checkout_paypalipn.php:.

Let us know how you get on..

<?php.

/*.

$Id: paypal_notify.php,v 0.981 2003-16-07 10:57:31 pablo_pasqualino Exp pablo_pasqualino $.

OsCommerce, Open Source E-Commerce Solutions.

Http://www.oscommerce.com.

Paypal IPN v0.981 for Milestone 2.

Copyright (c) 2003 Pablo Pasqualino.

/cgi-bin/webscr?cmd=_ext-enter&redirect_cmd=_xclick&business=".MODULE_PAYMENT_PAYPALIPN_ID.".

&item_name=".urlencode(STORE_NAME)."&item_number=".$insert_id."&currency_code=".$paypal_ipn_currency."&amount=".$paypal_ipn_order_amount.".

&shipping=".$paypal_ipn_shipping_amount."&tax=".$paypal_ipn_tax_amount."&first_name=".urlencode($order->customer['firstname'])."&last_name="..

Urlencode($order->customer['lastname'])."&address1=".urlencode($order->customer['street_address'])."&city=".urlencode($order->customer['city'])."&state="..

Urlencode($order->customer['state'])."&zip=".urlencode($order->customer['postcode'])."&email=".$order->customer['email_address']."&bn=oscommerce-.

Osmosis-0.981&return=".tep_href_link(FILENAME_CHECKOUT_SUCCESS, '', 'SSL')."&cancel_return=".tep_href_link(.

FILENAME_CHECKOUT_PAYMENT, '', 'SSL')."&notify_url=".MODULE_PAYMENT_PAYPALIPN_NOTIFY_URL);.

Require(DIR_WS_INCLUDES'application_bottom.php');.

?>.

This post has been edited by.

Yesudo.

: 07 May 2004, 23:43..

Comment #6

Okay, the IPN test worked..

So I tried a real one and this is what I got:.

Warning: Cannot modify header information - headers already sent by (output started at /home/x/public_html/catalog/checkout_paypalipn.php:2) in /home/x/public_html/catalog/includes/functions/general.php on line 1250.

Warning: session_start(): Cannot send session cookie - headers already sent by (output started at /home/x/public_html/catalog/checkout_paypalipn.php:2) in /home/x/public_html/catalog/includes/functions/sessions.php on line 76.

Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at /home/x/public_html/catalog/checkout_paypalipn.php:2) in /home/x/public_html/catalog/includes/functions/sessions.php on line 76.

Warning: Cannot modify header information - headers already sent by (output started at /home/x/public_html/catalog/checkout_paypalipn.php:2) in /home/x/public_html/catalog/includes/functions/general.php on line 29.

????.

Thanks again for so much help with this..

P.s. I'm not getting email notifications either...

Comment #7

Delete any whitespace b4 the first.

<?php.

And after the last.

?>.

In checkout_paypalipn.php..

This post has been edited by.

Yesudo.

: 08 May 2004, 11:36..

Comment #8

That was it!!! Darn, I should have thought of that. That's the answer to tons of people's problems on this forum. I've read it a million times...duh!!!!.

Now I have to compare the file with my old one because I've added the Quickbooks order file creation contrib, not sure if I've added anything else...might try the Held Orders one soon..

THANK YOU!!!!!!!!!!!.

You were so patient, I truly appreciate it...

Comment #9

No probs..

All I did was make the same amendments to the checkout_paypalipn file as you needed to for the checkout_process.php file for the random order contrib..

I hadn't detailed this in the contrib as I don't use IPN so did not realise it needed the same amendments - contrib now updated..

This post has been edited by.

Yesudo.

: 08 May 2004, 11:57..

Comment #10

After I installed the random order number contribution, if the buyer selects PayPal as the payment option, it works by assigning the order number 0 to it. When the next PayPal buyer tries to place an order, they get this error code:.

1062 - Duplicate entry '0' for key 1.

Insert into orders (customers_id, customers_name, customers_company, customers_street_address, customers_suburb, customers_city...............

This only happens with PayPal, not my other payment gateway/credit card..

Any clues as to why the PayPal payment option would prevent it from assigning the order a number other than 0??? Better yet, why is it reverting to 0 after each sale???.

Help!!!..

Comment #11

This one:.

Http://www.oscommerc...tributions,1172.

With the latest version dated 6 Mar 2004..

Thanks for any tips to try...

Comment #12


This question was taken from a support group/message board and re-posted here so others can learn from it.