function dvin_qlist_scripts_styles()
 {
     global $dvin_wcql_settings, $dvin_qlist_products;
     wp_enqueue_style('dvin-wcql-stylesheet', plugins_url('/css/styles.css', __FILE__));
     wp_enqueue_style('dvin-wcql-custom_stylesheet', plugins_url('/css/custom_styles.css', __FILE__));
     wp_enqueue_style('dashicons');
     //include js file
     if (file_exists(TEMPLATEPATH . '/' . Dvin_Wcql::template_path() . 'js/dvin_wcql.js')) {
         $js_path = get_template_directory_uri() . '/' . Dvin_Wcql::template_path() . 'js/dvin_wcql.js';
     } elseif (file_exists(STYLESHEETPATH . '/' . Dvin_Wcql::template_path() . 'js/dvin_wcql.js')) {
         $js_path = get_stylesheet_directory_uri() . '/' . Dvin_Wcql::template_path() . 'js/dvin_wcql.js';
     } else {
         $js_path = plugins_url('/js/dvin_wcql.js', __FILE__);
     }
     //	if(!defined('DOING_AJAX') || !DOING_AJAX)
     wp_enqueue_script('dvin-wcql-js', $js_path, array('jquery'), '1.0.0', false);
     $dvin_quotelist_refresh_afteradd_url = '';
     //initialize with null to avoid undefined notices
     if (isset($dvin_wcql_settings['redirect_to_listpage_afteradd']) && !empty($dvin_wcql_settings['redirect_to_listpage_afteradd'])) {
         $dvin_quotelist_refresh_afteradd_url = Dvin_Wcql::get_url();
     }
     echo "<script>var dvin_quotelist_count ='" . dvin_get_wcql_count() . "';var dvin_wcql_ajax_url = '" . admin_url('admin-ajax.php') . "'; var dvin_quotelist_refresh_afteradd_url='" . $dvin_quotelist_refresh_afteradd_url . "';var login_redirect_url='" . addslashes(wp_login_url()) . "\\'?redirect_to=\\'" . urlencode($_SERVER['REQUEST_URI']) . "';</script>";
 }
예제 #2
0
						<?php 
            echo $addons_str;
            //addon info
            if (isset($dvin_wcql_settings['no_price']) && $dvin_wcql_settings['no_price'] != 'on') {
                echo apply_filters('woocommerce_widget_cart_item_quantity', '<span class="quantity">' . sprintf('%s &times; %s', $values['quantity'], $price_in_html) . '</span>');
                ?>
					<?php 
            }
        }
    }
    ?>
	</li>
	<p class="buttons">
        
		<a href="<?php 
    echo Dvin_Wcql::get_url();
    ?>
" class="button wc-forward minicart-button"><?php 
    echo apply_filters('dvin_wcql_viewquotelist', __('View Quote List', 'dvinwcql'));
    ?>
</a>
	</p>
	<?php 
} else {
    ?>
		<li class="empty"><?php 
    _e('No products in the list', 'dvinwcql');
    ?>
</li>
	<?php 
}