peter222 Posted September 8, 2008 Posted September 8, 2008 hi, I'm a novice to osCommerce, php, mysql,.. but I can search and read, which I have done for a long while now. But now I got a problem to which I need help, so I finally registered myself here :) I want an if / else construction in admin/orders.php, something like: <?php if ($delivery_country == "English') { some php_function } else { some other php_function } How can I make this delivery_country_check to work? thanks!
GemRock Posted September 8, 2008 Posted September 8, 2008 have a look at the order class and you will find its available in the delivery array, and could be referred to in the orders.php as, eg, $order->delivery['country'], depending on your osc site. Ken commercial support - unProtected channel, not to be confused with the forum with same name - open to everyone who need some professional help: either PM/email me, or go to my website (URL can be found in my profile). over 20 years of computer programming experience.
peter222 Posted September 9, 2008 Author Posted September 9, 2008 hi Ken, can you explain this more, because I tried a couple things now, no success :(
peter222 Posted September 9, 2008 Author Posted September 9, 2008 I think this is the closest I got so far, but I am doing something wrong here: $customer_country_query = tep_db_query("select delivery_country from " . TABLE_ORDERS . " where orders_id = '". (int)$HTTP_GET_VARS['order_id'] . "'"); $customer_country = tep_db_fetch_array($customer_country_query); if ($customer_country['delivery_country'] == 'English') { <php .... ?> } else { <php .... ?> } anybody?
♥geoffreywalton Posted September 9, 2008 Posted September 9, 2008 I think this is the closest I got so far, but I am doing something wrong here: $customer_country_query = tep_db_query("select delivery_country from " . TABLE_ORDERS . " where orders_id = '". (int)$HTTP_GET_VARS['order_id'] . "'"); $customer_country = tep_db_fetch_array($customer_country_query); if ($customer_country['delivery_country'] == 'English') { <php .... ?> } else { <php .... ?> } anybody? I live in United Kingdom not English Need help installing add ons/contributions, cleaning a hacked site or a bespoke development, check my profile Virus Threat Scanner My Contributions Basic install answers. Click here for Contributions / Add Ons. UK your site. Site Move. Basic design info. For links mentioned in old answers that are no longer here follow this link Useful Threads. If this post was useful, click the Like This button over there ======>>>>>.
peter222 Posted September 9, 2008 Author Posted September 9, 2008 I live in United Kingdom not English you are right, this code is a mix of things, sorry ;) but put the code between <?php en ?> and loose the <?php .. ?> inside, done!
Recommended Posts
Archived
This topic is now archived and is closed to further replies.