Ejemplo n.º 1
0
 function view()
 {
     $app = JFactory::getApplication();
     require_once JPATH_ADMINISTRATOR . '/components/com_k2store/library/select.php';
     K2StoreToolBar::_custom('save', 'save', 'save', 'JTOOLBAR_SAVE', false, 'shippingTask');
     K2StoreToolBar::_custom('cancel', 'cancel', 'cancel', 'JTOOLBAR_CLOSE', false, 'shippingTask');
     JToolBarHelper::title(JText::_('K2STORE_SHIPM_SHIPPING_METHODS'), 'k2store-logo');
     $id = $app->input->getInt('id', '0');
     $sid = $app->input->getInt('sid', '0');
     $this->includeCustomModel('ShippingMethods');
     $this->includeCustomTables();
     $model = JModelLegacy::getInstance('ShippingMethods', 'K2StoreModel');
     $model->setId((int) $sid);
     $item = $model->getItem();
     if (!isset($item)) {
         $item = JTable::getInstance('ShippingMethods', 'Table');
     }
     $data = array();
     $data['published'] = JHTML::_('select.booleanlist', 'published', 'class=""', $item->published);
     $data['taxclass'] = K2StoreSelect::taxclass($item->tax_class_id, 'tax_class_id');
     $data['shippingtype'] = K2StoreSelect::shippingtype($item->shipping_method_type, 'shipping_method_type', '', 'shipping_method_type', false);
     $options = array();
     $options[] = JHtml::_('select.option', 'no', JText::_('JNO'));
     $options[] = JHtml::_('select.option', 'store', JText::_('K2STORE_SHIPPING_STORE_ADDRESS'));
     $data['address_override'] = JHtmlSelect::genericlist($options, 'address_override', array(), 'value', 'text', $item->address_override);
     // Form
     $form = array();
     $form['action'] = $this->baseLink();
     $form['shippingTask'] = 'save';
     //We are calling a view from the ShippingMethods we isn't actually the same  controller this has, however since all it does is extend the base view it is
     // all good, and we don't need to remake getView()
     $view = $this->getView('ShippingMethods', 'html');
     $view->hidemenu = true;
     $view->hidestats = true;
     //$view->setTask(true);
     $view->setModel($model, true);
     $view->assign('item', $item);
     $view->assign('data', $data);
     $view->assign('form2', $form);
     $view->setLayout('view');
     $view->display();
 }
Ejemplo n.º 2
0
						name="quantity_start[<?php 
    echo $item->productprice_id;
    ?>
]"
						value="<?php 
    echo $item->quantity_start;
    ?>
" size="5" />
						&nbsp;<?php 
    echo JText::_('K2STORE_PR_AND_ABOVE');
    ?>
					</td>

					<td>
						<?php 
    echo K2StoreSelect::productpricetype($item->pricetype, "pricetype[{$item->productprice_id}]");
    ?>
					</td>


					<td style="text-align: left;">
						<input type="text"
						name="price[<?php 
    echo $item->productprice_id;
    ?>
]"
						value="<?php 
    echo $item->price;
    ?>
"  size="10"/>
					</td>
Ejemplo n.º 3
0
 public function getInput()
 {
     require_once JPATH_ADMINISTRATOR . '/components/com_k2store/library/select.php';
     $html = K2StoreSelect::shippingtype($this->value, $this->name);
     return $html;
 }
Ejemplo n.º 4
0
?>
        <?php 
foreach (@$items as $item) {
    $checked = JHTML::_('grid.id', $i, $item->shipping_rate_id);
    ?>
            <tr class='row<?php 
    echo $k;
    ?>
'>
				<td style="text-align: center;"> <?php 
    echo $checked;
    ?>
</td>
                <td style="text-align: center;">
                    <?php 
    echo K2StoreSelect::geozones($item->geozone_id, "geozone[{$item->shipping_rate_id}]");
    ?>
                    <br />
                    [<a href="<?php 
    echo $baseLink;
    ?>
&shippingTask=deleterate&cid[]=<?php 
    echo $item->shipping_rate_id;
    ?>
&return=<?php 
    echo base64_encode($baseLink . "&shippingTask=setrates&sid={$row->shipping_method_id}&tmpl=component");
    ?>
">
						<?php 
    echo JText::_("K2STORE_SRATE_DELETE_RATE");
    ?>
Ejemplo n.º 5
0
                    <?php 
        echo K2StoreSelect::productattributeoptionprefix($item->product_optionvalue_prefix, "prefix[{$item->product_optionvalue_id}]");
        ?>
                </td>
                <td>
                    <input type="text" name="price[<?php 
        echo $item->product_optionvalue_id;
        ?>
]" value="<?php 
        echo $item->product_optionvalue_price;
        ?>
" size="10" />
                </td>
                 <td>
                    <?php 
        echo K2StoreSelect::productattributeoptionprefix($item->product_optionvalue_weight_prefix, "weight_prefix[{$item->product_optionvalue_id}]");
        ?>
                </td>
                <td>
                    <input type="text" name="weight[<?php 
        echo $item->product_optionvalue_id;
        ?>
]" value="<?php 
        echo $item->product_optionvalue_weight;
        ?>
" size="10" />
                </td>


              <td>
					<input type="text" name="ordering[<?php 
Ejemplo n.º 6
0
    }
    echo "</span>";
    $key = 'attribute_' . $attribute->productattribute_id;
    $selected = !empty($values[$key]) ? $values[$key] : $default[$attribute->productattribute_id];
    // Selected attribute options (for child attributes)
    $selected_opts = !empty($this->selected_opts) ? json_decode($this->selected_opts) : 0;
    if (!count($selected_opts)) {
        $selected_opts = 0;
    }
    //now choose the format: select or radio
    $format = K2StoreSelect::getAttributeDisplayFormat($attribute->productattribute_id);
    if ($format == 'radio') {
        //echo K2StoreSelect::productattributeoptions( $attribute->productattribute_id, $selected, $key, $attribs, null, $selected_opts  );
        echo K2StoreSelect::radio_productattributeoptions($attribute->productattribute_id, $selected, $key, $attribs, $idtag = null, $required, $selected_opts);
    } else {
        echo K2StoreSelect::productattributeoptions($attribute->productattribute_id, $selected, $key, $attribs, $idtag = null, $required, $selected_opts);
    }
    ?>
			
			        </div>
			        <?php 
}
?>

    		</div> <!-- end of attribute options -->
	

     <!-- Add to cart button -->
		<div id='add_to_cart_<?php 
echo $item->product_id;
?>