Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I'm trying to add some text in Paypal EC module, since I found in Paypal guidelines a note that explains to add a CLEARLY VISIBLE TEXT 'or' in cart, to help customers understand that Express Checkout is an alternative to Standard Drupal Checkout.
As you draw EC form in cart, this is not clear. I would like to add some extra html text between drupal 'go on with checkout' and EC checkout.
I found these are the module lines adding EC form in cart. How can I edit them?
/**
* Displays an Express Checkout button as a form that redirects to PayPal.
*/
function commerce_paypal_ec_order_form($form, &$form_state, $payment_method, $order) {
$form_state['payment_method'] = $payment_method;
$form_state['order'] = $order;
$form['#attributes'] = array(
'class' => array('paypal-ec-order-form'),
);
// @todo See if we can embed this using HTTP to avoid potential browser
// warnings if HTTPS is not enabled on the site.
$form['paypal_ec'] = array(
'#type' => 'image_button',
'#value' => t('Check out with PayPal'),
'#src' => commerce_paypal_ec_button_url(),
'#attached' => array(
'css' => array(
drupal_get_path('module', 'commerce_paypal_ec') . '/theme/commerce_paypal_ec.theme.css',
),
),
);
return $form;
}
Comments
Comment #1
psicomante CreditAttribution: psicomante commentedTry this.
adding a single line of code you should have the desired result
in the code:
Psi.
Comment #2
giuvax CreditAttribution: giuvax commentedThanks a lot! It works.
I finally edit the module adding a suffix too. Now I just have to give it a layout via css.