Advertisement
Guest User

Untitled

a guest
Sep 16th, 2011
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.69 KB | None | 0 0
  1. <?php
  2.  
  3. /**
  4. *if there is no presence of postcode for estimate , make shipping cost 0
  5. * @param object $options shipping detail
  6. * @author vinay
  7. *
  8. */
  9. if ( !function_exists("show_initial_shipping_cost") ):
  10. function show_initial_shipping_cost($options) {
  11. global $Shopp;
  12. if ( $Shopp->Shopping->data->Order->Shipping->postcode != "" ){
  13. //do nothing for now
  14. } else {
  15. $options["Domestic Shipping"]->amount = 0;
  16. }
  17. #if ( $_SERVER['REMOTE_ADDR'] == "110.44.113.254" )
  18. //$Shopp->Shipping->postcodes
  19. #print_r($Shopp->Shipping);
  20. }
  21. endif;
  22. //hook to calculate total shipping
  23. add_action('shopp_calculate_shipping','show_initial_shipping_cost',100);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement