Jump to content

Changing "Secure Checkout" button during checkout process


Recommended Posts

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 post
Share on other sites

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.)

  • Thanks 1
Link to post
Share on other sites
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 post
Share on other sites

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);

 

  • Thanks 1
Link to post
Share on other sites
  • 4 weeks later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...