• Resolved rolftd

    (@rolftd)


    Hi, we are having trouble with the following:

    Creating a new account through the Fluid Checkout page is not possible because the address is not being stored in the account.

    We provide a shipment method only for a certain region. With fluid checkout switched off it works perfectly well, with the shipment setting ‘force to billing address’. However, Fluid Checkout changes this automatically to shipping address. The result is that the specific shipment method will not show, because Fluid looks for a shipping address that does not exist. Even with ‘Billing address same as the shipping address checked by default’ switched on in Fluid, it does not work, because there is no shipping address.

    Please inform how to solve this. We do not want the customers to ask for two addresses. Switching off the billing addres with a checkout field editor plugin also dos not solve this. Only switching off the Fluid Checkout plugin seems to solve it.

    • This topic was modified 3 years ago by rolftd.
Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author Diego Versiani

    (@diegoversiani)

    Hi @rolftd,

    Creating a new account through the Fluid Checkout page is not possible because the address is not being stored in the account.

    I tested the flow for creating a user while completing a purchase and it worked without any issues. The account was created and the addresses were saved correctly with different information for billing and shipping.

    1. Could you specify the steps to reproduce this problem?

    We provide a shipment method only for a certain region. With fluid checkout switched off it works perfectly well, with the shipment setting ‘force to billing address’. However, Fluid Checkout changes this automatically to shipping address. The result is that the specific shipment method will not show, because Fluid looks for a shipping address that does not exist. Even with ‘Billing address same as the shipping address checked by default’ switched on in Fluid, it does not work, because there is no shipping address.

    I suspect this problem is related to a known bug that we are working to fix, where the shipping address is cleared when selecting a “Local pickup” shipping method.

    2. Do you also offer Local Pickup shipping methods?

    3. Is the shipment method availability defined based on shipping or billing address?

    Fluid Checkout changes this automatically to shipping address.

    Yes. Disabling this WooCommerce option was was necessary to make the work with the shipping fields before billing, and, this option would only cause problems or not affect anything if left enabled.

    We do not want the customers to ask for two addresses. Switching off the billing addres with a checkout field editor plugin also dos not solve this.

    It is possible to remove the billing address entirely, and to remove the billing step. I’ll post this solution in another response below.

    Only switching off the Fluid Checkout plugin seems to solve it.

    We do not see this as a “solution” ??

    I think most issues here are related to the bug with the shipping address being cleared.

    I let you know here once this related problem is fixed.

    Best,
    Diego

    Plugin Author Diego Versiani

    (@diegoversiani)

    Hi @rolftd,

    If you want to remove the billing address entirely, we suggest you move the first and last name fields to the “Contact” step because these fields are used by WooCommerce to create the user’s account.

    Below is a code snippet that will move the billing name fields and remove the billing address step and fields.

    /**
     * Move fields to the contact substep.
     */
    function fluidcheckout_move_fields_to_contact_substep( $contact_field_ids ) {
    	// Fields before existing fields
    	// $contact_field_ids = array_merge( array( 'billing_first_name', 'billing_last_name' ), $contact_field_ids );
    
    	// Fields after existing fields
    	$contact_field_ids = array_merge( $contact_field_ids, array( 'billing_first_name', 'billing_last_name' ) );
    
    	return $contact_field_ids;
    }
    add_filter( 'fc_checkout_contact_step_field_ids', 'fluidcheckout_move_fields_to_contact_substep', 10 );
    
    /**
     * Remove billing fields, except email.
     *
     * @param   array  $fields  Fields used in checkout.
     */
    function fluidcheckout_remove_billing_fields( $fields ) {
    	// unset( $fields[ 'billing_first_name' ] );
    	// unset( $fields[ 'billing_last_name' ] );
    	unset( $fields[ 'billing_company' ] );
    	unset( $fields[ 'billing_phone' ] );
    	unset( $fields[ 'billing_address_1' ] );
    	unset( $fields[ 'billing_address_2' ] );
    	unset( $fields[ 'billing_city' ] );
    	unset( $fields[ 'billing_state' ] );
    	unset( $fields[ 'billing_country' ] );
    	unset( $fields[ 'billing_postcode' ] );
    	return $fields;
    }
    add_filter( 'woocommerce_billing_fields', 'fluidcheckout_remove_billing_fields', 300 );
    
    /**
     * Remove the billing step.
     */
    function fluidcheckout_remove_billing_step() {
    	// Bail if steps class not available
    	if ( ! class_exists( 'FluidCheckout_Steps' ) ) { return; }
    	
    	FluidCheckout_Steps::instance()->unregister_checkout_step( 'billing' );
    }
    add_action( 'fc_register_steps', 'fluidcheckout_remove_billing_step', 300 );

    If you are unsure about how to add the code snippet, check our article:
    How to safely add code snippets to your WooCommerce website

    Best,
    Diego

    Thread Starter rolftd

    (@rolftd)

    Hi Diego,

    The specific shipment method availability is based upon zip code. As we only use the billing address, this is providing the zip code. Without Fluid, it works. Wth Fluid switched off, it does not work. But as we also provide local pickup, it might be that this known bug is the problem.

    I will wait for an update of the plugin with that bug fixed an also use the snippet you proovide, which looks like a good idea. Thanks!

    Rolf

    Plugin Author Diego Versiani

    (@diegoversiani)

    Hi @rolftd,

    The problem with Local Pickup clearing the shipping address has been fixed. An update to version 1.5.3 is already available with this fix.

    Please note that because you are using the Billing Zipcode as the condition for the shipping methods to be available, you might need to adjust that after applying the code snippet.

    I’m closing this topic for now. If you need further assistance, please reply to this topic with more information and answers to the questions in my first reply.

    Best,
    Diego

    Thread Starter rolftd

    (@rolftd)

    Hi Diego,

    I did exactly as you suggested. In general it works, but there is still one problem.

    When someone orders as a guest of creates an account during checkout, only local pickup is available. Accordingly, shipping information is hided (Fluid setting) but the shipping address is still mandatory and at the top of the checkout page a message appears: ‘add an address to continue’. The cause may be that Fluid forces the standard shipment setting to customer shipping address?

    Greetings Rolf

    Thread Starter rolftd

    (@rolftd)

    I found out the problem; as I am using zip code, the default value of the country has to be filled, even if you are not using it. Problem solved.

    Plugin Author Diego Versiani

    (@diegoversiani)

    Hi @rolftd,

    That’s good to know. Thanks for sharing the solution ??

    Best,
    Diego

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Problems with shipping address’ is closed to new replies.