Пример #1
0
 function display($tpl = null)
 {
     if (!class_exists('VmHTML')) {
         require VMPATH_ADMIN . DS . 'helpers' . DS . 'html.php';
     }
     $this->vendorId = VmConfig::isSuperVendor();
     // TODO add icon for media view
     $this->SetViewTitle();
     $model = VmModel::getModel('media');
     $layoutName = vRequest::getCmd('layout', 'default');
     if ($layoutName == 'edit') {
         $this->media = $model->getFile();
         $this->addStandardEditViewCommands();
     } else {
         $virtuemart_product_id = vRequest::getInt('virtuemart_product_id');
         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;
         }
         $cat_id = vRequest::getInt('virtuemart_category_id', 0);
         JToolBarHelper::custom('synchronizeMedia', 'new', 'new', vmText::_('COM_VIRTUEMART_TOOLS_SYNC_MEDIA_FILES'), false);
         $this->addStandardDefaultViewCommands();
         $this->addStandardDefaultViewLists($model, null, null, 'searchMedia');
         $options = array('' => vmText::_('COM_VIRTUEMART_LIST_ALL_TYPES'), 'product' => vmText::_('COM_VIRTUEMART_PRODUCT'), 'category' => vmText::_('COM_VIRTUEMART_CATEGORY'), 'manufacturer' => vmText::_('COM_VIRTUEMART_MANUFACTURER'), 'vendor' => vmText::_('COM_VIRTUEMART_VENDOR'));
         $this->lists['search_type'] = VmHTML::selectList('search_type', vRequest::getVar('search_type'), $options, 1, '', 'onchange="this.form.submit();"');
         $options = array('' => vmText::_('COM_VIRTUEMART_LIST_ALL_ROLES'), 'file_is_displayable' => vmText::_('COM_VIRTUEMART_FORM_MEDIA_DISPLAYABLE'), 'file_is_downloadable' => vmText::_('COM_VIRTUEMART_FORM_MEDIA_DOWNLOADABLE'), 'file_is_forSale' => vmText::_('COM_VIRTUEMART_FORM_MEDIA_SET_FORSALE'));
         $this->lists['search_role'] = VmHTML::selectList('search_role', vRequest::getVar('search_role'), $options, 1, '', 'onchange="this.form.submit();"');
         $this->files = $model->getFiles(false, false, $virtuemart_product_id, $cat_id);
         $this->pagination = $model->getPagination();
     }
     parent::display($tpl);
 }
 function display($tpl = null)
 {
     $this->loadHelper('html');
     $this->loadHelper('permissions');
     //@todo should be depended by loggedVendor
     $this->vendorId = 1;
     $titleMsg = '';
     $model = VmModel::getModel();
     $this->perms = Permissions::getInstance();
     // to add in vmview ?
     $multivendor = Vmconfig::get('multix', 'none');
     $this->multiX = $multivendor !== 'none' && $multivendor != '' ? true : false;
     $layoutName = JRequest::getWord('layout', 'default');
     if ($layoutName == 'edit') {
         $this->media = $model->getFile();
         $this->addStandardEditViewCommands();
     } else {
         $this->cat_id = 0;
         if ($this->product_id = JRequest::getInt('virtuemart_product_id', 0)) {
             $product = VmModel::getModel('product')->getProductSingle($this->product_id, false, false);
             $this->link = $this->editLink($this->product_id, '<i class="icon-edit"></i> ' . $product->product_name, 'virtuemart_product_id', array('class' => 'hasTooltip btn btn-inverse', 'title' => JText::_('COM_VIRTUEMART_EDIT') . ' ' . $product->product_name), 'product');
             $titleMsg = $product->product_name;
         } else {
             if ($this->cat_id = JRequest::getInt('virtuemart_category_id', 0)) {
                 $category = VmModel::getModel('category')->getCategory($this->cat_id, false);
                 $this->link = $this->editLink($this->cat_id, '<i class="icon-edit"></i> ' . $category->category_name, 'virtuemart_category_id', array('class' => 'hasTooltip btn btn-inverse', 'title' => JText::_('COM_VIRTUEMART_EDIT') . ' ' . $category->category_name), 'category');
                 $titleMsg = $category->category_name;
             }
         }
         // RAW render
         if (JRequest::getWord('format', '') === 'raw') {
             $tpl = 'results';
         } else {
             if ($this->adminVendor == 1) {
                 JToolBarHelper::custom('synchronizeMedia', 'new', 'new', JText::_('COM_VIRTUEMART_TOOLS_SYNC_MEDIA_FILES'), false);
                 if ($this->multiX) {
                     JToolBarHelper::custom('toggle.shared.1', 'ok', 'yes', JText::_('COM_VIRTUEMART_SHARED'), true);
                     JToolBarHelper::custom('toggle.shared.0', 'cancel', 'no', JText::_('COM_VIRTUEMART_SHARED'), true);
                 }
             }
             $this->addStandardDefaultViewCommands();
         }
         $this->addStandardDefaultViewLists($model, null, null, 'searchMedia');
         $options = array('' => '- ' . JText::_('COM_VIRTUEMART_TYPE') . ' -', 'product' => JText::_('COM_VIRTUEMART_PRODUCT'), 'category' => JText::_('COM_VIRTUEMART_CATEGORY'), 'manufacturer' => JText::_('COM_VIRTUEMART_MANUFACTURER'), 'vendor' => JText::_('COM_VIRTUEMART_VENDOR'));
         $this->lists['search_type'] = VmHTML::selectList('search_type', JRequest::getVar('search_type'), $options, 1, '', 'onchange="Joomla.ajaxSearch(this); return false;"');
         $options = array('' => JText::_('COM_VIRTUEMART_LIST_ALL_ROLES'), 'file_is_displayable' => JText::_('COM_VIRTUEMART_FORM_MEDIA_DISPLAYABLE'), 'file_is_downloadable' => JText::_('COM_VIRTUEMART_FORM_MEDIA_DOWNLOADABLE'), 'file_is_forSale' => JText::_('COM_VIRTUEMART_FORM_MEDIA_SET_FORSALE'));
         $this->lists['search_role'] = VmHTML::selectList('search_role', JRequest::getVar('search_role'), $options, 1, '', 'onchange="this.form.submit();"');
         $this->files = $model->getFiles(false, false, $this->product_id, $this->cat_id);
         $this->pagination = $model->getPagination();
     }
     // TODO add icon for media view
     $this->SetViewTitle('', $titleMsg);
     parent::display($tpl);
 }
Пример #3
0
	function plgVmOnProductEdit($field, $product, &$row,&$retValue) {
		if ($field->custom_element != $this->_name) return '';
		$this->parseCustomParams($field);
		$html ='
			<fieldset>
				<legend>'. JText::_('VMCUSTOM_DROP_BOX') .'</legend>
				<table class="admintable">
					'.VmHTML::row('input','VMCUSTOM_DROP_STRING_NAME','custom_param['.$row.'][custom_drop_name]',$field->custom_drop_name).'
					'.VmHTML::row('input','VMCUSTOM_DROP_STRING','custom_param['.$row.'][custom_drop]',$field->custom_drop).'
				</table>
			</fieldset>';
		$retValue .= $html;

		return true ;
	}
Пример #4
0
	function plgVmOnProductEdit($field, $product_id, &$row,&$retValue) {
		if ($field->custom_element != $this->_name) return '';
		// $html .='<input type="text" value="'.$field->custom_size.'" size="10" name="custom_param['.$row.'][custom_size]">';
		$this->parseCustomParams($field);

		$html ='
			<fieldset>
				<legend>'. JText::_('VMCUSTOM_TEXTINPUT') .'</legend>
				<table class="admintable">
					'.VmHTML::row('input','VMCUSTOM_TEXTINPUT_SIZE','custom_param['.$row.'][custom_size]',$field->custom_size).'
				</table>
			</fieldset>';
		$retValue .= $html;
		$row++;
		return true ;
	}
Пример #5
0
    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;
    }
Пример #6
0
 function plgVmOnDisplayEdit(&$calc, &$html)
 {
     $html .= '<table>';
     $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_VADDRESS', 'vAddress', $calc->vAddress);
     //	$html .= VmHTML::row('checkbox','VMCALCULATION_ISTRAXX_AVALARA_TRACE','trace',$calc->trace);
     $html .= '</table></fieldset>';
     if ($calc->activated) {
         $html .= $this->ping($calc);
     }
     $html .= JText::_('VMCALCULATION_AVALARA_MANUAL');
     return TRUE;
 }
