Jump to content

Changing "Secure Checkout" button during checkout process


graham_w

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

Link to comment
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 comment
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);

 

Link to comment
Share on other sites

  • 4 weeks later...

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...