Guest Posted March 8, 2009 Share Posted March 8, 2009 I am new to this and would appreciate any help please. I have 2 main problems: 1- After confirming orders and taking payments, no confirmation emails are sent neither to the customer nor to the store owner. 2- After confirming the order and trying to re-direct the customer back to the site, it fails to do so and this Parse Error message appear: Parse error: syntax error, unexpected T_STRING in /content/StartupHostPlus/b/u/butesoaps.com/web/catalog/checkout_process.php on line 310 When i look at line 310, it says : $payment_class = $$payment; The whole section says the following: $email_order .= "\n" . EMAIL_TEXT_BILLING_ADDRESS . "\n" . EMAIL_SEPARATOR . "\n" . tep_address_label($customer_id, $billto, 0, '', "\n") . "\n\n"; if (is_object($$payment)) { $email_order .= EMAIL_TEXT_PAYMENT_METHOD . "\n" . EMAIL_SEPARATOR . "\n"; $payment_class = $$payment; $email_order .= $order->info['payment_method'] . "\n\n"; if ($payment_class->email_footer) { $email_order .= $payment_class->email_footer . "\n\n"; } } Any ideas any one? Thankful for any help and directions. Link to comment Share on other sites More sharing options...
Guest Posted March 10, 2009 Share Posted March 10, 2009 Can any one help please? Thank you Link to comment Share on other sites More sharing options...
germ Posted March 10, 2009 Share Posted March 10, 2009 I've looked at that, and looked at that. There's only one line that is different from "standard" code and I don't think it's the problem. I honestly don't see any error. I think line 310 lies else where (sometimes how PHP counts lines is different than how you or I would :blush: ) If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you. "Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice." - Me - "Headers already sent" - The definitive help "Cannot redeclare ..." - How to find/fix it SSL Implementation Help Like this post? "Like" it again over there > Link to comment Share on other sites More sharing options...
Guest Posted March 11, 2009 Share Posted March 11, 2009 I would like to add that all other email functions work fine like tell a friend, web enquiry, notify customers,etc. The only emails the site does not seem to send is the order confirmation emails to the customers and the store owner. Any help would be much appreciated. p.s. The Parse error is still appearing, any one has a clue how to sort it please? Mny thanks for any contribution Link to comment Share on other sites More sharing options...
germ Posted March 11, 2009 Share Posted March 11, 2009 Post all the code from the file. Preferably in a CODE box. If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you. "Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice." - Me - "Headers already sent" - The definitive help "Cannot redeclare ..." - How to find/fix it SSL Implementation Help Like this post? "Like" it again over there > Link to comment Share on other sites More sharing options...
Guest Posted March 12, 2009 Share Posted March 12, 2009 Link to comment Share on other sites More sharing options...
germ Posted March 12, 2009 Share Posted March 12, 2009 Find this code, it's about line 142 or so: // initialized for the email confirmation Right ABOVE this code, add: // enter info into coupons table if (tep_session_is_registered('coupon_id')) { $sql_data_array = array('coupon_id' => $coupon_id, 'customer_id' => $customer_id, 'order_id' => $insert_id, 'redeem_date' => 'now()'); tep_db_perform(TABLE_COUPONS_TO_CUSTOMER, $sql_data_array); } tep_redirect(tep_href_link(FILENAME_CHECKOUT_SUCCESS, '', 'SSL')); require(DIR_WS_INCLUDES . 'application_bottom.php'); ?> The first line in my code box is line 310. Where did that come from? :unsure: If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you. "Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice." - Me - "Headers already sent" - The definitive help "Cannot redeclare ..." - How to find/fix it SSL Implementation Help Like this post? "Like" it again over there > Link to comment Share on other sites More sharing options...
germ Posted March 12, 2009 Share Posted March 12, 2009 Find this code, it's about line 142 or so: // initialized for the email confirmation Right ABOVE this code, add: Delete the above lines. Move the code below where it says to, I guess: // enter info into coupons table if (tep_session_is_registered('coupon_id')) { $sql_data_array = array('coupon_id' => $coupon_id, 'customer_id' => $customer_id, 'order_id' => $insert_id, 'redeem_date' => 'now()'); tep_db_perform(TABLE_COUPONS_TO_CUSTOMER, $sql_data_array); } Leave this code at the bottom of the file: tep_redirect(tep_href_link(FILENAME_CHECKOUT_SUCCESS, '', 'SSL')); require(DIR_WS_INCLUDES . 'application_bottom.php'); ?> If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you. "Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice." - Me - "Headers already sent" - The definitive help "Cannot redeclare ..." - How to find/fix it SSL Implementation Help Like this post? "Like" it again over there > Link to comment Share on other sites More sharing options...
Guest Posted March 13, 2009 Share Posted March 13, 2009 You have cracked it, thank you so much for your help and attention, greatly appreciated. No parse error and confirmation emails are now getting sent, workd like a dream. If i may impose on you with a question, when I did test orders, i received the order confirmation email fine but when i look on the site, we have an invoice with a logo, address, etc. Is that supposed to go to the customer too? Dont get me wrong, the text only email is quite sufficient, i was only wondering. Once again, i appreciate your help very much, thanks a million Link to comment Share on other sites More sharing options...
germ Posted March 13, 2009 Share Posted March 13, 2009 I think there's a contribution that spells out the code changes required to switch your shop over from plain text to HTML emails. After that you'd have to add the code to the email for any logos, etc. Glad you're up and running. :) If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you. "Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice." - Me - "Headers already sent" - The definitive help "Cannot redeclare ..." - How to find/fix it SSL Implementation Help Like this post? "Like" it again over there > Link to comment Share on other sites More sharing options...
Guest Posted March 14, 2009 Share Posted March 14, 2009 Actualy I am just content it is finally working and runing well. In fact that fix has also fixed a couple of other things in the process, the sold items report was not working before and best sellers on the front end was not counting, they are now both working :P You know what they say; if aint broken dont fix it. My knowledge of codes are very limited and I am quite happy to leave it as it is. Again, many thanks for your help :) Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.