basketmen Posted June 25, 2009 Posted June 25, 2009 Guys, i want to put or add the customer COUNTRY information in checkout_shipping.php page, i know there is address that can containing country in that page, but i want to put just country information in other place in that page what is the code to call it there i had try this, but no one working $country or ' . $country . ' or <?php $country ?> or <? ' . $country . ' ?> please help guys what is the right code to get customer COUNTRY Deadline always
germ Posted June 25, 2009 Posted June 25, 2009 <?php echo tep_get_country_name($customer_country_id); ?> It worked for me, no runs, no drips, no errors. If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you. "Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice." - Me - "Headers already sent" - The definitive help "Cannot redeclare ..." - How to find/fix it SSL Implementation Help Like this post? "Like" it again over there >
basketmen Posted June 25, 2009 Author Posted June 25, 2009 it is working like a charm thank you very much my brother :) gbu Deadline always
basketmen Posted June 26, 2009 Author Posted June 26, 2009 i have one question again, i want to insert that code to change the Third text below, so showing customer COUNTRY in that line $this->types = array('ONE' => 'First', 'TWO' => 'Second', 'THR' => 'Third', 'FOU' => 'Fourth'); i had try these but still not working $this->types = array('ONE' => 'First', 'TWO' => 'Second', 'THR' => '<?php echo tep_get_country_name($customer_country_id); ?>', 'FOU' => 'Fourth'); $this->types = array('ONE' => 'First', 'TWO' => 'Second', 'THR' => <?php echo tep_get_country_name($customer_country_id); ?>, 'FOU' => 'Fourth'); $this->types = array('ONE' => 'First', 'TWO' => 'Second', 'THR' => tep_get_country_name($customer_country_id), 'FOU' => 'Fourth'); Deadline always
germ Posted June 26, 2009 Posted June 26, 2009 To load it into the array: $this->types = array('ONE' => 'First', 'TWO' => 'Second', 'THR' => tep_get_country_name($customer_country_id), 'FOU' => 'Fourth'); To display it: echo $this->types['THR']; If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you. "Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice." - Me - "Headers already sent" - The definitive help "Cannot redeclare ..." - How to find/fix it SSL Implementation Help Like this post? "Like" it again over there >
basketmen Posted July 8, 2009 Author Posted July 8, 2009 <?php echo tep_get_country_name($customer_country_id); ?> It worked for me, no runs, no drips, no errors. hi jim i have a minor problem the code is working to call the original customer COUNTRY information in checkout_shipping.php page, for example france but sometime member want to change the country when checkout in checkout_shipping_address.php page, for example change to spain, but after go back to checkout_shipping.php page its still showing the original customer COUNTRY, that is france is there conditional to showing the updated country there? Deadline always
germ Posted July 8, 2009 Posted July 8, 2009 On the page in question there is this code: $country = tep_db_prepare_input($HTTP_POST_VARS['country']); Your code would need to appear ANYWHERE AFTER that code and look something like this: echo tep_get_country_name($country); If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you. "Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice." - Me - "Headers already sent" - The definitive help "Cannot redeclare ..." - How to find/fix it SSL Implementation Help Like this post? "Like" it again over there >
basketmen Posted July 23, 2009 Author Posted July 23, 2009 <?php echo tep_get_country_name($customer_country_id); ?> the code is working in store pages but its not working in admin/orders.php page, its just blank i want to change billing address with customer country information Deadline always
germ Posted July 23, 2009 Posted July 23, 2009 Try: <?php echo $order->customer['country']; ?> If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you. "Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice." - Me - "Headers already sent" - The definitive help "Cannot redeclare ..." - How to find/fix it SSL Implementation Help Like this post? "Like" it again over there >
♥ecartz Posted July 24, 2009 Posted July 24, 2009 Or <?php echo $order->customer['country']['title']; ?> Always back up before making changes.
ezbiker Posted August 3, 2009 Posted August 3, 2009 <?php echo tep_get_country_name($customer_country_id); ?> It worked for me, no runs, no drips, no errors. It work for me too, even though I put the code on "account edit" page....thanks
ezbiker Posted August 3, 2009 Posted August 3, 2009 Hi Jim, Can I ask a question, please? What if I like to put the State on account edit page? I did tried to modified your code by change the word "country" to "state"...but it doesn't work. Thanks for your help! Jason,
ezbiker Posted August 3, 2009 Posted August 3, 2009 Hi Jim, Can I ask a question, please? What if I like to put the State on account edit page? I did tried to modified your code by change the word "country" to "state"...but it doesn't work. Thanks for your help! Jason, Hi Jim, I found the answer, as shown below; <?php echo tep_get_zone_name($account['entry_country_id'], $account['entry_zone_id'], ''); ?> Thanks anyway Jason,
Recommended Posts
Archived
This topic is now archived and is closed to further replies.