<input type="text" size="7" class="text_area" value="<?php 
echo $this->vendor->vendor_letter_footer_cell_height_ratio;
?>
" id="vendor_letter_footer_cell_height_ratio" name="vendor_letter_footer_cell_height_ratio">
					</td>
				</tr>
				<tr>
					<td class="key">
						<label for="vendor_letter_footer_line"><?php 
echo JText::_('COM_VIRTUEMART_VENDOR_LETTER_FOOTER_LINE');
?>
:</label>
					</td>
					<td >
						<?php 
echo VmHTML::checkbox('vendor_letter_footer_line', $this->vendor->vendor_letter_footer_line);
?>
					</td>
					<td class="key">
						<?php 
echo JText::_('COM_VIRTUEMART_VENDOR_LETTER_FOOTER_LINE_COLOR');
?>
:
					</td>
					<td >
						<input type="text" size="7" class="text_area" value="<?php 
echo $this->vendor->vendor_letter_footer_line_color;
?>
" id="vendor_letter_footer_line_color" name="vendor_letter_footer_line_color">
					</td>
				</tr>
    /**
     * Formatting admin display by roles
     * input Types for product only !
     * $field->is_cart_attribute if can have a price
     */
    public function displayProductCustomfieldBE($field, $product_id, $row)
    {
        // $vendor_currency as static, because is called for same user session
        static $vendor_currency = null;
        $field->custom_value = empty($field->custom_value) ? $field->value : $field->custom_value;
        if ($field->is_cart_attribute) {
            if ($vendor_currency === null) {
                JLoader::register('VmModel', JPATH_VM_ADMINISTRATOR . 'helpers/vmmodel.php');
                $vendor_model = VmModel::getModel('vendor');
                $vendor_model->setId(1);
                // todo SUTDIO42, perhaps check the vendors ?
                $vendor = $vendor_model->getVendor();
                $currencyModel = VmModel::getModel('currency');
                $currencyModel->setId($vendor->vendor_currency);
                $vendor_currency = $currencyModel->getData();
            }
            $priceInput = '<div class="input-append"><input class="input-mini" type="text" size="4" style="text-align:right;" value="' . (isset($field->custom_price) ? $field->custom_price : '0') . '" name="field[' . $row . '][custom_price]" /><span class="add-on">' . $vendor_currency->currency_symbol . "</span></div>";
        } else {
            $priceInput = ' ';
        }
        if ($field->is_list) {
            $options = array();
            $values = explode(';', $field->value);
            foreach ($values as $key => $val) {
                $options[] = array('value' => $val, 'text' => $val);
            }
            $currentValue = $field->custom_value;
            return JHTML::_('select.genericlist', $options, 'field[' . $row . '][custom_value]', null, 'value', 'text', $currentValue) . '</td><td>' . $priceInput;
        } else {
            switch ($field->field_type) {
                case 'A':
                    //vmdebug('displayProductCustomfieldBE $field',$field);
                    if (!isset($field->withParent)) {
                        $field->withParent = 0;
                    }
                    if (!isset($field->parentOrderable)) {
                        $field->parentOrderable = 0;
                    }
                    //vmdebug('displayProductCustomfieldFE',$field);
                    JLoader::register('VmHTML', JPATH_VM_ADMINISTRATOR . 'helpers/html.php');
                    $html = JText::_('COM_VIRTUEMART_CUSTOM_WP') . VmHTML::checkbox('field[' . $row . '][withParent]', $field->withParent, 1, 0, '') . '<br />';
                    $html .= JText::_('COM_VIRTUEMART_CUSTOM_PO') . VmHTML::checkbox('field[' . $row . '][parentOrderable]', $field->parentOrderable, 1, 0, '');
                    $options = array();
                    // 					$options[] = array( 'value' => 'product_name' ,'text' =>JText::_('COM_VIRTUEMART_PRODUCT_FORM_NAME')); Is anyway displayed there
                    $options[] = array('value' => 'product_sku', 'text' => JText::_('COM_VIRTUEMART_PRODUCT_SKU'));
                    $options[] = array('value' => 'slug', 'text' => JText::_('COM_VIRTUEMART_PRODUCT_ALIAS'));
                    $options[] = array('value' => 'product_length', 'text' => JText::_('COM_VIRTUEMART_PRODUCT_LENGTH'));
                    $options[] = array('value' => 'product_width', 'text' => JText::_('COM_VIRTUEMART_PRODUCT_WIDTH'));
                    $options[] = array('value' => 'product_height', 'text' => JText::_('COM_VIRTUEMART_PRODUCT_HEIGHT'));
                    $options[] = array('value' => 'product_weight', 'text' => JText::_('COM_VIRTUEMART_PRODUCT_WEIGHT'));
                    $html .= JHTML::_('select.genericlist', $options, 'field[' . $row . '][custom_value]', '', 'value', 'text', $field->custom_value) . '</td><td>' . $priceInput;
                    return $html;
                    // 					return 'Automatic Childvariant creation (later you can choose here attributes to show, now product name) </td><td>';
                    break;
                    // variants
                // variants
                case 'V':
                    return '<input type="text" class="input-medium" value="' . $field->custom_value . '" name="field[' . $row . '][custom_value]" /></td><td>' . $priceInput;
                    break;
                    /*
                     * Stockable (group of) child variants
                     * Special type setted by the plugin
                     */
                /*
                 * Stockable (group of) child variants
                 * Special type setted by the plugin
                 */
                case 'G':
                    return;
                    break;
                    /*Extended by plugin*/
                /*Extended by plugin*/
                case 'E':
                    $html = '<input type="hidden" value="' . $field->value . '" name="field[' . $row . '][custom_value]" />';
                    JLoader::register('vmCustomPlugin', JPATH_VM_PLUGINS . '/vmcustomplugin.php');
                    JPluginHelper::importPlugin('vmcustom', $field->custom_element);
                    $dispatcher = JDispatcher::getInstance();
                    $retValue = '';
                    $dispatcher->trigger('plgVmOnProductEdit', array($field, $product_id, &$row, &$retValue));
                    return $html . $retValue . '</td><td>' . $priceInput;
                    break;
                case 'D':
                    return vmJsApi::jDate($field->custom_value, 'field[' . $row . '][custom_value]', 'field_' . $row . '_customvalue') . '</td><td>' . $priceInput;
                    break;
                case 'T':
                    //TODO Patrick
                    return '<input type="text" class="input-medium" value="' . $field->custom_value . '" name="field[' . $row . '][custom_value]" /></td><td>' . $priceInput;
                    break;
                    /* string or integer */
                /* string or integer */
                case 'S':
                case 'I':
                    // FIX studio42 tmlspecialchars: "
                    return '<input type="text" class="input-medium" value="' . htmlspecialchars($field->custom_value) . '" name="field[' . $row . '][custom_value]" /></td><td>' . $priceInput;
                    break;
                    //'X'=>'COM_VIRTUEMART_CUSTOM_EDITOR',
                //'X'=>'COM_VIRTUEMART_CUSTOM_EDITOR',
                case 'X':
                    return '<textarea class="mceInsertContentNew" name="field[' . $row . '][custom_value]" id="field-' . $row . '-custom_value">' . $field->custom_value . '</textarea>
						<script type="text/javascript">// Creates a new editor instance
							tinymce.execCommand("mceAddControl",true,"field-' . $row . '-custom_value")
						</script></td><td>' . $priceInput;
                    //return '<input type="text" value="'.$field->custom_value.'" name="field['.$row.'][custom_value]" /></td><td>'.$priceInput;
                    break;
                    //'Y'=>'COM_VIRTUEMART_CUSTOM_TEXTAREA'
                //'Y'=>'COM_VIRTUEMART_CUSTOM_TEXTAREA'
                case 'Y':
                    return '<textarea id="field[' . $row . '][custom_value]" name="field[' . $row . '][custom_value]" class="inputbox" cols=80 rows=50 >' . $field->custom_value . '</textarea></td><td>' . $priceInput;
                    //return '<input type="text" value="'.$field->custom_value.'" name="field['.$row.'][custom_value]" /></td><td>'.$priceInput;
                    break;
                case 'editorta':
                    jimport('joomla.html.editor');
                    $editor = JFactory::getEditor();
                    //TODO This is wrong!
                    $_return['fields'][$_fld->name]['formcode'] = $editor->display($_prefix . $_fld->name, $_return['fields'][$_fld->name]['value'], 300, 150, $_fld->cols, $_fld->rows);
                    break;
                    /* bool */
                /* bool */
                case 'B':
                    return JHTML::_('select.booleanlist', 'field[' . $row . '][custom_value]', 'class="inputbox"', $field->custom_value) . '</td><td>' . $priceInput;
                    break;
                    /* parent */
                /* parent */
                case 'P':
                    return $field->custom_value . '<input type="hidden" value="' . $field->custom_value . '" name="field[' . $row . '][custom_value]" /></td><td>';
                    break;
                    /* related category*/
                /* related category*/
                case 'Z':
                    if (!$field->custom_value) {
                        return '';
                    }
                    // special case it's category ID !
                    $q = 'SELECT * FROM `#__virtuemart_categories_' . VMLANG . '` JOIN `#__virtuemart_categories` AS p using (`virtuemart_category_id`) WHERE `published`=1 AND `virtuemart_category_id`= "' . (int) $field->custom_value . '" ';
                    $this->_db->setQuery($q);
                    //echo $this->_db->_sql;
                    if ($category = $this->_db->loadObject()) {
                        $q = 'SELECT `virtuemart_media_id` FROM `#__virtuemart_category_medias` WHERE `virtuemart_category_id`= "' . (int) $field->custom_value . '" ';
                        $this->_db->setQuery($q);
                        $thumb = '';
                        if ($media_id = $this->_db->loadResult()) {
                            $thumb = $this->displayCustomMedia($media_id, 'category');
                        }
                        $display = '<input type="hidden" value="' . $field->custom_value . '" name="field[' . $row . '][custom_value]" />';
                        return $display . JHTML::link(JRoute::_('index.php?option=com_virtuemart&view=category&task=edit&virtuemart_category_id=' . (int) $field->custom_value, FALSE), $thumb . ' ' . $category->category_name, array('title' => $category->category_name)) . $display;
                    } else {
                        return 'no result/unpublished';
                    }
                    /* related product*/
                /* related product*/
                case 'R':
                    /* product kit(bundle)*/
                /* product kit(bundle)*/
                case 'K':
                    if (!$field->custom_value) {
                        return '';
                    }
                    $param = json_decode($field->custom_param);
                    if (!empty($param->is_hidden)) {
                        $isHidden = 1;
                    } else {
                        $isHidden = 0;
                    }
                    $pModel = VmModel::getModel('product');
                    $related = $pModel->getProduct((int) $field->custom_value, FALSE, FALSE, FALSE, 1, FALSE);
                    $thumb = '';
                    if (!empty($related->virtuemart_media_id[0])) {
                        $thumb = $this->displayCustomMedia($related->virtuemart_media_id[0]) . ' ';
                    } else {
                        $thumb = $this->displayCustomMedia(0) . ' ';
                    }
                    $display = '<input type="hidden" value="' . $field->custom_value . '" name="field[' . $row . '][custom_value]" />';
                    $display .= JHTML::link(juri::root() . 'index.php?option=com_virtuemart&view=productdetails&virtuemart_product_id=' . $related->virtuemart_product_id . '&virtuemart_category_id=' . $related->virtuemart_category_id, $thumb . $related->product_name, array('title' => $related->product_name, 'target' => 'blank'));
                    $display .= JText::_('COM_VIRTUEMART_CUSTOM_IS_HIDDEN') . ' ' . VmHTML::checkbox('custom_param[' . $row . '][is_hidden]', $isHidden, 1, 0, '');
                    return $display;
                    break;
                    /* image */
                /* image */
                case 'M':
                    if (empty($product)) {
                        $vendorId = 1;
                    } else {
                        $vendorId = $product->virtuemart_vendor_id;
                    }
                    $q = 'SELECT `virtuemart_media_id` as value,`file_title` as text FROM `#__virtuemart_medias` WHERE `published`=1
					AND (`virtuemart_vendor_id`= "' . $vendorId . '" OR `shared` = "1")';
                    $this->_db->setQuery($q);
                    $options = $this->_db->loadObjectList();
                    return JHTML::_('select.genericlist', $options, 'field[' . $row . '][custom_value]', '', 'value', 'text', $field->custom_value) . '</td><td>' . $priceInput;
                    break;
                    /* Child product Group */
                /* Child product Group */
                case 'G':
                    break;
                    /* Child product */
                    /*				case 'C':
                    					if (empty($product)){
                    				   $virtuemart_product_id = JRequest::getInt('virtuemart_product_id', 0);
                    				   } else {
                    				   $virtuemart_product_id = $product->virtuemart_product_id;
                    				   }
                    				   $html = '';
                    				   $q='SELECT concat(`product_sku`,":",`product_name`) as text ,`virtuemart_product_id`,`product_in_stock` FROM `#__virtuemart_products` WHERE `published`=1
                    				   AND `virtuemart_product_id`= "'.$field->custom_value.'"';
                    				   //$db->setQuery(' SELECT virtuemart_product_id, product_name FROM `#__virtuemart_products` WHERE `product_parent_id` ='.(int)$product_id);
                    				   $this->_db->setQuery($q);
                    				   if ($child = $this->_db->loadObject()) {
                    				   $html .= JHTML::link ( JRoute::_ ( 'index.php?option=com_virtuemart&view=product&task=edit&virtuemart_product_id='.$field->custom_value), $child->text.' ('.$field->custom_value.')', array ('title' => $child->text ));
                    				   $html .= ' '.JText::_('COM_VIRTUEMART_PRODUCT_FORM_IN_STOCK').':'.$child->product_in_stock ;
                    				   $html .= '<input type="hidden" value="'.$child->virtuemart_product_id.'" name="field['.$row.'][custom_value]" /></div><div>'.$priceInput;
                    				   return $html;
                    				   //					return '<input type="text" value="'.$field->custom_value.'" name="field['.$row.'][custom_value]" />';
                    				   }
                    				   else return JText::_('COM_VIRTUEMART_CUSTOM_NO_CHILD_PRODUCT');
                    				   break;*/
            }
        }
    }
			<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>
	<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">
