Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /**
- *if there is no presence of postcode for estimate , make shipping cost 0
- * @param object $options shipping detail
- * @author vinay
- *
- */
- if ( !function_exists("show_initial_shipping_cost") ):
- function show_initial_shipping_cost($options) {
- global $Shopp;
- if ( $Shopp->Shopping->data->Order->Shipping->postcode != "" ){
- //do nothing for now
- } else {
- $options["Domestic Shipping"]->amount = 0;
- }
- #if ( $_SERVER['REMOTE_ADDR'] == "110.44.113.254" )
- //$Shopp->Shipping->postcodes
- #print_r($Shopp->Shipping);
- }
- endif;
- //hook to calculate total shipping
- add_action('shopp_calculate_shipping','show_initial_shipping_cost',100);
- function jake_add_scripts {
- if (is_home() || is_front_page()) {
- $scripturl = WP_PLUGIN_URL .'/easing-slider/js/';
- if(get_option('jquery') == 'true') {
- if ( !is_admin() ) {
- wp_deregister_script('jquery');
- wp_register_script('jquery', $scripturl.'jquery.js', '', '1.4.2');
- wp_enqueue_script('jquery');
- }
- }
- wp_register_script('easing', $scripturl.'jquery.easing.js', '', '1.3');
- wp_enqueue_script('easing');
- wp_register_script('script', $scripturl.'script.js', '', '1.1.9');
- wp_enqueue_script('script');
- }
- }
- function jake_add_styles() {
- if (is_home() || is_front_page()) {
- $sliderstyle = WP_PLUGIN_URL .'/easing-slider/css/slider.css';
- wp_register_style('slider', $sliderstyle, '', '1.1.9');
- wp_enqueue_style('slider');
- }
- }
- remove_action('wp_print_styles','add_styles');
- remove_action('wp_print_scripts','add_scripts');
- add_action('wp_print_styles','jake_add_styles');
- add_action('wp_print_scripts','jake_add_scripts');
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement