Forum Replies Created

Viewing 10 posts - 1 through 10 (of 75 total)
  • Author
    Posts
  • Hi Harry,

    Thank you and your right about I did have to update the files.
    Many Thanks for you help,
    Kind Regards,

    This reply has been marked as private.

    Hi,

    Please go to

    Home

     

    and try it, once added to cart it appears.

    Thanks

    Hi Harry,

    Thanks but I think you did not see what I meant. Please have another look at the screenshot above and look at the fist 2 products and in the top right and corner it has a triangle and has test ADDED. This is what I meant. I hope you can see it and its a great little but very neat effect.

    I it can be implemented.

    Kind Regards,

    Rizwan

    Hi Harry,

    That’s great and works really well.
    Many Thanks for showing me the code.

    Kind Regards,
    Rizwan

    Hi Harry,

    Many Thanks and worked.
    Kind Regards,
    Rizwan

    in reply to: Add Title Field to Checkout #30839

    Hi Harry,

    OK yes I understand. Harry can you then please try and help with me the following:

     

    Hi Harry, Many Thanks for the update. Its on the top which is great now.

    1. Is it possble now to have it on one row, with First and Last Name fields, so: Title * , First Name * , Last Name * are all on one row.

    If you can help place the Title, First Name and Last Name on one row, that would be great and would rally appreciate if you could look into this.

    Kind Regards,
    Rizwan

    in reply to: Add Title Field to Checkout #30759

    Hi Harry,

    OK, I understand. Can you help me with the following code

    /**
    * ADD TITLE
    *
    */

    add_action(‘woocommerce_before_checkout_billing_form’, ‘customise_checkout_field’);
    function customise_checkout_field($checkout)
    {

    woocommerce_form_field(‘title’, array(
    ‘label’ => __(‘Title’, ‘woocommerce’),
    ‘required’ => true,
    ‘class’ => array(‘form-row-wide’),
    ‘type’ => ‘select’,

    ‘options’ => array(‘mr’ => __(‘Mr’, ‘woocommerce’), ‘mrs’ => __(‘Mrs’, ‘woocommerce’), ‘ms’ => __(‘Ms’, ‘woocommerce’), ‘miss’ => __(‘Miss’, ‘woocommerce’), ‘dr’ => __(‘Dr’, ‘woocommerce’), ‘prof’ => __(‘Prof’, ‘woocommerce’))
    ), $checkout->get_value(‘title’));

    }

    //Checkout Process
    add_action(‘woocommerce_checkout_process’, ‘customise_checkout_field_process’);
    function customise_checkout_field_process()
    {
    // if the field is set, if not then show an error message.
    if (!$_POST[‘title’]) wc_add_notice(__(‘Please enter Title’) , ‘error’);
    }

    /**
    * Update the order meta with field value
    */
    add_action( ‘woocommerce_checkout_update_order_meta’, ‘my_custom_checkout_field_update_order_meta’ );

    function my_custom_checkout_field_update_order_meta( $order_id ) {
    if ( ! empty( $_POST[‘title’] ) ) {
    update_post_meta( $order_id, ‘title’, sanitize_text_field( $_POST[‘title’] ) );
    }
    }

     

    Which I have taken from the links you supplied.

    I am trying to find out the table in which this Title field is being stored.
    Can you please see the code and see if you can tell there the Title filed is being stored in MYSQL database.

    If you can find it, it would be great and I can use this table in my export plugin to get the field I need.
    Any help with this would be helpful.
    Kind Regards,
    Rizwan

    in reply to: Add Title Field to Checkout #30714

    Hi Harry,

    Many Thanks for all your help.

    I have used your script and links and they have helped a lot , many thanks.

    I added a user and donation with Email: [email protected]

    The Title field I set was set to Prof. However when I export both customer and order data, I do not get the title column to appear. Please find attached files.

    Can you show me how we can get this column to appear in the export or where it is in the SQL server database table, column?

    Appreciate all your help with this. Ideally would like the title to appear in the customer export where we have name, details etc..

    Many Thanks again for all your help.
    I hope you can help.

    Kind Regards,
    Rizwan

    Attachments:
    You must be logged in to view attached files.

    Hi Harry,

    Sorry for the delay, tried and works really well.
    Many Thanks for your help and continued support.
    Much Appreciated,
    Kind Regards,
    Rizwan

Viewing 10 posts - 1 through 10 (of 75 total)