Hi,
The current system doesn't support that, but it would be nice, so I've worked on it.
Add the code:
if(isset($data['order']['additional'])) {
$task = 'products';
$data['products'] = '1';
$do = true;
}
after the code:
if(isset($data['order']['order_payment_tax_namekey'])) {
$order->order_payment_tax_namekey = $safeHtmlFilter->clean($data['order']['order_payment_tax_namekey'], 'string');
$do = true;
}
in the file administrator/components/com_hikashop/classes/order.php
Change the code:
if(empty($product->order_product_quantity)){
return $this->delete($product->order_product_id);
}
to:
if(empty($product->order_product_quantity) && @$product->order_product_code != 'order additional'){
return $this->delete($product->order_product_id);
}
in the file administrator/components/com_hikashop/classes/order_product.php
and change the code:
if(!empty($this->order->additional)) {
foreach($this->order->additional as $additional) {
?>
<dt class="hikashop_order_additional_additional"><label><?php echo JText::_($additional->order_product_name); ?></label></dt>
<dd class="hikashop_order_additional_additional"><span><?php
if(!empty($additional->order_product_price)) {
$additional->order_product_price = (float)$additional->order_product_price;
}
if(!empty($additional->order_product_price) || empty($additional->order_product_options)) {
echo $this->currencyHelper->format($additional->order_product_price, $this->order->order_currency_id);
} else {
echo $additional->order_product_options;
}
?></span></dd>
to:
if(!empty($this->order->additional)) { ?>
<input type="hidden" name="data[order][additional]" value="1"/>
<?php
foreach($this->order->additional as $additional) {
?><?php
if(!empty($additional->order_product_price)) {
$additional->order_product_price = (float)$additional->order_product_price;
}
if(!empty($additional->order_product_price) || empty($additional->order_product_options)) {
$name = 'order_product_price';
$value = $additional->order_product_price;
} else {
$name = 'order_product_options';
$value = $additional->order_product_options;
}
?>
<dt class="hikashop_order_additional_additional"><label><?php echo JText::_($additional->order_product_name); ?></label></dt>
<dd class="hikashop_order_additional_additional"><span>
<input type="text" name="data[order][product][<?php echo $additional->order_product_name; ?>][<?php echo $name; ?>]" value="<?php echo $value; ?>"/>
<input type="hidden" name="data[order][product][<?php echo $additional->order_product_name; ?>][order_product_id]" value="<?php echo $additional->order_product_id; ?>"/>
<input type="hidden" name="data[order][product][<?php echo $additional->order_product_name; ?>][order_product_code]" value="order additional"/>
<input type="hidden" name="data[order][product][<?php echo $additional->order_product_name; ?>][order_product_quantity]" value="0"/>
</span></dd>
in the file administrator/components/com_hikashop/views/order/tmpl/edit_additional.php
That will add that capability. We'll add that in the next version as well.