function enqueue_static_resources()
 {
     $router = C_Router::get_instance();
     wp_enqueue_script('jquery-ui-accordion');
     // For some reason ajax.js isn't registered yet in 2.0.67.14 and above, so we have
     // to do it manually.
     if (method_exists('M_Ajax', 'register_scripts')) {
         M_Ajax::register_scripts();
     }
     if (version_compare(NGG_PLUGIN_VERSION, '2.0.67') >= 0) {
         wp_enqueue_script('ngg-pro-lightbox-ecommerce-overrides', $router->get_static_url('photocrati-nextgen_pro_ecommerce#lightbox_overrides.js'));
     } else {
         wp_enqueue_script('ngg-pro-lightbox-ecommerce-overrides', $router->get_static_url('photocrati-nextgen_pro_ecommerce#lightbox_overrides.js'), array('ngg-store-js'));
     }
     wp_enqueue_style('ngg-pro-add-to-cart', $router->get_static_url('photocrati-nextgen_pro_ecommerce#add_to_cart.css'));
     M_NextGen_Pro_Ecommerce::enqueue_cart_resources();
     if (!self::$_template_rendered) {
         self::$_template_rendered = TRUE;
         $parameters = array('not_for_sale_msg' => C_NextGen_Settings::get_instance()->ecommerce_not_for_sale_msg, 'sources' => $this->get_sources(), 'i18n' => $this->get_i18n_strings());
         $add_to_cart_tmpl = new C_MVC_View('photocrati-nextgen_pro_ecommerce#add_to_cart_tmpl', $parameters);
         $add_to_cart_item_tmpl = new C_MVC_View('photocrati-nextgen_pro_ecommerce#add_to_cart_source_item_tmpl', $parameters);
         $add_to_cart_items_tmpl = new C_MVC_View('photocrati-nextgen_pro_ecommerce#add_to_cart_source_items_tmpl', $parameters);
         wp_localize_script('ngg-pro-lightbox-ecommerce-overrides', 'ngg_add_to_cart_templates', array('add_to_cart' => $add_to_cart_tmpl->render(TRUE), 'add_to_cart_item' => $add_to_cart_item_tmpl->render(TRUE), 'add_to_cart_items' => $add_to_cart_items_tmpl->render(TRUE)));
         wp_localize_script('ngg-pro-lightbox-ecommerce-overrides', 'ngg_cart_i18n', (array) $this->get_i18n_strings());
     }
 }
 static function enqueue_cart_resources()
 {
     $router = C_Router::get_instance();
     if (!wp_script_is('sprintf')) {
         wp_register_script('sprintf', $router->get_static_url('photocrati-nextgen_pro_ecommerce#sprintf.js'));
     }
     wp_register_script('ngg_pro_cart', $router->get_static_url('photocrati-nextgen_pro_ecommerce#cart.js'), array('photocrati_ajax', 'backbone', 'sprintf'));
     wp_enqueue_script('ngg_pro_cart');
     wp_localize_script('ngg_pro_cart', 'Ngg_Pro_Cart_Settings', array('currency_format' => M_NextGen_Pro_Ecommerce::get_price_format_string(), 'checkout_url' => M_NextGen_Pro_Ecommerce::get_checkout_page_url()));
 }
 function _send_email($order_hash, $subject, $body, $to = NULL)
 {
     $retval = FALSE;
     // Get the destination url
     $order_details_page = $this->get_thank_you_page_url($order_hash, TRUE);
     // Ensure that we have a valid order
     if ($order = C_Order_Mapper::get_instance()->find_by_hash($order_hash)) {
         // Get needed components
         $mail = C_Nextgen_Mail_Manager::get_instance();
         // Set additional order variables
         $order->order_details_page = $order_details_page;
         $order->total_amount = M_NextGen_Pro_Ecommerce::get_formatted_price($order->total_amount, FALSE, FALSE);
         $order->admin_email = bloginfo('admin_email');
         $order->blog_description = bloginfo('description');
         $order->blog_name = bloginfo('name');
         $order->blog_url = site_url();
         $order->site_url = site_url();
         $order->home_url = home_url();
         $order->order_id = $order->ID;
         // Determine item count
         $item_count = 0;
         $file_list = '';
         foreach ($order->cart['images'] as $image) {
             $imageObj = C_Image_Mapper::get_instance()->find($image[$image['id_field']]);
             $name = pathinfo($imageObj->filename);
             $name = $name['filename'];
             if ($item_count == 0) {
                 $file_list = $name;
             } else {
                 $file_list .= ',' . $name;
             }
             foreach ($image['items'] as $tmpid => $item) {
                 // TODO: remove this if. I can't determine why these are being added as items
                 if (in_array($tmpid, array('ngg_digital_downloads', 'ngg_manual_pricelist'))) {
                     continue;
                 }
                 $item_count += intval($item['quantity']);
             }
         }
         $order->item_count = $item_count;
         $order->file_list = $file_list;
         // Send the e-mail
         $content = $mail->create_content();
         $content->set_subject($subject);
         $content->load_template($body);
         foreach (get_object_vars($order) as $key => $val) {
             $content->set_property($key, $val);
         }
         $mail->send_mail($content, $to ? $to : $order->email);
         $retval = TRUE;
     }
     return $retval;
 }
        ?>
</span>
                                </td>
                                <td>
                                    <?php 
        esc_html_e($item->title);
        ?>
                                </td>
                                <td class='ngg_order_price_column'>
                                    <?php 
        echo M_NextGen_Pro_Ecommerce::get_formatted_price($item->price);
        ?>
                                </td>
                                <td>
                                    <?php 
        echo M_NextGen_Pro_Ecommerce::get_formatted_price($item->price * $item->quantity);
        ?>
                                </td>
                            </tr>
                        <?php 
    }
    ?>
                    </table>
                </td>
            </tr>
        <?php 
}
?>
    </table>
</div>