Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls
 

Adding recommends.tpl to product not available error page

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 06-24-2009, 08:25 AM
 
Acquamarina Acquamarina is offline
 

X-Adept
  
Join Date: Aug 2006
Location: USA
Posts: 811
 

Default Adding recommends.tpl to product not available error page

Hi,

I want to add a sampling of products to error_product_disabled.tpl and thought I could use recommends.tpl but nothing happens.

This is the code I used without result:

{* $Id: error_product_disabled.tpl,v 1.5 2005/11/17 06:55:39 max Exp $ *}
<h3>{$lng.err_product_disabled}</h3>
{$lng.err_product_disabled_msg}
<br/>
<br/>

{if $active_modules.Recommended_Products ne ""}
{include file="modules/Recommended_Products/recommends.tpl" }
{/if}

Have no idea why it's not working or what is missing, or even if it should work like this.

Any help is appreciated.
__________________
Vera B
4.4.5
CFLSystems.com mods, Kosmos eBay Integration, Feed Manager Pro, custom mods, BCSEngineering Mods, CDSEO PRO
Hosting by EWDHosting - The best home for your x-cart.
Reply With Quote
  #2  
Old 06-25-2009, 05:13 AM
 
Acquamarina Acquamarina is offline
 

X-Adept
  
Join Date: Aug 2006
Location: USA
Posts: 811
 

Default Re: Adding recommends.tpl to product not available error page

Still working on this... Maybe it should be done in error_message.php? Maybe both php and tpl?

We sell one of a kind and get a lot of hits on the product disabled page, which has no products or images, just text links.

I would like to add a random product display to that page in hopes to entice a visitor to stay. Right now it is just a mostly blank template page with the header, left and right navigation. Why not make it visually pleasing?

Any suggestions?
__________________
Vera B
4.4.5
CFLSystems.com mods, Kosmos eBay Integration, Feed Manager Pro, custom mods, BCSEngineering Mods, CDSEO PRO
Hosting by EWDHosting - The best home for your x-cart.
Reply With Quote
  #3  
Old 12-18-2009, 09:08 AM
 
Acquamarina Acquamarina is offline
 

X-Adept
  
Join Date: Aug 2006
Location: USA
Posts: 811
 

Default Re: Adding recommends.tpl to product not available error page

Bump - Anyone? No one has ever really thought about doing this? I find that hard to believe...
__________________
Vera B
4.4.5
CFLSystems.com mods, Kosmos eBay Integration, Feed Manager Pro, custom mods, BCSEngineering Mods, CDSEO PRO
Hosting by EWDHosting - The best home for your x-cart.
Reply With Quote
  #4  
Old 04-01-2010, 03:37 PM
  betty4's Avatar 
betty4 betty4 is offline
 

Advanced Member
  
Join Date: Aug 2006
Posts: 75
 

Lightbulb Re: Adding recommends.tpl to product not available error page

Quote:
Originally Posted by Acquamarina
Bump - Anyone? No one has ever really thought about doing this? I find that hard to believe...

I tried this and had the same problem. I tried just copying and pasting then adjusted the {if} statement to look like this:

{if $active_modules.Recommended_Products ne ""}
{capture name=recommends}
<TABLE border="0" cellspacing="5">
{section name=num loop=$recommends}
<TR class="ItemsList">
<TD width="5%">#{$recommends[num].productcode}</TD>

<td width="15%"><a href="product.php?productid={ $recommends[num].productid}">{include file="product_thumbnail.tpl" productid=$recommends[num].productid image_x=$config.Appearance.thumbnail_width product=$product_links[cat_num].product tmbn_url=$recommends[num].tmbn_url}</a></td>

<TD width="80%">
<A href="product.php?productid={$recommends[num].productid}"><FONT class="ItemsList">{$recommends[num].product}</FONT></A>
</TD>
</TR>
{/section}
</TABLE>
{/capture}
{include file="dialog.tpl" title=$lng.lbl_recommends content=$smarty.capture.recommends extra="width=100%"}
{/if}

On "Preview" in Admin console the Recommends table is returned as expected, but no products. This is because template preview doesn't show as it would during actual customer experience.

Note:
Customer search experience on disabled...Template "error_product_disabled.tpl" is not returned when searching for disabled product only search_results returned with Advanced search option.

When searching productcode (SKU) and not productid I get no returned products or product images. I will test edit the code from productid to productcode.

I really think it should be template error_access_denied.tpl because in my version this is what is returned when a product has been freshly deleted from the database.
__________________
Was 4.0.17 Gold w/3rd party modules
Now 4.5.5 Gold with core modules
Reply With Quote
  #5  
Old 04-02-2010, 04:01 AM
 
Acquamarina Acquamarina is offline
 

X-Adept
  
Join Date: Aug 2006
Location: USA
Posts: 811
 

Default Re: Adding recommends.tpl to product not available error page

Hi,

Did you make any changes to the error_message.php or just the template? I have a feeling there is something that needs to change on that file, but no idea of what it is.

As for the customer experience side, in my cart if items out of stock are set to disable automatically, the error_access_denied.tpl is used. It is not the best choice as the wording on the template is almost rude, and I want it that way if someone is trying to access files without permission. For a customer it is not appropriate, so I have to disable items manually to display the "Item out of stock" message.

As for the search I referred to, it is the search engines not the cart search, so the customer is probably a new visitor.

Thank for posting. It would be great if we could make this work. Don't understand why it doesn't do that by default or as a choice in Admin.
__________________
Vera B
4.4.5
CFLSystems.com mods, Kosmos eBay Integration, Feed Manager Pro, custom mods, BCSEngineering Mods, CDSEO PRO
Hosting by EWDHosting - The best home for your x-cart.
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 12:37 PM.

   

 
X-Cart forums © 2001-2020