itemid)) $url_itemid = $this->itemid; elseif (!empty($Itemid)) $url_itemid = '&Itemid=' . $Itemid; if ($this->config->get('show_quantity_field') == -2) $this->params->set('show_quantity_field', @$this->row->product_display_quantity_field); $config =& hikashop_config(); $wishlistEnabled = $config->get('enable_wishlist', 1); $hideForGuest = 1; if (($config->get('hide_wishlist_guest', 1) && hikashop_loadUser() != null) || !$config->get('hide_wishlist_guest', 1)) $hideForGuest = 0; if (!isset($this->cart)) $this->cart = hikashop_get('helper.cart'); $url = ''; $module_id = $this->params->get('from_module', 0); if (empty($this->ajax)) $this->ajax = 'return hikashopModifyQuantity(\'' . $this->row->product_id . '\',field,1,0,\'cart\',' . $module_id . ')'; if (@$this->row->product_sale_start || empty($this->element->main)) $start_date = @$this->row->product_sale_start; else $start_date = $this->element->main->product_sale_start; if (@$this->row->product_sale_end || empty($this->element->main)) $end_date = @$this->row->product_sale_end; else $end_date = $this->element->main->product_sale_end; $formName = ',0'; if (!$this->config->get('ajax_add_to_cart', 0) || ($this->config->get('show_quantity_field') >= 2 && !@$this->element->product_id)) { if (empty($this->formName)) { if (@$this->row->product_id) $formName = ',\'hikashop_product_form_' . $this->row->product_id . '_' . $this->params->get('main_div_name') . '\''; else $formName = ',\'hikashop_product_form_' . $this->params->get('main_div_name') . '\''; } else { $formName = $this->formName; } } $showFree = ($this->config->get('display_add_to_wishlist_for_free_products', 1) || (!$this->config->get('display_add_to_wishlist_for_free_products', 1) && $this->row->prices[0]->price_value != '0')); if ($end_date && $end_date < time()) { ?> time()) { ?> params->get('date_format', '%d %B %Y'))); ?> params->get('catalogue') && ($this->config->get('display_add_to_cart_for_free_products') || !empty($this->row->prices))) { if (@$this->row->product_min_per_order || empty($this->element->main)) $min = @$this->row->product_min_per_order; else $min = @$this->element->main->product_min_per_order; if (@$this->row->product_max_per_order || empty($this->element->main)) $max = @$this->row->product_max_per_order; else $max = @$this->element->main->product_max_per_order; if ($min <= 0) $min = 1; $wishlistAjax = 'if(hikashopCheckChangeForm(\'item\'' . $formName . ')){ return hikashopModifyQuantity(\'' . (int)@$this->row->product_id . '\',field,1' . $formName . ',\'wishlist\',' . $module_id . '); } else { return false; }'; if ($this->row->product_quantity == -1 && !empty($this->element->main) && $this->element->main->product_quantity != -1) $this->row->product_quantity = $this->element->main->product_quantity; $btnType = 'add'; if ($this->row->product_quantity == -1) { ?>
row->has_options)) { if ($this->params->get('add_to_cart', 1)) echo $this->cart->displayButton('' . JText::_('CHOOSE_OPTIONS') . '', 'choose_options', $this->params, hikashop_contentLink('product&task=show&product_id=' . $this->row->product_id . '&name=' . $this->row->alias . $url_itemid . $this->category_pathway, $this->row), 'window.location = \'' . str_replace("'", "\'", hikashop_contentLink('product&task=show&product_id=' . $this->row->product_id . '&name=' . $this->row->alias . $url_itemid . $this->category_pathway, $this->row)) . '\';return false;', '', null, null, 'btn btn-default small'); } else { if ($this->params->get('add_to_cart', 1)) { echo $this->cart->displayButton('' . JText::_('ADD_TO_CART').'', 'add', $this->params, $url, $this->ajax, '', $max, $min, 'btn btn-default small'); $btnType = 'wish'; } if (hikashop_level(1) && $this->params->get('add_to_wishlist') && $wishlistEnabled && !$hideForGuest && $showFree) { echo '
' . $this->cart->displayButton('' . JText::_('ADD_TO_WISHLIST').'', $btnType, $this->params, $url, $wishlistAjax, '', $max, $min, 'btn btn-default small', false) . '
'; } } } elseif ($this->row->product_quantity > 0) { ?>
row->product_quantity == 1 && JText::_('X_ITEM_IN_STOCK') != 'X_ITEM_IN_STOCK') $text = JText::sprintf('X_ITEM_IN_STOCK', $this->row->product_quantity); else $text = JText::sprintf('X_ITEMS_IN_STOCK', $this->row->product_quantity); if ($this->params->get('show_out_of_stock') != '') { if ($this->params->get('show_out_of_stock')) { echo '
' . $text . '
'; } } else { if ($config->get('show_out_of_stock')) { echo '
' . $text . '
'; } else { } } if ($max <= 0 || $max > $this->row->product_quantity) $max = $this->row->product_quantity; if (!empty($this->row->has_options)) { if ($this->params->get('add_to_cart', 1)) echo $this->cart->displayButton( '' . JText::_('CHOOSE_OPTIONS') . '', 'choose_options', $this->params, hikashop_contentLink('product&task=show&product_id=' . $this->row->product_id . '&name=' . $this->row->alias . $url_itemid . $this->category_pathway, $this->row), 'window.location = \'' . str_replace("'", "\'", hikashop_contentLink('product&task=show&product_id=' . $this->row->product_id . '&name=' . $this->row->alias . $url_itemid . $this->category_pathway, $this->row)) . '\';return false;', '', null, null, 'btn btn-default small'); } else { if ($this->params->get('add_to_cart', 1)) { echo $this->cart->displayButton('' . JText::_('ADD_TO_CART').'', 'add', $this->params, $url, $this->ajax, '', $max, $min, 'btn btn-default small'); $btnType = 'wish'; } if (hikashop_level(1) && $this->params->get('add_to_wishlist') && $wishlistEnabled && !$hideForGuest && $showFree) { echo '
' . $this->cart->displayButton('' . JText::_('ADD_TO_WISHLIST').'', $btnType, $this->params, $url, $wishlistAjax, '', $max, $min, 'btn btn-default small', false) . '
'; } } } else { ?>
params->get('show_out_of_stock') != '') { if ($this->params->get('show_out_of_stock')) { } } else { if ($config->get('show_out_of_stock')) { echo '
' . JText::_('NO_STOCK') . '
'; } else { } } $waitlist = $this->config->get('product_waitlist', 0); if (hikashop_level(1) && ($waitlist == 2 || ($waitlist == 1 && (!empty($this->row->main->product_waitlist) || !empty($this->row->product_waitlist))))) { ?>
cart->displayButton('' . JText::_('ADD_TO_WISHLIST').'', 'add_waitlist', $params, hikashop_completeLink('product&task=waitlist&cid=' . $this->row->product_id . $url_itemid), 'window.location=\'' . str_replace("'", "\'", hikashop_completeLink('product&task=waitlist&cid=' . $this->row->product_id . $url_itemid)) . '\';return false;'); } if (hikashop_level(1) && $this->params->get('add_to_wishlist') && $wishlistEnabled && !$hideForGuest && $showFree) { if (!empty($this->row->has_options)) { if ($this->params->get('add_to_cart', 1)) echo $this->cart->displayButton('' . JText::_('CHOOSE_OPTIONS') . '', 'choose_options', $this->params, hikashop_contentLink('product&task=show&product_id=' . $this->row->product_id . '&name=' . $this->row->alias . $url_itemid . $this->category_pathway, $this->row), 'window.location = \'' . str_replace("'", "\'", hikashop_contentLink('product&task=show&product_id=' . $this->row->product_id . '&name=' . $this->row->alias . $url_itemid . $this->category_pathway, $this->row)) . '\';return false;', '', null, null, 'btn btn-default small'); } else { echo '
' . $this->cart->displayButton('' . JText::_('ADD_TO_WISHLIST').'', 'add', $this->params, $url, $wishlistAjax, '', @$this->row->product_max_per_order, 1, 'btn btn-default small', false) . '
'; } } } ?>
params->get('add_to_wishlist', 1) && $showFree && !$hideForGuest && !$this->config->get('display_add_to_cart_for_free_products')) { if (!empty($this->row->has_options)) { if ($this->params->get('add_to_cart', 1)) echo $this->cart->displayButton('' . JText::_('CHOOSE_OPTIONS') . '', 'choose_options', $this->params, hikashop_contentLink('product&task=show&product_id=' . $this->row->product_id . '&name=' . $this->row->alias . $url_itemid . $this->category_pathway, $this->row), 'window.location = \'' . str_replace("'", "\'", hikashop_contentLink('product&task=show&product_id=' . $this->row->product_id . '&name=' . $this->row->alias . $url_itemid . $this->category_pathway, $this->row)) . '\';return false;', ''); } else { $wishlistAjax = 'if(hikashopCheckChangeForm(\'item\'' . $formName . ')){ return hikashopModifyQuantity(\'' . (int)@$this->row->product_id . '\',field,1' . $formName . ',\'wishlist\',' . $module_id . '); } else { return false; }'; echo '
' . $this->cart->displayButton('' . JText::_('ADD_TO_WISHLIST').'', 'add', $this->params, $url, $wishlistAjax, '', @$this->row->product_max_per_order, 1, 'btn btn-default small', false) . '
'; } }