Пример #5
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>
Пример #6
0
?>
						</label>
					</span>
			</td>
			<td>
				<?php 
echo VmHTML::checkbox('seo_translate', VmConfig::get('seo_translate', 1));
?>
			</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', VmConfig::get('seo_use_id'));
?>
			</td>
		</tr>
	</table>
</fieldset>
Пример #7
0
		<tr class="not_opc_param">
			<td class="key">
            	<span class="hasTip" title="<?php 
echo vmText::_('COM_VIRTUEMART_ADMIN_ONCHECKOUT_SHOW_STEPS_TIP');
?>
">
					<label for="oncheckout_show_steps">
						<?php 
echo vmText::_('COM_VIRTUEMART_ADMIN_ONCHECKOUT_SHOW_STEPS');
?>
					</label>
                </span>
			</td>
			<td>
				<?php 
echo VmHTML::checkbox('oncheckout_show_steps', VmConfig::get('oncheckout_show_steps', 0));
?>
			</td>
		</tr> <?php 
echo VmHTML::row('genericlist', 'COM_VIRTUEMART_ADMIN_CFG_AUTOMATIC_SHIPMENT', $this->listShipment, 'set_automatic_shipment', '', 'virtuemart_shipmentmethod_id', 'shipment_name', VmConfig::get('set_automatic_shipment', 0));
echo VmHTML::row('genericlist', 'COM_VIRTUEMART_ADMIN_CFG_AUTOMATIC_PAYMENT', $this->listPayment, 'set_automatic_payment', '', 'virtuemart_paymentmethod_id', 'payment_name', VmConfig::get('set_automatic_payment', 0));
echo VmHTML::row('checkbox', 'COM_VIRTUEMART_ADMIN_CFG_AGREE_TERMS_ONORDER', 'agree_to_tos_onorder', VmConfig::get('agree_to_tos_onorder', 1));
echo VmHTML::row('checkbox', 'COM_VIRTUEMART_ADMIN_ONCHECKOUT_SHOW_LEGALINFO', 'oncheckout_show_legal_info', VmConfig::get('oncheckout_show_legal_info', 1));
echo VmHTML::row('checkbox', 'COM_VIRTUEMART_ADMIN_ONCHECKOUT_SHOW_REGISTER', 'oncheckout_show_register', VmConfig::get('oncheckout_show_register', 1));
echo VmHTML::row('checkbox', 'COM_VIRTUEMART_ADMIN_ONCHECKOUT_ONLY_REGISTERED', 'oncheckout_only_registered', VmConfig::get('oncheckout_only_registered', 0));
echo VmHTML::row('checkbox', 'COM_VIRTUEMART_ADMIN_ONCHECKOUT_SHOW_PRODUCTIMAGES', 'oncheckout_show_images', VmConfig::get('oncheckout_show_images', 0));
$attrlist = 'class="inputbox" multiple="multiple" ';
echo VmHTML::row('genericlist', 'COM_VIRTUEMART_ADMIN_CFG_STATUS_PDF_INVOICES', $this->osWoP_Options, 'inv_os[]', $attrlist, 'order_status_code', 'order_status_name', VmConfig::get('inv_os', array('C')), 'inv_os', true);
echo VmHTML::row('genericlist', 'COM_VIRTUEMART_CFG_OSTATUS_EMAILS_SHOPPER', $this->osWoP_Options, 'email_os_s[]', $attrlist, 'order_status_code', 'order_status_name', VmConfig::get('email_os_s', array('U', 'C', 'S', 'R', 'X')), 'email_os_s', true);
echo VmHTML::row('genericlist', 'COM_VIRTUEMART_CFG_OSTATUS_EMAILS_VENDOR', $this->os_Options, 'email_os_v[]', $attrlist, 'order_status_code', 'order_status_name', VmConfig::get('email_os_v', array('U', 'C', 'R', 'X')), 'email_os_v', true);
echo VmHTML::row('checkbox', 'COM_VIRTUEMART_ADMIN_CFG_LANGFIX', 'vmlang_js', VmConfig::get('vmlang_js', 0));
Пример #8
0
		</tr>
		<tr>
			<td class="key"><span
				class="hasTip"
				title="<?php 
