• I need additional product data field like weight or height. This is more like a info/ description field for each product variation.

    I can probably use a custom field but I want a field such that is different for each product variation.

    1. If there any hook to create such a field? IF not how in php (should I change wc-product.php?]
    2. If it can be created how can it be used in theme?

    http://wordpress.org/extend/plugins/woocommerce/

Viewing 6 replies - 1 through 6 (of 6 total)
  • I solve it with the custom fields, calling the post meta

    <?php echo get_post_meta($post->ID, “artist”, true); ?>

    Thread Starter lahoti

    (@lahoti)

    Ya but what if I have product variation? How to enter for each product variation

    I put them all with different psot-meta in my short description.

    An in each product, when I need to show this info I put the value in the custom file, if there is no value it will not show.

    Of course I have several values that apply to many item, like: author, date, year, origen, etc.

    Thread Starter lahoti

    (@lahoti)

    but all product variation have the same code to display.. so how will i display custom field corresponding to Product variation A-1; and when it is A-2 show field corresponding to it

    <?php echo get_post_meta($post->ID, “A1”, true); ?>

    <?php echo get_post_meta($post->ID, “A2”, true); ?>

    <?php echo get_post_meta($post->ID, “A3”, true); ?>

    <?php echo get_post_meta($post->ID, “A4”, true); ?>

    and go on.

    Thread Starter lahoti

    (@lahoti)

    no its not that simple (i thought i might do it buikding upon what you suggested)-
    I tried following
    – created custom field A_post_ID_for variation
    – WHen webpage is loaded php runs once using ID of parent post
    — hence, when i change variation it doesnt help
    – tried to look at how price is changing and it seemed will have to modify too much php code in WC_product class..

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Additional product data info field’ is closed to new replies.