draculakos Posted September 5, 2008 Posted September 5, 2008 i want to put a small code on footer.php that will work only if the customer is on checkout_shipping.php.. Now you will ask me why i don't put the code directly inside the checkout_shipping but there is a reason.. the code that i want to put on the footer.php is that : <script type="text/javascript" src="js/checkout.js"></script> anyway i think the code i need will start with something like : if (basename($PHP_SELF) != FILENAME_CHECKOUT_SHIPPING) please if anyone can answer, please do it:) I am Maintaining : Product_Short_Description (i added it on specials.php and in shopping_cart.php) City Shipping Rates With Admin (fixed the error that was giving wrong total shipping charges) I had Created : UTF bug fix on standard reviews system (admin & block) Corrupted character on mysql with utf-8
spax Posted September 5, 2008 Posted September 5, 2008 If you want it on checkout_shipping.php, this will do it: <?php if (basename($PHP_SELF) == FILENAME_CHECKOUT_SHIPPING) { echo '<script type="text/javascript" src="js/checkout.js"></script>'; } ?> If you do as you have it, with the != operator, every page except checkout_shipping.php will get the JS call.
draculakos Posted September 5, 2008 Author Posted September 5, 2008 oh i see.. thank you :) I am Maintaining : Product_Short_Description (i added it on specials.php and in shopping_cart.php) City Shipping Rates With Admin (fixed the error that was giving wrong total shipping charges) I had Created : UTF bug fix on standard reviews system (admin & block) Corrupted character on mysql with utf-8
draculakos Posted September 5, 2008 Author Posted September 5, 2008 If you want it on checkout_shipping.php, this will do it: <?php if (basename($PHP_SELF) == FILENAME_CHECKOUT_SHIPPING) { echo '<script type="text/javascript" src="js/checkout.js"></script>'; } ?> If you do as you have it, with the != operator, every page except checkout_shipping.php will get the JS call. one more question.. if i want the code to work for the FILENAME_CHECKOUT_SHIPPING and FILENAME_CHECKOUT_PAYMENT and FILENAME_CHECKOUT_PROCESS how will i add them all together? I am Maintaining : Product_Short_Description (i added it on specials.php and in shopping_cart.php) City Shipping Rates With Admin (fixed the error that was giving wrong total shipping charges) I had Created : UTF bug fix on standard reviews system (admin & block) Corrupted character on mysql with utf-8
spax Posted September 5, 2008 Posted September 5, 2008 <?php if (basename($PHP_SELF) == FILENAME_CHECKOUT_SHIPPING || basename($PHP_SELF) == FILENAME_CHECKOUT_PAYMENT || basename($PHP_SELF) == FILENAME_CHECKOUT_PROCESS) { echo '<script type="text/javascript" src="js/checkout.js"></script>'; } ?> I haven't tested it so make sure you do before you commit to it.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.