echo JText::_('COM_VIRTUEMART_ADMIN_ONCHECKOUT_SHOW_PRODUCTIMAGES_TIP');
?>
">
					<label for="oncheckout_show_images"><?php 
echo JText::_('COM_VIRTUEMART_ADMIN_ONCHECKOUT_SHOW_PRODUCTIMAGES');
?>
				</label> </span>
			</td>
			<td>
			<?php 
echo VmHTML::checkbox('oncheckout_show_images', $this->config->get('oncheckout_show_images', 0));
?>
			</td>
		</tr>

		<tr>
			<td class="key"><span
				class="hasTip"
				title="<?php 
echo JText::_('COM_VIRTUEMART_ADMIN_CFG_STATUS_PDF_INVOICES_EXPLAIN');
?>
">
					 <?php 
echo JText::_('COM_VIRTUEMART_ADMIN_CFG_STATUS_PDF_INVOICES');
?>
				 </span>
Пример #9
0
					'none'	=>	JText::_('COM_VIRTUEMART_ADMIN_CFG_ENABLE_DEBUG_NONE'),
					'admin'	=>	JText::_('COM_VIRTUEMART_ADMIN_CFG_ENABLE_DEBUG_ADMIN'),
					'all'	=> JText::_('COM_VIRTUEMART_ADMIN_CFG_ENABLE_DEBUG_ALL')
				);
				echo VmHTML::radioList('debug_enable', $this->config->get('debug_enable','none'),$options);
				?>
			</td>
		</tr>
	    <tr>
		    <td class="key">
		<span class="hasTip" title="<?php echo JText::_('COM_VIRTUEMART_ADMIN_CFG_DANGEROUS_TOOLS_EXPLAIN'); ?>">
		<label for="dangeroustools"><?php echo JText::_('COM_VIRTUEMART_ADMIN_CFG_DANGEROUS_TOOLS') ?>
		</span>
		    </td>
		    <td>
			    <?php echo VmHTML::checkbox('dangeroustools', $this->config->get('dangeroustools')); ?>
		    </td>
	    </tr>
	<tr>
	<td class="key">
		<span class="hasTip" title="<?php echo JText::_('COM_VIRTUEMART_ADMIN_CFG_ENABLE_MULTIX_EXPLAIN'); ?>">
		<?php echo JText::_('COM_VIRTUEMART_ADMIN_CFG_ENABLE_MULTIX') ?>
		</span>
		</td>
		<td>
		<?php
			$options = array(
				'none'	=>	JText::_('COM_VIRTUEMART_ADMIN_CFG_ENABLE_MULTIX_NONE'),
				'admin'	=>	JText::_('COM_VIRTUEMART_ADMIN_CFG_ENABLE_MULTIX_ADMIN')
// 				'all'	=> JText::_('COM_VIRTUEMART_ADMIN_CFG_ENABLE_DEBUG_ALL')
			);
				($this->product_parent->product_name), array('title' => vmText::_('COM_VIRTUEMART_EDIT').' '.htmlentities($this->product_parent->product_name))).' =&gt; ');
		}
		echo vmText::sprintf('COM_VIRTUEMART_PRODUCT_INFORMATION',$parentRel);
		echo ' id: '.$this->product->virtuemart_product_id ?>
	</legend>
    <table class="adminform" width="100%">
		<tr class="row<?php echo $i?>">
			<td style="min-width:75px;max-width:200px;width:130px;">
				<?php echo vmText::_('COM_VIRTUEMART_PRODUCT_FORM_NAME') ?>
			</td>
			<td>
				<input type="text" class="inputbox"  name="product_name" id="product_name" value="<?php echo $this->product->product_name; ?>" size="32" maxlength="255" />
			</td>
			<td colspan="2">
				<label><?php echo VmHTML::checkbox('published', $this->product->published); ?><?php echo vmText::_('COM_VIRTUEMART_PUBLISHED') ?></label>
				<label><?php echo VmHTML::checkbox('product_special', $this->product->product_special); ?> <?php echo vmText::_('COM_VIRTUEMART_PRODUCT_FORM_SPECIAL') ?></label>
			</td>
			<td>
				<span class="hastip" title="<?php echo vmText::_('COM_VIRTUEMART_PRODUCT_FORM_ALIAS_TIP');?>"><?php echo vmText::_('COM_VIRTUEMART_PRODUCT_FORM_ALIAS') ?></span>
			</td>
			<td height="18">
				<input type="text" class="inputbox"  name="slug" id="slug" value="<?php echo $this->product->slug; ?>" size="32" maxlength="255" />
			</td>
		</tr>

		<?php $i = 1 - $i; ?>
		<tr class="row<?php echo $i?>">
			<td>
				<span  class="hastip" title="<?php echo vmText::_('COM_VIRTUEMART_PRODUCT_SKU_TIP') ?>"><?php echo vmText::_('COM_VIRTUEMART_PRODUCT_SKU') ?></span>
			</td>
			<td>
Пример #11
0
		</tr>
		</table>
		<table class="admintable" id="show_hide_prices">
		<tr>
		    <td>
			<span class="hasTip" title="<?php 
echo tsmText::_('com_tsmart_ADMIN_CFG_SHOW_PRICES_EXPLAIN');
?>
">
<?php 
echo tsmText::_('com_tsmart_ADMIN_CFG_SHOW_PRICES');
?>
		    </td>
		    <td>
<?php 
echo VmHTML::checkbox('show_prices', $this->shoppergroup->show_prices);
?>
		    </td>
		</tr>

		    <tr>
			<th></th>
			<th><?php 
echo tsmText::_('com_tsmart_ADMIN_CFG_PRICES_LABEL');
?>
</th>
			<th><?php 
echo tsmText::_('com_tsmart_ADMIN_CFG_PRICES_TEXT');
?>
</th>
			<th><?php 
Пример #12
0
		<tr>
			<td class="key">
            	<span class="hasTip" title="<?php 
echo vmText::_('COM_VIRTUEMART_ADMIN_CFG_AUTOMATIC_PAYMENT_TIP');
?>
">
					<label for="automatic_payment">
						<?php 
echo vmText::_('COM_VIRTUEMART_ADMIN_CFG_AUTOMATIC_PAYMENT');
?>
					</label>
				</span>
			</td>
			<td>
				<?php 
echo VmHTML::checkbox('automatic_payment', VmConfig::get('automatic_payment', 1));
?>
			</td>
		</tr>

		<?php 
