Missing product don't generate 404 page or 404 cod
- progreccor
-
Topic Author
- Offline
- SEO, webdesign
Less
More
10 years 1 month ago #248481
by progreccor
Я не явлюсь официальной службой поддержки!
Я здесь добровольно!
Хочешь получить купон на скидку Hikashop? Спроси меня как!
Missing product don't generate 404 page or 404 cod was created by progreccor
-- 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 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? Спроси меня как!
Please Log in or Create an account to join the conversation.
10 years 1 month ago #248483
by nicolas
Replied by nicolas on topic Missing product don't generate 404 page or 404 cod
Hi,
You can add the code:
before the line :
in the file "show" of the view "product" via the menu Display>Views.
You can add the code:
Code:
if($this->config->get('404_when_product_not_found',1)){
JError::raiseError(404, JText::_('PRODUCT_NOT_FOUND'));
echo '</div>';
return;
}
Code:
$app->enqueueMessage(JText::_('PRODUCT_NOT_FOUND'));
Please Log in or Create an account to join the conversation.
Time to create page: 0.195 seconds