Soft 404's

  • Posts: 265
  • Thank you received: 1
10 years 9 months ago #180140

-- HikaShop version -- : 2.3.4
-- Joomla version -- : 3.3.6
-- Error-message(debug-mod must be tuned on) -- : none

Hello everyone,

I'm getting a lot of soft 404 crawl errors for products that are no longer available. How do I make sure that these soft 404's return a 404 instead of 'product not found'?

Thanks,
Hal

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

  • Posts: 12953
  • Thank you received: 1778
10 years 9 months ago #180567

Hello,
The solution will just be to edit the "show" file of the "product" view of your front-end template, via "Hikashop->Display->Views" and change these lines :

$app->enqueueMessage(JText::_('PRODUCT_NOT_FOUND'));
hikashop_setPageTitle(JText::_('PRODUCT_NOT_FOUND'));
By :
return JError::raiseError(404, 'product not found');

The following user(s) said Thank You: ydingilski

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

  • Posts: 265
  • Thank you received: 1
10 years 9 months ago #180653

I missed your reply. Thank you for your help!

I occasionally have a sale, so I have set up a 'sale' category. The problem is when those products come out of sale the page is still indexed by google and comes up in their search results i.e. /sale/product123.co.uk

Once I have removed a product from a category, can I make those also return a 404?

Thanks,
Hal

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

  • Posts: 84304
  • Thank you received: 13698
  • MODERATOR
10 years 9 months ago #180848

Hi,

That's more complex because you would have to load the products of the category to see if there are products or not in it before doing the redirect in the "listing" file of the view "category".
I would recommend to contact a third party developer for such customization.

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

Time to create page: 0.069 seconds
Powered by Kunena Forum