echo VmHTML::row('checkbox', 'COM_VIRTUEMART_ADMIN_CFG_AGREE_TERMS_ONORDER', 'agree_to_tos_onorder', VmConfig::get('agree_to_tos_onorder', 1));
echo VmHTML::row('checkbox', 'COM_VIRTUEMART_ADMIN_ONCHECKOUT_SHOW_LEGALINFO', 'oncheckout_show_legal_info', VmConfig::get('oncheckout_show_legal_info', 1));
echo VmHTML::row('checkbox', 'COM_VIRTUEMART_ADMIN_ONCHECKOUT_SHOW_REGISTER', 'oncheckout_show_register', VmConfig::get('oncheckout_show_register', 1));
echo VmHTML::row('checkbox', 'COM_VIRTUEMART_ADMIN_ONCHECKOUT_ONLY_REGISTERED', 'oncheckout_only_registered', VmConfig::get('oncheckout_only_registered', 0));
echo VmHTML::row('checkbox', 'COM_VIRTUEMART_ADMIN_ONCHECKOUT_SHOW_PRODUCTIMAGES', 'oncheckout_show_images', VmConfig::get('oncheckout_show_images', 0));
?>

		<tr>
			<td class="key">
            	<span class="hasTip" title="<?php 
Пример #13
0
		<tr>
			<td class="key">
            	<span class="hasTip" title="<?php 
echo JText::_('COM_VIRTUEMART_ADMIN_CFG_LANGFIX_EXPLAIN');
?>
">
					<label for="addtocart_popup">
						<?php 
echo JText::_('COM_VIRTUEMART_ADMIN_CFG_LANGFIX');
?>
					</label>
				</span>
			</td>
			<td>
				<?php 
echo VmHTML::checkbox('vmlang_js', VmConfig::get('vmlang_js', 0));
?>
			</td>
		</tr>
		<?php 
echo VmHTML::row('input', 'COM_VIRTUEMART_CFG_ATTACH', 'attach', VmConfig::get('attach', ''));
$this->os_Options = $this->orderStatusModel->getOrderStatusNames();
$emptyOption = JHtml::_('select.option', -1, vmText::_('COM_VIRTUEMART_NONE'), 'order_status_code', 'order_status_name');
array_unshift($this->os_Options, $emptyOption);
$attrlist = 'class="inputbox" multiple="multiple" ';
echo VmHTML::row('genericlist', 'COM_VIRTUEMART_CFG_ATTACH_OS', $this->os_Options, 'attach_os[]', $attrlist, 'order_status_code', 'order_status_name', VmConfig::get('attach_os', array('U', 'C', 'R', 'X')), 'attach_os', true);
?>
	</table>
</fieldset>

Пример #14
0
		<?php 
echo JText::_('COM_VIRTUEMART_ADMIN_CFG_DOWNLOAD_EXPIRE');
?>
		</span>
		</td>
	    <td>
		<input size="8" type="text" name="download_expire" class="inputbox" value="<?php 
echo $this->config->get('download_expire');
?>
" />
	    </td>
	</tr>
	<tr>
	    <td class="key">
		<span class="hasTip" title="<?php 
echo JText::_('COM_VIRTUEMART_ADMIN_CFG_DOWNLOAD_KEEP_STOCKLEVEL_TIP');
?>
">
		<?php 
echo JText::_('COM_VIRTUEMART_ADMIN_CFG_DOWNLOAD_KEEP_STOCKLEVEL');
?>
		</span>
	    </td>
	    <td>
		<?php 
echo VmHTML::checkbox('downloadable_products_keep_stocklevel', $this->config->get('downloadable_products_keep_stocklevel'));
?>
	    </td>
	</tr>
    </table>
</fieldset>
Пример #15
0
?>
</td>
		<td><br />
		<?php 
echo VmHTML::checkbox('include_comment', true);
?>
		</td>
	</tr>
	<tr>
		<td class="key"><?php 
echo tsmText::_('com_tsmart_ORDER_UPDATE_LINESTATUS');
?>
</td>
		<td><br />
		<?php 
echo VmHTML::checkbox('orders[' . $this->orderID . '][update_lines]', true);
?>
		</td>
	</tr>
	<tr>
		<td colspan="2" align="center" class="key">
		<a href="#" class="orderStatFormSubmit" >
			<span class="icon-nofloat vmicon vmicon-16-save"></span>&nbsp;<?php 
echo tsmText::_('com_tsmart_SAVE');
?>
</a>&nbsp;&nbsp;&nbsp;
		<a href="#" title="<?php 
echo tsmText::_('com_tsmart_CANCEL');
?>
" onClick="javascript:cancelOrderStatFormEdit(event);" class="show_element[updateOrderStatus]">
			<span class="icon-nofloat vmicon vmicon-16-remove"></span>&nbsp;<?php 
Пример #16
0
?>
</td>
		<td><br />
		<?php 
echo VmHTML::checkbox('include_comment', true);
?>
		</td>
	</tr>
	<tr>
		<td class="key"><?php 
echo JText::_('COM_VIRTUEMART_ORDER_UPDATE_LINESTATUS');
?>
</td>
		<td><br />
		<?php 
echo VmHTML::checkbox('update_lines', true);
?>
		</td>
	</tr>
	<tr>
		<td colspan="2" align="center" class="key">
		<a href="#" class="orderStatFormSubmit" >
			<span class="icon-nofloat vmicon vmicon-16-save"></span>&nbsp;<?php 
echo JText::_('COM_VIRTUEMART_SAVE');
?>
</a>&nbsp;&nbsp;&nbsp;
		<a href="#" title="<?php 
echo JText::_('COM_VIRTUEMART_CANCEL');
?>
" onClick="javascript:document.orderStatForm.reset();" class="show_element[updateOrderStatus]">
			<span class="icon-nofloat vmicon vmicon-16-remove"></span>&nbsp;<?php 
Пример #17
0
				<?php 
echo VmHTML::checkbox('jsite', $this->config->get('jsite', 1));
?>
			</td>
			</tr>

			<tr>
				<td class="key">
		<span class="hasTip" title="<?php 
echo JText::_('COM_VIRTUEMART_ADMIN_CFG_ENABLE_GOOGLE_JQUERY_EXPLAIN');
?>
">
		<label for="google_jquery"><?php 
echo JText::_('COM_VIRTUEMART_ADMIN_CFG_ENABLE_GOOGLE_JQUERY');
?>
		</span>
				</td>
				<td>
					<?php 
echo VmHTML::checkbox('google_jquery', $this->config->get('google_jquery', '1'));
?>
				</td>
			</tr>
		</table>
	    </fieldset>
		
	</td>
</tr>

</table>
Пример #18
0
		<table class="admintable">
			<tr>
			<td class="key">
			    <span class="hasTip" title="<?php 
echo JText::_('COM_VIRTUEMART_ADMIN_CFG_SHOW_PRICES_EXPLAIN');
?>
">
			    <label for="show_prices"><?php 
echo JText::_('COM_VIRTUEMART_ADMIN_CFG_SHOW_PRICES');
?>
</label>
			    </span>
			</td>
			<td>
			    <?php 
echo VmHTML::checkbox('show_prices', $this->config->get('show_prices'));
?>
			</td>
			</tr>
			</table>
		    <table class="admintable" id="show_hide_prices">
			<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>
Пример #19
0
</td>
<td>
	<fieldset class="checkboxes">
		<legend>
			<span class="hasTip" title="<?php 
echo vmText::_('COM_VIRTUEMART_CFG_POOS_ENABLE_EXPLAIN');
?>
">
				<?php 
echo vmText::_('COM_VIRTUEMART_CFG_POOS_ENABLE');
?>
			</span>
		</legend>
		<div>
			<?php 
echo VmHTML::checkbox('lstockmail', VmConfig::get('lstockmail'));
?>
			<span class="hasTip" title="<?php 
echo vmText::_('COM_VIRTUEMART_CFG_LOWSTOCK_NOTIFY_TIP');
?>
">
				<label for="reviews_autopublish">
					<?php 
echo vmText::_('COM_VIRTUEMART_CFG_LOWSTOCK_NOTIFY');
?>
				</label>
			</span>
		</div>
		<?php 
