Пример #1
0
// Lecture des TVA ********************************************************************************
$vatArray = array();
$vatArray = $h_oledrion_vat->getAllVats(new oledrion_parameters());
// Quelques options pour le template
$xoopsTpl->assign('nostock_msg', oledrion_utils::getModuleOption('nostock_msg'));
$xoopsTpl->assign('mod_pref', $mod_pref);
// Préférences du module
$xoopsTpl->assign('columnsCount', oledrion_utils::getModuleOption('catagory_colums'));
$xoopsTpl->assign('welcome_msg', nl2br($registry->getfile(OLEDRION_TEXTFILE3)));
// Récupération du nombre total de produits publiés dans la base
$itemsCount = $h_oledrion_products->getRecommendedCount();
if ($itemsCount > $limit) {
    $pagenav = new XoopsPageNav($itemsCount, $limit, $start);
    $xoopsTpl->assign('pagenav', $pagenav->renderNav());
}
if ($limit > 0) {
    // Récupération de la liste des produits récents
    $oledrion_shelf_parameters->resetDefaultValues()->setProductsType('recommended')->setStart($start)->setLimit($limit)->setSort('product_recommended')->setOrder('DESC')->setCategory(0)->setWithXoopsUser(true)->setWithRelatedProducts(true);
    $products = $oledrion_shelf->getProducts($oledrion_shelf_parameters);
    if (isset($products['lastTitle'])) {
        $lastTitle = strip_tags($products['lastTitle']);
        unset($products['lastTitle']);
    }
    $xoopsTpl->assign('products', $products);
}
$xoopsTpl->assign('global_advert', oledrion_utils::getModuleOption('advertisement'));
$xoopsTpl->assign('breadcrumb', oledrion_utils::breadcrumb(array(OLEDRION_URL . basename(__FILE__) => _OLEDRION_RECOMMENDED)));
oledrion_utils::setCSS();
oledrion_utils::setLocalCSS($xoopsConfig['language']);
oledrion_utils::setMetas(_OLEDRION_RECOMMENDED . ' - ' . oledrion_utils::getModuleName(), oledrion_utils::getModuleName());
require_once XOOPS_ROOT_PATH . '/footer.php';
Пример #2
0
 *
 * Version : $Id:
 * ****************************************************************************
 */
/**
 * Plan des catégories
 */
