graham_w Posted April 14, 2020 Share Posted April 14, 2020 I am wanting to change the language entry during the checkout process for the "Secure Checkout" button. I want the current language entry to stay as it is ", then have a different language entry eg 'Complete Order' once the customer hits the 'index.php?_a=confirm' page during the checkout process. Is this possible? Thanks Link to comment Share on other sites More sharing options...
fabriceunko Posted April 14, 2020 Share Posted April 14, 2020 Hello, You must go to in language, then choose from the drop-down menu checkout and you can change the text Link to comment Share on other sites More sharing options...
bsmither Posted April 14, 2020 Share Posted April 14, 2020 Please take notes of the web address of the steps you want the phrase to change. The web address would be one of ?_a=basket, ?_a=confirm, ?_a=gateway, ?_a=checkout, or ?_a=cart (possibly deprecated). There is a difference whether a customer is logged in or not. In /classes/cubecart.class.php, near line 1838, find: $checkout_button = (CC_SSL) ? $GLOBALS['language']->checkout['secure_checkout'] : $GLOBALS['language']->checkout['checkout']; If there is only one language being displayed, then you can hard-code additional phrases. For example: Find: $checkout_button = (CC_SSL) ? $GLOBALS['language']->checkout['secure_checkout'] : $GLOBALS['language']->checkout['checkout']; On a new blank line after, add this (example): if($_GET['_a'] == "confirm") $checkout_button = (CC_SSL) ? "Complete Secure Order" : "Complete Order"; If more than one language, then you may need additional work. This is a change to core code, and on an upgrade, this will be over-written. Luckily, there is a hook we can use for a custom code snippet. (Snippets survive upgrades.) Link to comment Share on other sites More sharing options...
graham_w Posted April 15, 2020 Author Share Posted April 15, 2020 5 hours ago, bsmither said: This is a change to core code, and on an upgrade, this will be over-written. Luckily, there is a hook we can use for a custom code snippet. (Snippets survive upgrades.) Thank you for this. Really appreciate it. What trigger would I use for creating a snippet? Would it be class.cubecart.checkout_progress Link to comment Share on other sites More sharing options...
bsmither Posted April 15, 2020 Share Posted April 15, 2020 It would be: class.cubecart.display_basket.alternate The code would be: <?php if($_GET['_a'] == "confirm") $checkout_button = (CC_SSL) ? "Complete Secure Order" : "Complete Order"; $GLOBALS['smarty']->assign('CHECKOUT_BUTTON', $checkout_button); Link to comment Share on other sites More sharing options...
graham_w Posted May 7, 2020 Author Share Posted May 7, 2020 Forgot to say thank you for your assistance, this worked perfectly. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.