Datafeedr Support Forums

Datafeedr Support Forums (/index.php)
-   Questions (/forumdisplay.php?f=67)
-   -   404 page for the store (/showthread.php?t=4938)

blnklaus August 5th, 2011 03:05 AM

404 page for the store
Hy, is it possible to integrate a "view" for product which leaved the store. What i mean is: If a product is removed by the merchant an a guest comes from a google search, he se the standard 404 Page. Is it possible that the visitor become am Special Page like: "Sorry the product u serch for isn't anymore in the Store, here are some similar product for you.

stefan August 5th, 2011 03:04 PM

Right now that's not possible with views.

It's however possible to create/customize a 404 page.

1) Check first if your theme's folder already provides a 404.php file

If such file is available WordPress will automatically use that page if a Page Not Found error occurs.

Feel free to customize the current error message to your needs by editing the file.

2) If your theme does not provide a 404.php file

Create one yourself or ask the theme owner to provide one for the theme.

You can find more info below.

blnklaus August 5th, 2011 06:46 PM

My theme Knows about 404 page. But that's not what i want for the Store. So i think a Special " error page" (view) for the Store will Be a Great Feature fore the Next update.

stefan August 5th, 2011 08:13 PM

As a workaround you can add something like this in your 404 php file.



$product = "store/product";

if (strpos($_SERVER['REQUEST_URI'], $product) !== false) { ?>
  <h2>your store 404 error</h2>
<?php } else { ?>
  <h2>your default 404 error</h2>

<?php } ?>

It allows you to specify an error message specific for your missing product pages.

The $product variable depends on the URL structure you chose for your product pages (Store > URL Settings).

So change accordingly.

dele001 August 12th, 2011 08:52 AM

Just curious, can we copy a template of a php code on datafeedr and post on our 404 page?

Eric August 12th, 2011 08:57 AM


All times are GMT -5. The time now is 01:13 PM.

Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2021, Jelsoft Enterprises Ltd.