require 'header.php';
$GLOBALS['current_category'] = -1;
$xoopsOption['template_main'] = 'oledrion_map.html';
require_once XOOPS_ROOT_PATH . '/header.php';
require_once OLEDRION_PATH . 'class/tree.php';
$xoopsTpl->assign('mod_pref', $mod_pref);
// Préférences du module
$categories = array();
$categories = $h_oledrion_cat->getAllCategories(new oledrion_parameters());
$mytree = new Oledrion_XoopsObjectTree($categories, 'cat_cid', 'cat_pid');
$tree = $mytree->makeTreeAsArray('cat_title', '-');
foreach ($tree as $key => $value) {
    if (isset($categories[$key])) {
        $category = $categories[$key];
        $xoopsTpl->append('categories', array('cat_url_rewrited' => $category->getLink(), 'cat_href_title' => $category->getHrefTitle(), 'cat_title' => $value));
    }
}
oledrion_utils::setCSS();
oledrion_utils::loadLanguageFile('modinfo.php');
$xoopsTpl->assign('global_advert', oledrion_utils::getModuleOption('advertisement'));
$xoopsTpl->assign('breadcrumb', oledrion_utils::breadcrumb(array(OLEDRION_URL . basename(__FILE__) => _MI_OLEDRION_SMNAME4)));
$title = _MI_OLEDRION_SMNAME4 . ' - ' . oledrion_utils::getModuleName();
oledrion_utils::setMetas($title, $title);
require_once XOOPS_ROOT_PATH . '/footer.php';
Пример #3
0
 * @author 			Hervé Thouzard of Instant Zero (http://www.instant-zero.com)
 *
 * Version : $Id:
 * ****************************************************************************
 */
/**
 * Page appelée par la passerelle après le paiement en ligne
 */
require 'header.php';
$GLOBALS['current_category'] = -1;
$success = true;
$xoopsOption['template_main'] = 'oledrion_thankyou.html';
require_once XOOPS_ROOT_PATH . '/header.php';
$h_oledrion_caddy->emptyCart();
// On donne la possibilité à la passerelle de traiter la commande
$gateway = null;
$gateway = oledrion_gateways::getGatewayObject();
if (is_object($gateway) && method_exists($gateway, 'thankYou')) {
    if (!file_exists(OLEDRION_GATEWAY_LOG_PATH)) {
        file_put_contents(OLEDRION_GATEWAY_LOG_PATH, '<?php exit(); ?>');
    }
    $gateway->thankYou(OLEDRION_GATEWAY_LOG_PATH);
    unset($gateway);
}
$xoopsTpl->assign('success', $success);
$xoopsTpl->assign('global_advert', oledrion_utils::getModuleOption('advertisement'));
$xoopsTpl->assign('breadcrumb', oledrion_utils::breadcrumb(array(OLEDRION_URL . basename(__FILE__) => _OLEDRION_PURCHASE_FINSISHED)));
$title = _OLEDRION_PURCHASE_FINSISHED . ' - ' . oledrion_utils::getModuleName();
oledrion_utils::setMetas($title, $title);
oledrion_utils::setCSS();
require_once XOOPS_ROOT_PATH . '/footer.php';
Пример #4
0
            oledrion_utils::redirect(_AM_OLEDRION_SAVE_OK, $baseurl, 2);
        } else {
            oledrion_utils::redirect(_AM_OLEDRION_SAVE_PB, $baseurl, 5);
        }
        break;
        // ************************************************************************
    // ************************************************************************
    case 'edit':
        // Edition d'une liste ***************************************
    // Edition d'une liste ***************************************
    case 'addList':
        // Ajout d'une liste **************************************
        // ************************************************************************
        $xoopsTpl->assign('op', $op);
        $sform = listForm($op, 0);
        if ($op == 'edit') {
            $title = _OLEDRION_EDIT_LIST;
        } else {
            $title = _OLEDRION_ADD_LIST;
        }
        $breadcrumb = array(OLEDRION_URL . 'all-lists.php' => _MI_OLEDRION_SMNAME11, OLEDRION_URL . basename(__FILE__) => _MI_OLEDRION_SMNAME10, OLEDRION_URL => $title);
        $xoopsTpl->assign('form', $sform->render());
        break;
}
oledrion_utils::setCSS();
oledrion_utils::setLocalCSS($xoopsConfig['language']);
$xoopsTpl->assign('mod_pref', $mod_pref);
$xoopsTpl->assign('breadcrumb', oledrion_utils::breadcrumb($breadcrumb));
$title = _MI_OLEDRION_SMNAME10 . ' - ' . oledrion_utils::getModuleName();
oledrion_utils::setMetas($title, $title);
require_once XOOPS_ROOT_PATH . '/footer.php';
Пример #5
0
        $sform->addElement(new XoopsFormLabel(_OLEDRION_STREET, $commande->getVar('cmd_adress')));
        $sform->addElement(new XoopsFormLabel(_OLEDRION_CP, $commande->getVar('cmd_zip')));
        $sform->addElement(new XoopsFormLabel(_OLEDRION_CITY, $commande->getVar('cmd_town')));
        $sform->addElement(new XoopsFormLabel(_OLEDRION_COUNTRY, $countries[$commande->getVar('cmd_country')]));
        $sform->addElement(new XoopsFormLabel(_OLEDRION_PHONE, $commande->getVar('cmd_telephone')));
        $sform->addElement(new XoopsFormLabel(_OLEDRION_EMAIL, $commande->getVar('cmd_email')));
        if (oledrion_utils::getModuleOption('ask_vatnumber')) {
            $sform->addElement(new XoopsFormLabel(_OLEDRION_VAT_NUMBER, $commande->getVar('cmd_vat_number')));
        }
        if ($commande->getVar('cmd_bill') == 0) {
            $sform->addElement(new XoopsFormLabel(_OLEDRION_INVOICE, _NO));
        } else {
            $sform->addElement(new XoopsFormLabel(_OLEDRION_INVOICE, _YES));
        }
        $button_tray = new XoopsFormElementTray('', '');
        if (oledrion_utils::getModuleOption('offline_payment') == 1 && isset($_POST['offline_payment']) && intval($_POST['offline_payment']) == 0 || $commandAmountTTC == 0) {
            $submit_btn = new XoopsFormButton('', 'post', _OLEDRION_FINISH, 'submit');
        } else {
            $submit_btn = new XoopsFormButton('', 'post', _OLEDRION_PAY_GATEWAY, 'submit');
        }
        $button_tray->addElement($submit_btn);
        $sform->addElement($button_tray);
        $xoopsTpl->assign('form', $sform->render());
        break;
}
$xoopsTpl->assign('global_advert', oledrion_utils::getModuleOption('advertisement'));
$xoopsTpl->assign('breadcrumb', oledrion_utils::breadcrumb(array(OLEDRION_URL . basename(__FILE__) => _OLEDRION_VALIDATE_CMD)));
$title = _OLEDRION_VALIDATE_CMD . ' - ' . oledrion_utils::getModuleName();
oledrion_utils::setMetas($title, $title);
oledrion_utils::setCSS();
require_once XOOPS_ROOT_PATH . '/footer.php';
Пример #6
0
/**
 * Page appelée par la passerelle de paiement dans le cas de l'annulation d'une commande
 */
