Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Conditional Statements in OsCommerce


supastoked

Recommended Posts

I use the same principle as Monika

 

  <?php
 if ((basename($PHP_SELF)) == FILENAME_DEFAULT) {
if (!$cPath) {
?>
do stuff
<?php
} else {
?>
do other stuff
<?php
}
 } else {
?> 
do something else
<?php
 }

 if (((basename($PHP_SELF)) != FILENAME_DEFAULT)||($cPath)) {
?>
do another thing here for categories
<?php
 }
?>

No longer giving free advice. Please place deposit in meter slot provided.  Individual: [=] SME: [==] Corporation: [===]
If deposit does not fit one of the slots provided then you are asking too much! :P

Is your Osc dated try Phoenix  raising oscommerce from the ashes.

Link to comment
Share on other sites

i was stuck on getting location with HTTP_GET_VARS

<?php echo ( ( isset($HTTP_GET_VARS['cPath']) && tep_not_null($HTTP_GET_VARS['cPath']) ) ?

'___do stuff for other pages___' : '___do stuff for homepage___'); ?>

 

i'm thinking this is what made it not work with SEO URL's:

tep_not_null($HTTP_GET_VARS['cPath'])

 

for the homepage, cPath is defined but empty, not null .... but it's not always in a get variable

also, some other pages(like product pages) have cPath defined as well, so you would not only target the homepage

:-)

Monika

 

addicted to writing code ... can't get enough of databases either, LOL!

 

my toolbox: Textpad - Compare and Merge - phpMyAdmin - WS_FTP - Photoshop - How to search the forum

 

Interactive Media Award July 2007 ~ category E-Commerce

my advice on the forum is for free, PMs where you send me work are considered consultation which I charge for ...

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...