Robin Somes Posted June 11, 2015 Share Posted June 11, 2015 Using CC 6.05 and All-In-One Shipping. When a customer goes through to Checkout and enters their address details, they are summarised on the following page. But the country is displayed as the 2-letter ISO code, rather than the name of the country (image below). Which file do I need to edit to display the country rather than the ISO code, on that page and on others?TIA,Robin Quote Link to comment Share on other sites More sharing options...
bsmither Posted June 11, 2015 Share Posted June 11, 2015 In the template file content.checkout.confirm.php, find the instances of {$BILLING.country_iso} and {$DELIVERY.country_iso} and change the country_iso to just country. That should do it.You may need to clear the CubeCart cache in admin, Maintenance, Rebuild tab because we made an edit to a skin file. Quote Link to comment Share on other sites More sharing options...
Robin Somes Posted June 11, 2015 Author Share Posted June 11, 2015 In the template file content.checkout.confirm.php, find the instances of {$BILLING.country_iso} and {$DELIVERY.country_iso} and change the country_iso to just country. That should do it.You may need to clear the CubeCart cache in admin, Maintenance, Rebuild tab because we made an edit to a skin file.Very nearly. It now shows the ISO 3-digit number, rather than the country or the ISO 2-letter code. I've run out of time this afternoon, so I'll resume tomorrow. But for now, many thanks for pointing me in the right direction.R Quote Link to comment Share on other sites More sharing options...
bsmither Posted June 11, 2015 Share Posted June 11, 2015 Well. You would think there would be some sense to this.In the file /classes/cubecart.class.php, near line 877, find:$this->_basket['billing_address'] = array(In this array, 'country' and 'country_id' are both being assigned the country's iso numcode, presumably. (Such as USA=840, UK=826, Ireland=372)Instead of changing one of the redundant elements, for fear of breaking something else, let's add an array element 'country_name'.'country_name' => getCountryFormat($_POST['billing']['country'], 'numcode', 'name'),Be careful to note which statements have a final comma and which do not. Only the last element in the array declaration can go without a trailing comma.Do the same for the next 'delivery' array. Quote Link to comment Share on other sites More sharing options...
Robin Somes Posted June 12, 2015 Author Share Posted June 12, 2015 Many thanks, Brian; that, and changing {$BILLING.country} to {$BILLING.country_name} in content.checkout.confirm.php, has done the trick.Robin Quote Link to comment Share on other sites More sharing options...
nathanbright Posted July 21, 2015 Share Posted July 21, 2015 Thanks for this solution on exactly the issue I haveBUTIsn't /classes/cubecart.class.php a pretty fundamental core code file that is very likely to be overwritten by future security updates?Nathan Quote Link to comment Share on other sites More sharing options...
Dirty Butter Posted July 21, 2015 Share Posted July 21, 2015 @nathanbright - You are correct that this fix will be overwritten on update. I comment every change I make and use BeyondCompare so I can find all my tweaks and copy them over into the updated version when it comes out. Quote Link to comment Share on other sites More sharing options...
havenswift-hosting Posted July 21, 2015 Share Posted July 21, 2015 If this is a bug in core (havent looked) then if it is reported as a git issue then it will be fixed for a future version Quote Link to comment Share on other sites More sharing options...
nathanbright Posted July 21, 2015 Share Posted July 21, 2015 We could extract the country name from the $COUNTRIES associative array but the smarty code is heavy goingI suspect the 'country' attribute was intended for this purpose but as Brian (?) says, safer to create the new attributeAlso (not checked yet) the same change probably needs applying to the delivery addressGithub issue #693 raisedI am relatively new to Cubecart so apologies if that was inappropriate Quote Link to comment Share on other sites More sharing options...
Dirty Butter Posted July 21, 2015 Share Posted July 21, 2015 No apologies needed!! That's what the GitHub is for! Your feedback is always appreciated! Quote Link to comment Share on other sites More sharing options...
havenswift-hosting Posted July 21, 2015 Share Posted July 21, 2015 Hi NathanDefinitely no apologies needed - these forums are great for asking about an issue, hopefully getting an answer if it is functioanlity related or getting others to verify that it is actually a bug when it can / should then be added as a git issue so it can be fixed so core file changes are not needed. Getting confirmation from at least one other person is important so that the git issues list doesnt get clogged up with non bugs so thanks for adding itIan Quote Link to comment Share on other sites More sharing options...
nathanbright Posted July 21, 2015 Share Posted July 21, 2015 Thanks both for the positive feedbackCollaboration - love it(and thanks for the BeyondCompare pointer, going to look at that more closely) Quote Link to comment Share on other sites More sharing options...
Dirty Butter Posted July 21, 2015 Share Posted July 21, 2015 There are other data compare software available - I started using it when it was free, so I've stayed with it. It is free to try, but now it's a paid product. Quote Link to comment Share on other sites More sharing options...
havenswift-hosting Posted July 21, 2015 Share Posted July 21, 2015 There are other data compare software available - I started using it when it was free, so I've stayed with it. It is free to try, but now it's a paid product.two others are DiffMerge and WinMerge - they are both good and do certain things in different ways which is why we use both Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.