$options = array('none' => vmText::_('COM_VIRTUEMART_ADMIN_CFG_POOS_NONE'), 'disableit' => vmText::_('COM_VIRTUEMART_ADMIN_CFG_POOS_DISABLE_IT'), 'disableit_children' => vmText::_('COM_VIRTUEMART_ADMIN_CFG_POOS_DISABLE_IT_CHILDREN'), 'disableadd' => vmText::_('COM_VIRTUEMART_ADMIN_CFG_POOS_DISABLE_ADD'), 'risetime' => vmText::_('COM_VIRTUEMART_ADMIN_CFG_POOS_RISE_AVATIME'));
echo VmHTML::radioList('stockhandle', VmConfig::get('stockhandle', 'none'), $options);
Пример #20
0
		<tr>
			<td class="key">
            	<span class="hasTip" title="<?php 
echo JText::_('COM_VIRTUEMART_ADMIN_ONCHECKOUT_CHANGE_SHOPPER_TIP');
?>
">
					<label for="oncheckout_change_shopper">
						<?php 
echo JText::_('COM_VIRTUEMART_ADMIN_ONCHECKOUT_CHANGE_SHOPPER');
?>
					</label>
                </span>
			</td>
			<td>
				<?php 
echo VmHTML::checkbox('oncheckout_change_shopper', VmConfig::get('oncheckout_change_shopper', 0));
?>
			</td>
		</tr>
	</table>
</fieldset>


