price = $price; $this->name = $name; $this->type= strtolower($type); $this->currency = $config['defaultCurrency']; if($allowed_country_area != "") $this->SetAllowedCountryArea($allowed_country_area); if($excluded_country_area != "") $this->SetExcludedCountryArea($excluded_country_area); $this->allowed_state_areas_arr = array(); $this->allowed_zip_patterns_arr = array(); $this->excluded_state_areas_arr = array(); $this->excluded_zip_patterns_arr = array(); } function SetAllowedStateAreas($areas) { $this->allowed_restrictions = true; $this->allowed_state_areas_arr = $areas; } function SetAllowedZipPattens($zips) { $this->allowed_restrictions = true; $this->allowed_zip_patterns_arr = $zips; } function SetExcludedStateAreas($areas) { $this->excluded_restrictions = true; $this->excluded_state_areas_arr = $areas; } function SetExcludedZipPatternsStateAreas($zips) { $this->excluded_restrictions = true; $this->excluded_zip_patterns_arr = $zips; } function SetAllowedCountryArea($country_area) { if($country_area == "CONTINENTAL_48" || $country_area == "FULL_50_STATES" || $country_area = "ALL" ) { $this->allowed_country_area = $country_area; $this->allowed_restrictions = true; } else $this->allowed_country_area = ""; } function SetExcludedCountryArea($country_area) { if($country_area == "CONTINENTAL_48" || $country_area == "FULL_50_STATES" || $country_area = "ALL" ) { $this->excluded_country_area = $country_area; $this->excluded_restrictions = true; } else $this->excluded_country_area = ""; } } ?>