Missing product don't generate 404 page or 404 cod

  • Posts: 2293
  • Thank you received: 315
8 years 2 months ago #248481

-- url of the page with the problem -- : par-store.ru/katalog/zhidkosti/product/405-1
-- HikaShop version -- : 2.6.3
-- Joomla version -- : 3.6.2
-- PHP version -- : 5.6

Here is page with missing product but browser get 200 code response.

How could I get 404 code?


Я не явлюсь официальной службой поддержки!
Я здесь добровольно!

Хочешь получить купон на скидку Hikashop? Спроси меня как!
Attachments:

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

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
8 years 2 months ago #248483

Hi,

You can add the code:

if($this->config->get('404_when_product_not_found',1)){
		JError::raiseError(404, JText::_('PRODUCT_NOT_FOUND'));
		echo '</div>';
		return;
	}
before the line :
$app->enqueueMessage(JText::_('PRODUCT_NOT_FOUND'));
in the file "show" of the view "product" via the menu Display>Views.

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

Time to create page: 0.060 seconds
Powered by Kunena Forum