Download & Extend

Overwrite product settings to set form submit to "Add to cart"

Project:UC Node Checkout
Version:6.x-2.0-beta4
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:closed (fixed)

Issue Summary

Line 387 of uc_node_checkout.module:

      
// If enabled, alter the submit button to say "Add to cart".
if (variable_get('uc_node_checkout_alter_node_submit_button', TRUE)) {
  $form['buttons']['submit']['#value'] = t('Add to cart');
}

This statically sets the submit text of the form to 'Add to cart' - overwriting the configurations in
"Home » Administer » Store administration » Configuration » Product settings" where you can set the name of the submit value to anything you want.

It seems UC Node Checkout should reference whatever is in this field in product settings page, then pull that instead of just setting it to 'Add to cart'.

I'd do it, but don't know how.

Comments

#1

Little patch to change static "Add to cart" text to whatever is defined in the UC product settings.
OK, I can't see to attach a patch right now, so here it is as <code>:
uc_node_checkout.module.patch

389c389
<           $form['buttons']['submit']['#value'] = t('Add to cart');
---
>           $form['buttons']['submit']['#value'] = t(variable_get('uc_product_add_to_cart_text','Add to cart'));

#2

Assigned to:Anonymous» aidanlis
Status:active» needs review

Cool looks good.

#3

Assigned to:aidanlis» Anonymous
Status:needs review» fixed

Fixed

#4

Status:fixed» closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

nobody click here