Jump to content

[HOW TO] How to show Guest (instant) checkout in one page checkout?


Detelin Markov

Recommended Posts

Hi,

 

Two day`s i try to show only instant checkout but without success. I read several posts here but not work for me.

 

I try to change order-opc.js 
 

$(function() {
	// GUEST CHECKOUT / NEW ACCOUNT MANAGEMENT
	if ((!isLogged) || (isGuest))
	{
		if (guestCheckoutEnabled && !isLogged)
		{
			$('#opc_account_choice').show();
			$('#opc_account_form, #opc_invoice_address').show(); /* change here to "show" */
			
			$('#opc_createAccount').click(function() {
				$('.is_customer_param').hide(); /* change here to "hide" */
				$('#opc_account_form').slideDown('slow');
				$('#is_new_customer').val('1');
				$('#opc_account_choice, #opc_invoice_address').hide();
				updateState();
				updateNeedIDNumber();
				updateZipCode();
			});
			$('#opc_guestCheckout').click(function() {
				$('.is_customer_param').show();/* change here to "show" */
				$('#opc_account_form').slideDown('slow');
				$('#is_new_customer').val('0');
				$('#opc_account_choice, #opc_invoice_address').hide();
				$('#new_account_title').html(txtInstantCheckout);
				$('#submitAccount').prop({id : 'submitGuestAccount', name : 'submitGuestAccount'});
				updateState();
				updateNeedIDNumber();
				updateZipCode();
			});
		}
		else if (isGuest)
		{
			$('.is_customer_param').hide();
			$('#opc_account_form').show('slow');
			$('#is_new_customer').val('0');
			$('#opc_account_choice, #opc_invoice_address').hide();
			$('#new_account_title').html(txtInstantCheckout);
			updateState();
			updateNeedIDNumber();
			updateZipCode();
		}
		else
		{
			$('#opc_account_choice').hide();
			$('#is_new_customer').val('1');
			$('.is_customer_param, #opc_account_form').show();
			$('#opc_invoice_address').hide();
			updateState();
			updateNeedIDNumber();
			updateZipCode();
		}
		

Try to set 

<div id="opc_new_account-overlay" class="opc-overlay" style="display: block;"></div>

Try to add auto click function for guest checkout - works but then save button not working.

 

How show only instant checkout without need to clicking on Guest choice button?

 

Suggestion?

 

P.S: I don`t understend why presta don`t have this function by default - Many merchant sell products that ordinary people buy one at year (why they to register?). Is better this buyers to be fan in merchant fb page or recive newsllatter.

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...