Forum Replies Created

Viewing 15 replies - 31 through 45 (of 54 total)
  • Thread Starter smarta-brett

    (@smarta-brett)

    also – can you also help with the Field Label – it does not have a label as such – it just shows the words “Recipients Phone – IMPORTANT in case we have trouble with delivery.” in the actual text box where you type

    and I’d like to make it required filed too if possible

    Thread Starter smarta-brett

    (@smarta-brett)

    Hi – yes I have but maybe I have it wrong – see below for my functions.php file contents

    <?php
    /**
     *	Aurum WordPress Theme
     *
     *	Laborator.co
     *	www.laborator.co
     */
    
    add_action('wp_enqueue_scripts', 'enqueue_childtheme_scripts', 1000);
    
    function enqueue_childtheme_scripts()
    {
    	wp_enqueue_style('aurum-child', get_stylesheet_directory_uri() . '/style.css');
    }
    function wc_remove_related_products( $args ) {
    	return array();
    }
    add_filter('woocommerce_related_products_args','wc_remove_related_products', 10);
    // Hook in
    add_filter( 'woocommerce_checkout_fields' , 'custom_override_checkout_fields' );
    
    // Our hooked in function - $fields is passed via the filter!
    function custom_override_checkout_fields( $fields ) {
         $fields['shipping']['shipping_phone'] = array(
            'label'     => __('Recipients Phone - IMPORTANT in case we have trouble with delivery.', 'woocommerce'),
        'placeholder'   => _x('Recipients Phone - IMPORTANT in case we have trouble with delivery.', 'placeholder', 'woocommerce'),
        'required'  => true,
        'class'     => array('form-row-wide'),
        'clear'     => true
         );
    
    return $fields;
    
    }
    add_filter( 'woocommerce_checkout_fields', 'custom_order_notes_placeholder', 100 );
    
    function custom_order_notes_placeholder( $fields ) {
    
    	$fields['order']['order_comments']['label'] .= ' ' . __( '(Add gift tag message here)', 'aurum' );
    
    	return $fields;
    }
    /* To use:
    1. Add this snippet to your theme's functions.php file
    2. Change the meta key names in the snippet
    3. Create a custom field in the order post - e.g. key = "Tracking Code" value = abcdefg
    4. When next updating the status, or during any other event which emails the user, they will see this field in their email
    */
    add_filter('woocommerce_email_order_meta_keys', 'my_custom_order_meta_keys');
    
    function my_custom_order_meta_keys( $keys ) {
         $keys[] = 'shipping_phone'; // This will look for a custom field called 'Tracking Code' and add it to emails
         return $keys;
    }
    Forum: Hacks
    In reply to: woo commerce field problem
    Thread Starter smarta-brett

    (@smarta-brett)

    thanks James

    Thread Starter smarta-brett

    (@smarta-brett)

    brilliant – thanks !

    Forum: Plugins
    In reply to: [YOP Poll] Results by date
    Thread Starter smarta-brett

    (@smarta-brett)

    hello? anyone there?

    any news on this?

    I can use MCM Categories to tag images but can’t remove them form the main library

    Forum: Plugins
    In reply to: [YOP Poll] Results by date
    Thread Starter smarta-brett

    (@smarta-brett)

    I’d also like to split results into defined users – I only have 2 users and would like to be able to compare their answers

    Thread Starter smarta-brett

    (@smarta-brett)

    yes – thank you

    I looked at the csv file in a text editor and found that many of the lines were missing a comma at the end of the line

    not sure why the excel was exporting it that way

    anyhow, once I fixed that it worked fine

    Thread Starter smarta-brett

    (@smarta-brett)

    thanks – It was the cache issue that was confusing me – restarting the browser, or viewing in a different browser showed me the correct result

    Thread Starter smarta-brett

    (@smarta-brett)

    further to this post

    I have re-named the files with 01 – 12 numerically

    I have also changed the dates so they are in date order of the way I want them to display

    now when I load sometime they load in name order – which works fine – but other times they load randomly

    also sorting by date does not put them in order

    Ideally I would like to have no sort pulldown at the top and have them load in name order by default – is this possible?

    I now have shortcode of
    [sell_downloads columns=”2″ filter_by_type=”0″ show_order_by=”0″ order_by=”name”]
    however they are still not in correct name order

    Thread Starter smarta-brett

    (@smarta-brett)

    ok

    I played around and got it to work

    here is the edit I made

    <td class=”<?php echo $this->field->name ?>-field”>
    <?php if ( $this->field->name == ’email’ and ! empty( $this->field->value ) ) {
    $this->field->link = ‘mailto:’ . $this->field->value;
    $this->field->value = ‘Email’;
    } ?>

    <?php if ( $this->field->name == ‘website’ and ! empty( $this->field->value ) ) {
    $this->field->link = $this->field->value;
    $this->field->value = ‘Website’;
    } ?>

    Thread Starter smarta-brett

    (@smarta-brett)

    hi again

    before I start experimenting would this be correct to replace a https:// website link with the word “website”

    <?php if ( $this->field->name == ‘website’ and ! empty( $this->field->value ) )
    $this->field->link = ‘a href’ . $this->field->value;
    $this->field->value = ‘Website’;
    } ?>

    Thread Starter smarta-brett

    (@smarta-brett)

    ok – I spoke too soon !

    it is now showing the word Email in every record despite the fact that some records do not have email addresses entered in the Email field

    is there another qualifier so that this does not happen?

    Thread Starter smarta-brett

    (@smarta-brett)

    great – thanks – the tutorial explains it very well – even a novice like me was able to do it

    (admittedly I had to copy & paste the code in a few different spots before it worked … but all good now)

    Thread Starter smarta-brett

    (@smarta-brett)

    it appears that the css code needs to be in both the custom css areas for the Participant Database AND the themes custom css

Viewing 15 replies - 31 through 45 (of 54 total)