• Resolved whipsterloaded

    (@whipsterloaded)


    I’m looking to add a custom field to the product quickview window. I’ve found the quick-view-content template, but I’m not sure where the ‘ocean-woo-quick-view-product-content’ function is so I can add my function to include the custom field I’ve created.

    Any ideas?

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Theme Author oceanwp

    (@oceanwp)

    Hello, the quick view content is the same as the single product content, so you will need to add content to your single products, then it will be automatically added to the quick view.

    Thread Starter whipsterloaded

    (@whipsterloaded)

    Thanks for the quick response. I agree with you standard content will show, but my custom fields aren’t. I’m sure it’s my code…but not sure. In the link https://staging1.sentinelsolar.com/product-types/inverters/grid-tie-inverter/ you can see on the archive page, quick view shows title, excerpt and meta box inside. But if you go to the single product page for the item, you can see the custom fields for 2 download links – just below the metafields. These fall under the product entry summary with the standard fields, but for some reason they aren’t included in the quickview…

    This is my code for the fields:

    add_action( 'woocommerce_single_product_summary', 'downloads', 20);
    	
    	
    	function downloads() {
    	global $post;
    	
    	$download1 = get_post_meta($post->ID, 'specsheet', true);
    	$download2 = get_post_meta($post->ID, 'manual', true);
    	   
    	   echo '<div class="download-block"><div class="download-link">'; echo '<a target="blank" href="' . $download1. '"><i class="fa fa-file-pdf-o"></i> Specsheet</a> <a target="blank" href="' . $download2. '"><i class="fa fa-file-pdf-o"></i>  Manual</a>'; echo'</div></div>';
    	}

    Preferably I would injuect he fields above the metabox, but I can’t find the hook/priority combo to do it…so It falls after the summary.

    Thanks again for any help.

    • This reply was modified 7 years ago by whipsterloaded. Reason: added link to demo page--
    Theme Author oceanwp

    (@oceanwp)

    Hi, I have some hooks for the next theme release, you will be able to do it more easily.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Custom fields inside quickview’ is closed to new replies.