Пример #7
0
 function display($tpl = null)
 {
     $this->loadHelper('html');
     $this->loadHelper('permissions');
     //@todo should be depended by loggedVendor
     $vendorId = 1;
     $this->assignRef('vendorId', $vendorId);
     // TODO add icon for media view
     $this->SetViewTitle();
     $model = VmModel::getModel();
     $perms = Permissions::getInstance();
     $this->assignRef('perms', $perms);
     $layoutName = JRequest::getWord('layout', 'default');
     if ($layoutName == 'edit') {
         $media = $model->getFile();
         $this->assignRef('media', $media);
         $isNew = $media->virtuemart_media_id < 1;
         /*			if ($isNew) {
         				if(!Permissions::getInstance()->check('admin')) {
         					$usermodel = VmModel::getModel('user');
         // 					$usermodel->setCurrent();
         					$userDetails = $usermodel->getUser();
         					if(empty($userDetails->virtuemart_vendor_id)){
         						JError::raiseError(403,'Forbidden for non vendors');
         					}
         				} else $media->virtuemart_vendor_id = 1;
         				if(empty($media->virtuemart_vendor_id))$media->virtuemart_vendor_id = $userDetails->virtuemart_vendor_id;
         			}
         */
         $this->addStandardEditViewCommands();
     } else {
         $virtuemart_product_id = JRequest::getInt('virtuemart_product_id', 0);
         $cat_id = JRequest::getInt('virtuemart_category_id', 0);
         JToolBarHelper::customX('synchronizeMedia', 'new', 'new', JText::_('COM_VIRTUEMART_TOOLS_SYNC_MEDIA_FILES'), false);
         $this->addStandardDefaultViewCommands();
         $this->addStandardDefaultViewLists($model, null, null, 'searchMedia');
         $options = array('' => JText::_('COM_VIRTUEMART_LIST_EMPTY_OPTION'), 'product' => JText::_('COM_VIRTUEMART_PRODUCT'), 'category' => JText::_('COM_VIRTUEMART_CATEGORY'), 'manufacturer' => JText::_('COM_VIRTUEMART_MANUFACTURER'), 'vendor' => JText::_('COM_VIRTUEMART_VENDOR'));
         $this->lists['search_type'] = VmHTML::selectList('search_type', JRequest::getVar('search_type'), $options, 1, '', 'onchange="this.form.submit();"');
         $files = $model->getFiles(false, false, $virtuemart_product_id, $cat_id);
         $this->assignRef('files', $files);
         $pagination = $model->getPagination();
         $this->assignRef('pagination', $pagination);
     }
     parent::display($tpl);
 }
Пример #8
0
 function display($tpl = null)
 {
     if (!class_exists('VmHTML')) {
         require JPATH_VM_ADMINISTRATOR . DS . 'helpers' . DS . 'html.php';
     }
     if (!class_exists('Permissions')) {
         require JPATH_VM_ADMINISTRATOR . DS . 'helpers' . DS . 'permissions.php';
     }
     //@todo should be depended by loggedVendor
     $vendorId = 1;
     $this->assignRef('vendorId', $vendorId);
     // TODO add icon for media view
     $this->SetViewTitle();
     $model = VmModel::getModel('media');
     $perms = Permissions::getInstance();
     $this->assignRef('perms', $perms);
     $layoutName = JRequest::getWord('layout', 'default');
     if ($layoutName == 'edit') {
         $media = $model->getFile();
         $this->assignRef('media', $media);
         $isNew = $media->virtuemart_media_id < 1;
         $this->addStandardEditViewCommands();
     } else {
         $virtuemart_product_id = JRequest::getVar('virtuemart_product_id', array(), '', '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;
         }
         $cat_id = JRequest::getInt('virtuemart_category_id', 0);
         JToolBarHelper::customX('synchronizeMedia', 'new', 'new', JText::_('COM_VIRTUEMART_TOOLS_SYNC_MEDIA_FILES'), false);
         $this->addStandardDefaultViewCommands();
         $this->addStandardDefaultViewLists($model, null, null, 'searchMedia');
         $options = array('' => JText::_('COM_VIRTUEMART_LIST_ALL_TYPES'), 'product' => JText::_('COM_VIRTUEMART_PRODUCT'), 'category' => JText::_('COM_VIRTUEMART_CATEGORY'), 'manufacturer' => JText::_('COM_VIRTUEMART_MANUFACTURER'), 'vendor' => JText::_('COM_VIRTUEMART_VENDOR'));
         $this->lists['search_type'] = VmHTML::selectList('search_type', JRequest::getVar('search_type'), $options, 1, '', 'onchange="this.form.submit();"');
         $options = array('' => JText::_('COM_VIRTUEMART_LIST_ALL_ROLES'), 'file_is_displayable' => JText::_('COM_VIRTUEMART_FORM_MEDIA_DISPLAYABLE'), 'file_is_downloadable' => JText::_('COM_VIRTUEMART_FORM_MEDIA_DOWNLOADABLE'), 'file_is_forSale' => JText::_('COM_VIRTUEMART_FORM_MEDIA_SET_FORSALE'));
         $this->lists['search_role'] = VmHTML::selectList('search_role', JRequest::getVar('search_role'), $options, 1, '', 'onchange="this.form.submit();"');
         $files = $model->getFiles(false, false, $virtuemart_product_id, $cat_id);
         $this->assignRef('files', $files);
         $pagination = $model->getPagination();
         $this->assignRef('pagination', $pagination);
     }
     parent::display($tpl);
 }
Пример #9
0
    function plgVmOnProductEdit($field, $product_id, &$row, &$retValue)
    {
        if ($field->custom_element != $this->_name) {
            return '';
        }
        //VmConfig::$echoDebug = true;
        //vmdebug('plgVmOnProductEdit',$field);
        $html = '
			<fieldset>
				<legend>' . vmText::_('VMCUSTOM_TEXTINPUT') . '</legend>
				<table class="admintable">
					' . VmHTML::row('input', 'VMCUSTOM_TEXTINPUT_SIZE', 'customfield_params[' . $row . '][custom_size]', $field->custom_size);
        $options = array(0 => 'VMCUSTOM_TEXTINPUT_PRICE_BY_INPUT', 1 => 'VMCUSTOM_TEXTINPUT_PRICE_BY_LETTER');
        $html .= VmHTML::row('select', 'VMCUSTOM_TEXTINPUT_PRICE_BY_LETTER_OR_INPUT', 'customfield_params[' . $row . '][custom_price_by_letter]', $options, $field->custom_price_by_letter, '', 'value', 'text', false);
        //$html .= ($field->custom_price_by_letter==1)?vmText::_('VMCUSTOM_TEXTINPUT_PRICE_BY_LETTER'):vmText::_('VMCUSTOM_TEXTINPUT_PRICE_BY_INPUT');
        $html .= '</td>
		</tr>
				</table>
			</fieldset>';
        $retValue .= $html;
        $row++;
        return true;
    }
Пример #10
0
				<label for="title">
					<?php echo vmText::_('COM_VIRTUEMART_WORLDZONE'); ?>:
				</label>
			</td>
			<td>
				<?php echo JHtml::_('Select.genericlist', $this->worldZones, 'virtuemart_worldzone_id', '', 'virtuemart_worldzone_id', 'zone_name', $this->country->virtuemart_worldzone_id); ?>
			</td>
		</tr>*/
?>

		<?php 
echo VmHTML::row('input', 'COM_VIRTUEMART_COUNTRY_3_CODE', 'country_3_code', $this->country->country_3_code);
?>

		<?php 
echo VmHTML::row('input', 'COM_VIRTUEMART_COUNTRY_2_CODE', 'country_2_code', $this->country->country_2_code);
?>

	</table>
	</fieldset>
</div>

	<input type="hidden" name="virtuemart_country_id" value="<?php 
echo $this->country->virtuemart_country_id;
?>
" />

	<?php 
echo $this->addStandardHiddenToForm();
?>
			<td>
				<?php 
echo VmHTML::checkbox('jchosen', VmConfig::get('jchosen', 0));
?>
			</td>
		</tr>
		<tr>
			<td class="key">
				<span class="hasTip" title="<?php 
echo JText::_('COM_VIRTUEMART_ADMIN_CFG_ENABLE_GOOGLE_JQUERY_TIP');
?>
">
					<label for="google_jquery">
				<?php 
echo JText::_('COM_VIRTUEMART_ADMIN_CFG_ENABLE_GOOGLE_JQUERY');
?>
					</label>
				</span>
			</td>
			<td>
				<?php 
echo VmHTML::checkbox('google_jquery', VmConfig::get('google_jquery', '1'));
?>
			</td>
		</tr>
	</table>
</fieldset>
</td>
</tr>
</table>
Пример #12
0
echo VmHTML::row_control('select', JText::_('Hold seat'), 'hold_seat', $this->hold_seat_type, $this->item->hold_seat, '');
?>
                        <?php 
echo VmHTML::row_control('select_percent_amount', JText::_('Deposit Amount'), 'deposit_type', 'deposit_amount', $this->item->deposit_type, $this->item->deposit_amount);
?>
                        <?php 
echo VmHTML::row_control('select_amount_percent', 'Balance 1 Terms', 'balance_day_1', 'balance_percent_1', $this->item->balance_day_1, $this->item->balance_percent_1, false);
?>
                        <?php 
echo VmHTML::row_control('select_amount_percent', 'Balance 2 Terms', 'balance_day_2', 'balance_percent_2', $this->item->balance_day_2, $this->item->balance_percent_2, false);
?>
                        <?php 
echo VmHTML::row_control('select_amount_percent', 'Balance 3 Terms', 'balance_day_3', 'balance_percent_3', $this->item->balance_day_3, $this->item->balance_percent_3, false);
?>
                        <?php 
echo VmHTML::row_basic('list_checkbox', 'Payment option', 'list_payment_method_id', $this->list_payment_method, $this->item->list_payment_method_id, '', 'tsmart_paymentmethod_id', 'payment_name', true, true, true, 4);
?>

                    </div>
                </div>
                <div class="footer"></div>
            </div>

        </div>
        <input type="hidden" name="tsmart_paymentsetting_id"
               value="<?php 
echo $this->item->tsmart_paymentsetting_id;
?>
"/>
        <?php 
