By pdjohnson on
I want to be able to alter the name of the update cart element of the ecommerce shopping basket. I can do this but it breaks the processing of the update function since it is expecting 'update cart' as the value in $form_values['op']
function cart_view_form_submit($form_id, $form_values) {
switch($form_values['op']) {
case t('Update Cart'):
cache_clear_all();
cart_update_item_object((object)$form_values);
return 'cart/view';
case t('Checkout'):
// force it not to validate so we see the update quantity page again.
return 'cart/checkout';
}
}
Does anyone know a way of putting this functionality into the template.php or otherwise to override the cart_view_form_submit function so that it can have a different text?
Comments
I'd like the same
I had tried to change the 'update cart' link to read 'update basket' and was wondering why the button had stoppped working!
Is there a way of writing a language file to change cart to basket and zip / postal address to post code etc?
Hydrant Ltd
www.hydrant.co.uk