Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //In template.php
- function themename_url_outbound_alter(&$path, &$options, $original_path) {
- if($original_path==NULL) {
- if(isset($_POST["operation_id"]) && isset($_POST["street"])) {
- //Значит пришло что то от «Быстрого заказа»
- if(!empty($_POST["city"])) $_SESSION["yfo_city"] = $_POST["city"];
- if(!empty($_POST["phone"])) $_SESSION["yfo_phone"] = $_POST["phone"];
- if(!empty($_POST["email"])) $_SESSION["yfo_email"] = $_POST["email"];
- $addr = "";
- if(!empty($_POST["street"])) $addr.=" ул. ".$_POST["street"];
- if(!empty($_POST["building"])) $addr.=" д. ".$_POST["building"];
- if(!empty($_POST["suite"])) $addr.=" корпус ".$_POST["suite"];
- if(!empty($_POST["flat"])) $addr.=" кв. ".$_POST["flat"];
- if(!empty($_POST["entrance"])) $addr.=" подъезд ".$_POST["entrance"];
- if(!empty($_POST["floor"])) $addr.=" этаж ".$_POST["floor"];
- if(!empty($_POST["intercom"])) $addr.=" домофон ".$_POST["intercom"];
- if(!empty($_POST["zip"])) $addr.=" почтовый индекс ".$_POST["zip"];
- if(!empty($_POST["metro"])) $addr.=" ст. метро ".$_POST["metro"];
- if(!empty($addr)) $_SESSION["yfo_addr"] = $addr;
- $name = "";
- if(!empty($_POST["firstname"])) $name.=$_POST["firstname"];
- if(!empty($_POST["fathersname"])) $name.=" ".$_POST["fathersname"];
- if(!empty($_POST["lastname"])) $name.=" ".$_POST["lastname"];
- if(!empty($name)) $_SESSION["yfo_name"] = $name;
- drupal_goto('checkout/');
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment