Exemplo n.º 1
0
 * as published by the Free Software Foundation.
 *
 * You should have received a copy of the GNU General Public License
 * along with redSHOP; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 */
require_once JPATH_COMPONENT . '/helpers/helper.php';
require_once JPATH_SITE . '/administrator/components/com_redshop/helpers/redshop.cfg.php';
$objOrder = new order_functions();
$objconfiguration = new Redconfiguration();
$user = JFactory::getUser();
$shipping_address = $objOrder->getOrderShippingUserInfo($data['order_id']);
$Itemid = $_REQUEST['Itemid'];
$redhelper = new redhelper();
$db = JFactory::getDbo();
$user = JFActory::getUser();
$task = JRequest::getVar('task');
$layout = JRequest::getVar('layout');
$app = JFactory::getApplication();
if ($this->_params->get("currency") != "") {
    $currency_main = $this->_params->get("currency");
} else {
    if (CURRENCY_CODE != "") {
        $currency_main = CURRENCY_CODE;
    } else {
        $currency_main = "USD";
    }
}
$sql = "SELECT op.*,o.order_total,o.user_id,o.order_tax,o.order_subtotal,o.order_shipping,o.order_number,o.payment_discount FROM " . $this->_table_prefix . "order_payment AS op LEFT JOIN " . $this->_table_prefix . "orders AS o ON op.order_id = o.order_id  WHERE o.order_id='" . $data['order_id'] . "'";
$db->setQuery($sql);
$order_details = $db->loadObjectList();
Exemplo n.º 2
0
 function addQuizzes($tpl = null)
 {
     $db = JFactory::getDBO();
     $user = JFActory::getUser();
     $search_text = JRequest::getVar('search_text', "");
     $sql = "SELECT id, name FROM `#__guru_quiz`";
     if ($search_text != "") {
         $sql = $sql . " where name LIKE '%" . $search_text . "%' and `is_final` <> 1 and `author`=" . intval($user->id);
     } else {
         $sql = $sql . " where `is_final` <> 1 and `author`=" . intval($user->id);
     }
     $db->setQuery($sql);
     $list_quizzes = $db->loadAssocList();
     $this->assignRef('list_quizzes', $list_quizzes);
     parent::display($tpl);
 }