Justin Posted November 24, 2002 Posted November 24, 2002 I've got a client who has static top and bottom HTML frames, with the osCommerce store in the center frame. There is a "Checkout" image link in the top frame, which I am trying to link to checkout_payment.php. When I do this via a standard A HREF directive, however, the shopping cart is emptied. I assume that this method of linking does not maintain the session ID, and therefore OSC assumes the customer hasn't entered anything into the cart yet. Would somebody be so kind as to let me know how I should refer to OSC pages such as checkout_payment.php from external HTML pages, while still maintaing the session state? Any advice would be much, much appreciated. (Please resist the urge to point out that frames are a bad idea. I agree with you completely, but this is the client's wish. I am doing my best to work around them.) :)
mattice Posted November 24, 2002 Posted November 24, 2002 you need to append the sessionid to any link. The easiest way to do this is by calling the tep_href_link() function which is used througout all osCommerce pages to create links. It supports the session id but also SSL versus NONSSL. The function can be found in catalog/includes/functions/html_output.php Mattice "Politics is the art of preventing people from taking part in affairs which properly concern them"
Justin Posted November 24, 2002 Author Posted November 24, 2002 Thanks for the tip, Mattice. I had tried that technique using the following: <?php echo '<a href="' . tep_href_link(FILENAME_CHECKOUT_PAYMENT, '', 'SSL') . '">';?> I added this as the only PHP code in the top frame's HTML, changing the ending from .html to .php, but this doesn't seem to append the session ID to the link. Any idea as to what I'm doing wrong?
Guest Posted November 24, 2002 Posted November 24, 2002 I too am using frames and I am having trouble with SSL. My shopping cart functions perfectly when not in SSL mode, but when I change over to SSL enable for checkout, I cannot stay logged in. IE: I add things to the cart, then if I reload to a catalog page which is not SSL - I lose everything from my cart and have to RELOGIN again if I want to try and check out. Is this normal osc behaviour or is something weird? I have made the upgrade to the post Nov 1st new checkout procedure, but not a full upgrade. I made the following mods: -------------------------------------------------------------------- added 11 fields to table orders, consistent with catalog/install/oscommerce.sql v.1.55 added catalog/includes/modules/checkout_new_address.php v.1.1 ##shipping modules must be upgraded for new checkout API upgraded catalog/includes/modules/shipping/zones.php to v.1.14 upgraded catalog/includes/modules/shipping/usps.php to v.1.35 upgraded catalog/includes/modules/shipping/flat.php to v.1.35 upgraded catalog/includes/modules/shipping/item.php to v.1.34 upgraded catalog/includes/modules/shipping/table.php to v.1.22 upgraded catalog/includes/modules/shipping/ups.php to v.1.44 ##payment modules must be upgraded for new checkout API upgraded catalog/includes/modules/payment/authorizenet.php v.1.38 upgraded catalog/includes/modules/payment/moneyorder.php v.1.4 added catalog/includes/modules/payment/paypal.php v.1.31 (these are all we use) ##these classes are affected and must be upgraded added catalog/includes/classes/cc_validation.php v.1.1 added catalog/includes/classes/http_client.php v.1.1 upgraded catalog/includes/classes/shopping_cart.php to v.1.30 upgraded catalog/includes/classes/order.php to v.1.18 upgraded catalog/includes/classes/shipping.php to v.1.16 upgraded catalog/includes/classes/payment.php to v.1.30 ##these languages files must be updated to latest versions upgraded catalog/includes/languages/english.php to v.1.102 by edits upgraded catalog/includes/languages/german.php to v.1.102 by edits upgraded catalog/includes/languages/english/checkout_payment to v.1.12 added catalog/includes/languages/english/checkout_payment_address v.1.1 added catalog/includes/languages/english/checkout_shipping v.1.1 added catalog/includes/languages/english/checkout_shipping_address v.1.1 upgraded catalog/includes/languages/english/checkout_confirmation to v.1.21 upgraded catalog/includes/languages/english/checkout_process to v.1.26 upgraded catalog/includes/languages/english/checkout_success to v.1.11 by edits upgraded catalog/includes/languages/english/modules/payment/authorizenet.php to v.1.11 upgraded catalog/includes/languages/english/modules/payment/moneyorder.php to v.1.4 added catalog/includes/languages/german/checkout_shipping v.1.2 upgraded catalog/includes/languages/german/checkout_payment to v.1.17 added catalog/includes/languages/german/checkout_shipping_address v.1.2 added catalog/includes/languages/german/checkout_payment_address v.1.2 upgraded catalog/includes/languages/german/checkout_confirmation to v.1.23 upgraded catalog/includes/languages/german/checkout_process to v.1.27 upgraded catalog/includes/languages/german/checkout_success to v.1.16 upgraded catalog/includes/languages/german/modules/payment/authorizenet.php to v.1.13 upgraded catalog/includes/languages/german/modules/payment/moneyorder.php to v.1.5 #these are the new workhorses for the revised checkout upgraded catalog/checkout_process.php to v.1.113 upgraded catalog/checkout_payment.php to v.1.98 upgraded catalog/checkout_confirmation.php to v.1.122 upgraded catalog/checkout_success.php to v.1.38 by edits from 1.35 [whew!] added catalog/checkout_shipping_address.php v.1.2 added catalog/checkout_shipping v.1.2 added catalog/checkout_payment_address v.1.2 upgraded catalog/includes/application_top.php to v.1.250 and made edits to conform previous modifications added 5 new little graphics (arrows and progress bullet for new checkout display) in catalog/images ##ADMIN SIDE: upgraded admin/includes/classes/order.php to v.1.4 upgraded admin/includes/application_top.php to v.1.152 upgraded admin/includes/languages/english/orders.php to v.1.20 upgraded admin/orders.php to v.1.103 ==END LOG
Guest Posted November 24, 2002 Posted November 24, 2002 I too am using frames and I am having trouble with SSL. My shopping cart functions perfectly when not in SSL mode, but when I change over to SSL enable for checkout, I cannot stay logged in. IE: I add things to the cart, then if I reload to a catalog page which is not SSL - I lose everything from my cart and have to RELOGIN again if I want to try and check out. Is this normal osc behaviour or is something weird? I have made the upgrade to the post Nov 1st new checkout procedure, but not a full upgrade. I made the following mods: -------------------------------------------------------------------- added 11 fields to table orders, consistent with catalog/install/oscommerce.sql v.1.55 added catalog/includes/modules/checkout_new_address.php v.1.1 ##shipping modules must be upgraded for new checkout API upgraded catalog/includes/modules/shipping/zones.php to v.1.14 upgraded catalog/includes/modules/shipping/usps.php to v.1.35 upgraded catalog/includes/modules/shipping/flat.php to v.1.35 upgraded catalog/includes/modules/shipping/item.php to v.1.34 upgraded catalog/includes/modules/shipping/table.php to v.1.22 upgraded catalog/includes/modules/shipping/ups.php to v.1.44 ##payment modules must be upgraded for new checkout API upgraded catalog/includes/modules/payment/authorizenet.php v.1.38 upgraded catalog/includes/modules/payment/moneyorder.php v.1.4 added catalog/includes/modules/payment/paypal.php v.1.31 (these are all we use) ##these classes are affected and must be upgraded added catalog/includes/classes/cc_validation.php v.1.1 added catalog/includes/classes/http_client.php v.1.1 upgraded catalog/includes/classes/shopping_cart.php to v.1.30 upgraded catalog/includes/classes/order.php to v.1.18 upgraded catalog/includes/classes/shipping.php to v.1.16 upgraded catalog/includes/classes/payment.php to v.1.30 ##these languages files must be updated to latest versions upgraded catalog/includes/languages/english.php to v.1.102 by edits upgraded catalog/includes/languages/german.php to v.1.102 by edits upgraded catalog/includes/languages/english/checkout_payment to v.1.12 added catalog/includes/languages/english/checkout_payment_address v.1.1 added catalog/includes/languages/english/checkout_shipping v.1.1 added catalog/includes/languages/english/checkout_shipping_address v.1.1 upgraded catalog/includes/languages/english/checkout_confirmation to v.1.21 upgraded catalog/includes/languages/english/checkout_process to v.1.26 upgraded catalog/includes/languages/english/checkout_success to v.1.11 by edits upgraded catalog/includes/languages/english/modules/payment/authorizenet.php to v.1.11 upgraded catalog/includes/languages/english/modules/payment/moneyorder.php to v.1.4 added catalog/includes/languages/german/checkout_shipping v.1.2 upgraded catalog/includes/languages/german/checkout_payment to v.1.17 added catalog/includes/languages/german/checkout_shipping_address v.1.2 added catalog/includes/languages/german/checkout_payment_address v.1.2 upgraded catalog/includes/languages/german/checkout_confirmation to v.1.23 upgraded catalog/includes/languages/german/checkout_process to v.1.27 upgraded catalog/includes/languages/german/checkout_success to v.1.16 upgraded catalog/includes/languages/german/modules/payment/authorizenet.php to v.1.13 upgraded catalog/includes/languages/german/modules/payment/moneyorder.php to v.1.5 #these are the new workhorses for the revised checkout upgraded catalog/checkout_process.php to v.1.113 upgraded catalog/checkout_payment.php to v.1.98 upgraded catalog/checkout_confirmation.php to v.1.122 upgraded catalog/checkout_success.php to v.1.38 by edits from 1.35 [whew!] added catalog/checkout_shipping_address.php v.1.2 added catalog/checkout_shipping v.1.2 added catalog/checkout_payment_address v.1.2 upgraded catalog/includes/application_top.php to v.1.250 and made edits to conform previous modifications added 5 new little graphics (arrows and progress bullet for new checkout display) in catalog/images ##ADMIN SIDE: upgraded admin/includes/classes/order.php to v.1.4 upgraded admin/includes/application_top.php to v.1.152 upgraded admin/includes/languages/english/orders.php to v.1.20 upgraded admin/orders.php to v.1.103 ==END LOG
mattice Posted November 25, 2002 Posted November 25, 2002 Thanks for the tip, Mattice. I had tried that technique using the following: <?php echo '<a href="' . tep_href_link(FILENAME_CHECKOUT_PAYMENT, '', 'SSL') . '">';?> I added this as the only PHP code in the top frame's HTML, changing the ending from .html to .php, but this doesn't seem to append the session ID to the link. Any idea as to what I'm doing wrong? The frame itself needs to have the session_id as well. So if your index.html file splits up in frame_a.html and frame_b.html both those have to be called by tep_href_link as well. (And you'll have to change them to php file extension) AND the session has to be created in index.html allready (include application_top.php ) HTH "Politics is the art of preventing people from taking part in affairs which properly concern them"
Recommended Posts
Archived
This topic is now archived and is closed to further replies.