Ecommerce software home
Shopping Cart Software Forum for Ecommerce Templates
 
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

Find us on Facebook Follow us on Twitter View our YouTube channel
Search our site
Forum Search
Google Site Search
 All Forums
 Technical
 PHP (Unix / Linux / Apache) versions
 Search.php - Add a custom copy
Author « Topic »  

Mooseman
Advanced Member

166 Posts

Pre-sales questions only
(More Details...)

Posted - 06/15/2020 :  13:46:29  
Hi!

Am already using "$xxSrchNM" to display a custom comment for searches the provide no results. It works great.

Is there a counterpart to this through which a custom comment displays with any search that DOES provide results?

I would need both available.

Thank you.

Marshall
Ecommerce Template Guru

USA
1909 Posts

Posted - 06/15/2020 :  14:09:54  
I use this on one of the sites I manage. In the <head> put

<?php
$stext=getrequest('stext');
?>
<title>Search Your Website's Name</title>
<meta name="description" content="Search results for
<?php
if(!empty($stext)) {print $stext;}
else {print "YOUR WEBSITE'S NAME";} ?>">

Above <?php include "vsadmin/inc/incsearch.php" ?> put

<h1><?php
if(!empty($stext)) {print $stext;}
else {print "Search Your website's name";} ?></h1>

You can do any variation you want.


Marshall
CENLYT Productions - ms designs
Affordable Web Design
Custom Ecommerce Designs
Responsive Websites
Cenlyt.com

Mooseman
Advanced Member

166 Posts

Pre-sales questions only
(More Details...)

Posted - 06/16/2020 :  09:37:07  
Thanks Marshall.

Is not quite what's needed. I think I need to rephrase my question...

The user searches and either:

1. finds no match, which prints "XXX"

- OR -

2. finds matches, which (in addition to the data) prints "YYY"

Both "XXX" and "YYY" display within the body and are above <?php include "vsadmin/inc/incsearch.php" ?>

Until now I've been using "$xxSrchNM" to generate my "XXX" message. Now I need to also generate "YYY" a message that only displays when matches are found.



Marshall
Ecommerce Template Guru

USA
1909 Posts

Posted - 06/16/2020 :  10:39:39  
Do you want "YYY" to appear in place of "$xxSrchNM" or are you putting it in say an <h> tag?

Marshall
CENLYT Productions - ms designs
Affordable Web Design
Custom Ecommerce Designs
Responsive Websites
Cenlyt.com

Mooseman
Advanced Member

166 Posts

Pre-sales questions only
(More Details...)

Posted - 06/16/2020 :  10:50:59  
Initially I was hoping there was a counterpart to "$xxSrchNM" for successful searches

However it doesn't really matter how I get there as long as the user gets either XXX (or) YYY depending on the results of the search.

Mooseman
Advanced Member

166 Posts

Pre-sales questions only
(More Details...)

Posted - 06/19/2020 :  09:44:20  
Marshall,

I rephrased this question then posted it as new.

See: https://www.ecommercetemplates.com/support/topic.asp?TOPIC_ID=112981

dbDave provided the solution I was looking for.

Thank you for your trying to help me.
  « Topic »  
Jump To:
Shopping Cart Software Forum for Ecommerce Templates © 2002-2022 ecommercetemplates.com
This page was generated in 0.01 seconds. Snitz Forums 2000