Ostern, I would be interested.
Ostern, I would be interested.
O'Stern i am looking forward to your solution. thanks!
-steve
Excuse me for replay delay.
*******************************************************
In my shop I use simpe shopping method.
When client push "Checkout" button, he will see the page with "total coast" and comments.
So, I redesign "shipping" page. It will be better to rename this page to my_purchase, but
I am lazy :)
So, our shop will do: shopping_cart -> sheckout_shipping -> checkout_process -> checkout_success
First of all let's design a new chechout_shipping page.
/includes/templates/template_default/templates/tpl_checkout_shipping_default.php
Add this lines:
if (!$_SESSION['customer_id']) {
echo '<br><strong>You are not registered user</strong>';
.....
echo '<br>Name:<br>';
echo zen_draw_input_field('noname_name', '', 'size="24"');
echo '<br>Phone:<br>';
echo zen_draw_input_field('noname_phone', '', 'size="24"');
}
And add the table with product list in the top of file.
Modified tpl_checkout_shipping_default.php file attached to the post.
Now we should write handler.
I created "Noname Noname" user with fake e-mail adress. In _my shop_ the "id" of this user is 8.
I think, It will be best to attach unregistered customer's name and phone to momments. It will
look like:
.....comment ... .. .NAME:LALALA PHONE:LALALA
Let's modify
/includes/modules/pages/checkout_shipping/header_php.php
See attached file, because next lines I add from chechout_payment and other files :)
--------------
require(DIR_WS_CLASSES . 'order.php');
$order = new order;
require(DIR_WS_CLASSES . 'order_total.php');
$order_total_modules = new order_total;
$order_total_modules->collect_posts();
$order_total_modules->pre_confirmation_check();
--------------
I han comented lines where not logged on cusromer redirected to the login page.
And at last add lines to attach name and phone to the comments:
---------------
if ( isset($_POST['action']) && ($_POST['action'] == 'process') ) {
// If user is nor registered, change his Id
if (!$_SESSION['customer_id']) { $_SESSION['customer_id']=8;
//Check is the name and phone filled
if ($_POST['noname_name']=="" || $_POST['noname_phone']=="" )
{ $anon_fields=false ;} else { $anon_fields=true ;}
$_SESSION['comments'] = zen_db_prepare_input($_POST['comments']."\nName:".$_POST['noname_name']."\nPhone:".$_POST['noname_phone']);
} else {
//normal comment to registered users
$_SESSION['comments'] = zen_db_prepare_input($_POST['comments']);
---------------
Destroy section in /includes/modules/pages/checkout_success/header_php.php
if ($_SESSION['customer_id']==8) {
zen_session_destroy();
$_SESSION['customer_id']=0;
}
Hope, I forgot nothing.
If it will be some questions - write them here or for_letters [at] urk [dot] net
Real shop with patched zen-cart is http://gofree.com.ua. Unfortunately in russian language :)
PS: sorry, comments in files are also in russian.
**************************************************
Patched files:
http://stern.org.ua/notes/zc_noname.rar
how do you provide your customers with a receipt?
Zen cart PCI compliant Hosting
O'Stern,
Looking forward to testing conversion with such an option.
I haven't quite wrapped my head around your code yet, but I have one question:
What happens when two customers simultaneously decide to proceed through checkout anonymously?
Thanks much,
Joe
Now J_Schilz
Integrated Checkout Without Account (wiki w/pics, demo, download)
The main idea in pseudo code:
In chechout_template /shipping_template/other_last_page_tamplate page:
if (USER_NOT_LOGED) { show_phone_and_name_box() }
Nothing wrong will be if 2 unregistered users will see this page at the same time.
Then in chechout_handler/shipping_hanler page:
If button pushed:
if ( isset($_POST['action']) && ($_POST['action'] == 'process') ) {
if (USER_NOT_LOGED) {
chande_id_to_noname_user()
add_name_and_phone_th_the_comments()
}
}
In checkout_success_handler:
if (USER_USER_ID_IS_NONAME_USER) {
destroy_session()
}
----------------------
So, the customer loged in with the "noname" account less then a second. Since the end of chechout_handler_script till the destroy_session() in checkout_success script.
I prefer no account and welcome any progress in this area.
I can't tell you how many times I sat down and tried to code it myself. I'm a darn good programmer and can usually modify any code I come across, but for some reason I can't get a grip on HTML/PHP.
Personally, I don't want "one more account" on any site and I will [usually] dump a full shopping cart before I will create a new account at a website.
Has anyone tested this out?? I would love this since I am using paypal and dont really need checkout or want it! Please let me know if this works. so happy this is finally written here!
jewelry lady,
you can use the paypal EXPRESS
this is just what you need,
Zen cart PCI compliant Hosting