echo $this->addStandardHiddenToForm();
Пример #13
0
    ?>
						</td>
					</tr>
					<tr>
						<td><?php 
    echo vmText::_('COM_VIRTUEMART_ORDER_PRINT_SHIPMENT_LBL');
    ?>
</td>
						<td>
							<input type="hidden" size="10" name="virtuemart_shipmentmethod_id" value="<?php 
    echo $this->orderbt->virtuemart_shipmentmethod_id;
    ?>
"/>
							<!--
							<?php 
    echo VmHTML::select("virtuemart_shipmentmethod_id", $shipments, $this->orderbt->virtuemart_shipmentmethod_id, '', "virtuemart_shipmentmethod_id", "shipment_name");
    ?>
							<span id="delete_old_shipment" style="display: none;"><br />
								<input id="delete_old_shipment" type="checkbox" name="delete_old_shipment" value="1" /> <label class='' for=""><?php 
    echo vmText::_('COM_VIRTUEMART_ORDER_EDIT_CALCULATE');
    ?>
</label>
							</span>
							-->
							<?php 
    foreach ($shipments as $shipment) {
        if ($shipment->virtuemart_shipmentmethod_id == $this->orderbt->virtuemart_shipmentmethod_id) {
            echo $shipment->shipment_name;
        }
    }
    ?>
Пример #14
0
	    <td class="key">
		<span class="hasTip" title="<?php echo vmText::_('com_tsmart_ADMIN_CFG_MAIL_FROM_RECIPIENT_EXPLAIN'); ?>">
		<label for="mail_from_recipient"><?php echo vmText::_('com_tsmart_ADMIN_CFG_MAIL_FROM_RECIPIENT') ?></span>
		    </span>
	    </td>
	    <td>
		    <?php echo VmHTML::checkbox('mail_from_recipient', VmConfig::get('mail_from_recipient',0)); ?>
	    </td>
    </tr>
    <tr>
	    <td class="key">
		<span class="hasTip" title="<?php echo vmText::_('com_tsmart_ADMIN_CFG_MAIL_FROM_SETSENDER_EXPLAIN'); ?>">
		<label for="mail_from_setsender"><?php echo vmText::_('com_tsmart_ADMIN_CFG_MAIL_FROM_SETSENDER') ?></span>
		    </span>
	    </td>
	    <td>
		    <?php echo VmHTML::checkbox('mail_from_setsender', VmConfig::get('mail_from_setsender',0)); ?>
	    </td>
    </tr --><?php */
$attrlist = 'class="inputbox" multiple="multiple" ';
echo VmHTML::row('genericlist', 'com_tsmart_ADMIN_CFG_STATUS_PDF_INVOICES', $this->osWoP_Options, 'inv_os[]', $attrlist, 'order_status_code', 'order_status_name', tsmConfig::get('inv_os', array('C')), 'inv_os', true);
echo VmHTML::row('genericlist', 'com_tsmart_CFG_OSTATUS_EMAILS_SHOPPER', $this->osWoP_Options, 'email_os_s[]', $attrlist, 'order_status_code', 'order_status_name', tsmConfig::get('email_os_s', array('U', 'C', 'S', 'R', 'X')), 'email_os_s', true);
echo VmHTML::row('genericlist', 'com_tsmart_CFG_OSTATUS_EMAILS_VENDOR', $this->os_Options, 'email_os_v[]', $attrlist, 'order_status_code', 'order_status_name', tsmConfig::get('email_os_v', array('U', 'C', 'R', 'X')), 'email_os_v', true);
echo VmHTML::row('input', 'com_tsmart_CFG_ATTACH', 'attach', tsmConfig::get('attach', ''));
echo VmHTML::row('genericlist', 'com_tsmart_CFG_ATTACH_OS', $this->osWoP_Options, 'attach_os[]', $attrlist, 'order_status_code', 'order_status_name', tsmConfig::get('attach_os', array('U', 'C', 'R', 'X')), 'attach_os', true);
?>
	</table>
</fieldset>


Пример #15
0
                </div>
                <div class="span2">
                    <div class="activelist">
                        <?php 
    echo VmHTML::bootstrap_activelist('params[' . $passenger_type . '_state]', $this->config->params->get($passenger_type . '_state', true), ' ');
    ?>
                    </div>
                </div>
                <div class="span6">
                    <div class="slider-age">
                        <div class="pull-left title"> <?php 
    echo "Set {$passenger_type_label} age";
    ?>
 </div>
                        <div  class="pull-left" style="width: 70%"><?php 
    echo VmHTML::select_from_to('params[' . $passenger_type . '_passenger_age_from]', 'params[' . $passenger_type . '_passenger_age_to]', $this->config->params->get($passenger_type . '_passenger_age_from', 0), $this->config->params->get($passenger_type . '_passenger_age_to', 0), 'class="required"');
    ?>
</div>
                    </div>
                </div>

            </div>
            <?php 
}
?>
        </div>
        <?php 
echo $this->addStandardHiddenToForm();
?>
        <input type="hidden" value="<?php 
echo $this->config->tsmart_general_id;
Пример #16
0
		</tr>
		</table>
		<table class="admintable" id="show_hide_prices">
		<tr>
		    <td>
			<span class="hasTip" title="<?php 
echo JText::_('COM_VIRTUEMART_ADMIN_CFG_SHOW_PRICES_EXPLAIN');
?>
">
<?php 
echo JText::_('COM_VIRTUEMART_ADMIN_CFG_SHOW_PRICES');
?>
		    </td>
		    <td>
<?php 
echo VmHTML::checkbox('show_prices', $this->shoppergroup->price_display->get('show_prices'));
?>
		    </td>
		</tr>

		    <tr>
			<th></th>
			<th><?php 
echo JText::_('COM_VIRTUEMART_ADMIN_CFG_PRICES_LABEL');
?>
</th>
			<th><?php 
echo JText::_('COM_VIRTUEMART_ADMIN_CFG_PRICES_TEXT');
?>
</th>
			<th><?php 
Пример #17
0
echo JText::_('COM_VIRTUEMART_ADMIN_CFG_SEO_TRANSLATE');
?>
</label>
		</span>
	    </td>
		<td>
			<?php 
echo VmHTML::checkbox('seo_translate', $this->config->get('seo_translate'));
?>
		</td>
	</tr>
	<tr>
	    <td class="key">		
		<span class="hasTip" title="<?php 
echo JText::_('COM_VIRTUEMART_ADMIN_CFG_SEO_USE_ID_TIP');
?>
">
		<label for="seo_use_id"><?php 
echo JText::_('COM_VIRTUEMART_ADMIN_CFG_SEO_USE_ID');
?>
</label>
		</span>
	    </td>
		<td>
			<?php 
echo VmHTML::checkbox('seo_use_id', $this->config->get('seo_use_id'));
?>
		</td>
	</tr>
 </table>
</fieldset>
					</td>
			</tr>
			<tr>
				<td colspan=2><div
					class="hasTooltip"
					title="<?php 
echo JText::_('COM_VIRTUEMART_ADMIN_CFG_RATING_EXPLAIN');
?>
">
						<?php 
echo JText::_('COM_VIRTUEMART_ADMIN_CFG_RATING');
?>
					</div>
						<?php 
$showReviewFor = array('none' => JText::_('COM_VIRTUEMART_ADMIN_CFG_RATING_MODE_NONE'), 'bought' => JText::_('COM_VIRTUEMART_ADMIN_CFG_RATING_MODE_BOUGHT_PRODUCT'), 'registered' => JText::_('COM_VIRTUEMART_ADMIN_CFG_RATING_MODE_REGISTERED'));
echo VmHTML::selectList('ratingMode', VmConfig::get('ratingMode', 2), $showReviewFor, 1, '', '', 'input-xlarge');
?>
				</td>
			</tr>

		</table>
	</fieldset>
</div>

