Hi,
Ah, right. I had forgotten about half of the pieces. I'll suppose that you're using a display in "div" mode for your products lisitng menu items, and not "table" or "list".
If you look in the product / listing_div view file, and search for "show_quantity_field" you can find two pieces of code:
if($this->config->get('show_quantity_field') >= 2 && empty($this->tmpl_ajax)) {
?>
<form action="<?php echo hikashop_completeLink('product&task=updatecart'); ?>" method="post" name="hikashop_product_form_<?php echo $mainDivName; ?>" enctype="multipart/form-data">
<?php
}
before the products listing's HTML, and :
if($this->config->get('show_quantity_field') >= 2) {
$this->ajax = 'if(hikashopCheckChangeForm(\'item\',\'hikashop_product_form_'.$mainDivName.'\')){ return hikashopModifyQuantity(\'\',field,1,\'hikashop_product_form_'.$mainDivName.'\'); } return false;';
$this->row = new stdClass();
$this->row->prices = array($this->row);
$this->row->product_quantity = -1;
$this->row->product_min_per_order = 0;
$this->row->product_max_per_order = -1;
$this->row->product_sale_start = 0;
$this->row->product_sale_end = 0;
$this->row->formName = 'hikashop_product_form_'.$this->params->get('main_div_name', '');
$this->row->prices = array('filler');
$this->params->set('show_quantity_field', 2);
$this->setLayout('quantity');
echo $this->loadTemplate();
if(!empty($this->ajax) && $this->config->get('redirect_url_after_add_cart', 'stay_if_cart') == 'ask_user') {
?>
<input type="hidden" name="popup" value="1"/>
<?php
}
?>
<input type="hidden" name="hikashop_cart_type_0" id="hikashop_cart_type_0" value="cart"/>
<input type="hidden" name="add" value="1"/>
<input type="hidden" name="ctrl" value="product"/>
<input type="hidden" name="task" value="updatecart"/>
<input type="hidden" name="return_url" value="<?php echo urlencode(base64_encode(urldecode($this->redirect_url))); ?>"/>
</form>
<?php
}
after the products listing.
These pieces will add a form element around the whole products listing, along with hidden input fields and the add to cart button at the bottom.
So, on top of the previous modification, you would also have to change the checks
$this->config->get('show_quantity_field') >= 2
in this view file to check on $Itemid.
For example, instead of
if($this->config->get('show_quantity_field') >= 2) {
you could have:
global $Itemid;
if($Itemid == XX || $this->config->get('show_quantity_field') >= 2) {