Your account is limited to posting only in the Pre-Sales Questions forum.
Support forum access is limited to members with a purchase history.

If you are working on behalf of another member, please contact us with the name of the license holder and we will upgrade your account.
   
 
Redirect if no valid entry_id in product_details
Posted: 03 September 2011 04:32 AM   [ Ignore ]
Has a Nice Profile
Avatar
RankRank
Total Posts:  102
Joined  2011-08-13

I have deleted some entries. How do I tell EE to redirect when no valid entry_id is displayed.

At the moment a non-existing entry_id displays the .store_header template. See here: http://thomaswinterstetter.com/cart/product_detail/119

Thanks!

[ Edited: 04 September 2011 02:31 PM by Chris Newton ]
 Signature 

Advisor, Backup, Consigliere. Based in Germany.

Profile
 
 
Posted: 03 September 2011 06:54 AM   [ Ignore ]   [ # 1 ]
Has a Nice Profile
Avatar
RankRank
Total Posts:  102
Joined  2011-08-13

This is how I resolved the issue:

{preload_replace:template_group="cart"}
{preload_replace
:template="product_detail"}

{exp
:channel:entries 
channel
="products" 
limit="1" 
require_entry="yes"}
{if no_results}{redirect
="404"}{/if}
{embed
="{template_group}/.header" title="{title}{if product_keywords}, {product_keywords}{/if}" template_group="{template_group}" template="{template}" }
{
/exp:channel:entries}

</head>
<
body>
{embed="{template_group}/.top_nav" template_group="{template_group}" template="{template}"

Thank you.

 Signature 

Advisor, Backup, Consigliere. Based in Germany.

Profile
 
 
Posted: 04 September 2011 02:31 PM   [ Ignore ]   [ # 2 ]
Administrator
Avatar
RankRankRankRankRank
Total Posts:  8342
Joined  2008-09-29

Nice

 Signature 

NOTE: If I say “I will look into x” and you PM me information, please do not hesitate to contact me again about it, if I do not respond in several hours, or at most a day. Please feel free to remind me as you see fit

Profile
 
 
   
 
 
‹‹ CT Admin      "Verified" buyers ››