Hide/remove "Select Options Button"

  • Posts: 34
  • Thank you received: 0
6 years 3 months ago #285409

-- url of the page with the problem -- : henchmanapparel.com/
-- HikaShop version -- : 3.2.1
-- Joomla version -- : 3.8.3
-- PHP version -- : 7.1.11
-- Browser(s) name and version -- : Firefox

I want to hide the "Choose Options" button on the category display page.

I have accessed the relevant file via DISLPAY->VIEWS->PRODUCT/QUANTITY_LEGACY.

I can remove/hide the button by commenting out data from the file, but this also results in the "ADD TO CART" button being removed/hidden from the product page.

How can I remove the Choose Options button on the category page, but still preserve the Add To Cart button on the product page?

Please Log in or Create an account to join the conversation.

  • Posts: 81515
  • Thank you received: 13069
  • MODERATOR
6 years 3 months ago #285423

Hi,

Well, you're on the right track.
You indeed need to modify that file if you have the "add to cart legacy" setting activated or old view overrides.

If it removes both buttons, it means that you've removed too much code from there.
You only need to remove the lines:

echo $this->cart->displayButton(JText::_('CHOOSE_OPTIONS'), 'choose_options', $this->params, hikashop_contentLink('product&task=show&cid='.$this->row->product_id.'&name='.$this->row->alias.$url_itemid.$this->category_pathway,$this->row),'window.location = \''.str_replace("'","\'",hikashop_contentLink('product&task=show&cid='.$this->row->product_id.'&name='.$this->row->alias.$url_itemid.$this->category_pathway,$this->row)).'\';return false;', '');
from the view file.
Note that if you want to remove the buttons from the listing but not from the product page, then you could simply turn off the "add to cart" button display setting in the settings of your menu item via the Joomla menu manager, without changing any code.

The following user(s) said Thank You: jimphillips

Please Log in or Create an account to join the conversation.

  • Posts: 34
  • Thank you received: 0
6 years 3 months ago #285492

Thank you for your reply Nicolas, it was very helpful.

I used your second option of turning it off in the Menu Manager, and it worked perfectly.

Please Log in or Create an account to join the conversation.

Time to create page: 0.058 seconds
Powered by Kunena Forum