require 'header.php';
$GLOBALS['current_category'] = -1;
$xoopsOption['template_main'] = 'oledrion_cancelpurchase.tpl';
require_once XOOPS_ROOT_PATH . '/header.php';
// On donne la possibilité à la passerelle d'annuler la commande
$gateway = null;
$gateway = oledrion_gateways::getGatewayObject();
if (is_object($gateway) && method_exists($gateway, 'cancelOrder')) {
    if (!file_exists(OLEDRION_GATEWAY_LOG_PATH)) {
        file_put_contents(OLEDRION_GATEWAY_LOG_PATH, '<?php exit(); ?>');
    }
    $gateway->cancelOrder(OLEDRION_GATEWAY_LOG_PATH);
    unset($gateway);
} elseif (isset($_GET['id'])) {
    $order = null;
    $order = $h_oledrion_commands->getOrderFromCancelPassword($_GET['id']);
    if (is_object($order)) {
        $h_oledrion_commands->setOrderCanceled($order);
    }
}
$h_oledrion_caddy->emptyCart();
$xoopsTpl->assign('mod_pref', $mod_pref);
$xoopsTpl->assign('breadcrumb', oledrion_utils::breadcrumb(array(OLEDRION_URL . basename(__FILE__) => _OLEDRION_ORDER_CANCELED)));
$title = _OLEDRION_ORDER_CANCELED . ' - ' . oledrion_utils::getModuleName();
oledrion_utils::setMetas($title, $title);
oledrion_utils::setCSS();
oledrion_utils::setLocalCSS($xoopsConfig['language']);
require_once XOOPS_ROOT_PATH . '/footer.php';
Пример #7
0
         $firstChilds = array();
         $firstChilds = $mytree->getFirstChild($category->getVar('cat_cid'));
         foreach ($firstChilds as $children) {
             $tmpCategory = array();
             $tmpCategory = $children->toArray();
             $tmpCategory['count'] = $count;
             $xoopsTpl->append('subCategories', $tmpCategory);
             $count++;
         }
         $subCategoriesSearched = true;
     }
 } else {
     // page d'accueil des catégories
     $title = _OLEDRION_CATEGORIES . ' - ' . oledrion_utils::getModuleName();
     oledrion_utils::setMetas($title, $title);
     $xoopsTpl->assign('breadcrumb', oledrion_utils::breadcrumb(array(OLEDRION_URL . basename(__FILE__) => _OLEDRION_CATEGORIES)));
     if (OLEDRION_SHOW_MAIN_CATEGORIES) {
         $count = 1;
         $motherCategories = $h_oledrion_cat->getMotherCategories();
         foreach ($motherCategories as $mothercategory) {
             $tmpCategory = array();
             $tmpCategory = $mothercategory->toArray();
             $tmpCategory['count'] = $count;
             $xoopsTpl->append('motherCategories', $tmpCategory);
             $count++;
         }
     }
 }
 // Paramétrage des catégories
 $chunk1 = oledrion_utils::getModuleOption('chunk1');
 // Produits les plus récents