当前位置: 首页>>代码示例>>PHP>>正文


PHP shopfunctions类代码示例

本文整理汇总了PHP中shopfunctions的典型用法代码示例。如果您正苦于以下问题:PHP shopfunctions类的具体用法?PHP shopfunctions怎么用?PHP shopfunctions使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


在下文中一共展示了shopfunctions类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: display


//.........这里部分代码省略.........
             //$this->addStandardDefaultViewCommands();
             $this->addStandardDefaultViewLists($catmodel, 'category_name');
             $this->categories = $catmodel->getCategoryTree(0, 0, false, $this->lists['search']);
             $this->pagination = $catmodel->getPagination();
             // restore icon is good but not the word
             JToolBarHelper::custom('display', 'restore', 'restore', JText::_('JTOOLBAR_BACK'), false);
             JToolBarHelper::custom('massxref_cats_exe', 'assign', 'assign', JText::_('COM_VIRTUEMART_MASS_REPLACE'), false);
             JToolBarHelper::custom('massxref_cats_add', 'new', 'new', JText::_('COM_VIRTUEMART_MASS_ADD'), true);
             break;
         case 'massxref_sgrps':
         case 'massxref_sgrps_exe':
             $this->SetViewTitle('PRODUCT_MASSXREF');
             //TODO test if path is ok addpath is now in the constructor
             $this->addTemplatePath(JPATH_VM_ADMINISTRATOR . '/views' . DS . 'shoppergroup' . DS . 'tmpl');
             $this->loadHelper('permissions');
             $this->perms = Permissions::getInstance();
             $this->showVendors = $this->perms->check('admin');
             $sgrpmodel = VmModel::getModel('shoppergroup');
             $this->addStandardDefaultViewLists($sgrpmodel);
             $this->shoppergroups = $sgrpmodel->getShopperGroups(false, true);
             $this->pagination = $sgrpmodel->getPagination();
             JToolBarHelper::custom('massxref_sgrps_exe', 'groups-add', 'new', JText::_('COM_VIRTUEMART_PRODUCT_XREF_SGRPS_EXE'), false);
             break;
         default:
             if ($product_parent_id = JRequest::getInt('product_parent_id', false)) {
                 $product_parent = $model->getProductSingle($product_parent_id, false);
                 if ($product_parent) {
                     $title = 'PRODUCT_CHILDREN_LIST';
                     $link_to_parent = JHTML::_('link', JRoute::_('index.php?view=product&task=edit&virtuemart_product_id=' . $product_parent->virtuemart_product_id . '&option=com_virtuemart'), $product_parent->product_name, array('class' => 'hasTooltip', 'title' => JText::_('COM_VIRTUEMART_EDIT_PARENT') . ' ' . $product_parent->product_name));
                     $msg = JText::_('COM_VIRTUEMART_PRODUCT_OF') . " " . $link_to_parent;
                 } else {
                     $title = 'PRODUCT_CHILDREN_LIST';
                     $msg = 'Parent with product_parent_id ' . $product_parent_id . ' not found';
                 }
             } else {
                 $title = 'PRODUCT';
                 $msg = "";
             }
             $this->db = JFactory::getDBO();
             $this->loadHelper('permissions');
             $this->SetViewTitle($title, $msg);
             $this->addStandardDefaultViewLists($model, 'created_on', 'DESC', 'filter_product');
             $vendor_id = $this->adminVendor;
             if ($vendor_id == 1) {
                 $vendor_id = null;
             }
             // fix ???
             $catid = JRequest::getInt('uctlist = ', 0);
             /* Get the list of products */
             $productlist = $model->getProductListing(false, false, false, false, true, true, $catid, $vendor_id);
             //The pagination must now always set AFTER the model load the listing
             $this->pagination = $model->getPagination();
             /* Get the category tree */
             $categoryId = $model->virtuemart_category_id;
             //OSP switched to filter in model, was JRequest::getInt('virtuemart_category_id');
             $this->category_tree = ShopFunctions::categoryListTree(array($categoryId));
             /* Load the product price */
             $this->loadHelper('calculationh');
             $vendor_model = VmModel::getModel('vendor');
             $productreviews = VmModel::getModel('ratings');
             foreach ($productlist as $virtuemart_product_id => $product) {
                 if (isset($product->virtuemart_media_id)) {
                     $product->mediaitems = count($product->virtuemart_media_id);
                 } else {
                     $product->mediaitems = 'none';
                 }
                 $product->reviews = $productreviews->countReviewsForProduct($product->virtuemart_product_id);
                 $vendor_model->setId($product->virtuemart_vendor_id);
                 $vendor = $vendor_model->getVendor();
                 $currencyDisplay = CurrencyDisplay::getInstance($vendor->vendor_currency, $vendor->virtuemart_vendor_id);
                 if (!empty($product->product_price) && !empty($product->product_currency)) {
                     $product->product_price_display = $currencyDisplay->priceDisplay($product->product_price, (int) $product->product_currency, 1, true);
                 }
                 /* Write the first 5 categories in the list */
                 $product->categoriesList = shopfunctions::renderGuiList('virtuemart_category_id', '#__virtuemart_product_categories', 'virtuemart_product_id', $product->virtuemart_product_id, 'category_name', '#__virtuemart_categories', 'virtuemart_category_id', 'category');
             }
             $mf_model = VmModel::getModel('manufacturer');
             $this->manufacturers = $mf_model->getManufacturerDropdown();
             /* add Search filter in lists*/
             /* Search type */
             $options = array('' => JText::_('COM_VIRTUEMART_LIST_EMPTY_OPTION'), 'parent' => JText::_('COM_VIRTUEMART_PRODUCT_LIST_SEARCH_BY_PARENT_PRODUCT'), 'product' => JText::_('COM_VIRTUEMART_PRODUCT_LIST_SEARCH_BY_DATE_TYPE_PRODUCT'), 'price' => JText::_('COM_VIRTUEMART_PRODUCT_LIST_SEARCH_BY_DATE_TYPE_PRICE'), 'withoutprice' => JText::_('COM_VIRTUEMART_PRODUCT_LIST_SEARCH_BY_DATE_TYPE_WITHOUTPRICE'));
             $this->lists['search_type'] = VmHTML::selectList('search_type', JRequest::getVar('search_type'), $options, 1, '', 'onchange="Joomla.ajaxSearch(this); return false;"', 'input-medium');
             /* Search order */
             $options = array('bf' => JText::_('COM_VIRTUEMART_PRODUCT_LIST_SEARCH_BY_DATE_BEFORE'), 'af' => JText::_('COM_VIRTUEMART_PRODUCT_LIST_SEARCH_BY_DATE_AFTER'));
             $this->lists['search_order'] = VmHTML::selectList('search_order', JRequest::getVar('search_order'), $options, 1, '', '', 'input-small');
             // Toolbar
             //JToolBarHelper::save('sentproductemailtoshoppers', JText::_('COM_VIRTUEMART_PRODUCT_EMAILTOSHOPPERS'));
             JToolBarHelper::custom('massxref_cats', 'new', 'new', JText::_('COM_VIRTUEMART_PRODUCT_XREF_CAT'), true);
             JToolBarHelper::custom('massxref_sgrps', 'new', 'new', JText::_('COM_VIRTUEMART_PRODUCT_XREF_SGRPS'), true);
             JToolBarHelper::custom('createchild', 'new', 'new', JText::_('COM_VIRTUEMART_PRODUCT_CHILD'), true);
             JToolBarHelper::custom('cloneproduct', 'copy', 'copy', JText::_('COM_VIRTUEMART_PRODUCT_CLONE'), true);
             JToolBarHelper::custom('addrating', 'star-2', '', JText::_('COM_VIRTUEMART_ADD_RATING'), true);
             $this->addStandardDefaultViewCommands();
             $this->productlist = $productlist;
             $this->virtuemart_category_id = $categoryId;
             $this->model = $model;
             break;
     }
     parent::display($tpl);
 }
开发者ID:denis1001,项目名称:Virtuemart-2-Joomla-3-Bootstrap,代码行数:101,代码来源:view.html.php

