• Resolved alaid

    (@alaid)


    Hi,

    Congratulations on this very useful plugin.

    I created the field, I activated the field so that the seller can edit it, so far so good, but after the seller adds the information in the field, it is not shown in the product.

    How can I get it to show up on the product?`

    Thanks.

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author krazyplugins

    (@krazyplugins)

    Hello @alaid

    You can use the_field or get_field function of ACF.

    Let me know if there is an issue.

    Thanks

    Thread Starter alaid

    (@alaid)

    Hi,

    I have no experience as a developer, but I found a way to show the box on the product page

    add_action('woocommerce_after_add_to_cart_form','show_available',14);
    
    function show_available(){
          global $product;
    
            if ( empty( $product ) ) {
                return;
            }
     $available = get_post_meta( $product->get_id(), 'available', true );
    
            if ( ! empty( $available ) ) {
                ?>
                      <div class="details"><strong><?php echo esc_attr__( 'Available: ', 'dokan-lite' ); ?></strong><?php echo esc_attr( $available ); ?></div>
                <?php
            }
    }

    But in this case I am using Field Type: Date Picker. How can I get the date to display correctly in the format I’m choosing and not as a value?

    Thanks

    • This reply was modified 3 years, 11 months ago by alaid. Reason: Information was missing
    Plugin Author krazyplugins

    (@krazyplugins)

    Hello @alaid

    The date picker field type is currently not supported by this plugin so the vendor will not be able to add the date to the product.

    How to display the date picker value entered by admin, please check it here.

    Thanks

    Thread Starter alaid

    (@alaid)

    Hi,

    Remember that I have no experience as a programmer, if you can help me by writing the lines of code that I have to add to make the date appear correctly with the date picker field type.

    Thank you

    Plugin Author krazyplugins

    (@krazyplugins)

    Hello @alaid

    This is not plugin support request, it will be great if you take the help of any developer.

    Thanks

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘How do I display the field on the Product Page?’ is closed to new replies.