<?php 
/*	</td>
 <td valign="top">

<fieldset>
<legend><?php echo JText::_('COM_VIRTUEMART_ADMIN_CFG_TITLES') ?></legend>
<table class="admintable">
<tr>
		<table width="100%">
			<tr>
				<td class="key"><div
					class="hasTooltip"
					title="<?php 
echo JText::_('COM_VIRTUEMART_REVIEWS_AUTOPUBLISH_TIP');
?>
">
						<label for="reviews_autopublish"><?php 
echo JText::_('COM_VIRTUEMART_REVIEWS_AUTOPUBLISH');
?>
						</label> </div>
				</td>
				<td>
					<?php 
echo VmHTML::checkbox('reviews_autopublish', VmConfig::get('reviews_autopublish'));
?>
				</td>
			</tr>
			<tr>
				<td class="key"><div
					class="hasTooltip"
					title="<?php 
echo JText::_('COM_VIRTUEMART_ADMIN_CFG_REVIEW_MINIMUM_COMMENT_LENGTH_TIP');
?>
">
						<label for="reviews_minimum_comment_length"><?php 
echo JText::_('COM_VIRTUEMART_ADMIN_CFG_REVIEW_MINIMUM_COMMENT_LENGTH');
?>
						</label> </div>
				</td>
Пример #22
0
][comments]" cols="5" rows="5"></textarea>
					<?php 
        echo JHTML::_('link', '#', JText::_('COM_VIRTUEMART_ADD_COMMENT'), array('class' => 'show_comment'));
        ?>
				</td>
				<!-- Update -->
				<td><?php 
        echo VmHTML::checkbox('orders[' . $order->virtuemart_order_id . '][customer_notified]', 0) . JText::_('COM_VIRTUEMART_ORDER_LIST_NOTIFY');
        ?>
					<br/>
					&nbsp;&nbsp;&nbsp;<?php 
        echo VmHTML::checkbox('orders[' . $order->virtuemart_order_id . '][customer_send_comment]', 1) . JText::_('COM_VIRTUEMART_ORDER_HISTORY_INCLUDE_COMMENT');
        ?>
					<br/>
					<?php 
        echo VmHTML::checkbox('orders[' . $order->virtuemart_order_id . '][update_lines]', 1) . JText::_('COM_VIRTUEMART_ORDER_UPDATE_LINESTATUS');
        ?>
				</td>
				<!-- Total -->
				<td><?php 
        echo $order->order_total;
        ?>
</td>
				<td><?php 
        echo JHTML::_('link', JRoute::_($link, FALSE), $order->virtuemart_order_id, array('title' => JText::_('COM_VIRTUEMART_ORDER_EDIT_ORDER_ID') . ' ' . $order->virtuemart_order_id));
        ?>
</td>

			</tr>
				<?php 
        $k = 1 - $k;
Пример #23
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 
Пример #24
0
    /**
     * @author Max Milbers
     * @param $field
     * @param $product_id
     * @param $row
     */
    public function displayProductCustomfieldBE($field, $product, $row)
    {
        //This is a kind of fallback, setting default of custom if there is no value of the productcustom
        $field->customfield_value = empty($field->customfield_value) ? $field->custom_value : $field->customfield_value;
        $field->customfield_price = empty($field->customfield_price) ? 0 : $field->customfield_price;
        if (is_object($product)) {
            $product_id = $product->virtuemart_product_id;
            $virtuemart_vendor_id = $product->virtuemart_vendor_id;
        } else {
            $product_id = $product;
            $virtuemart_vendor_id = VmConfig::isSuperVendor();
            vmdebug('displayProductCustomfieldBE product was not object, use for productId ' . $product_id . ' and $virtuemart_vendor_id = ' . $virtuemart_vendor_id);
        }
        //vmdebug('displayProductCustomfieldBE',$product_id,$field,$virtuemart_vendor_id,$product);
        //the option "is_cart_attribute" gives the possibility to set a price, there is no sense to set a price,
        //if the custom is not stored in the order.
        if ($field->is_input) {
            if (!class_exists('VirtueMartModelVendor')) {
                require VMPATH_ADMIN . DS . 'models' . DS . 'vendor.php';
            }
            if (!class_exists('VirtueMartModelCurrency')) {
                require VMPATH_ADMIN . DS . 'models' . DS . 'currency.php';
            }
            $vendor_model = VmModel::getModel('vendor');
            //$virtuemart_vendor_id = 1;
            $vendor = $vendor_model->getVendor($virtuemart_vendor_id);
            $currency_model = VmModel::getModel('currency');
            $vendor_currency = $currency_model->getCurrency($vendor->vendor_currency);
            $priceInput = '<span style="white-space: nowrap;"><input type="text" size="12" style="text-align:right;" value="' . $field->customfield_price . '" name="field[' . $row . '][customfield_price]" /> ' . $vendor_currency->currency_symbol . "</span>";
        } else {
            $priceInput = ' ';
        }
        switch ($field->field_type) {
            case 'C':
                //vmdebug('displayProductCustomfieldBE $field',$field);
                //if(!isset($field->withParent)) $field->withParent = 0;
                //if(!isset($field->parentOrderable)) $field->parentOrderable = 0;
                //vmdebug('displayProductCustomfieldBE',$field,$product);
                if (!empty($product->product_parent_id) and $product->product_parent_id == $field->virtuemart_product_id) {
                    return 'controlled by parent';
                }
                $html = '';
                if (!class_exists('VmHTML')) {
                    require VMPATH_ADMIN . DS . 'helpers' . DS . 'html.php';
                }
                //$html = vmText::_('COM_VIRTUEMART_CUSTOM_WP').VmHTML::checkbox('field[' . $row . '][withParent]',$field->withParent,1,0,'');
                //$html .= vmText::_('COM_VIRTUEMART_CUSTOM_PO').VmHTML::checkbox('field[' . $row . '][parentOrderable]',$field->parentOrderable,1,0,'').'<br />';
                if (empty($field->selectoptions) or count($field->selectoptions) == 0) {
                    $selectOption = new stdClass();
                    //The json conversts it anyway in an object, so suitable to use an object here
                    $selectOption->voption = 'product_name';
                    $selectOption->slabel = '';
                    $selectOption->clabel = '';
                    $selectOption->canonical = 0;
                    $selectOption->values = '';
                    $c = 0;
                    $field->selectoptions = new stdClass();
                    $field->selectoptions->{$c} = $selectOption;
                    $field->options = new stdClass();
                } else {
                    if (is_array($field->selectoptions)) {
                        $field->selectoptions = (object) $field->selectoptions;
                    }
                }
                $field->options = (object) $field->options;
                $optAttr = array();
                $optAttr[] = array('value' => '0', 'text' => vmText::_('COM_VIRTUEMART_LIST_EMPTY_OPTION'));
                $optAttr[] = array('value' => 'product_name', 'text' => vmText::_('COM_VIRTUEMART_PRODUCT_FORM_NAME'));
                $optAttr[] = array('value' => 'product_sku', 'text' => vmText::_('COM_VIRTUEMART_PRODUCT_SKU'));
                $optAttr[] = array('value' => 'slug', 'text' => vmText::_('COM_VIRTUEMART_PRODUCT_ALIAS'));
                $optAttr[] = array('value' => 'product_length', 'text' => vmText::_('COM_VIRTUEMART_PRODUCT_LENGTH'));
                $optAttr[] = array('value' => 'product_width', 'text' => vmText::_('COM_VIRTUEMART_PRODUCT_WIDTH'));
                $optAttr[] = array('value' => 'product_height', 'text' => vmText::_('COM_VIRTUEMART_PRODUCT_HEIGHT'));
                $optAttr[] = array('value' => 'product_weight', 'text' => vmText::_('COM_VIRTUEMART_PRODUCT_WEIGHT'));
                $optAttr[] = array('value' => 'clabels', 'text' => vmText::_('COM_VIRTUEMART_CLABELS'));
                $productModel = VmModel::getModel('product');
                $childIds = array();
                $sorted = array();
                //vmSetStartTime();
                $productModel->getAllProductChildIds($product_id, $childIds);
                if (isset($childIds[$product_id])) {
                    $sorted = self::sortChildIds($product_id, $childIds[$product_id]);
                }
                array_unshift($sorted, array('parent_id' => $product_id, 'vm_product_id' => $product_id));
                $showSku = true;
                $k = 0;
                if (empty($field->selectoptions)) {
                    $field->selectoptions = array();
                }
                foreach ($field->selectoptions as $k => &$soption) {
                    $options = array();
                    $options[] = array('value' => '0', 'text' => vmText::_('COM_VIRTUEMART_LIST_EMPTY_OPTION'));
                    $added = array();
                    if ($soption->voption != 'clabels') {
                        foreach ($sorted as $vmProductId) {
                            if (empty($vmProductId) or $vmProductId['vm_product_id'] == $product_id) {
                                continue;
                            }
                            $product = $productModel->getProductSingle($vmProductId['vm_product_id'], false);
                            $voption = trim($product->{$soption->voption});
                            if (!empty($voption)) {
                                $found = false;
                                //Guys, dont tell me about in_array or array_search, it does not work here
                                foreach ($added as $add) {
                                    if ($add == $voption) {
                                        $found = true;
                                    }
                                }
                                if (!$found) {
                                    $added[] = $voption;
                                }
                            }
                        }
                        if ($soption->voption == 'product_sku') {
                            $showSku = false;
                        }
                    }
                    if (!empty($soption->values)) {
                        $values = explode("\n", $soption->values);
                        foreach ($values as $value) {
                            $found = false;
                            $value = trim($value);
                            foreach ($added as $add) {
                                if ($add == $value) {
                                    $found = true;
                                    vmdebug('Found true due $soption->values');
                                }
                            }
                            if (!$found) {
                                $added[] = $value;
                            }
                        }
                    }
                    $soption->values = implode("\n", $added);
                    foreach ($added as &$value) {
                        $options[] = array('value' => $value, 'text' => $value);
                    }
                    $soption->comboptions = $options;
                    if (!isset($soption->clabel)) {
                        $soption->clabel = '';
                    }
                    $soption->slabel = empty($soption->clabel) ? vmText::_('COM_VIRTUEMART_' . strtoupper($soption->voption)) : vmText::_($soption->clabel);
                    if ($k == 0) {
                        $html .= '<div style="float:left">';
                    } else {
                        $html .= '<div class="removable">';
                    }
                    $idTag = 'selectoptions' . $k;
                    $html .= JHtml::_('select.genericlist', $optAttr, 'field[' . $row . '][selectoptions][' . $k . '][voption]', '', 'value', 'text', $soption->voption, $idTag);
                    $html .= '<input type="text" value="' . $soption->clabel . '" name="field[' . $row . '][selectoptions][' . $k . '][clabel]" style="line-height:2em;margin:5px 5px 0;" />';
                    $html .= '<textarea name="field[' . $row . '][selectoptions][' . $k . '][values]" rows="5" cols="35" style="float:none;margin:5px 5px 0;" >' . $soption->values . '</textarea>';
                    if ($k > 0) {
                        $html .= '<span class="vmicon vmicon-16-remove"></span>';
                    } else {
                    }
                    $html .= '</div>';
                    if ($k == 0) {
                        $html .= '<div style="float:right;max-width:60%;width:45%;min-width:30%" >' . vmText::_('COM_VIRTUEMART_CUSTOM_CV_DESC') . '</div>';
                        $html .= '<div class="clear"></div>';
                    }
                }
                $idTag = 'selectoptions' . ++$k;
                $html .= '<fieldset style="background-color:#F9F9F9;">
					<legend>' . vmText::_('COM_VIRTUEMART_CUSTOM_RAMB_NEW') . '</legend>
					<div id="new_ramification">';
                //$html .= JHtml::_ ('select.genericlist', $options, 'field[' . $row . '][selectoptions]['.$k.'][voption]', '', 'value', 'text', 'product_name',$idTag) ;
                //$html .= '<input type="text" value="" name="field[' . $row . '][selectoptions]['.$k.'][slabel]" />';
                $html .= JHtml::_('select.genericlist', $optAttr, 'voption', '', 'value', 'text', 'product_name', 'voption');
                $html .= '<input type="text" value="" id="vlabel" name="vlabel" />';
                $html .= '<span id="new_ramification_bt"><span class="icon-nofloat vmicon vmicon-16-new"></span>' . vmText::_('COM_VIRTUEMART_ADD') . '</span>
					</div>
				</fieldset>';
                vmJsApi::addJScript('new_ramification', "\n\tjQuery( function(\$) {\n\t\t\$('#new_ramification_bt').click(function() {\n\t\t\tvar Prod = \$('.new_ramification');//obsolete?\n\n\t\t\tvar voption = jQuery('#voption').val();\n\t\t\tvar label = jQuery('#vlabel').val();\n\t\t\t\t//console.log ('my label '+label);\n\t\t\tform = document.getElementById('adminForm');\n\t\t\tvar newdiv = document.createElement('div');\n\t\t\tnewdiv.innerHTML = '<input type=\"text\" value=\"'+voption+'\" name=\"field[" . $row . "][selectoptions][" . $k . "][voption]\" /><input type=\"text\" value=\"'+label+'\" name=\"field[" . $row . "][selectoptions][" . $k . "][clabel]\" />';\n\t\t\tform.appendChild(newdiv);\n\n\t\t\tform.task.value = 'apply';\n\t\t\tform.submit();\n\t\t\treturn false;\n\t\t});\n\t});\n\t");
                if ($product_id) {
                    $link = JRoute::_('index.php?option=com_virtuemart&view=product&task=createChild&virtuemart_product_id=' . $product_id . '&' . JSession::getFormToken() . '=1&target=parent');
                    $add_child_button = "";
                } else {
                    $link = "";
                    $add_child_button = " not-active";
                }
                $html .= '<div class="button2-left ' . $add_child_button . ' btn-wrapper">
						<div class="blank">';
                if ($link) {
                    $html .= '<a href="' . $link . '" class="btn btn-small">';
                } else {
                    $html .= '<span class="hasTip" title="' . vmText::_('COM_VIRTUEMART_PRODUCT_ADD_CHILD_TIP') . '">';
                }
                $html .= vmText::_('COM_VIRTUEMART_PRODUCT_ADD_CHILD');
                if ($link) {
                    $html .= '</a>';
                } else {
                    $html .= '</span>';
                }
                $html .= '</div>
					</div><div class="clear"></div>';
                //vmdebug('my $field->selectoptions',$field->selectoptions,$field->options);
                $html .= '<table id="syncro">';
                $html .= '<tr>
<th style="text-align: left !important;width:130px;">#</th>';
                if ($showSku) {
                    $html .= '<th style="text-align: left !important;width:90px;">' . vmText::_('COM_VIRTUEMART_PRODUCT_SKU') . '</th>';
                }
                $html .= '<th style="text-align: left !important;width:80px;">' . vmText::_('COM_VIRTUEMART_PRODUCT_GTIN') . '</th>
<th style="text-align: left !important;" width="5%">' . vmText::_('COM_VIRTUEMART_PRODUCT_FORM_PRICE_COST') . '</th>
<th style="text-align: left !important;width:30px;">' . vmText::_('COM_VIRTUEMART_PRODUCT_FORM_IN_STOCK') . '</th>
<th style="text-align: left !important;width:30px;">' . vmText::_('COM_VIRTUEMART_PRODUCT_FORM_ORDERED_STOCK') . '</th>';
                foreach ($field->selectoptions as $k => $option) {
                    $html .= '<th>' . vmText::_('COM_VIRTUEMART_' . strtoupper($option->voption)) . '</th>';
                }
                $html .= '</tr>';
                if (isset($childIds[$product_id])) {
                    foreach ($sorted as $i => $line) {
                        $html .= self::renderProductChildLine($i, $line, $field, $productModel, $row, $showSku);
                    }
                }
                $html .= '</table>';
                return $html;
                // 					return 'Automatic Childvariant creation (later you can choose here attributes to show, now product name) </td><td>';
                break;
            case 'A':
                //vmdebug('displayProductCustomfieldBE $field',$field);
                if (!isset($field->withParent)) {
                    $field->withParent = 0;
                }
                if (!isset($field->parentOrderable)) {
                    $field->parentOrderable = 0;
                }
                //vmdebug('displayProductCustomfieldBE',$field);
                if (!class_exists('VmHTML')) {
                    require VMPATH_ADMIN . DS . 'helpers' . DS . 'html.php';
                }
                $html = '</td><td>' . vmText::_('COM_VIRTUEMART_CUSTOM_WP') . VmHTML::checkbox('field[' . $row . '][withParent]', $field->withParent, 1, 0, '') . '<br />';
                $html .= vmText::_('COM_VIRTUEMART_CUSTOM_PO') . VmHTML::checkbox('field[' . $row . '][parentOrderable]', $field->parentOrderable, 1, 0, '');
                $options = array();
                $options[] = array('value' => 'product_name', 'text' => vmText::_('COM_VIRTUEMART_PRODUCT_FORM_NAME'));
                $options[] = array('value' => 'product_sku', 'text' => vmText::_('COM_VIRTUEMART_PRODUCT_SKU'));
                $options[] = array('value' => 'slug', 'text' => vmText::_('COM_VIRTUEMART_PRODUCT_ALIAS'));
                $options[] = array('value' => 'product_length', 'text' => vmText::_('COM_VIRTUEMART_PRODUCT_LENGTH'));
                $options[] = array('value' => 'product_width', 'text' => vmText::_('COM_VIRTUEMART_PRODUCT_WIDTH'));
                $options[] = array('value' => 'product_height', 'text' => vmText::_('COM_VIRTUEMART_PRODUCT_HEIGHT'));
                $options[] = array('value' => 'product_weight', 'text' => vmText::_('COM_VIRTUEMART_PRODUCT_WEIGHT'));
                $html .= JHtml::_('select.genericlist', $options, 'field[' . $row . '][customfield_value]', '', 'value', 'text', $field->customfield_value);
                return $html;
                // 					return 'Automatic Childvariant creation (later you can choose here attributes to show, now product name) </td><td>';
                break;
                /* string or integer */
            /* string or integer */
            case 'B':
            case 'S':
                if ($field->is_list) {
                    $options = array();
                    $values = explode(';', $field->custom_value);
                    foreach ($values as $key => $val) {
                        $options[] = array('value' => $val, 'text' => $val);
                    }
                    $currentValue = $field->customfield_value;
                    return $priceInput . '</td><td>' . JHtml::_('select.genericlist', $options, 'field[' . $row . '][customfield_value]', NULL, 'value', 'text', $currentValue);
                } else {
                    return $priceInput . '</td><td><input type="text" value="' . $field->customfield_value . '" name="field[' . $row . '][customfield_value]" />';
                    break;
                }
                break;
                /* parent hint, this is a GROUP and should be G not P*/
            /* parent hint, this is a GROUP and should be G not P*/
            case 'G':
                return $field->customfield_value . '<input type="hidden" value="' . $field->customfield_value . '" name="field[' . $row . '][customfield_value]" /></td><td>';
                break;
                /* image */
            /* image */
            case 'M':
                if ($field->is_list and $field->is_input) {
                    $html = $priceInput . '</td><td>is list ';
                    $values = explode(';', $field->custom_value);
                    foreach ($values as $val) {
                        $html .= $this->displayCustomMedia($val, 'product');
                    }
                    return $html;
                } else {
                    if (empty($field->custom_value)) {
                        $q = 'SELECT `virtuemart_media_id` as value,`file_title` as text FROM `#__virtuemart_medias` WHERE `published`=1
					AND (`virtuemart_vendor_id`= "' . $virtuemart_vendor_id . '" OR `shared` = "1")';
                        $db = JFactory::getDBO();
                        $db->setQuery($q);
                        $options = $db->loadObjectList();
                    } else {
                        $values = explode(';', $field->custom_value);
                        $mM = VmModel::getModel('media');
                        foreach ($values as $key => $val) {
                            $mM->setId($val);
                            $file = $mM->getFile();
                            $tmp = array('value' => $val, 'text' => $file->file_name);
                            $options[] = (object) $tmp;
                        }
                    }
                    return $priceInput . '</td><td>' . JHtml::_('select.genericlist', $options, 'field[' . $row . '][customfield_value]', '', 'value', 'text', $field->customfield_value);
                }
                break;
            case 'D':
                return $priceInput . '</td><td>' . vmJsApi::jDate($field->customfield_value, 'field[' . $row . '][customfield_value]', 'field_' . $row . '_customvalue');
                break;
                //'X'=>'COM_VIRTUEMART_CUSTOM_EDITOR',
            //'X'=>'COM_VIRTUEMART_CUSTOM_EDITOR',
            case 'X':
                // Not sure why this block is needed to get it to work when editing the customfield (the subsequent block works fine when creating it, ie. in JS)
                $document = JFactory::getDocument();
                if (get_class($document) == 'JDocumentHTML') {
                    $editor = JFactory::getEditor();
                    return $editor->display('field[' . $row . '][customfield_value]', $field->customfield_value, '550', '400', '60', '20', false) . '</td><td>';
                }
                return $priceInput . '</td><td><textarea class="mceInsertContentNew" name="field[' . $row . '][customfield_value]" id="field-' . $row . '-customfield_value">' . $field->customfield_value . '</textarea>
						<script type="text/javascript">// Creates a new editor instance
							tinymce.execCommand("mceAddControl",true,"field-' . $row . '-customfield_value")
						</script>';
                //return '<input type="text" value="'.$field->customfield_value.'" name="field['.$row.'][customfield_value]" /></td><td>'.$priceInput;
                break;
                //'Y'=>'COM_VIRTUEMART_CUSTOM_TEXTAREA'
            //'Y'=>'COM_VIRTUEMART_CUSTOM_TEXTAREA'
            case 'Y':
                return $priceInput . '</td><td><textarea id="field[' . $row . '][customfield_value]" name="field[' . $row . '][customfield_value]" class="inputbox" cols=80 rows=6 >' . $field->customfield_value . '</textarea>';
                //return '<input type="text" value="'.$field->customfield_value.'" name="field['.$row.'][customfield_value]" /></td><td>'.$priceInput;
                break;
                /*Extended by plugin*/
            /*Extended by plugin*/
            case 'E':
                $html = '<input type="hidden" value="' . $field->customfield_value . '" name="field[' . $row . '][customfield_value]" />';
                if (!class_exists('vmCustomPlugin')) {
                    require VMPATH_PLUGINLIBS . DS . 'vmcustomplugin.php';
                }
                //vmdebug('displayProductCustomfieldBE $field',$field);
                JPluginHelper::importPlugin('vmcustom', $field->custom_element);
                $dispatcher = JDispatcher::getInstance();
                $retValue = '';
                $dispatcher->trigger('plgVmOnProductEdit', array($field, $product_id, &$row, &$retValue));
                return $html . $priceInput . '</td><td>' . $retValue;
                break;
                /* related category*/
            /* related category*/
            case 'Z':
                if (!$product_id or empty($field->customfield_value)) {
                    return '';
                }
                // special case it's category ID !
                $q = 'SELECT * FROM `#__virtuemart_categories_' . VmConfig::$vmlang . '` INNER JOIN `#__virtuemart_categories` AS p using (`virtuemart_category_id`) WHERE `virtuemart_category_id`= "' . (int) $field->customfield_value . '" ';
                $db = JFactory::getDBO();
                $db->setQuery($q);
                //echo $db->_sql;
                if ($category = $db->loadObject()) {
                    $q = 'SELECT `virtuemart_media_id` FROM `#__virtuemart_category_medias` WHERE `virtuemart_category_id`= "' . (int) $field->customfield_value . '" ';
                    $db->setQuery($q);
                    $thumb = '';
                    if ($media_id = $db->loadResult()) {
                        $thumb = $this->displayCustomMedia($media_id, 'category');
                    }
                    $display = '<input type="hidden" value="' . $field->customfield_value . '" name="field[' . $row . '][customfield_value]" />';
                    $display .= '<span class="custom_related_image">' . $thumb . '</span><span class="custom_related_title">';
                    $display .= JHtml::link('index.php?option=com_virtuemart&view=category&task=edit&virtuemart_category_id=' . (int) $field->customfield_value, $category->category_name, array('title' => $category->category_name, 'target' => 'blank')) . '</span>';
                    return $display;
                } else {
                    return 'no result $product_id = ' . $product_id . ' and ' . $field->customfield_value;
                }
                /* related product*/
            /* related product*/
            case 'R':
                if (!$product_id) {
                    return '';
                }
                $pModel = VmModel::getModel('product');
                $related = $pModel->getProduct((int) $field->customfield_value, TRUE, FALSE, FALSE, 1);
                if (!empty($related->virtuemart_media_id[0])) {
                    $thumb = $this->displayCustomMedia($related->virtuemart_media_id[0]) . ' ';
                } else {
                    $thumb = $this->displayCustomMedia(0) . ' ';
                }
                $display = '<input type="hidden" value="' . $field->customfield_value . '" name="field[' . $row . '][customfield_value]" />';
                $display .= '<span class="custom_related_image">' . $thumb . '</span><span class="custom_related_title">';
                $display .= JHtml::link('index.php?option=com_virtuemart&view=product&task=edit&virtuemart_product_id=' . $related->virtuemart_product_id, $related->product_name, array('title' => $related->product_name, 'target' => 'blank')) . '</span>';
                return $display;
        }
    }
