Mediajuggle Posted August 17, 2005 Share Posted August 17, 2005 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 More sharing options...
Jack_mcs Posted August 17, 2005 Share Posted August 17, 2005 Try if ($languages_id == '1') Jack Support Links: For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc. All of My Addons Get the latest versions of my addons Recommended SEO Addons Link to comment Share on other sites More sharing options...
Mediajuggle Posted August 17, 2005 Author Share Posted August 17, 2005 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 More sharing options...
Jack_mcs Posted August 17, 2005 Share Posted August 17, 2005 Yes. Jack Support Links: For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc. All of My Addons Get the latest versions of my addons Recommended SEO Addons Link to comment Share on other sites More sharing options...
Mediajuggle Posted August 17, 2005 Author Share Posted August 17, 2005 well that didn't work because i now have both pages displaying at the same time... the problem is of course with my syntax..... and Ideas... My Contribution Music Download Store Template http://www.oscommerce.com/community/contributions,4275 Link to comment Share on other sites More sharing options...
Mediajuggle Posted August 17, 2005 Author Share Posted August 17, 2005 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 More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.