示例2: display

 function display($tpl = null)
 {
     // Get the task
     $task = JRequest::getWord('task', $this->getLayout());
     $this->assignRef('task', $task);
     // Load helpers
     if (!class_exists('CurrencyDisplay')) {
         require JPATH_VM_ADMINISTRATOR . DS . 'helpers' . DS . 'currencydisplay.php';
     }
     if (!class_exists('VmHTML')) {
         require JPATH_VM_ADMINISTRATOR . DS . 'helpers' . DS . 'html.php';
     }
     if (!class_exists('VmImage')) {
         require JPATH_VM_ADMINISTRATOR . DS . 'helpers' . DS . 'image.php';
     }
     $model = VmModel::getModel();
     // Handle any publish/unpublish
     switch ($task) {
         case 'add':
         case 'edit':
             //this was in the controller for the edit tasks, we need this for the access by FE
             $this->addTemplatePath(JPATH_COMPONENT_ADMINISTRATOR . DS . 'views' . DS . 'product' . DS . 'tmpl');
             VmConfig::loadJLang('com_virtuemart_orders', TRUE);
             VmConfig::loadJLang('com_virtuemart_shoppers', TRUE);
             $virtuemart_product_id = JRequest::getVar('virtuemart_product_id', array());
             if (is_array($virtuemart_product_id) && count($virtuemart_product_id) > 0) {
                 $virtuemart_product_id = (int) $virtuemart_product_id[0];
             } else {
                 $virtuemart_product_id = (int) $virtuemart_product_id;
             }
             $product = $model->getProductSingle($virtuemart_product_id, false);
             //$product_parent= $model->getProductParent($product->product_parent_id);
             $product_parent = false;
             if (!empty($product->product_parent_id)) {
                 $product_parent = $model->getProductSingle($product->product_parent_id, false);
             }
             $mf_model = VmModel::getModel('manufacturer');
             $manufacturers = $mf_model->getManufacturerDropdown($product->virtuemart_manufacturer_id);
             $this->assignRef('manufacturers', $manufacturers);
             // Get the category tree
             if (isset($product->categories)) {
                 $category_tree = ShopFunctions::categoryListTree($product->categories);
             } else {
                 $category_tree = ShopFunctions::categoryListTree();
             }
             $this->assignRef('category_tree', $category_tree);
             //Fallback for categories inherited by parent to correctly calculate the prices
             if (empty($product->categories) and !empty($product_parent->categories)) {
                 $product->categories = $product_parent->categories;
             }
             //Get the shoppergoup list - Cleanshooter Custom Shopper Visibility
             if (isset($product->shoppergroups)) {
                 $shoppergroupList = ShopFunctions::renderShopperGroupList($product->shoppergroups);
             }
             $this->assignRef('shoppergroupList', $shoppergroupList);
             // Load the product price
             if (!class_exists('calculationHelper')) {
                 require JPATH_VM_ADMINISTRATOR . DS . 'helpers' . DS . 'calculationh.php';
             }
             $product_childIds = $model->getProductChildIds($virtuemart_product_id);
             $product_childs = array();
             $childs = 0;
             $maxChilds = 30;
             foreach ($product_childIds as $id) {
                 if ($childs++ > $maxChilds) {
                     break;
                 }
                 $product_childs[] = $model->getProductSingle($id, false);
             }
             $this->assignRef('product_childs', $product_childs);
             if (!class_exists('VirtueMartModelConfig')) {
                 require JPATH_VM_ADMINISTRATOR . DS . 'models' . DS . 'config.php';
             }
             $productLayouts = VirtueMartModelConfig::getLayoutList('productdetails');
             $this->assignRef('productLayouts', $productLayouts);
             // Load Images
             $model->addImages($product);
             if (!class_exists('shopFunctionsF')) {
                 require JPATH_VM_SITE . DS . 'helpers' . DS . 'shopfunctionsf.php';
             }
             $vmtemplate = shopFunctionsF::loadVmTemplateStyle();
             if (is_Dir(JPATH_ROOT . DS . 'templates' . DS . $vmtemplate . DS . 'images' . DS . 'availability' . DS)) {
                 $imagePath = '/templates/' . $vmtemplate . '/images/availability/';
             } else {
                 $imagePath = '/components/com_virtuemart/assets/images/availability/';
             }
             $this->assignRef('imagePath', $imagePath);
             // Load the vendors
             $vendor_model = VmModel::getModel('vendor');
             if (Vmconfig::get('multix', 'none') !== 'none') {
                 $lists['vendors'] = Shopfunctions::renderVendorList($product->virtuemart_vendor_id);
             }
             // Load the currencies
             $currency_model = VmModel::getModel('currency');
             if (!class_exists('Permissions')) {
                 require JPATH_VM_ADMINISTRATOR . DS . 'helpers' . DS . 'permissions.php';
             }
             $vendor_model->setId(Permissions::getInstance()->isSuperVendor());
             $vendor = $vendor_model->getVendor();
             if (empty($product->product_currency)) {
//.........这里部分代码省略.........
开发者ID:juanmcortez,项目名称:Lectorum,代码行数:101,代码来源:view.html.php

示例3: plgVmConfirmedOrder

    /**
     * Form Creation
     */
    function plgVmConfirmedOrder($cart, $order)
    {
        if (!($method = $this->getVmPluginMethod($order['details']['BT']->virtuemart_paymentmethod_id))) {
            return NULL;
        }
        if (!$this->selectedThisElement($method->payment_element)) {
            return FALSE;
        }
        $lang = JFactory::getLanguage();
        $filename = 'com_virtuemart';
        $lang->load($filename, JPATH_ADMINISTRATOR);
        if (!class_exists('VirtueMartModelOrders')) {
            require JPATH_VM_ADMINISTRATOR . DIRECTORY_SEPARATOR . 'models' . DIRECTORY_SEPARATOR . 'orders.php';
        }
        if (!class_exists('VirtueMartModelCurrency')) {
            require JPATH_VM_ADMINISTRATOR . DIRECTORY_SEPARATOR . 'models' . DIRECTORY_SEPARATOR . 'currency.php';
        }
        $jinput = JFactory::getApplication()->input;
        //Account Settings
        $environment = $method->pagamastarde_env;
        $discount = $method->pagamastarde_discount;
        if ($environment == 'test') {
            $account_id = $method->pagamastarde_test_account;
            $account_key = $method->pagamastarde_test_key;
        } else {
            $account_id = $method->pagamastarde_real_account;
            $account_key = $method->pagamastarde_real_key;
        }
        //Callback urls
        $url_ok = JURI::root() . 'index.php?option=com_virtuemart' . '&view=pluginresponse' . '&task=pluginresponsereceived' . '&vmethod=pagantis' . '&status=ok' . '&on=' . $order['details']['BT']->order_number . '&pm=' . $order['details']['BT']->virtuemart_paymentmethod_id . '&Itemid=' . $jinput->get('Itemid', '', INT) . '&lang=' . $jinput->get('lang', '', CMD);
        $url_ko = JURI::root() . 'index.php?option=com_virtuemart' . '&view=pluginresponse' . '&task=pluginresponsereceived' . '&vmethod=pagantis' . '&status=ko' . '&on=' . $order['details']['BT']->order_number . '&pm=' . $order['details']['BT']->virtuemart_paymentmethod_id . '&Itemid=' . $jinput->get('Itemid', '', INT) . '&lang=' . $jinput->get('lang', '', CMD);
        $cancelled_url = JURI::root() . 'index.php?option=com_virtuemart' . '&view=cart' . '&task=checkout' . '&vmethod=pagantis' . '&status=ko' . '&on=' . $order['details']['BT']->order_number . '&pm=' . $order['details']['BT']->virtuemart_paymentmethod_id . '&Itemid=' . $jinput->get('Itemid', '', INT) . '&lang=' . $jinput->get('lang', '', CMD);
        $callback_url = JURI::root() . 'index.php?option=com_virtuemart' . '&view=pluginresponse' . '&task=pluginresponsereceived' . '&vmethod=pagantis' . '&pm=' . $order['details']['BT']->virtuemart_paymentmethod_id;
        //Order ID
        $order_id = strval($order['details']['BT']->order_number);
        //Order email & Full name
        $customer_email = $order['details']['BT']->email;
        $customer_name = $order['details']['BT']->first_name . ' ' . $order['details']['BT']->last_name;
        //Order Amount
        //Precio del pedido
        $order_amount = number_format((double) $order['details']['BT']->order_total, 2, '.', '');
        $order_amount = str_replace('.', '', $order_amount);
        $order_amount = floatval($order_amount);
        //Currency
        $currency = self::PAGAMASTARDE_CURRENCY;
        //Lang code
        $lang_site = substr($_SERVER["HTTP_ACCEPT_LANGUAGE"], 0, 2);
        if (!in_array($lang_site, self::$lang_codes)) {
            $lang_code = "en";
        } else {
            $lang_code = $lang_site;
        }
        //address
        $address = $order['details']['BT']->address_1 . " " . $order['details']['BT']->address_2;
        $city = $order['details']['BT']->city;
        $country = shopfunctions::getCountryByID($order['details']['BT']->virtuemart_country_id, 'country_name');
        $state = shopfunctions::getStateByID($order['details']['BT']->virtuemart_state_id, 'state_name');
        $zip = $order['details']['BT']->zip;
        //shipping
        $saddress = !isset($order['details']['ST']->address_1) ? '' : $order['details']['ST']->address_1 . " " . $order['details']['ST']->address_2;
        $scity = !isset($order['details']['ST']->city) ? '' : $order['details']['ST']->city;
        $scountry = !isset($order['details']['ST']->virtuemart_country_id) ? '' : shopfunctions::getCountryByID($order['details']['ST']->virtuemart_country_id, 'country_name');
        $sstate = !isset($order['details']['ST']->virtuemart_state_id) ? '' : shopfunctions::getStateByID($order['details']['ST']->virtuemart_state_id, 'state_name');
        $szip = !isset($order['details']['ST']->zip) ? '' : $order['details']['ST']->zip;
        //phone
        $phone = $order['details']['BT']->phone_1;
        $mobile_phone = $order['details']['BT']->phone_2;
        $this->log("Creating Form");
        $this->log("OrderID:" . $order_id);
        //Signature
        $signature = hash('sha512', $account_key . $account_id . $order_id . $order_amount . $currency . $url_ok . $url_ko . $callback_url . $discount . $cancelled_url);
        //Order description
        $description = 'OrderID: ' . $order_id;
        //shippment and tax
        $products = '';
        $i = 1;
        $products .= '<input name="items[' . $i . '][description]" type="hidden" value="Gastos de envío">';
        $products .= '<input name="items[' . $i . '][quantity]" type="hidden" value="1">';
        $products .= '<input name="items[' . $i . '][amount]" type="hidden" value="' . round($order['details']['BT']->order_shipment + $order['details']['BT']->order_shipment_tax, 2) . '">';
        $i++;
        /* tax included in the item price
           $products .= '<input name="items['.$i.'][description]" type="hidden" value="Impuestos">';
           $products .= '<input name="items['.$i.'][quantity]" type="hidden" value="1">';
           $products .= '<input name="items['.$i.'][amount]" type="hidden" value="'.number_format($order['details']['BT']->order_billTaxAmount,2).'">';
           $i++;
           */
        //Products description
        foreach ($cart->products as $product) {
            $products .= '<input name="items[' . $i . '][description]" type="hidden" value="' . addslashes($product->product_name) . '">';
            $products .= '<input name="items[' . $i . '][quantity]" type="hidden" value="' . $product->quantity . '">';
            $products .= '<input name="items[' . $i . '][amount]" type="hidden" value="' . round($product->prices['salesPrice'] * $product->quantity, 2) . '">';
            $i++;
        }
        //HTML necesary to send Paga+Tarde Request
        $form = '<html><head><title>Redirección Paga+Tarde</title></head><body><div style="margin: auto; text-align: center;">';
        $form .= '
            <form action="' . self::PAGAMASTARDE_URL . '" method="post" name="vm_pagamastarde_form" id="pagamastarde_form">
//.........这里部分代码省略.........
开发者ID:pagantis,项目名称:pagamastarde-virtuemart,代码行数:101,代码来源:pagamastarde.php

示例4: if

::<?php 
echo vmText::sprintf("VMPAYMENT_PAYPAL_CC_WHATISCVV_TOOLTIP", $this->_displayCVVImages($viewData['method']));
?>
 ">
                        <?php 
echo vmText::_('VMPAYMENT_PAYPAL_CC_WHATISCVV');
?>
                    </span>
                </td>
            </tr>
            <tr>
                <td nowrap width="10%" align="right"><?php 
echo vmText::_('VMPAYMENT_PAYPAL_CC_EXDATE');
?>
</td>
                <td>
                    <?php 
echo shopfunctions::listMonths('cc_expire_month_' . $viewData['virtuemart_paymentmethod_id'], $customerData->getVar('cc_expire_month'));
echo " / ";
echo shopfunctions::listYears('cc_expire_year_' . $viewData['virtuemart_paymentmethod_id'], $customerData->getVar('cc_expire_year'), null, null, "onchange=\"var month = document.getElementById('cc_expire_month_'" . $viewData['virtuemart_paymentmethod_id'] . "); if(!CreditCardisExpiryDate(month.value,this.value, '" . $viewData['virtuemart_paymentmethod_id'] . "')){this.value='';month.value='';}\" ");
?>
                    <div id="cc_expiredate_errormsg_<?php 
echo $viewData['virtuemart_paymentmethod_id'];
?>
"></div>
                </td>
            </tr>
        </table>
    </span>
</div>
开发者ID:juanmcortez,项目名称:Lectorum,代码行数:30,代码来源:creditcardform.php

示例5: plgVmDisplayListFEPayment

    /**
     * This shows the plugin for choosing in the payment list of the checkout process.
     *
     * @author Valerie Cartan Isaksen
     */
    function plgVmDisplayListFEPayment(VirtueMartCart $cart, $selected = 0, &$htmlIn)
    {
        //JHTML::_ ('behavior.tooltip');
        if ($this->getPluginMethods($cart->vendorId) === 0) {
            if (empty($this->_name)) {
                $app = JFactory::getApplication();
                $app->enqueueMessage(vmText::_('COM_VIRTUEMART_CART_NO_' . strtoupper($this->_psType)));
                return FALSE;
            } else {
                return FALSE;
            }
        }
        $html = array();
        $method_name = $this->_psType . '_name';
        JHTML::script('vmcreditcard.js', 'components/com_virtuemart/assets/js/', FALSE);
        VmConfig::loadJLang('com_virtuemart', true);
        vmJsApi::jCreditCard();
        $htmla = '';
        $html = array();
        foreach ($this->methods as $this->_currentMethod) {
            if ($this->checkConditions($cart, $this->_currentMethod, $cart->cartPrices)) {
                $methodSalesPrice = $this->setCartPrices($cart, $cart->cartPrices, $this->_currentMethod);
                $this->_currentMethod->{$method_name} = $this->renderPluginName($this->_currentMethod);
                $html = $this->getPluginHtml($this->_currentMethod, $selected, $methodSalesPrice);
                if ($selected == $this->_currentMethod->virtuemart_paymentmethod_id) {
                    $this->_getAuthorizeNetFromSession();
                } else {
                    $this->_cc_type = '';
                    $this->_cc_number = '';
                    $this->_cc_cvv = '';
                    $this->_cc_expire_month = '';
                    $this->_cc_expire_year = '';
                }
                if (empty($this->_currentMethod->creditcards)) {
                    $this->_currentMethod->creditcards = self::getCreditCards();
                } elseif (!is_array($this->_currentMethod->creditcards)) {
                    $this->_currentMethod->creditcards = (array) $this->_currentMethod->creditcards;
                }
                $creditCards = $this->_currentMethod->creditcards;
                $creditCardList = '';
                if ($creditCards) {
                    $creditCardList = $this->_renderCreditCardList($creditCards, $this->_cc_type, $this->_currentMethod->virtuemart_paymentmethod_id, FALSE);
                }
                $sandbox_msg = "";
                if ($this->_currentMethod->sandbox) {
                    $sandbox_msg .= '<br />' . vmText::_('VMPAYMENT_AUTHORIZENET_SANDBOX_TEST_NUMBERS');
                }
                $cvv_images = $this->_displayCVVImages($this->_currentMethod);
                $html .= '<br /><span class="vmpayment_cardinfo">' . vmText::_('VMPAYMENT_AUTHORIZENET_COMPLETE_FORM') . $sandbox_msg . '
		    <table border="0" cellspacing="0" cellpadding="2" width="100%">
		    <tr valign="top">
		        <td nowrap width="10%" align="right">
		        	<label for="creditcardtype">' . vmText::_('VMPAYMENT_AUTHORIZENET_CCTYPE') . '</label>
		        </td>
		        <td>' . $creditCardList . '</td>
		    </tr>
		    <tr valign="top">
		        <td nowrap width="10%" align="right">
		        	<label for="cc_type">' . vmText::_('VMPAYMENT_AUTHORIZENET_CCNUM') . '</label>
		        </td>
		        <td>
				<script type="text/javascript">
				//<![CDATA[  
				  function checkAuthorizeNet(id, el)
				   {
				     ccError=razCCerror(id);
					CheckCreditCardNumber(el.value, id);
					if (!ccError) {
					el.value=\'\';}
				   }
				//]]> 
				</script>
		        <input type="text" class="inputbox" id="cc_number_' . $this->_currentMethod->virtuemart_paymentmethod_id . '" name="cc_number_' . $this->_currentMethod->virtuemart_paymentmethod_id . '" value="' . $this->_cc_number . '"    autocomplete="off"   onchange="javascript:checkAuthorizeNet(' . $this->_currentMethod->virtuemart_paymentmethod_id . ', this);"  />
		        <div id="cc_cardnumber_errormsg_' . $this->_currentMethod->virtuemart_paymentmethod_id . '"></div>
		    </td>
		    </tr>
		    <tr valign="top">
		        <td nowrap width="10%" align="right">
		        	<label for="cc_cvv">' . vmText::_('VMPAYMENT_AUTHORIZENET_CVV2') . '</label>
		        </td>
		        <td>
		            <input type="text" class="inputbox" id="cc_cvv_' . $this->_currentMethod->virtuemart_paymentmethod_id . '" name="cc_cvv_' . $this->_currentMethod->virtuemart_paymentmethod_id . '" maxlength="4" size="5" value="' . $this->_cc_cvv . '" autocomplete="off" />

			<span class="hasTip" title="' . vmText::_('VMPAYMENT_AUTHORIZENET_WHATISCVV') . '::' . vmText::sprintf("VMPAYMENT_AUTHORIZENET_WHATISCVV_TOOLTIP", $cvv_images) . ' ">' . vmText::_('VMPAYMENT_AUTHORIZENET_WHATISCVV') . '
			</span></td>
		    </tr>
		    <tr>
		        <td nowrap width="10%" align="right">' . vmText::_('VMPAYMENT_AUTHORIZENET_EXDATE') . '</td>
		        <td> ';
                $html .= shopfunctions::listMonths('cc_expire_month_' . $this->_currentMethod->virtuemart_paymentmethod_id, $this->_cc_expire_month);
                $html .= " / ";
                $html .= '
				<script type="text/javascript">
				//<![CDATA[  
				  function changeDate(id, el)
//.........这里部分代码省略.........
开发者ID:naka211,项目名称:studiekorrektur,代码行数:101,代码来源:authorizenet.php

示例6: display

 function display($tpl = null)
 {
     // Get the task
     $this->task = JRequest::getWord('task', $this->getLayout());
     // Load helpers
     $this->loadHelper('currencydisplay');
     $this->loadHelper('html');
     $this->loadHelper('image');
     $this->loadHelper('permissions');
     $this->perms = Permissions::getInstance();
     $model = VmModel::getModel();
     switch ($this->task) {
         case 'massxref_cats':
         case 'massxref_cats_exe':
             $this->addTemplatePath(JPATH_VM_ADMINISTRATOR . '/views/category/tmpl');
             $this->showVendors = $this->perms->check('admin');
             $keyWord = '';
             $catmodel = VmModel::getModel('category');
             $this->catmodel = $catmodel;
             //$this->addStandardDefaultViewCommands();
             $this->addStandardDefaultViewLists($catmodel, 'category_name');
             $this->categories = $catmodel->getCategoryTree(0, 0, false, $this->lists['search']);
             $this->pagination = $catmodel->getPagination();
             break;
         case 'massxref_sgrps':
         case 'massxref_sgrps_exe':
             $this->addTemplatePath(JPATH_VM_ADMINISTRATOR . '/views/shoppergroup/tmpl');
             $this->showVendors = $this->perms->check('admin');
             $sgrpmodel = VmModel::getModel('shoppergroup');
             $this->addStandardDefaultViewLists($sgrpmodel);
             $this->shoppergroups = $sgrpmodel->getShopperGroups(false, true);
             $this->pagination = $sgrpmodel->getPagination();
             break;
         default:
             if ($product_parent_id = JRequest::getInt('product_parent_id', false)) {
                 $product_parent = $model->getProductSingle($product_parent_id, false);
                 if ($product_parent) {
                     $title = 'PRODUCT_CHILDREN_LIST';
                     $link_to_parent = JHTML::_('link', JRoute::_('index.php?view=product&task=edit&virtuemart_product_id=' . $product_parent->virtuemart_product_id . '&option=com_virtuemart'), $product_parent->product_name, array('title' => JText::_('COM_VIRTUEMART_EDIT_PARENT') . ' ' . $product_parent->product_name));
                     $msg = JText::_('COM_VIRTUEMART_PRODUCT_OF') . " " . $link_to_parent;
                 } else {
                     $title = 'PRODUCT_CHILDREN_LIST';
                     $msg = 'Parent with product_parent_id ' . $product_parent_id . ' not found';
                 }
             } else {
                 $title = 'PRODUCT';
                 $msg = "";
             }
             $this->db = JFactory::getDBO();
             $this->addStandardDefaultViewLists($model, 'created_on');
             $vendor = $this->adminVendor;
             if ($vendor == 1) {
                 $vendor = null;
             }
             /* Get the list of products */
             $productlist = $model->getProductListing(false, false, false, false, true, true, 0, $vendor);
             //The pagination must now always set AFTER the model load the listing
             $this->pagination = $model->getPagination();
             /* Get the category tree */
             $categoryId = $model->virtuemart_category_id;
             //OSP switched to filter in model, was JRequest::getInt('virtuemart_category_id');
             $this->category_tree = ShopFunctions::categoryListTree(array($categoryId));
             /* Load the product price */
             $this->loadHelper('calculationh');
             $vendor_model = VmModel::getModel('vendor');
             $productreviews = VmModel::getModel('ratings');
             foreach ($productlist as $virtuemart_product_id => $product) {
                 if (isset($product->virtuemart_media_id)) {
                     $product->mediaitems = count($product->virtuemart_media_id);
                 } else {
                     $product->mediaitems = 'none';
                 }
                 $product->reviews = $productreviews->countReviewsForProduct($product->virtuemart_product_id);
                 $vendor_model->setId($product->virtuemart_vendor_id);
                 $vendor = $vendor_model->getVendor();
                 $currencyDisplay = CurrencyDisplay::getInstance($vendor->vendor_currency, $vendor->virtuemart_vendor_id);
                 if (!empty($product->product_price) && !empty($product->product_currency)) {
                     $product->product_price_display = $currencyDisplay->priceDisplay($product->product_price, (int) $product->product_currency, 1, true);
                 }
                 /* Write the first 5 categories in the list */
                 $product->categoriesList = shopfunctions::renderGuiList('virtuemart_category_id', '#__virtuemart_product_categories', 'virtuemart_product_id', $product->virtuemart_product_id, 'category_name', '#__virtuemart_categories', 'virtuemart_category_id', 'category');
             }
             $mf_model = VmModel::getModel('manufacturer');
             $this->manufacturers = $mf_model->getManufacturerDropdown();
             /* add Search filter in lists*/
             /* Search type */
             $options = array('' => JText::_('COM_VIRTUEMART_LIST_EMPTY_OPTION'), 'parent' => JText::_('COM_VIRTUEMART_PRODUCT_LIST_SEARCH_BY_PARENT_PRODUCT'), 'product' => JText::_('COM_VIRTUEMART_PRODUCT_LIST_SEARCH_BY_DATE_TYPE_PRODUCT'), 'price' => JText::_('COM_VIRTUEMART_PRODUCT_LIST_SEARCH_BY_DATE_TYPE_PRICE'), 'withoutprice' => JText::_('COM_VIRTUEMART_PRODUCT_LIST_SEARCH_BY_DATE_TYPE_WITHOUTPRICE'));
             $this->lists['search_type'] = VmHTML::selectList('search_type', JRequest::getVar('search_type'), $options, 1, '', '', 'input-medium');
             /* Search order */
             $options = array('bf' => JText::_('COM_VIRTUEMART_PRODUCT_LIST_SEARCH_BY_DATE_BEFORE'), 'af' => JText::_('COM_VIRTUEMART_PRODUCT_LIST_SEARCH_BY_DATE_AFTER'));
             $this->lists['search_order'] = VmHTML::selectList('search_order', JRequest::getVar('search_order'), $options, 1, '', '', 'input-small');
             $this->productlist = $productlist;
             $this->virtuemart_category_id = $categoryId;
             $this->model = $model;
             break;
     }
     $tpl = 'results';
     parent::display($tpl);
     echo $this->AjaxScripts();
 }
开发者ID:denis1001,项目名称:Virtuemart-2-Joomla-3-Bootstrap,代码行数:100,代码来源:view.raw.php

示例7: plgVmOnDisplayEdit

    function plgVmOnDisplayEdit(&$calc, &$html)
    {
        $html .= '<fieldset>
	<legend>' . JText::_('VMCALCULATION_AVALARA') . '</legend>
	<table class="admintable">';
        $html .= VmHTML::row('checkbox', 'VMCALCULATION_AVALARA_ACTIVATED', 'activated', $calc->activated);
        $html .= VmHTML::row('input', 'VMCALCULATION_AVALARA_COMPANY_CODE', 'company_code', $calc->company_code);
        $html .= VmHTML::row('input', 'VMCALCULATION_AVALARA_ACCOUNT', 'account', $calc->account);
        $html .= VmHTML::row('input', 'VMCALCULATION_AVALARA_LICENSE', 'license', $calc->license);
        $html .= VmHTML::row('checkbox', 'VMCALCULATION_AVALARA_COMMITT', 'committ', $calc->committ);
        $html .= VmHTML::row('checkbox', 'VMCALCULATION_AVALARA_ONLYCART', 'only_cart', $calc->only_cart);
        $html .= VmHTML::row('checkbox', 'VMCALCULATION_AVALARA_ACCRUAL', 'accrual', $calc->accrual);
        $html .= VmHTML::row('checkbox', 'VMCALCULATION_AVALARA_DEV', 'dev', $calc->dev);
        $html .= VmHTML::row('checkbox', 'VMCALCULATION_AVALARA_PREVCHECKOUT_AD_INVALID', 'prevCheckoutAddInv', $calc->prevCheckoutAddInv);
        $label = 'VMCALCULATION_AVALARA_VADDRESS';
        $lang = JFactory::getLanguage();
        $label = $lang->hasKey($label . '_TIP') ? '<span class="hasTip" title="' . JText::_($label . '_TIP') . '">' . JText::_($label) . '</span>' : JText::_($label);
        $html .= '
            <tr>
                <td class="key">
                    ' . $label . '
                </td>
                <td>
                    ' . shopfunctions::renderCountryList($calc->avatax_virtuemart_country_id, TRUE, array(), 'avatax_') . '
                </td>';
        /*   $countriesList = ShopFunctions::renderCountryList($calc->calc_countries,True);
                        $this->assignRef('countriesList', $countriesList);
                        $statesList = ShopFunctions::renderStateList($calc->virtuemart_state_ids,'', True);
                        $this->assignRef('statesList', $statesList);
        
                    $label = 'VMCALCULATION_AVALARA_VADDRESS';
                    $lang =JFactory::getLanguage();
                    $label = $lang->hasKey($label.'_TIP') ? '<span class="hasTip" title="'.JText::_($label.'_TIP').'">'.JText::_($label).'</span>' : JText::_($label) ;
                 $html .= '
        			<td>
        				'.shopfunctions::renderStateList($calc->avatax_virtuemart_state_id,'avatax_',TRUE).'
        			</td> */
        $html .= '</tr>';
        //$html .= VmHTML::row('checkbox','VMCALCULATION_AVALARA_VADDRESS','vAddress',$calc->vAddress);
        //	$html .= VmHTML::row('checkbox','VMCALCULATION_ISTRAXX_AVALARA_TRACE','trace',$calc->trace);
        $html .= '</table>';
        if ($calc->activated) {
            $html .= $this->ping($calc);
        }
        $html .= JText::_('VMCALCULATION_AVALARA_MANUAL') . '</fieldset>';
        return TRUE;
    }
开发者ID:juanmcortez,项目名称:Lectorum,代码行数:47,代码来源:avalara.php

示例8: display3rdInfo

 function display3rdInfo($intro, $developer, $contactlink, $manlink)
 {
     $logolink = $this->getOwnUrl();
     return shopfunctions::display3rdInfo($this->_name, $intro, $developer, $logolink, $contactlink, $manlink);
 }
开发者ID:cuongnd,项目名称:etravelservice,代码行数:5,代码来源:vmplugin.php

示例9: plgVmDisplayListFEPayment

    /**
     * plgVmDisplayListFEPayment
     * This event is fired to display the pluginmethods in the cart (edit shipment/payment) for exampel
     *
     * @param object $cart Cart object
     * @param integer $selected ID of the method selected
     * @return boolean True on succes, false on failures, null when this plugin was not selected.
     * On errors, JError::raiseWarning (or JError::raiseError) must be used to set a message.
     *
     * @author Max Kimmel
     */
    public function plgVmDisplayListFEPayment(VirtueMartCart $cart, $selected = 0, &$htmlIn)
    {
        if ($this->getPluginMethods($cart->vendorId) === 0) {
            if (empty($this->_name)) {
                $app = JFactory::getApplication();
                $app->enqueueMessage(JText::_('COM_VIRTUEMART_CART_NO_' . strtoupper($this->_psType)));
                return FALSE;
            } else {
                return FALSE;
            }
        }
        JFactory::getLanguage()->load('com_virtuemart');
        //MAX: use loop if payment method is used multiple times (no limitation by VM possible at the moment)
        foreach ($this->methods as $method) {
            if ($this->checkConditions($cart, $method, $cart->pricesUnformatted)) {
                $methodSalesPrice = $this->calculateSalesPrice($cart, $method, $cart->pricesUnformatted);
                //$method->$method_name = $this->renderPluginName ($method);
                $html = $this->getPluginHtml($method, $selected, $methodSalesPrice);
                $html .= '
					<script type="text/javascript" src="https://bridge.paymill.de/"></script>
					<script type="text/javascript" src="' . JURI::root() . 'plugins/vmpayment/paymill/assets/js/paymill.js"></script>
					<script type="text/javascript">
						PAYMILL_PUBLIC_KEY = "' . $method->public_key . '";
						checkBridge();
					</script>
					<br />
					<span class="vmpayment_cardinfo">' . JText::_('VMPAYMENT_PAYMILL_COMPLETE_FORM') . '
		    		<div id="iframeerror"></div>

		    		<table border="0" cellspacing="0" cellpadding="2" width="100%">
		    			<tr valign="top">
					        <td nowrap width="10%" align="right">
					        	<label for="cardholdername">' . JText::_('VMPAYMENT_PAYMILL_CREDITCARDOWNER') . '</label>
					        </td>
					        <td>
					        	<input type="text" id="cardholdername" />
					        </td>
		    			</tr>
		    			<tr valign="top">
					        <td nowrap width="10%" align="right">
					        	<label for="cardnumber">' . JText::_('VMPAYMENT_PAYMILL_CREDITCARDNUMBER') . '</label>
					        </td>
					        <td>
					        	<input type="text" id="cardnumber" />
					        </td>
		    			</tr>
					    <tr valign="top">
					        <td nowrap width="10%" align="right">
					        	<label for="cardCvc">' . JText::_('VMPAYMENT_PAYMILL_CVC') . '</label>
					        </td>
					        <td>
			        			<input type="text" id="cardCvc" maxlength="4" size="5" />
								<span class="hasTip" title="' . JText::sprintf("VMPAYMENT_PAYMILL_WHATISCVC_TOOLTIP", $cvc_images) . ' ">' . JText::_('VMPAYMENT_PAYMILL_WHATISCVC') . '
								</span>
						    </td>
		    			</tr>
		    			<tr>
		        			<td nowrap width="10%" align="right">' . JText::_('VMPAYMENT_PAYMILL_EXDATE') . '</td>
		        			<td> ' . shopfunctions::listMonths('cardExpMonth', $this->_cc_expire_month) . ' / ' . shopfunctions::listYears('cardExpYear', $this->_cc_expire_year, NULL, 2022) . '</td>
		        		</tr>
		        	</table>
		        	<input type="hidden" id="pm_amount" name="pm_amount" value="' . $cart->pricesUnformatted["billTotal"] . '" />
		        	<input type="hidden" id="paymillTokenField" name="paymillToken" />
		        	<input type="hidden" id="pm_email" name="pm_email" />
		        	<input type="hidden" id="root_url" value="' . JURI::root() . '" />
		        	<input type="hidden" id="formerror" />
		        	<input type="hidden" name="vm_paymentmethod_id" id="vm_paymentmethod_id" value="' . $method->virtuemart_paymentmethod_id . '" />

		        	<div id="loader" style="display: none">' . JText::_('VMPAYMENT_PAYMILL_PAYMENT_IS_PROCEEDED') . '...</div>
		        	<div id="paymentErrors"></div>
		        	<div id="result" style="display: none"><span style="color: #009900">Daten erfolgreich eingegeben!</span></div>
		        	<img id="loadergif" src="plugins/vmpayment/paymill/assets/img/loader2.gif" style="display: none; margin: 0px 10px" />
		        	</span>';
                $htmla[] = $html;
            }
        }
        $htmlIn[] = $htmla;
        //return $this->displayListFE($cart, $selected, $htmlIn);
    }
开发者ID:stAn47,项目名称:paymill-virtuemart-2,代码行数:90,代码来源:paymill.php

示例10: display

 function display($tpl = null)
 {
     if (!class_exists('VmHTML')) {
         require VMPATH_ADMIN . DS . 'helpers' . DS . 'html.php';
     }
     $model = VmModel::getModel('calc');
     //@todo should be depended by loggedVendor
     $this->vendorId = vmAccess::getVendorId();
     $this->SetViewTitle();
     $layoutName = vRequest::getCmd('layout', 'default');
     if ($layoutName == 'edit') {
         $calc = $model->getCalc();
         $this->assignRef('calc', $calc);
         $isNew = $calc->virtuemart_calc_id < 1;
         if ($isNew) {
             $calc->virtuemart_vendor_id = $this->vendorId;
             $db = JFactory::getDBO();
             //get default currency of the vendor, if not set get default of the shop
             $q = 'SELECT `vendor_currency` FROM `#__virtuemart_vendors` WHERE `virtuemart_vendor_id` = "' . $this->vendorId . '"';
             $db->setQuery($q);
             $currency = $db->loadResult();
             if (empty($currency)) {
                 $q = 'SELECT `vendor_currency` FROM `#__virtuemart_vendors` WHERE `virtuemart_vendor_id` = "1" ';
                 $db->setQuery($q);
                 $currency = $db->loadResult();
                 $calc->calc_currency = $currency;
             } else {
                 $calc->calc_currency = $currency;
             }
         }
         $this->entryPointsList = self::renderEntryPointsList($calc->calc_kind);
         $this->mathOpList = self::renderMathOpList($calc->calc_value_mathop);
         if (empty($calc->calc_categories)) {
             $calc->calc_categories = array();
         } else {
             if (!is_array($calc->calc_categories)) {
                 $calc->calc_categories = array($calc->calc_categories);
             }
         }
         $calc_categories = $calc->calc_categories;
         $this->categoryTree = ShopFunctions::categoryListTree($calc_categories);
         $currencyModel = VmModel::getModel('currency');
         $this->currencies = $currencyModel->getCurrencies();
         $this->shopperGroupList = ShopFunctions::renderShopperGroupList($calc->virtuemart_shoppergroup_ids, True);
         if (!class_exists('ShopFunctionsF')) {
             require VMPATH_SITE . DS . 'helpers' . DS . 'shopfunctionsf.php';
         }
         $this->countriesList = ShopFunctionsF::renderCountryList($calc->calc_countries, True);
         $this->statesList = ShopFunctionsF::renderStateList($calc->virtuemart_state_ids, '', True);
         $this->manufacturerList = ShopFunctions::renderManufacturerList($calc->virtuemart_manufacturers, true);
         if ($this->showVendors()) {
             $this->vendorList = ShopFunctions::renderVendorList($calc->virtuemart_vendor_id);
         }
         $this->addStandardEditViewCommands();
     } else {
         if ($this->showVendors()) {
             JToolBarHelper::custom('toggle.shared.1', 'publish', 'yes', vmText::_('COM_VIRTUEMART_SHARED_TOGGLE_ON'), true);
             JToolBarHelper::custom('toggle.shared.0', 'unpublish', 'no', vmText::_('COM_VIRTUEMART_SHARED_TOGGLE_OFF'), true);
         }
         $this->addStandardDefaultViewCommands();
         $this->addStandardDefaultViewLists($model);
         $search = vRequest::getCmd('search', false);
         $this->calcs = $model->getCalcs(false, false, $search);
         VmConfig::loadJLang('com_virtuemart_shoppers', true);
         foreach ($this->calcs as &$data) {
             $data->calcCategoriesList = shopfunctions::renderGuiList($data->virtuemart_calc_id, 'categories', 'category_name', 'category', 'calc_categories', 'virtuemart_calc_id');
             $data->calcShoppersList = shopfunctions::renderGuiList($data->virtuemart_calc_id, 'shoppergroups', 'shopper_group_name', 'shoppergroup', 'calc_shoppergroups', 'virtuemart_calc_id');
             $data->calcCountriesList = shopfunctions::renderGuiList($data->virtuemart_calc_id, 'countries', 'country_name', 'country', 'calc_countries', 'virtuemart_calc_id');
             $data->calcStatesList = shopfunctions::renderGuiList($data->virtuemart_calc_id, 'states', 'state_name', 'states', 'calc_states', 'virtuemart_calc_id');
             $data->calcManufacturersList = shopfunctions::renderGuiList($data->virtuemart_calc_id, 'manufacturers', 'mf_name', 'manufacturer', 'calc_manufacturers', 'virtuemart_calc_id');
         }
         $this->pagination = $model->getPagination();
     }
     parent::display($tpl);
 }
开发者ID:sam-akopyan,项目名称:hamradio,代码行数:75,代码来源:view.html.php

示例11: display


//.........这里部分代码省略.........
             // Assign the values
             $this->assignRef('pane', $pane);
             $this->assignRef('editor', $editor);
             $this->assignRef('product', $product);
             $this->assignRef('currencies', $currencies);
             //no need moved to top $this->assignRef('manufacturers', $manufacturers);
             $this->assignRef('related_products', $related_products);
             $this->assignRef('product_parent', $product_parent);
             /* Assign label values */
             $this->assignRef('action', $action);
             $this->assignRef('info_label', $info_label);
             $this->assignRef('status_label', $status_label);
             $this->assignRef('dim_weight_label', $dim_weight_label);
             $this->assignRef('images_label', $images_label);
             $this->assignRef('delete_message', $delete_message);
             $this->assignRef('lists', $lists);
             // Toolbar
             $text = "";
             if ($task == 'edit') {
                 if ($product->product_sku) {
                     $sku = ' (' . $product->product_sku . ')';
                 } else {
                     $sku = "";
                 }
                 if (!empty($product->virtuemart_product_id)) {
                     $text = '<a href="' . juri::root() . 'index.php?option=com_virtuemart&view=productdetails&virtuemart_product_id=' . $product->virtuemart_product_id . '" target="_blank" >' . $product->product_name . $sku . '<span class="vm2-modallink"></span></a>';
                 } else {
                     $text = $product->product_name . $sku;
                 }
             }
             $this->SetViewTitle('PRODUCT', $text);
             //JToolBarHelper::custom('sentproductemailtocustomer', 'email_32', 'email_32',  'COM_VIRTUEMART_PRODUCT_EMAILTOSHOPPER' ,false);
             $this->addStandardEditViewCommands($product->virtuemart_product_id);
             break;
         default:
             if ($product_parent_id = JRequest::getInt('product_parent_id', false)) {
                 $product_parent = $model->getProduct($product_parent_id);
                 $title = 'PRODUCT_CHILDREN_LIST';
                 $link_to_parent = JHTML::_('link', JRoute::_('index.php?view=product&task=edit&virtuemart_product_id=' . $product_parent->virtuemart_product_id . '&option=com_virtuemart'), $product_parent->product_name, array('title' => JText::_('COM_VIRTUEMART_EDIT_PARENT') . ' ' . $product_parent->product_name));
                 $msg = JText::_('COM_VIRTUEMART_PRODUCT_OF') . " " . $link_to_parent;
             } else {
                 $title = 'PRODUCT';
                 $msg = "";
             }
             $this->db = JFactory::getDBO();
             $this->SetViewTitle($title, $msg);
             $this->addStandardDefaultViewLists($model, 'created_on');
             /* Get the list of products */
             $productlist = $model->getProductListing(false, false, false, false, true);
             //The pagination must now always set AFTER the model load the listing
             $pagination = $model->getPagination();
             $this->assignRef('pagination', $pagination);
             /* Get the category tree */
             $categoryId = $model->virtuemart_category_id;
             //OSP switched to filter in model, was JRequest::getInt('virtuemart_category_id');
             $category_tree = ShopFunctions::categoryListTree(array($categoryId));
             $this->assignRef('category_tree', $category_tree);
             // Check for Media Items and Reviews, set the price
             $media = VmModel::getModel('media');
             $productreviews = VmModel::getModel('ratings');
             /* Load the product price */
             if (!class_exists('calculationHelper')) {
                 require JPATH_VM_ADMINISTRATOR . DS . 'helpers' . DS . 'calculationh.php';
             }
             $vendor_model = VmModel::getModel('vendor');
             foreach ($productlist as $virtuemart_product_id => $product) {
                 $product->mediaitems = count($product->virtuemart_media_id);
                 $product->reviews = $productreviews->countReviewsForProduct($product->virtuemart_product_id);
                 $vendor_model->setId($product->virtuemart_vendor_id);
                 $vendor = $vendor_model->getVendor();
                 $currencyDisplay = CurrencyDisplay::getInstance($vendor->vendor_currency, $vendor->virtuemart_vendor_id);
                 if (!empty($product->product_price) && !empty($product->product_currency)) {
                     $product->product_price_display = $currencyDisplay->priceDisplay($product->product_price, (int) $product->product_currency, 1, true);
                 }
                 /* Write the first 5 categories in the list */
                 $product->categoriesList = shopfunctions::renderGuiList('virtuemart_category_id', '#__virtuemart_product_categories', 'virtuemart_product_id', $product->virtuemart_product_id, 'category_name', '#__virtuemart_categories', 'virtuemart_category_id', 'category');
             }
             $mf_model = VmModel::getModel('manufacturer');
             $manufacturers = $mf_model->getManufacturerDropdown();
             $this->assignRef('manufacturers', $manufacturers);
             /* add Search filter in lists*/
             /* Search type */
             $options = array('' => JText::_('COM_VIRTUEMART_LIST_EMPTY_OPTION'), 'parent' => JText::_('COM_VIRTUEMART_PRODUCT_LIST_SEARCH_BY_PARENT_PRODUCT'), 'product' => JText::_('COM_VIRTUEMART_PRODUCT_LIST_SEARCH_BY_DATE_TYPE_PRODUCT'), 'price' => JText::_('COM_VIRTUEMART_PRODUCT_LIST_SEARCH_BY_DATE_TYPE_PRICE'), 'withoutprice' => JText::_('COM_VIRTUEMART_PRODUCT_LIST_SEARCH_BY_DATE_TYPE_WITHOUTPRICE'));
             $this->lists['search_type'] = VmHTML::selectList('search_type', JRequest::getVar('search_type'), $options);
             /* Search order */
             $options = array('bf' => JText::_('COM_VIRTUEMART_PRODUCT_LIST_SEARCH_BY_DATE_BEFORE'), 'af' => JText::_('COM_VIRTUEMART_PRODUCT_LIST_SEARCH_BY_DATE_AFTER'));
             $this->lists['search_order'] = VmHTML::selectList('search_order', JRequest::getVar('search_order'), $options);
             // Toolbar
             JToolBarHelper::save('sentproductemailtoshoppers', JText::_('COM_VIRTUEMART_PRODUCT_EMAILTOSHOPPERS'));
             JToolBarHelper::custom('createchild', 'new', 'new', JText::_('COM_VIRTUEMART_PRODUCT_CHILD'), true);
             JToolBarHelper::custom('cloneproduct', 'copy', 'copy', JText::_('COM_VIRTUEMART_PRODUCT_CLONE'), true);
             JToolBarHelper::custom('addrating', 'default', '', JText::_('COM_VIRTUEMART_ADD_RATING'), true);
             $this->addStandardDefaultViewCommands();
             $this->assignRef('productlist', $productlist);
             $this->assignRef('virtuemart_category_id', $categoryId);
             $this->assignRef('model', $model);
             break;
     }
     parent::display($tpl);
 }
开发者ID:joselapria,项目名称:virtuemart,代码行数:101,代码来源:view.html.php

示例12: getPayments

 /**
  * Retireve a list of calculation rules from the database.
  *
  * @author Max Milbers
  * @param string $onlyPuiblished True to only retreive the publish Calculation rules, false otherwise
  * @param string $noLimit True if no record count limit is used, false otherwise
  * @return object List of calculation rule objects
  */
 public function getPayments($onlyPublished = false, $noLimit = false)
 {
     $where = array();
     if ($onlyPublished) {
         $where[] = ' `#__virtuemart_paymentmethods`.`published` = 1';
     }
     $whereString = '';
     if (count($where) > 0) {
         $whereString = ' WHERE ' . implode(' AND ', $where);
     }
     $select = ' * FROM `#__virtuemart_paymentmethods_' . VMLANG . '` as l ';
     $joinedTables = ' JOIN `#__virtuemart_paymentmethods`   USING (`virtuemart_paymentmethod_id`) ';
     $this->_data = $this->exeSortSearchListQuery(0, $select, $joinedTables, $whereString, ' ', $this->_getOrdering());
     //$this->exeSortSearchListQuery(0,'*',' FROM `#__virtuemart_paymentmethods`',$whereString,'',$this->_getOrdering('ordering'));
     if (isset($this->_data)) {
         if (!class_exists('shopfunctions')) {
             require JPATH_VM_ADMINISTRATOR . DS . 'helpers' . DS . 'shopfunctions.php';
         }
         foreach ($this->_data as $data) {
             /* Add the paymentmethod shoppergroups */
             $q = 'SELECT `virtuemart_shoppergroup_id` FROM #__virtuemart_paymentmethod_shoppergroups WHERE `virtuemart_paymentmethod_id` = "' . $data->virtuemart_paymentmethod_id . '"';
             $this->_db->setQuery($q);
             $data->virtuemart_shoppergroup_ids = $this->_db->loadColumn();
             /* Write the first 5 shoppergroups in the list */
             $data->paymShoppersList = shopfunctions::renderGuiList('virtuemart_shoppergroup_id', '#__virtuemart_paymentmethod_shoppergroups', 'virtuemart_paymentmethod_id', $data->virtuemart_paymentmethod_id, 'shopper_group_name', '#__virtuemart_shoppergroups', 'virtuemart_shoppergroup_id', 'shoppergroup', 4, 0);
         }
     }
     return $this->_data;
 }
开发者ID:denis1001,项目名称:Virtuemart-2-Joomla-3-Bootstrap,代码行数:37,代码来源:paymentmethod.php

示例13: display

 function display($tpl = null)
 {
     // Load the helper(s)
     $this->addHelperPath(VMPATH_ADMIN . DS . 'helpers');
     if (!class_exists('vmPSPlugin')) {
         require VMPATH_PLUGINLIBS . DS . 'vmpsplugin.php';
     }
     if (!class_exists('VmHTML')) {
         require VMPATH_ADMIN . DS . 'helpers' . DS . 'html.php';
     }
     $model = VmModel::getModel();
     $layoutName = vRequest::getCmd('layout', 'default');
     $this->SetViewTitle();
     $layoutName = vRequest::getCmd('layout', 'default');
     if ($layoutName == 'edit') {
         VmConfig::loadJLang('plg_vmpsplugin', false);
         JForm::addFieldPath(VMPATH_ADMIN . DS . 'fields');
         $shipment = $model->getShipment();
         // Get the payment XML.
         $formFile = vRequest::filterPath(VMPATH_ROOT . DS . 'plugins' . DS . 'vmshipment' . DS . $shipment->shipment_element . DS . $shipment->shipment_element . '.xml');
         if (file_exists($formFile)) {
             $shipment->form = JForm::getInstance($shipment->shipment_element, $formFile, array(), false, '//vmconfig | //config[not(//vmconfig)]');
             $shipment->params = new stdClass();
             $varsToPush = vmPlugin::getVarsToPushFromForm($shipment->form);
             VmTable::bindParameterableToSubField($shipment, $varsToPush);
             $shipment->form->bind($shipment->getProperties());
         } else {
             $shipment->form = null;
         }
         if (!class_exists('VmImage')) {
             require VMPATH_ADMIN . DS . 'helpers' . DS . 'image.php';
         }
         if (!class_exists('VirtueMartModelVendor')) {
             require VMPATH_ADMIN . DS . 'models' . DS . 'vendor.php';
         }
         $vendor_id = 1;
         $currency = VirtueMartModelVendor::getVendorCurrency($vendor_id);
         $this->assignRef('vendor_currency', $currency->currency_symbol);
         if ($this->showVendors()) {
             $vendorList = ShopFunctions::renderVendorList($shipment->virtuemart_vendor_id);
             $this->assignRef('vendorList', $vendorList);
         }
         $this->pluginList = self::renderInstalledShipmentPlugins($shipment->shipment_jplugin_id);
         $this->assignRef('shipment', $shipment);
         $this->shopperGroupList = ShopFunctions::renderShopperGroupList($shipment->virtuemart_shoppergroup_ids, true);
         $this->addStandardEditViewCommands($shipment->virtuemart_shipmentmethod_id);
     } else {
         JToolBarHelper::custom('cloneshipment', 'copy', 'copy', vmText::_('COM_VIRTUEMART_SHIPMENT_CLONE'), true);
         $this->addStandardDefaultViewCommands();
         $this->addStandardDefaultViewLists($model);
         $this->shipments = $model->getShipments();
         VmConfig::loadJLang('com_virtuemart_shoppers', TRUE);
         foreach ($this->shipments as &$data) {
             // Write the first 5 shoppergroups in the list
             $data->shipmentShoppersList = shopfunctions::renderGuiList($data->virtuemart_shoppergroup_ids, 'shoppergroups', 'shopper_group_name', 'shopper');
         }
         $this->pagination = $model->getPagination();
     }
     parent::display($tpl);
 }
开发者ID:thumbs-up-sign,项目名称:TuVanDuAn,代码行数:60,代码来源:view.html.php

示例14: display


//.........这里部分代码省略.........
             } else {
                 if (!empty($product_parent)) {
                     $product_lwh_uom = $product_parent->product_lwh_uom;
                 } else {
                     $product_lwh_uom = tsmConfig::get('lwh_unit_default');
                 }
             }
             if (!empty($product->product_unit)) {
                 $product_unit = $product->product_unit;
             } else {
                 if (!empty($product_parent)) {
                     $product_unit = $product_parent->product_unit;
                 } else {
                     $product_unit = tsmConfig::get('product_unit_default', 'KG');
                 }
             }
             $lists['product_weight_uom'] = ShopFunctions::renderWeightUnitList('product_weight_uom', $product_weight_uom);
             $lists['product_iso_uom'] = ShopFunctions::renderUnitIsoList('product_unit', $product_unit);
             $lists['product_lwh_uom'] = ShopFunctions::renderLWHUnitList('product_lwh_uom', $product_lwh_uom);
             if (empty($product->product_available_date)) {
                 $product->product_available_date = date("Y-m-d");
             }
             $waitinglistmodel = tmsModel::getModel('waitinglist');
             /* Load waiting list */
             if ($product->tsmart_product_id) {
                 //$waitinglist = $this->get('waitingusers', 'waitinglist');
                 $waitinglist = $waitinglistmodel->getWaitingusers($product->tsmart_product_id);
                 $this->assignRef('waitinglist', $waitinglist);
             }
             $orderstatusModel = tmsModel::getModel('orderstatus');
             $lists['OrderStatus'] = $orderstatusModel->renderOSList(array(), 'order_status', TRUE);
             // Add the tsmart_shoppergroup_ids
             $cid = JFactory::getUser()->id;
             $this->activeShoppergroups = shopfunctions::renderGuiList($cid, 'shoppergroups', 'shopper_group_name', 'category', 'vmuser_shoppergroups', 'tsmart_user_id');
             if (!empty($this->activeShoppergroups)) {
                 $shoppergroupModel = tmsModel::getModel('shoppergroup');
                 $this->activeShoppergroups = tsmText::_($shoppergroupModel->getDefault(0)->shopper_group_name);
             }
             // Load protocustom lists
             $customModel = tmsModel::getModel('custom');
             $this->fieldTypes = tsmartModelCustom::getCustomTypes();
             $customsList = $customModel->getCustomsList();
             $attribs = 'style= "width: 300px;"';
             $customlist = JHtml::_('select.genericlist', $customsList, 'customlist', $attribs, 'value', 'text', null, false, true);
             $this->assignRef('customsList', $customlist);
             if ($product->product_parent_id > 0) {
                 // Set up labels
                 $info_label = tsmText::_('com_tsmart_PRODUCT_FORM_ITEM_INFO_LBL');
                 $status_label = tsmText::_('com_tsmart_PRODUCT_FORM_ITEM_STATUS_LBL');
                 $dim_weight_label = tsmText::_('com_tsmart_PRODUCT_FORM_ITEM_DIM_WEIGHT_LBL');
                 $images_label = tsmText::_('com_tsmart_PRODUCT_FORM_ITEM_IMAGES_LBL');
                 $delete_message = tsmText::_('com_tsmart_PRODUCT_FORM_DELETE_ITEM_MSG');
             } else {
                 if ($task == 'add') {
                     $action = tsmText::_('com_tsmart_PRODUCT_FORM_NEW_PRODUCT_LBL');
                 } else {
                     $action = tsmText::_('com_tsmart_PRODUCT_FORM_UPDATE_ITEM_LBL');
                 }
                 $info_label = tsmText::_('com_tsmart_PRODUCT_FORM_PRODUCT_INFO_LBL');
                 $status_label = tsmText::_('com_tsmart_PRODUCT_FORM_PRODUCT_STATUS_LBL');
                 $dim_weight_label = tsmText::_('com_tsmart_PRODUCT_FORM_PRODUCT_DIM_WEIGHT_LBL');
                 $images_label = tsmText::_('com_tsmart_PRODUCT_FORM_PRODUCT_IMAGES_LBL');
                 $delete_message = tsmText::_('com_tsmart_PRODUCT_FORM_DELETE_PRODUCT_MSG');
             }
             //get countries
             require_once JPATH_ROOT . '/administrator/components/com_tsmart/helpers/tsmcountries.php';
开发者ID:cuongnd,项目名称:etravelservice,代码行数:67,代码来源:view.html.php

示例15: paypalChanged

                        <?php 
echo JText::_('VMPAYMENT_PAYPAL_CC_WHATISCVV');
?>
                    </span>
                </td>
            </tr>
            <tr>
			
                <td nowrap width="10%" align="right"><?php 
echo JText::_('VMPAYMENT_PAYPAL_CC_EXDATE');
?>
</td>
                <td>
                    <?php 
echo shopfunctions::listMonths('cc_expire_month_' . $viewData['virtuemart_paymentmethod_id'], $customerData->getVar('cc_expire_month'));
echo shopfunctions::listYears('cc_expire_year_' . $viewData['virtuemart_paymentmethod_id'], $customerData->getVar('cc_expire_year'), null, null, "onchange=\"javascript: paypalChanged(this);\"");
?>
                    <div id="cc_expiredate_errormsg_<?php 
echo $viewData['virtuemart_paymentmethod_id'];
?>
"></div>
                </td>
            </tr>
        </table>
    </span>
</div>
<script type="text/javascript">
 function paypalChanged(el)
  {
    var month = document.getElementById('cc_expire_month_<?php 
echo $viewData['virtuemart_paymentmethod_id'];
开发者ID:aldegtyarev,项目名称:stelsvelo,代码行数:31,代码来源:creditcardform.php


注:本文中的shopfunctions类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。