Пример #25
0
    /**
     * Writes a line  for the price configuration
     *
     * @author Max Milberes
     * @param string $name
     * @param string $langkey
     */
    static function writePriceConfigLine($array, $name, $langkey)
    {
        if (!class_exists('VmHTML')) {
            require JPATH_VM_ADMINISTRATOR . DS . 'helpers' . DS . 'html.php';
        }
        if (is_object($array)) {
            $array = get_object_vars($array);
        }
        $html = '<tr>
				<td class="key">
					<span class="editlinktip hasTip" title="' . vmText::_($langkey . '_EXPLAIN') . '">
						<label>' . vmText::_($langkey) . '</label>
					</span>
				</td>

				<td>' . VmHTML::checkbox($name, $array[$name]) . '
				</td>
				<td align="center">' . VmHTML::checkbox($name . 'Text', $array[$name . 'Text']) . '
				</td>
				<td align="center">
				<input type="text" value="' . $array[$name . 'Rounding'] . '" class="inputbox" size="4" name="' . $name . 'Rounding">
				</td>
			</tr>';
        return $html;
    }
Пример #26
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');
        //VmConfig::loadJLang('com_virtuemart_media');
        $identify = '';
        // ':'.$this->virtuemart_media_id;
        $this->addHiddenByType();
        $html = '<fieldset class="checkboxes">';
        $html .= '<legend>' . JText::_('COM_VIRTUEMART_IMAGE_INFORMATION') . '</legend>';
        $html .= '<div class="vm__img_autocrop">';
        $imageArgs = '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">
		<label for="published">' . JText::_('COM_VIRTUEMART_FILES_FORM_FILE_PUBLISHED') . '</label>
	</td>
	<td>';
        if (!class_exists('VmHTML')) {
            require JPATH_VM_ADMINISTRATOR . DS . 'helpers' . DS . 'html.php';
        }
        $html .= VmHTML::checkbox('media_published', $checked, 1, 0, 'class="inputbox"', 'media_published' . $identify);
        //<input type="checkbox" class="inputbox" id="media_published'.$identify.'" name="media_published'.$identify.'" '.$checked.' size="16" value="1" />
        $html .= '</td>';
        $html .= '<td rowspan = "8">';
        $html .= 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>';
        // 			$html .= '<tr>
        // 	<td class="labelcell">'. JText::_('COM_VIRTUEMART_FILES_FORM_CURRENT_FILE') .'</td>
        // 	<td>'.$this->file_name.'.'.$this->file_extension .'</td>
        // </tr>';
        if (!class_exists('Permissions')) {
            require JPATH_VM_ADMINISTRATOR . DS . 'helpers' . DS . 'permissions.php';
        }
        if (!Permissions::getInstance()->check('admin')) {
            $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_URL', 'file_url', $readonly);
        $html .= $this->displayRow('COM_VIRTUEMART_FILES_FORM_FILE_URL_THUMB', 'file_url_thumb', $readonly);
        $this->addMediaAttributesByType();
        $html .= '<tr>
					<td class="labelcell">' . JText::_('COM_VIRTUEMART_FILES_FORM_ROLE') . '</td>
					<td><fieldset class="checkboxes">' . JHTML::_('select.radiolist', $this->getOptions($this->_mRoles), 'media_roles' . $identify, '', '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">' . JText::_('COM_VIRTUEMART_FILES_FORM_LOCATION') . '</td>
						<td><fieldset class="checkboxes">' . JText::_('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">' . JText::_('COM_VIRTUEMART_FILES_FORM_LOCATION') . '</td>
						<td><fieldset class="checkboxes">' . JHTML::_('select.radiolist', $this->getOptions($this->_mLocation), 'media_attributes' . $identify, '', 'value', 'text', $mediaattribtemp) . '</fieldset></td></tr>';
        }
        $html .= '</table>';
        $html .= '<br /></fieldset>';
        $this->addMediaActionByType();
        $html .= '<fieldset class="checkboxes">';
        $html .= '<legend>' . JText::_('COM_VIRTUEMART_FILE_UPLOAD') . '</legend>';
        $html .= JText::_('COM_VIRTUEMART_IMAGE_ACTION') . JHTML::_('select.radiolist', $this->getOptions($this->_actions), 'media_action' . $identify, '', 'value', 'text', 0) . '<br /><br style="clear:both" />';
        $html .= JText::_('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;
    }
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">
Пример #28
0
					<tr>
						<td class="key">
							<span class="hasTip" title="<?php 