<script type="text/javascript">
	jQuery('#image').change( function() {
		var $newimage = jQuery(this).val();
		jQuery('#product_availability').val($newimage);
		jQuery('#imagelib').attr({ src:'<?php 
echo JURI::root(true) . $this->imagePath;
?>
Пример #19
0
    /**
     * This displays a media handler. It displays the full and the thumb (icon) of the media.
     * It also gives a possibility to upload/change/thumbnail media
     *
     * @param string $imageArgs html atttributes, Just for displaying the fullsized image
     */
    public function displayFileHandler()
    {
        VmConfig::loadJLang('com_virtuemart_media');
        $this->addHiddenByType();
        $html = '<fieldset class="checkboxes">';
        $html .= '<legend>' . vmText::_('COM_VIRTUEMART_IMAGE_INFORMATION') . '</legend>';
        $html .= '<div class="vm__img_autocrop">';
        $imageArgs = array('id' => 'vm_display_image');
        $html .= $this->displayMediaFull($imageArgs, false, '', false) . '</div>';
        //This makes problems, when there is already a form, and there would be form in a form. breaks js in some browsers
        //		$html .= '<form name="adminForm" id="adminForm" method="post" enctype="multipart/form-data">';
        $html .= ' <table class="adminform"> ';
        if ($this->published || $this->virtuemart_media_id === 0) {
            $checked = 1;
        } else {
            $checked = 0;
        }
        $html .= '<tr>';
        //  The following was removed bacause the check box (publish/unpublish) was not functioning...
        // 			$this->media_published = $this->published;
        $html .= '<td class="labelcell" style="width:20em">
	<label for="published">' . vmText::_('COM_VIRTUEMART_FILES_FORM_FILE_PUBLISHED') . '</label>
</td>
<td>';
        if (!class_exists('VmHtml')) {
            require VMPATH_ADMIN . DS . 'helpers' . DS . 'html.php';
        }
        $html .= VmHtml::checkbox('media[media_published]', $checked, 1, 0, 'class="inputbox"', 'media[media_published]');
        //<input type="checkbox" class="inputbox" id="media_published'.$identify.'" name="media_published'.$identify.'" '.$checked.' size="16" value="1" />
        $html .= '</td>';
        $imgWidth = VmConfig::get('img_width', '');
        if (!empty($imgWidth)) {
            $imgWidth = 'width:' . VmConfig::get('img_width', 90) . 'px;';
        } else {
            $imgWidth = 'max-width:200px;width:auto;';
        }
        $imgHeight = VmConfig::get('img_height', '');
        if (!empty($imgHeight)) {
            $imgHeight = 'height:' . VmConfig::get('img_height', 90) . 'px;';
        } else {
            $imgHeight = '';
        }
        $html .= '<td rowspan = "8" min-width = "' . (VmConfig::get('img_width', 90) + 10) . 'px" overflow="hidden">';
        $thumbArgs = array('class' => 'vm_thumb_image', 'style' => 'overflow: auto;' . $imgWidth . $imgHeight);
        $html .= $this->displayMediaThumb($thumbArgs);
        //JHTML::image($this->file_url_thumb, 'thumbnail', 'id="vm_thumb_image" style="overflow: auto; float: right;"');
        // $html .= $this->displayMediaThumb('',false,'id="vm_thumb_image" style="overflow: auto; float: right;"');
        $html .= '</td>';
        $html .= '</tr>';
        if (vmAccess::manager('media')) {
            $readonly = 'readonly';
        } else {
            $readonly = '';
        }
        $html .= $this->displayRow('COM_VIRTUEMART_FILES_FORM_FILE_TITLE', 'file_title');
        $html .= $this->displayRow('COM_VIRTUEMART_FILES_FORM_FILE_DESCRIPTION', 'file_description');
        $html .= $this->displayRow('COM_VIRTUEMART_FILES_FORM_FILE_META', 'file_meta');
        $html .= $this->displayRow('COM_VIRTUEMART_FILES_FORM_FILE_CLASS', 'file_class');
        $html .= $this->displayRow('COM_VIRTUEMART_FILES_FORM_FILE_URL', 'file_url', $readonly);
        //remove the file_url_thumb in case it is standard
        if (!empty($this->file_url_thumb) and is_a($this, 'VmImage')) {
            $file_url_thumb = $this->createThumbFileUrl();
            //vmdebug('my displayFileHandler ',$this,$file_url_thumb);
            if ($this->file_url_thumb == $file_url_thumb) {
                $this->file_url_thumb = vmText::sprintf('COM_VIRTUEMART_DEFAULT_URL', $file_url_thumb);
            }
        }
        $html .= $this->displayRow('COM_VIRTUEMART_FILES_FORM_FILE_URL_THUMB', 'file_url_thumb', $readonly);
        $this->addMediaAttributesByType();
        $html .= '<tr>
				<td class="labelcell">' . vmText::_('COM_VIRTUEMART_FILES_FORM_ROLE') . '</td>
				<td><fieldset class="checkboxes">' . JHtml::_('select.radiolist', $this->getOptions($this->_mRoles), 'media[media_roles]', '', 'value', 'text', $this->media_role) . '</fieldset></td></tr>';
        // 			$html .= '<tr><td class="labelcell">'.VmHTML::checkbox('file_is_forSale', $this->file_is_forSale);
        // 			$html .= VmHTML::checkbox('file_is_downloadable', $this->file_is_downloadable);
        if (!empty($this->file_type)) {
            $html .= '<tr>
					<td class="labelcell">' . vmText::_('COM_VIRTUEMART_FILES_FORM_LOCATION') . '</td>
					<td><fieldset class="checkboxes">' . vmText::_('COM_VIRTUEMART_FORM_MEDIA_SET_' . strtoupper($this->file_type)) . '</fieldset></td></tr>';
        } else {
            $mediaattribtemp = $this->media_attributes;
            if (empty($this->media_attributes)) {
                $mediaattribtemp = 'product';
            }
            $html .= '<tr>
					<td class="labelcell">' . vmText::_('COM_VIRTUEMART_FILES_FORM_LOCATION') . '</td>
					<td><fieldset class="checkboxes">' . JHtml::_('select.radiolist', $this->getOptions($this->_mLocation), 'media[media_attributes]', '', 'value', 'text', $mediaattribtemp) . '</fieldset></td></tr>';
        }
        // select language for image
        $active_languages = VmConfig::get('active_languages');
        if (count($active_languages) > 1) {
            $selectedImageLangue = explode(",", $this->file_lang);
            $configM = VmModel::getModel('config');
            $languages = $configM->getActiveLanguages($selectedImageLangue, 'media[active_languages][]');
            $html .= '<tr>
					<td class="labelcell"><span class="hasTip" title="' . vmText::_('COM_VIRTUEMART_FILES_FORM_LANGUAGE_TIP') . '">' . vmText::_('COM_VIRTUEMART_FILES_FORM_LANGUAGE') . '</span></td>
					<td><fieldset class="inputbox">' . $languages . '</fieldset></td>
					</tr>';
        }
        if (VmConfig::get('multix', 'none') != 'none') {
            if (empty($this->virtuemart_vendor_id)) {
                $vendorId = vmAccess::isSuperVendor();
            } else {
                $vendorId = $this->virtuemart_vendor_id;
            }
            if (!class_exists('ShopFunctions')) {
                require VMPATH_ADMIN . DS . 'helpers' . DS . 'shopfunctions.php';
            }
            $vendorList = ShopFunctions::renderVendorList($vendorId, 'media[virtuemart_vendor_id]');
            $html .= VmHTML::row('raw', 'COM_VIRTUEMART_VENDOR', $vendorList);
        }
        $html .= '</table>';
        $html .= '<br /></fieldset>';
        $this->addMediaActionByType();
        $html .= '<fieldset class="checkboxes">';
        $html .= '<legend>' . vmText::_('COM_VIRTUEMART_FILE_UPLOAD') . '</legend>';
        $html .= vmText::_('COM_VIRTUEMART_IMAGE_ACTION') . JHtml::_('select.radiolist', $this->getOptions($this->_actions), 'media[media_action]', '', 'value', 'text', 0) . '<br /><br style="clear:both" />';
        $html .= vmText::_('COM_VIRTUEMART_FILE_UPLOAD') . ' <input type="file" name="upload" id="upload" size="50" class="inputbox" /><br />';
        $html .= '<br />' . $this->displaySupportedImageTypes();
        $html .= '<br /></fieldset>';
        $html .= $this->displayFoldersWriteAble();
        $html .= $this->displayHidden();
        //		$html .= '</form>';
        return $html;
    }
	<tr class="row<?php 
    echo $row % 2;
    ?>
">
		<td>
			<?php 
    echo $shipmentMethod->shipment_name;
    ?>
		</td>
		<?php 
    foreach ($this->paymentMethods as $paymentMethod) {
        ?>
			<td>
				<?php 
        $configRecordName = 'zasilkovna_combination_payment_' . $paymentMethod->virtuemart_paymentmethod_id . '_shipment_' . $shipmentMethod->virtuemart_shipmentmethod_id;
        echo VmHTML::checkbox($configRecordName, isset($zasConfig[$configRecordName]) ? $zasConfig[$configRecordName] : '1');
        ?>
			</td>
		<?php 
        $row++;
    }
    ?>
	</tr>
	<?php 
}
?>
</table>
<br>
Jak nainstalovat omezení: <br>
  1. v souboru <i>/components/com_virtuemart/views/cart/tmpl/select_payment.php</i> najít tuto část kodu: (řádek cca 60)<br>
  <textarea onfocus="this.select();" onclick="this.select();"  readonly=""   rows="3" cols="80">
Пример #21
0
    public static function renderMetaEdit($obj)
    {
        $options = array('' => vmText::_('JGLOBAL_INDEX_FOLLOW'), 'noindex, follow' => vmText::_('JGLOBAL_NOINDEX_FOLLOW'), 'index, nofollow' => vmText::_('JGLOBAL_INDEX_NOFOLLOW'), 'noindex, nofollow' => vmText::_('JGLOBAL_NOINDEX_NOFOLLOW'), 'noodp, noydir' => vmText::_('COM_VIRTUEMART_NOODP_NOYDIR'), 'noodp, noydir, nofollow' => vmText::_('COM_VIRTUEMART_NOODP_NOYDIR_NOFOLLOW'));
        $html = '<table>
					' . VmHTML::row('input', 'COM_VIRTUEMART_CUSTOM_PAGE_TITLE', 'customtitle', $obj->customtitle) . '
					' . VmHTML::row('textarea', 'COM_VIRTUEMART_METAKEY', 'metakey', $obj->metakey, 'class="inputbox"', 80) . '
					' . VmHTML::row('textarea', 'COM_VIRTUEMART_METADESC', 'metadesc', $obj->metadesc, 'class="inputbox"', 80) . '
					' . VmHtml::row('selectList', 'COM_VIRTUEMART_METAROBOTS', 'metarobot', $obj->metarobot, $options) . '
					' . VmHTML::row('input', 'COM_VIRTUEMART_METAAUTHOR', 'metaauthor', $obj->metaauthor) . '
				</table>';
        return $html;
    }
Пример #22
0
					<?php 
echo vmText::_('COM_VIRTUEMART_WORLDZONE');
?>

				</label>
			</td>
			<td>
				<?php 
echo JHtml::_('Select.genericlist', $this->worldZones, 'virtuemart_worldzone_id', '', 'virtuemart_worldzone_id', 'zone_name', $this->state->virtuemart_worldzone_id);
?>

			</td>
		</tr>
		<?php 
echo VmHTML::row('input', 'COM_VIRTUEMART_STATE_3_CODE', 'state_3_code', $this->state->state_3_code, 'size="10"');
echo VmHTML::row('input', 'COM_VIRTUEMART_STATE_2_CODE', 'state_2_code', $this->state->state_2_code, 'size="10"');
?>

	</table>
	</fieldset>
</div>

	<input type="hidden" name="virtuemart_country_id" value="<?php 
echo $this->virtuemart_country_id;
?>
" />
	<input type="hidden" name="virtuemart_state_id" value="<?php 
echo $this->state->virtuemart_state_id;
?>
" />
    /**
     * Display for the cart
     *
     * @author Patrick Kohl
     * @param obj $product product object
     * @return html code
     */
    public function getProductCustomsFieldCart($product)
    {
        // group by virtuemart_custom_id
        $query = 'SELECT C.`virtuemart_custom_id`, `custom_title`, `show_title`, C.`custom_value`,`custom_field_desc` ,`custom_tip`,`field_type`,field.`virtuemart_customfield_id`,`is_hidden`
				FROM `#__virtuemart_customs` AS C
				LEFT JOIN `#__virtuemart_product_customfields` AS field ON C.`virtuemart_custom_id` = field.`virtuemart_custom_id`
				Where `virtuemart_product_id` =' . (int) $product->virtuemart_product_id . ' and `field_type` != "G" and `field_type` != "R" and `field_type` != "Z"';
        $query .= ' and is_cart_attribute = 1 group by virtuemart_custom_id ORDER BY field.`ordering`';
        $this->_db->setQuery($query);
        $groups = $this->_db->loadObjectList();
        $err = $this->_db->getErrorMsg();
        if (!empty($err)) {
            vmWarn('getProductCustomsFieldCart ' . $err);
        } else {
            if (empty($groups)) {
                return array();
            }
        }
        JLoader::register('VmHTML', JPATH_VM_ADMINISTRATOR . 'helpers/html.php');
        $row = 0;
        JLoader::register('CurrencyDisplay', JPATH_VM_ADMINISTRATOR . '/helpers/currencydisplay.php');
        $currency = CurrencyDisplay::getInstance();
        JLoader::register('calculationHelper', JPATH_VM_ADMINISTRATOR . '/helpers/calculationh.php');
        $calculator = calculationHelper::getInstance();
        $calculator->_product = $product;
        $calculator->_cats = $product->categories;
        $calculator->product_tax_id = isset($product->product_tax_id) ? $product->product_tax_id : 0;
        $calculator->product_discount_id = isset($product->product_discount_id) ? $product->product_discount_id : 0;
        $calculator->productCurrency = isset($product->product_currency) ? $product->product_currency : $calculator->productCurrency;
        JLoader::register('vmCustomPlugin', JPATH_VM_PLUGINS . '/vmcustomplugin.php');
        //$free = JText::_ ('COM_VIRTUEMART_CART_PRICE_FREE');
        // render select list
        foreach ($groups as $group) {
            //				$query='SELECT  field.`virtuemart_customfield_id` as value ,concat(field.`custom_value`," :bu ", field.`custom_price`) AS text
            $query = 'SELECT field.`virtuemart_product_id`, `custom_params`,`custom_element`, field.`virtuemart_custom_id`,
							field.`virtuemart_customfield_id`,field.`custom_value`, field.`custom_price`, field.`custom_param`
					FROM `#__virtuemart_customs` AS C
					LEFT JOIN `#__virtuemart_product_customfields` AS field ON C.`virtuemart_custom_id` = field.`virtuemart_custom_id`
					Where `virtuemart_product_id` =' . (int) $product->virtuemart_product_id;
            $query .= ' and is_cart_attribute = 1 and C.`virtuemart_custom_id`=' . (int) $group->virtuemart_custom_id;
            // We want the field to be ordered as the user defined
            $query .= ' ORDER BY field.`ordering`';
            $this->_db->setQuery($query);
            $options = $this->_db->loadObjectList();
            //vmdebug('getProductCustomsFieldCart options',$options);
            $group->options = array();
            foreach ($options as $option) {
                $group->options[$option->virtuemart_customfield_id] = $option;
            }
            if ($group->field_type == 'V') {
                $default = current($group->options);
                foreach ($group->options as $productCustom) {
                    $price = self::_getCustomPrice($productCustom->custom_price, $currency, $calculator);
                    $productCustom->text = $productCustom->custom_value . ' ' . $price;
                }
                $group->display = VmHTML::select('customPrice[' . $row . '][' . $group->virtuemart_custom_id . ']', $group->options, $default->custom_value, '', 'virtuemart_customfield_id', 'text', FALSE, false);
            } else {
                if ($group->field_type == 'G') {
                    $group->display .= '';
                    // no direct display done by plugin;
                } else {
                    if ($group->field_type == 'E') {
                        $group->display = '';
                        JLoader::register('vmCustomPlugin', JPATH_VM_PLUGINS . '/vmcustomplugin.php');
                        foreach ($group->options as $k => $productCustom) {
                            $price = self::_getCustomPrice($productCustom->custom_price, $currency, $calculator);
                            $productCustom->text = $productCustom->custom_value . ' ' . $price;
                            $productCustom->virtuemart_customfield_id = $k;
                            //legacy, it will be removed 2.2
                            $productCustom->value = $productCustom->virtuemart_customfield_id;
                            JPluginHelper::importPlugin('vmcustom');
                            $dispatcher = JDispatcher::getInstance();
                            $fieldsToShow = $dispatcher->trigger('plgVmOnDisplayProductVariantFE', array($productCustom, &$row, &$group));
                            //	$group->display .= '<input type="hidden" value="' . $k . '" name="customPrice[' . $row . '][' . $group->virtuemart_custom_id . ']" /> ';
                            $group->display .= '<input type="hidden" value="' . $productCustom->virtuemart_customfield_id . '" name="customPrice[' . $row . '][' . $productCustom->virtuemart_custom_id . ']" /> ';
                            if (!empty($currency->_priceConfig['variantModification'][0]) and $price !== '') {
                                $group->display .= '<div class="price-plugin">' . JText::_('COM_VIRTUEMART_CART_PRICE') . '<span class="price-plugin">' . $price . '</span></div>';
                            }
                            $row++;
                        }
                        $row--;
                    } else {
                        if ($group->field_type == 'U') {
                            foreach ($group->options as $productCustom) {
                                $price = self::_getCustomPrice($productCustom->custom_price, $currency, $calculator);
                                $productCustom->text = $productCustom->custom_value . ' ' . $price;
                                $group->display .= '<input type="text" value="' . JText::_($productCustom->custom_value) . '" name="customPrice[' . $row . '][' . $group->virtuemart_custom_id . '][' . $productCustom->value . ']" /> ';
                                if (!empty($currency->_priceConfig['variantModification'][0]) and $price !== '') {
                                    $group->display .= '<div class="price-plugin">' . JText::_('COM_VIRTUEMART_CART_PRICE') . '<span class="price-plugin">' . $price . '</span></div>';
                                }
                            }
                        } else {
                            if ($group->field_type == 'A') {
                                $group->display = '';
                                foreach ($group->options as $productCustom) {
                                    /*	if ((float)$productCustom->custom_price) {
                                    				$price = $currency->priceDisplay ($calculator->calculateCustomPriceWithTax ($productCustom->custom_price));
                                    			}
                                    			else {
                                    				$price = ($productCustom->custom_price === '') ? '' : $free;
                                    			}*/
                                    $productCustom->field_type = $group->field_type;
                                    $productCustom->is_cart = 1;
                                    $group->display .= $this->displayProductCustomfieldFE($product, $productCustom, $row);
                                    $checked = '';
                                }
                            } else {
                                $group->display = '';
                                $checked = 'checked="checked"';
                                foreach ($group->options as $productCustom) {
                                    //vmdebug('getProductCustomsFieldCart',$productCustom);
                                    $price = self::_getCustomPrice($productCustom->custom_price, $currency, $calculator);
                                    $productCustom->field_type = $group->field_type;
                                    $productCustom->is_cart = 1;
                                    //	$group->display .= '<input id="' . $productCustom->virtuemart_custom_id . '" ' . $checked . ' type="radio" value="' .
                                    //		$productCustom->virtuemart_custom_id . '" name="customPrice[' . $row . '][' . $productCustom->virtuemart_customfield_id . ']" /><label
                                    //		for="' . $productCustom->virtuemart_custom_id . '">' . $this->displayProductCustomfieldFE ($productCustom, $row) . ' ' . $price . '</label>';
                                    //MarkerVarMods
                                    $group->display .= '<input id="' . $productCustom->virtuemart_custom_id . $row . '" ' . $checked . ' type="radio" value="' . $productCustom->virtuemart_customfield_id . '" name="customPrice[' . $row . '][' . $productCustom->virtuemart_custom_id . ']" /><label
										for="' . $productCustom->virtuemart_custom_id . '" class="other-customfield">' . $this->displayProductCustomfieldFE($product, $productCustom, $row) . ' ' . $price . '</label>';
                                    $checked = '';
                                }
                            }
                        }
                    }
                }
            }
            $row++;
        }
        return $groups;
    }
Пример #24
0
 function display($tpl = null)
 {
     // Get the task
     $task = vRequest::getCmd('task', $this->getLayout());
     $this->assignRef('task', $task);
     // Load helpers
     if (!class_exists('CurrencyDisplay')) {
         require VMPATH_ADMIN . DS . 'helpers' . DS . 'currencydisplay.php';
     }
     if (!class_exists('VmHTML')) {
         require VMPATH_ADMIN . DS . 'helpers' . DS . 'html.php';
     }
     if (!class_exists('VmImage')) {
         require VMPATH_ADMIN . DS . 'helpers' . DS . 'image.php';
     }
     $model = tmsModel::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');
             tsmConfig::loadJLang('com_tsmart_orders', TRUE);
             tsmConfig::loadJLang('com_tsmart_shoppers', TRUE);
             $model_country = tmsModel::getModel('country');
             $this->countries = $model_country->getItemList();
             $tsmart_product_id = vRequest::getInt('tsmart_product_id');
             if (is_array($tsmart_product_id) && count($tsmart_product_id) > 0) {
                 $tsmart_product_id = (int) $tsmart_product_id[0];
             } else {
                 $tsmart_product_id = (int) $tsmart_product_id;
             }
             $product = $model->getItem($tsmart_product_id);
             require_once JPATH_ROOT . '/administrator/components/com_tsmart/helpers/tsmserviceclass.php';
             $product->tsmart_service_class_ids = tsmserviceclass::get_list_service_class_ids_by_tour_id($tsmart_product_id);
             require_once JPATH_ROOT . '/administrator/components/com_tsmart/helpers/tsmgroupsize.php';
             $product->tsmart_group_size_ids = tsmGroupSize::get_list_group_size_ids_by_tour_id($tsmart_product_id);
             //$user = JFactory::getUser();
             $superVendor = vmAccess::isSuperVendor();
             if ($superVendor != 1 and $superVendor != $product->tsmart_vendor_id) {
                 vmdebug('Product view.html.php ' . $superVendor, $product->tsmart_vendor_id);
                 JFactory::getApplication()->redirect('index.php?option=com_tsmart&view=tsmart', tsmText::_('com_tsmart_ALERTNOTAUTHOR'), 'error');
             }
             if (!empty($product->product_parent_id)) {
                 $product_parent = $model->getProductSingle($product->product_parent_id, false);
             }
             require_once JPATH_ROOT . '/administrator/components/com_tsmart/helpers/tsmserviceclass.php';
             $this->tour_service_class = tsmserviceclass::get_list_tour_service_class();
             $customfields = tmsModel::getModel('Customfields');
             $product->allIds[] = $product->tsmart_product_id;
             if (!empty($product->product_parent_id)) {
                 $product->allIds[] = $product->product_parent_id;
             }
             $product->customfields = $customfields->getCustomEmbeddedProductCustomFields($product->allIds);
             // Get the category tree
             if (isset($product->categories)) {
                 $this->category_tree = ShopFunctions::categoryListTree($product->categories);
             } else {
                 $this->category_tree = ShopFunctions::categoryListTree();
             }
             //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)) {
                 $product->shoppergroups = 0;
             }
             $this->shoppergroupList = ShopFunctions::renderShopperGroupList($product->shoppergroups);
             // Load the product price
             if (!class_exists('calculationHelper')) {
                 require VMPATH_ADMIN . DS . 'helpers' . DS . 'calculationh.php';
             }
             //Do we need the children? If there is a C customfield, we dont want them
             $isCustomVariant = false;
             foreach ($product->customfields as $custom) {
                 if ($custom->field_type == 'C' and $custom->tsmart_product_id == $tsmart_product_id) {
                     $isCustomVariant = true;
                     break;
                 }
             }
             if (!class_exists('tsmartModelConfig')) {
                 require VMPATH_ADMIN . '/models/config.php';
             }
             $productLayouts = tsmartModelConfig::getLayoutList('productdetails');
             $this->productLayouts = $productLayouts;
             // Load Images
             $model->addImages($product);
             if (!class_exists('VmTemplate')) {
                 require VMPATH_SITE . DS . 'helpers' . DS . 'vmtemplate.php';
             }
             $vmtemplate = VmTemplate::loadVmTemplateStyle();
             $this->imagePath = shopFunctions::getAvailabilityIconUrl($vmtemplate);
             // Load the vendors
             $vendor_model = tmsModel::getModel('vendor');
             $lists['vendors'] = '';
             if ($this->showVendors()) {
                 $lists['vendors'] = Shopfunctions::renderVendorList($product->tsmart_vendor_id);
             }
             // Load the currencies
             $currency_model = tmsModel::getModel('currency');
             $vendor_model->setId(vmAccess::isSuperVendor());
             $this->vendor = $vendor_model->getVendor();
             $currency = $currency_model->getItemList();
             $this->vendor_currency_symb = $currency->currency_symbol;
             $lists['manufacturers'] = shopFunctions::renderManufacturerList($product->tsmart_manufacturer_id, true);
             if (!empty($product->product_weight_uom)) {
                 $product_weight_uom = $product->product_weight_uom;
             } else {
                 if (!empty($product_parent)) {
                     $product_weight_uom = $product_parent->product_weight_uom;
                 } else {
                     $product_weight_uom = tsmConfig::get('weight_unit_default');
                 }
             }
             if (!empty($product->product_lwh_uom)) {
                 $product_lwh_uom = $product->product_lwh_uom;
             } 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';
             $countries = tsmcountries::get_countries();
             $this->assignRef('countries', $countries);
             //end get countries
             //get cities
             require_once JPATH_ROOT . '/administrator/components/com_tsmart/helpers/vmcities.php';
             $cities = tsmcities::get_cities();
             $this->assignRef('cities', $cities);
             //end get cities
             //get tour style
             require_once JPATH_ROOT . '/administrator/components/com_tsmart/helpers/tsmtourstyle.php';
             $list_tour_style = tsmtourstyle::get_list_tour_style();
             $this->assignRef('list_tour_style', $list_tour_style);
             //end get toursyle
             //get tour section
             require_once JPATH_ROOT . '/administrator/components/com_tsmart/helpers/tsmtoursection.php';
             $list_tour_section = tsmtoursection::get_list_tour_section();
             $this->assignRef('list_tour_section', $list_tour_section);
             //end get toursyle
             //get tour physicalgrade
             require_once JPATH_ROOT . '/administrator/components/com_tsmart/helpers/tsmphysicalgrade.php';
             $list_physical_grade = vmphysicalgrade::get_physical_grade();
             $this->assignRef('list_physical_grade', $list_physical_grade);
             //end get physicalgrade
             //get tour_type
             require_once JPATH_ROOT . '/administrator/components/com_tsmart/helpers/tsmtourtype.php';
             $list_tour_type = tsmtourtype::get_list_tour_type();
             $this->assignRef('list_tour_type', $list_tour_type);
             //end get tour_type
             //get tour_type
             require_once JPATH_ROOT . '/administrator/components/com_tsmart/helpers/tsmserviceclass.php';
             $list_tour_service_class = tsmserviceclass::get_list_tour_service_class();
             $product->list_tour_service_class_id = tsmserviceclass::get_list_service_class_ids_by_tour_id($product->tsmart_product_id);
             $this->assignRef('list_tour_service_class', $list_tour_service_class);
             //end get tour_type
             //get activities
             require_once JPATH_ROOT . '/administrator/components/com_tsmart/helpers/vmactivities.php';
             $product->list_activity_id = tsmactivities::get_list_activity_id_by_tour_id($product->tsmart_product_id);
             $activities = tsmactivities::get_activities();
             $this->assignRef('activities', $activities);
             //end get activities
             //get list group size
             require_once JPATH_ROOT . '/administrator/components/com_tsmart/helpers/tsmgroupsize.php';
             $list_group_size = tsmGroupSize::get_list_group_size();
             $product->list_group_size_id = tsmGroupSize::get_list_group_size_ids_by_tour_id($product->tsmart_product_id);
             $this->assignRef('list_group_size', $list_group_size);
             //end get list group size
             //get list country
             require_once JPATH_ROOT . '/administrator/components/com_tsmart/helpers/tsmcountries.php';
             $product->list_tsmart_country_id = tsmcountries::get_list_tsmart_country_id_by_tour_id($product->tsmart_product_id);
             //end get list group size
             require_once JPATH_ROOT . '/administrator/components/com_tsmart/helpers/tsmprice.php';
             $this->list_price_type = vmprice::get_list_price_type();
             require_once JPATH_ROOT . '/administrator/components/com_tsmart/helpers/tsmproduct.php';
             $this->list_tour_method = vmproduct::get_list_tour_method();
             $this->assignRef('product', $product);
             $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
             if ($product->product_sku) {
                 $sku = ' (' . $product->product_sku . ')';
             } else {
                 $sku = "";
             }
             //if (!empty($product->canonCatLink)) $canonLink = '&tsmart_category_id=' . $product->canonCatLink; else $canonLink = '';
             if (!empty($product->tsmart_product_id)) {
                 if (!class_exists('shopFunctionsF')) {
                     require VMPATH_SITE . DS . 'helpers' . DS . 'shopfunctionsf.php';
                 }
                 $menuItemID = shopFunctionsF::getMenuItemId(JFactory::getLanguage()->getTag());
                 $canonLink = '';
                 if ($product->canonCatId) {
                     $canonLink = '&tsmart_category_id=' . $product->canonCatId;
                 }
                 $text = '<a href="' . juri::root() . 'index.php?option=com_tsmart&view=productdetails&tsmart_product_id=' . $product->tsmart_product_id . $canonLink . '&Itemid=' . $menuItemID . '" target="_blank" >' . $product->product_name . $sku . '<span class="vm2-modallink"></span></a>';
                 if (JFactory::getApplication()->isSite()) {
                     $bar = JToolBar::getInstance('toolbar');
                     $bar->appendButton('Link', 'back', 'com_tsmart_LEAVE_TO_PRODUCT', juri::root() . 'index.php?option=com_tsmart&view=productdetails&tsmart_product_id=' . $product->tsmart_product_id . $canonLink . '&Itemid=' . $menuItemID);
                 }
             } else {
                 $text = $product->product_name . $sku;
             }
             $this->SetViewTitle('PRODUCT', $text);
             $this->addStandardEditViewCommandsNoValidate($product->tsmart_product_id);
             break;
         case 'massxref_cats':
         case 'massxref_cats_exe':
             $this->SetViewTitle('PRODUCT_MASSXREF');
             $showVendors = $this->showVendors();
             $this->assignRef('showVendors', $showVendors);
             $keyWord = '';
             $catmodel = tmsModel::getModel('category');
             $this->assignRef('catmodel', $catmodel);
             $this->addStandardDefaultViewCommandsNoValidate();
             $this->addStandardDefaultViewLists($catmodel, 'category_name');
             $session = JFactory::getSession();
             $reset = $session->get('reset_pag', false, 'vm');
             $limit = '';
             if ($reset) {
                 $limit = 0;
                 $session->set('reset_pag', false, 'vm');
             }
             $this->categories = $catmodel->getCategoryTree(0, 0, false, $this->lists['search'], $limit);
             $catpagination = $catmodel->getPagination();
             $this->assignRef('catpagination', $catpagination);
             $this->setLayout('massxref');
             JToolBarHelper::custom('massxref_cats_exe', 'new', 'new', tsmText::_('com_tsmart_PRODUCT_XREF_CAT_EXE'), false);
             break;
         case 'massxref_sgrps':
         case 'massxref_sgrps_exe':
             $sgrpmodel = tmsModel::getModel('shoppergroup');
             $this->addStandardDefaultViewLists($sgrpmodel);
             $shoppergroups = $sgrpmodel->getShopperGroups(false, true);
             $this->assignRef('shoppergroups', $shoppergroups);
             $sgrppagination = $sgrpmodel->getPagination();
             $this->assignRef('sgrppagination', $sgrppagination);
             $this->setLayout('massxref');
             JToolBarHelper::custom('massxref_sgrps_exe', 'new', 'new', tsmText::_('com_tsmart_PRODUCT_XREF_SGRPS_EXE'), false);
             break;
         default:
             if ($product_parent_id = vRequest::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&tsmart_product_id=' . $product_parent->tsmart_product_id . '&option=com_tsmart'), $product_parent->product_name, array('title' => tsmText::_('com_tsmart_EDIT_PARENT') . ' ' . $product_parent->product_name));
                     $msg = tsmText::_('com_tsmart_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->SetViewTitle($title, $msg);
             $this->addStandardDefaultViewLists($model, 'created_on');
             if ($cI = vRequest::getInt('tsmart_category_id', false)) {
                 $app = JFactory::getApplication();
                 //$old_state = $app->getUserState('tsmart_category_id');
                 $old_state = $app->getUserState('tsmart_category_id');
                 if (empty($old_state) or $old_state != $cI) {
                     vRequest::setVar('com_tsmart.product.filter_order', 'pc.ordering');
                     $model->filter_order = 'pc.ordering';
                     $old_state = $app->setUserState('tsmart_category_id', $cI);
                 }
             }
             //Get the list of products
             $productlist = $model->getItemList();
             //The pagination must now always set AFTER the model load the listing
             $this->pagination = $model->getPagination();
             //Get the category tree
             $categoryId = $model->tsmart_category_id;
             //OSP switched to filter in model, was vRequest::getInt('tsmart_category_id');
             $category_tree = ShopFunctions::categoryListTree(array($categoryId));
             $this->assignRef('category_tree', $category_tree);
             //load service class
             //Load the product price
             if (!class_exists('calculationHelper')) {
                 require VMPATH_ADMIN . DS . 'helpers' . DS . 'calculationh.php';
             }
             $vendor_model = tmsModel::getModel('vendor');
             $productreviews = tmsModel::getModel('ratings');
             $this->mfTable = $model->getTable('manufacturers');
             $this->catTable = $model->getTable('categories');
             $this->lists['vendors'] = '';
             if ($this->showVendors()) {
                 $this->lists['vendors'] = Shopfunctions::renderVendorList(vmAccess::getVendorId());
             }
             foreach ($productlist as $tsmart_product_id => $product) {
                 $product->mediaitems = count($product->tsmart_media_id);
                 $product->reviews = $productreviews->countReviewsForProduct($product->tsmart_product_id);
                 $vendor_model->setId($product->tsmart_vendor_id);
                 $vendor = $vendor_model->getVendor();
                 $currencyDisplay = CurrencyDisplay::getInstance($vendor->vendor_currency, $vendor->tsmart_vendor_id);
                 if (!empty($product->allPrices[$product->selectedPrice]['product_price']) && !empty($product->allPrices[$product->selectedPrice]['product_currency'])) {
                     $product->product_price_display = $currencyDisplay->priceDisplay($product->allPrices[$product->selectedPrice]['product_price'], (int) $product->allPrices[$product->selectedPrice]['product_currency'], 1, true);
                 } else {
                     if (!empty($product->allPrices) and count($product->allPrices) > 1) {
                         $product->product_price_display = tsmText::_('com_tsmart_MULTIPLE_PRICES');
                     } else {
                         $product->product_price_display = tsmText::_('com_tsmart_NO_PRICE_SET');
                     }
                 }
                 // Write the first 5 categories in the list
                 $product->categoriesList = '';
                 if (!empty($product->categories[0])) {
                     $product->categoriesList = shopfunctions::renderGuiList($product->categories, 'categories', 'category_name', 'category');
                 }
                 // Write the first 5 manufacturers in the list
                 $product->manuList = '';
                 if (!empty($product->tsmart_manufacturer_id[0])) {
                     $product->manuList = shopfunctions::renderGuiList($product->tsmart_manufacturer_id, 'manufacturers', 'mf_name', 'manufacturer');
                 }
             }
             $mf_model = tmsModel::getModel('manufacturer');
             $manufacturers = $mf_model->getManufacturerDropdown();
             $this->assignRef('manufacturers', $manufacturers);
             /* add Search filter in lists*/
             /* Search type */
             $options = array('' => tsmText::_('com_tsmart_LIST_EMPTY_OPTION'), 'parent' => tsmText::_('com_tsmart_PRODUCT_LIST_SEARCH_BY_PARENT_PRODUCT'), 'product' => tsmText::_('com_tsmart_PRODUCT_LIST_SEARCH_BY_DATE_TYPE_PRODUCT'), 'price' => tsmText::_('com_tsmart_PRODUCT_LIST_SEARCH_BY_DATE_TYPE_PRICE'), 'withoutprice' => tsmText::_('com_tsmart_PRODUCT_LIST_SEARCH_BY_DATE_TYPE_WITHOUTPRICE'));
             $this->lists['search_type'] = VmHTML::selectList('search_type', vRequest::getVar('search_type'), $options);
             /* Search order */
             $options = array('bf' => tsmText::_('com_tsmart_PRODUCT_LIST_SEARCH_BY_DATE_BEFORE'), 'af' => tsmText::_('com_tsmart_PRODUCT_LIST_SEARCH_BY_DATE_AFTER'));
             $this->lists['search_order'] = VmHTML::selectList('search_order', vRequest::getVar('search_order'), $options);
             // Toolbar
             /*if (vmAccess::manager('product.edit')) {
                   JToolBarHelper::custom('massxref_cats', 'new', 'new', vmText::_('com_tsmart_PRODUCT_XREF_CAT'), true);
                   JToolBarHelper::custom('massxref_sgrps', 'new', 'new', vmText::_('com_tsmart_PRODUCT_XREF_SGRPS'), true);
               }
               if (vmAccess::manager('product.create')) {
                   JToolBarHelper::custom('createchild', 'new', 'new', vmText::_('com_tsmart_PRODUCT_CHILD'), true);
                   JToolBarHelper::custom('cloneproduct', 'copy', 'copy', vmText::_('com_tsmart_PRODUCT_CLONE'), true);
               }*/
             // JToolBarHelper::custom('addrating', 'default', '', vmText::_('com_tsmart_ADD_RATING'), true);
             $view = vRequest::getCmd('view', vRequest::getCmd('controller', 'tsmart'));
             JToolBarHelper::divider();
             if (vmAccess::manager($view . '.edit.state')) {
                 JToolBarHelper::publishList();
                 JToolBarHelper::unpublishList();
             }
             if (vmAccess::manager($view . '.delete')) {
                 JToolBarHelper::spacer('10');
                 JToolBarHelper::deleteList();
             }
             $this->assignRef('productlist', $productlist);
             $this->assignRef('tsmart_category_id', $categoryId);
             $this->assignRef('model', $model);
             break;
     }
     parent::display($tpl);
 }
echo JText::_('COM_VIRTUEMART_MIGRATION_REWRITE_ORDER_NUMBER');
?>
</label>
			<?php 
echo VmHTML::checkbox('reWriteOrderNumber', $session->get('reWriteOrderNumber', 1, 'vm'));
?>
		</div>
		</div>
		<div class="span8">
		<div class="control-group">
			<label class="control-label" ><?php 
echo JText::_('COM_VIRTUEMART_MIGRATION_USER_ORDER_ID');
?>
</label>
			<?php 
echo VmHTML::checkbox('userOrderId', $session->get('userOrderId', 0, 'vm'));
?>
		</div>
		</div>
	</div>
	<div class="control-group">
		<label class="control-label" ><?php 
echo JText::_('COM_VIRTUEMART_MIGRATION_DCAT_BROWSE');
?>
</label>
		<input class="inputbox" type="text" name="migration_default_category_browse" size="15" value="<?php 
echo $session->get('migration_default_category_browse', '', 'vm');
?>
" />
	</div>
	<div class="control-group">
		<?php 
//echo VmHTML::row('booleanlist','COM_VIRTUEMART_VISIBLE_FOR_SHOPPER','calc_shopper_published',$this->calc->calc_shopper_published);
?>
		<?php 
//echo VmHTML::row('booleanlist','COM_VIRTUEMART_VISIBLE_FOR_VENDOR','calc_vendor_published',$this->calc->calc_vendor_published);
?>
		<?php 
echo VmHTML::row('raw', 'COM_VIRTUEMART_START_DATE', vmJsApi::jDate($this->calc->publish_up, 'publish_up'));
?>
		<?php 
echo VmHTML::row('raw', 'COM_VIRTUEMART_END_DATE', vmJsApi::jDate($this->calc->publish_down, 'publish_down'));
?>
		<?php 
if (Vmconfig::get('multix', 'none') !== 'none' and $this->perms->check('admin')) {
    echo VmHTML::row('raw', 'COM_VIRTUEMART_VENDOR', $this->vendorList);
}
?>
        </table></fieldset>
		<?php 
if (!class_exists('vmCalculationPlugin')) {
    require JPATH_VM_PLUGINS . DS . 'vmcalculationplugin.php';
}
JPluginHelper::importPlugin('vmcalculation');
$dispatcher = JDispatcher::getInstance();
$html = '';
$returnValues = $dispatcher->trigger('plgVmOnDisplayEdit', array(&$this->calc, &$html));
echo $html;
?>

Пример #27
0
echo VmHTML::row('input', 'COM_VIRTUEMART_SLUG', 'slug', $this->shipment->slug);
?>
	    <?php 
echo VmHTML::row('booleanlist', 'COM_VIRTUEMART_PUBLISHED', 'published', $this->shipment->published);
?>
	    <?php 
echo VmHTML::row('textarea', 'COM_VIRTUEMART_SHIPPING_FORM_DESCRIPTION', 'shipment_desc', $this->shipment->shipment_desc);
?>
	    <?php 
echo VmHTML::row('raw', 'COM_VIRTUEMART_SHIPPING_CLASS_NAME', $this->pluginList);
?>
	    <?php 
echo VmHTML::row('raw', 'COM_VIRTUEMART_SHIPPING_FORM_SHOPPER_GROUP', $this->shopperGroupList);
?>
	    <?php 
echo VmHTML::row('input', 'COM_VIRTUEMART_LIST_ORDER', 'ordering', $this->shipment->ordering, 'class="inputbox"', '', 4, 4);
?>
	    <?php 
if ($this->showVendors()) {
    echo VmHTML::row('raw', 'COM_VIRTUEMART_VENDOR', $this->vendorList);
}
if ($this->showVendors) {
    echo VmHTML::row('checkbox', 'COM_VIRTUEMART_SHARED', 'shared', $this->shipment->shared);
}
?>
        </table>
    </fieldset>
</div>


Пример #28
0
?>
                    <?php 
echo VmHTML::image('Icon', 'icon', $this->item->icon, 'class="required"');
?>
                    <?php 
echo VmHTML::row_control('textarea', 'Meta title', 'meta_title', $this->item->meta_title);
?>
                    <?php 
echo VmHTML::row_control('textarea', 'Key Word', 'key_word', $this->item->key_word);
?>
                    <?php 
echo VmHTML::row_control('editor', 'Description', 'description', $this->item->description);
?>

                    <?php 
echo VmHTML::row_control('booleanlist', 'com_tsmart_PUBLISHED', 'published', $this->item->published);
?>

                </div>
            </fieldset>

        </div>
        <input type="hidden" name="tsmart_vendor_id" value="<?php 
echo $this->item->tsmart_vendor_id;
?>
"/>
        <input type="hidden" name="tsmart_tour_type_id"
               value="<?php 
echo $this->item->tsmart_tour_type_id;
?>
"/>
" /></td>
										<?php 
        }
        ?>
									<td>
	                                    <input type="text" class="inputbox" name="childs[<?php 
        echo $child->virtuemart_product_id;
        ?>
][pordering]" size="2" value="<?php 
        echo $child->pordering;
        ?>
" /></td>
									</td>
									<td>
										<?php 
        echo VmHTML::checkbox('childs[' . $child->virtuemart_product_id . '][published]', $child->published);
        ?>
									</td>
								</tr>
							<?php 
    }
    ?>
						</table>
					<?php 
}
?>
				</td>
			</tr>
		</table>
	</fieldset>
