Exemplo n.º 1
0
     $db =& JFactory::getDBO();
     $query = "select * from #__content where id='{$pretextid}'";
     $db->setQuery($query);
     $pretext = $db->loadObject();
     $query = "select * from #__content where id='{$posttextid}'";
     $db->setQuery($query);
     $posttext = $db->loadObject();
     //is shipping enabled
     $cfg = new sc_configuration();
     $ship['enabled'] = $cfg->get("shippingenabled");
     //populate region list
     if ($ship['enabled']) {
         $ship['list'] = fshipping::buildRegionList();
         display::showConfirmCart($cart, $pretext, $posttext, $ship);
     } else {
         display::showConfirmCart($cart, $pretext, $posttext);
     }
     break;
 case "confirm":
     $fields = new fields();
     $fieldlist = $fields->getPublishedFields();
     $user = JFactory::getUser();
     // get the Joomla logged in user
     // fielddata is an array containing field names as key and values.
     // fieldnames can be custom field names
     // here is also the moment to get infor from Community Builder
     $fielddata = array();
     $fielddata['username'] = $user->username;
     $fielddata['name'] = $user->name;
     $fielddata['email'] = $user->email;
     display::showMyDetails($fieldlist, null, $fielddata);