rahulr85r Posted July 7, 2012 Share Posted July 7, 2012 hii guys, trying to add a custom message in order-carrier.tpl file. (The page which shows the shipping carriers selection , which comes rite after confirming the delivery address) basically just a message "Your delivery address seems out of US, please call us on 086 XXX XXX" ... now in order to do this i am trying to get the country name (as entered in the delivery address in the previous page. but cant somehow get the variable onto order-carrier.tpl. this is so that i can check if the country name in delivery address is outside US and then i can make this message appear ONLY IF it is outside the US. if someone could tell me how i can get the variable for the delivery address on this page, i might be able to do the rest. any guidance on this would really be helpful, as i am new to prestashop and not yet completely used to it. Thanks, r Link to comment Share on other sites More sharing options...
bellini13 Posted July 7, 2012 Share Posted July 7, 2012 you would want to get access to cart variable, which will have the id_address_delivery. you would typically do this by overriding the OrderController, determining what country is associated to the delivery address and then adding a variable to smarty to that control your message to be displayed. Link to comment Share on other sites More sharing options...
rahulr85r Posted July 7, 2012 Author Share Posted July 7, 2012 hi, thanks for the quick reply, well basically i am working on prestashop for the first time so not exactly sure how i would get access to cart variable by overriding, if you could just guide me a little on getting the value inside $delivery->country(on the previous delivery address selection page) into the order-carrier.tpl page it would do the job. -- i've already added the message, now just need to get the variable value and then i could add the condition and the rest of the process. Link to comment Share on other sites More sharing options...
rahulr85r Posted July 8, 2012 Author Share Posted July 8, 2012 anyone , who could assist me on this please ? Link to comment Share on other sites More sharing options...
rahulr85r Posted July 8, 2012 Author Share Posted July 8, 2012 i've just found that this variable is basically the one used in order-addresses.tpl {$delivery->country|escape:'htmlall':'UTF-8'} just need the same variable value in order-carrier.tpl even if i could create a global variable for the time bring and just access the value, i think it should work. anyone knows how to get the value of the variable from the former file to the second one. Link to comment Share on other sites More sharing options...
ENS Enterprises Posted August 12, 2016 Share Posted August 12, 2016 $address_collection[$id_address]->country Thanks, Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now