pbxcom... you're not just an ordinary Client are ya?
Anyway... I wanted something I could control from the inside of the shopping cart administration, so this is what I did... It works excellently, but I still want your opinion.
STEP 1.
I created a new box in the Left Navigation container: (I called my new box Miscellaneous)
hxxp://www.YOURSITE.com/squirrelcart/index.php?show_record_links=1&table=Content
STEP 2.
In the content of the box, I added the following code:
<a href="index3.php?page=terms&name=Terms%20and%20Con ditions">Terms & Conditions</a><br>
<a href="index3.php?page=privacy&name=Privacy%20Polic y">Privacy Policy</a><br>
I am doing 2 things in these links.
1. I am using the same page (index3.php) to include any additional pages using the ?page=PAGENAME. As long as PAGENAME you use is the same as your include file... PAGENAME.php. Example:
page=privacy - I use privacy.php to be included
page=terms - I use terms.php to be included
2. I give it the name I want to be used in the breadcrumbs navigation using the &name=NAME. Example:
If I want my breadcrumbs to read: PRIVACY POLICY I make the value
name=PRIVACY%20POLICY
So the whole Link would now be:
index3.php?page=privacy&name=PRIVACY%20POLICY
(%20 is used to indicate a SPACE)
STEP 3.
Now I created a NEW Breadcrumb file. I loaded the OLD breadcrumb file (crumb_navigation.php), and renamed it (crumb_navigation2.php).
I took out the following code (lines 9-13):
PHP Code:
if($show_products_mode == "cat_click") {
$Crumb_Nav = get_crumb_nav($crn,"category");
}
if($action == "show_detail") $Crumb_Nav = get_crumb_nav($rn,"product");
if($Crumb_Nav) print "<div class=\"bread_crumb_nav\">$home_link $sep $Crumb_Nav</div>";
and replaced it with:
PHP Code:
if (isset($_GET['name']))
{$name = $_GET['name'];}
print "<div class=\"bread_crumb_nav\">$home_link $sep $name</div>";
Remember to NOT save this as the Original Breadcrumb file!
STEP 4.
Now, I take my index.php (or store.php) and rename that to index3.php.
I replace the following code (so you will load the new version of your breadcrumbs):
PHP Code:
<? include "$cart_isp_root/crumb_navigation.php" ?>
With this code (use whatever you named your file in Step 3 above)
PHP Code:
<? include "$cart_isp_root/crumb_navigation2.php" ?>
STEP 5.
Now, I replace the following code in the same file (index.php or store.php now called index3.php):
PHP Code:
<?
// Cart Content section
include "$cart_isp_root/cart_content.php" ;
?>
with THIS code (Courtesy of PBXCom):
PHP Code:
<?
if (isset($_GET['page']))
{$page = $_GET['page'];}
include($page . '.php');
?>
DONE!
This will allow me to add pages on the 'fly' so to speak, just add it to the Miscellaneous box, and save the include page. It will also allow me to stay within the Squirrelcart framework.
STEP 6. OPTIONAL!
For the sake of making this complete... I will add a sample PRIVACY POLICY page here. Please save it as privacy.php (or whatever you will name your link in Step 2.):
PHP Code:
<table width="100%">
<tr>
<td class="content">
<p align="left"><strong><? print "$name" ?></strong></p>
<p align="left"> <strong>Information We Collect </strong><br>
We recognize your right to confidentiality and are committed to protecting your privacy. We use the information that we collect on our Web sites to provide you with a superior shopping experience and to communicate with you about products, services, and promotions. </p>
</td>
</tr>
</table>
See how the FIRST <P> tag includes the <? print "$name" ?> ? This will automatically take your page name that is also listed in the breadcrumbs. Of course, you do not need this specific information. You can just replace this code with PRIVACY POLICY or whatever text you like.
Now, I am pretty sure, that with some extra code, and handywork, you could just bake this into the original index.php or store.php file, but think it would add more code, and not making it so simple for our fellow n00bs...
Besides, I like keeping these 2 files separate...
Now check out my Privacy Policy etc at:
h__p://www.beautyandspaconcepts.com/index3.php?page=privacy&name=Privacy%20Policy