echo JText::_('COM_VIRTUEMART_ADMIN_CFG_SHOW_PRICES_EXPLAIN');
?>
">
							<label for="show_prices">
								<?php 
echo JText::_('COM_VIRTUEMART_ADMIN_CFG_SHOW_PRICES');
?>
							</label>
							</span>
						</td>
						<td>
							<?php 
echo VmHTML::checkbox('show_prices', VmConfig::get('show_prices', 1));
?>
						</td>
					</tr>
				</table>
				<table class="admintable" id="show_hide_prices">
					<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>
" /></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
		    
		    <tr>
			<td class="key">
			    <span class="hasTip" title="<?php 
    echo JText::_('COM_VIRTUEMART_ADMIN_CFG_SOAP_ENABLE_WS_CACHE_TIP');
    ?>
" >
			    <label for="soap_ws_custom_cache_on"><?php 
    echo JText::_('COM_VIRTUEMART_ADMIN_CFG_SOAP_ENABLE_WS_CACHE');
    ?>
</label>
			</span>
			</td>
			<td>
			    <?php 
    echo VmHTML::checkbox('soap_ws_custom_cache_on', $this->config->get('soap_ws_custom_cache_on'));
    ?>
			</td>
		    </tr>
		    
		    <tr>
			<td class="key">
				<span class="hasTip" title="<?php 
    echo JText::_('COM_VIRTUEMART_ADMIN_CFG_SOAP_CUSTOM_WSDL_TIP');
    ?>
">
				<?php 
    echo JText::_('COM_VIRTUEMART_ADMIN_CFG_SOAP_CUSTOM_WSDL');
    ?>
				</span>
				</td>