</tr>
Пример #30
0
 /**
  * This displays a custom handler.
  *
  * @param string $html atttributes, Just for displaying the fullsized image
  */
 public function displayCustomFields($datas)
 {
     $identify = '';
     // ':'.$this->virtuemart_custom_id;
     if (!class_exists('VmHTML')) {
         require VMPATH_ADMIN . DS . 'helpers' . DS . 'html.php';
     }
     if ($datas->field_type) {
         $this->addHidden('field_type', $datas->field_type);
     }
     $this->addHiddenByType($datas);
     $html = "";
     $model = VmModel::getModel('custom');
     // only input when not set else display
     if ($datas->field_type) {
         $html .= VmHTML::row('value', 'COM_VIRTUEMART_CUSTOM_FIELD_TYPE', $this->fieldTypes[$datas->field_type]);
     } else {
         $html .= VmHTML::row('select', 'COM_VIRTUEMART_CUSTOM_FIELD_TYPE', 'field_type', $this->getOptions($this->fieldTypes), $datas->field_type, VmHTML::validate('R'));
     }
     $html .= VmHTML::row('input', 'COM_VIRTUEMART_TITLE', 'custom_title', $datas->custom_title);
     $html .= VmHTML::row('booleanlist', 'COM_VIRTUEMART_SHOW_TITLE', 'show_title', $datas->show_title);
     $html .= VmHTML::row('booleanlist', 'COM_VIRTUEMART_PUBLISHED', 'published', $datas->published);
     $html .= VmHTML::row('select', 'COM_VIRTUEMART_CUSTOM_GROUP', 'custom_parent_id', $model->getParentList($datas->virtuemart_custom_id), $datas->custom_parent_id, '');
     $html .= VmHTML::row('booleanlist', 'COM_VIRTUEMART_CUSTOM_IS_CART_ATTRIBUTE', 'is_cart_attribute', $datas->is_cart_attribute);
     $html .= VmHTML::row('booleanlist', 'COM_VIRTUEMART_CUSTOM_IS_CART_INPUT', 'is_input', $datas->is_input);
     $html .= VmHTML::row('input', 'COM_VIRTUEMART_DESCRIPTION', 'custom_desc', $datas->custom_desc);
     // change input by type
     $html .= VmHTML::row('textarea', 'COM_VIRTUEMART_CUSTOM_DEFAULT', 'custom_value', $datas->custom_value);
     $html .= VmHTML::row('input', 'COM_VIRTUEMART_CUSTOM_TIP', 'custom_tip', $datas->custom_tip);
     $html .= VmHTML::row('input', 'COM_VIRTUEMART_CUSTOM_LAYOUT_POS', 'layout_pos', $datas->layout_pos);
     //$html .= VmHTML::row('booleanlist','COM_VIRTUEMART_CUSTOM_GROUP','custom_parent_id',$this->getCustomsList(),  $datas->custom_parent_id,'');
     $html .= VmHTML::row('booleanlist', 'COM_VIRTUEMART_CUSTOM_ADMIN_ONLY', 'admin_only', $datas->admin_only);
     $html .= VmHTML::row('booleanlist', 'COM_VIRTUEMART_CUSTOM_IS_LIST', 'is_list', $datas->is_list);
     $html .= VmHTML::row('booleanlist', 'COM_VIRTUEMART_CUSTOM_IS_HIDDEN', 'is_hidden', $datas->is_hidden);
     $html .= $this->ordering;
     // $html .= '</table>';  removed
     $html .= VmHTML::inputHidden($this->_hidden);
     return $html;
 }