Title: Tips
Last modified: August 22, 2016

---

# Tips

 *  [Claudio Sanches](https://wordpress.org/support/users/claudiosanches/)
 * (@claudiosanches)
 * [11 years, 2 months ago](https://wordpress.org/support/topic/tips-3/)
 * Hey man, just a few tips for you:
 * 1- Don’t load this Magnific Popup, you do not need, within the WooCommerce you
   can use the PrettyPhoto.
    Just use:
 *     ```
       $suffix      = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? '' : '.min';
       $assets_path = str_replace( array( 'http:', 'https:' ), '', WC()->plugin_url() ) . '/assets/';
   
       wp_enqueue_script( 'prettyPhoto', $assets_path . 'js/prettyPhoto/jquery.prettyPhoto' . $suffix . '.js', array( 'jquery' ), '3.1.5', true );
       wp_enqueue_style( 'woocommerce_prettyPhoto_css', $assets_path . 'css/prettyPhoto.css' );
       ```
   
 * In addition the prettyPhoto probably will already be cached in the user’s browser.
 * 2- Don’t load all the data in the HTML, this really is not cool!
    You do not 
   know if the client will want to preview all products… Instead it would be better
   if you use ajax.
 * You can change:
 *     ```
       add_action( 'woocommerce_after_shop_loop_item','wpb_wl_hook_quickview_content' );
       ```
   
 * And use: [https://codex.wordpress.org/AJAX_in_Plugins](https://codex.wordpress.org/AJAX_in_Plugins)
 * PrettyPhoto have a great support for ajax 😉
 * [https://wordpress.org/plugins/woocommerce-lightbox/](https://wordpress.org/plugins/woocommerce-lightbox/)

Viewing 1 replies (of 1 total)

 *  [ilanaguttman](https://wordpress.org/support/users/ilanaguttman/)
 * (@ilanaguttman)
 * [10 years, 11 months ago](https://wordpress.org/support/topic/tips-3/#post-5947320)
 * Where do you put these lines of code within WooCommerce files?

Viewing 1 replies (of 1 total)

The topic ‘Tips’ is closed to new replies.

 * ![](https://ps.w.org/woocommerce-lightbox/assets/icon-256x256.png?rev=2937575)
 * [WPB Quick View Popup for WooCommerce – Fast Product Preview Modal & AJAX Quick View](https://wordpress.org/plugins/woocommerce-lightbox/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/woocommerce-lightbox/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/woocommerce-lightbox/)
 * [Active Topics](https://wordpress.org/support/plugin/woocommerce-lightbox/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/woocommerce-lightbox/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/woocommerce-lightbox/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [ilanaguttman](https://wordpress.org/support/users/ilanaguttman/)
 * Last activity: [10 years, 11 months ago](https://wordpress.org/support/topic/tips-3/#post-5947320)
 * Status: not a support question