Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Need A Little PHP HELP!!


Mediajuggle

Recommended Posts

Okay, i'm using a outside content management program to add some features to my site...

 

the pages from my content system are pulled into Oscommerce by:

 

<?PHP
$number = "1";
$category="7";
$template = "pages";
include("../admin/show_news.php");
?>

 

the problem is that my site needs to be in English or Spanish so i need a way to detect if the oscommerce is set in English or Spanish mode

 

for example:

 

If oscommerce is in English mode then execute this code:

<?PHP
$number = "1";
$category="7";
$template = "pages";
include("../admin/show_news.php");
?>

else if oscommerce is in Spanish mode then execute this code:

<?PHP
$number = "1";
$category="8";
$template = "pages";
include("../admin/show_news.php");
?>

 

I don't think it's too hard of a problem... but I really need some help with this....

 

can someone please help???

My Contribution

Music Download Store Template

http://www.oscommerce.com/community/contributions,4275

Link to comment
Share on other sites

so the syntax would be:

 

 

if ($languages_id == '1') {
<?PHP
$number = "1";
$category="5";
$template = "pages";
include("../admin/show_news.php");
?>

} else {

<?PHP
$number = "1";
$category="5";
$template = "pages";
include("../admin/show_news.php");
?>
}

My Contribution

Music Download Store Template

http://www.oscommerce.com/community/contributions,4275

Link to comment
Share on other sites

thanks i just figured it out...

it should be:

 

<?PHP

if ($languages_id == '1') {

$number = "1";
$category="5";
$template = "pages";
include("../admin/show_news.php");


} else {


$number = "1";
$category="6";
$template = "pages";
include("../admin/show_news.php");

}

?>

 

 

thanks SOOOOOOOO much for pointing me in the right direction

My Contribution

Music Download Store Template

http://www.oscommerce.com/community/contributions,4275

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...