Bud
03-03-08, 02:30
As you've all probably gathered my coding is non existent.
So, in an effort to give visitors more than a blank page when they land on a product that no longer exists, I thought I'd put a simple piece of code in to say 'sorry, this item has been moved - please search again', sort of thing.
Now, 6 hours later I've only managed to get this sorted by using:
{if $fSearchPrice != 0}
{include file="elements`$DIRECTORY_SEPARATOR`product_display.tpl"}
{else}
Sorry, this item has been moved.
{/if}
That seems to have limited success but is not always true when using $fSearchPrice as the check.
I would like to use $sProductName as the check (or even better $sProductName+$fSearchPrice) - i.e. if there's no title, then it isn't in stock (that seems to be true).
Replacing $fSearchPrice with $sProductName doesn't work and I can't figure out how to change it to make that work.
I know most of you will be falling about laughing by now but it's bugging the hell out of me! :o
Any advice would be very gratefully received.
Cheers - Bud
:confused:
PS. Additional to my quest above (I'm not asking for help with this, or for it to be posted here. It's just an idea for those that can), I thought that if you had the knowledge you could perhaps take the search term from Google etc and automatically enter this into your search box, thus presenting the user with an instant search entry. At least that would help a large %age of the SERPs visitors obtain something useful even though they've landed on a page where the item has been removed.
So, in an effort to give visitors more than a blank page when they land on a product that no longer exists, I thought I'd put a simple piece of code in to say 'sorry, this item has been moved - please search again', sort of thing.
Now, 6 hours later I've only managed to get this sorted by using:
{if $fSearchPrice != 0}
{include file="elements`$DIRECTORY_SEPARATOR`product_display.tpl"}
{else}
Sorry, this item has been moved.
{/if}
That seems to have limited success but is not always true when using $fSearchPrice as the check.
I would like to use $sProductName as the check (or even better $sProductName+$fSearchPrice) - i.e. if there's no title, then it isn't in stock (that seems to be true).
Replacing $fSearchPrice with $sProductName doesn't work and I can't figure out how to change it to make that work.
I know most of you will be falling about laughing by now but it's bugging the hell out of me! :o
Any advice would be very gratefully received.
Cheers - Bud
:confused:
PS. Additional to my quest above (I'm not asking for help with this, or for it to be posted here. It's just an idea for those that can), I thought that if you had the knowledge you could perhaps take the search term from Google etc and automatically enter this into your search box, thus presenting the user with an instant search entry. At least that would help a large %age of the SERPs visitors obtain something useful even though they've landed on a page where the item has been removed.