hi,
the drupal variable "uc_teaser_add_to_cart_text" found at uc_product.module is never used as an product field label text.
/**
* @ingroup forms
* @see
* uc_product_forms()
* uc_catalog_buy_it_now_form_validate()
* uc_catalog_buy_it_now_form_submit()
*/
function uc_catalog_buy_it_now_form($form_state, $node) {
$form = array();
$form['#validate'][] = 'uc_catalog_buy_it_now_form_validate';
$form['#submit'][] = 'uc_catalog_buy_it_now_form_submit';
$form['nid'] = array('#type' => 'hidden', '#value' => $node->nid);
$form['submit'] = array(
'#type' => 'submit',
'#value' => variable_get('uc_teaser_add_to_cart_text', t('Add to cart')),
'#id' => 'edit-submit-'. $node->nid,
'#attributes' => array(
'class' => 'list-add-to-cart',
),
);
return $form;
}
the "Add to card" Button is blank.
after change the variable to "uc_product_add_to_cart_text" every thing is working well and the Button Label will show up as is defined under
"admin/store/settings/products/edit/fields"
Comments
Comment #1
Island Usurper commentedThis sounds like the problem with version 1.1 of i18n. If any of the multilingual variables haven't been saved to the database, it won't display the default English values. Both "uc_product_add_to_cart_text" and "uc_teaser_add_to_cart_text" are used appropriately, and can be set at admin/store/settings/product/edit. There are two versions of the add to cart form, one with attributes and a quantity field, and one without. The simpler one is used on node teasers and possibly in the catalog.
Comment #2
johanneshahn commentedhi,
ok now i know how it works :)