[Skip to main content](#vessel-content)

#   Missing product don't generate 404 page or 404 cod

##

- **[progreccor](/forum/user/4816-progreccor "View progreccor's Profile")**
- [![progreccor's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar4816.jpg)](/forum/user/4816-progreccor "View progreccor's Profile") Topic Author
- [ Offline](/forum/user/4816-progreccor "Москва")
- SEO, webdesign

Less More

- Posts: 2293
- Thank you received: 314
-
-
-
- [](http://www.d-dd.ru)
-

10 years 2 months ago [\#248481](#248481) by [progreccor](/forum/user/4816-progreccor "View progreccor's Profile")  *[Missing product don't generate 404 page or 404 cod](/forum/3-bug-report/886147-missing-product-dont-generate-404-page-or-404-cod#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?")* was created by *[progreccor](/forum/user/4816-progreccor "View progreccor's Profile")*

-- url of the page with the problem -- : [ par-store.ru/katalog/zhidkosti/product/405-1](http://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?

[ ![2016-08-26&#95;11-02-14.png](/forum/attachment/33190) ](/forum/attachment/33190 "...6&#95;11-02-14.png")

---

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

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

- [ ![2016-08-26&#95;11-02-14.png](/forum/attachment/33190) ](/forum/attachment/33190 "...6&#95;11-02-14.png") [ ](/forum/attachment/33190?download=1 "...6&#95;11-02-14.png")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMtYnVnLXJlcG9ydC84ODYxNDctbWlzc2luZy1wcm9kdWN0LWRvbnQtZ2VuZXJhdGUtNDA0LXBhZ2Utb3ItNDA0LWNvZD90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86564
- Thank you received: 14311
-
-

10 years 2 months ago [\#248483](#248483) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Missing product don't generate 404 page or 404 cod](/forum/3-bug-report/886147-missing-product-dont-generate-404-page-or-404-cod#248483 "-- 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?")*

Hi,

You can add the code: Code:

if($this-&gt;config-&gt;get('404_when_product_not_found',1)){ JError::raiseError(404, JText::_('PRODUCT_NOT_FOUND')); echo '&lt;/div&gt;'; return; }

before the line : Code:

$app-&gt;enqueueMessage(JText::_('PRODUCT_NOT_FOUND'));

in the file "show" of the view "product" via the menu Display&gt;Views.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMtYnVnLXJlcG9ydC84ODYxNDctbWlzc2luZy1wcm9kdWN0LWRvbnQtZ2VuZXJhdGUtNDA0LXBhZ2Utb3ItNDA0LWNvZD90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

Board Categories HikaShop Install &amp; Update Product &amp; Category Display Content Creation Sales and Orders Orders management Reports &amp; Statistics Customers Checkout Payment Methods Shipping Methods Import &amp; Export (CSV, XLS…) Specific Features Affilation Taxes Wishlist Vote Carousel &amp; Slider Mass Actions Filters &amp; Search Discount &amp; Coupon Feature Request Integrations Showcase General Talk about HikaShop Development HikaShop 3.0 Beta Translation Commercial Jobs HikaShop Components HikaMarket Market: Feature requests Market: How to? Market: Bug Report HikaSerial General talk about HikaSerial Serial: Bug Report Serial: How to? Support en Français de HikaSerial (French Support) HikaSubscription HikaAuction Auction: Feature requests Auction: How to? Auction: Bug report Hikashop around the world Support en Français (French Support) Russian FAQ. Курс выживания с Hikashop. Частые вопросы и о Расширения Hikashop Наши сайты на Hikashop 日本語版サポート(Japanese Support) Thai German Archives Bug Report How to?

[](/forum/topics/feed/mode-topics?format=feed&type=rss)

Time to create page: 0.068 seconds

[Powered by](/forum/credits) [Kunena Forum](https://www.kunena.org)
