Closed (fixed)
Project:
Commerce Core
Version:
7.x-1.3
Component:
Product
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
17 Nov 2012 at 09:37 UTC
Updated:
20 May 2013 at 23:41 UTC
I use the following code to override all sorts of Drupal forms in template.php
function THEME_theme() {
$items = array();
$items['user_login'] = array(
'render element' => 'form',
'template' => 'user-login',
'preprocess functions' => array('THEME_preprocess_user_login'),
);
return $items;
}
In this case I use user-login.tpl.php to handle the user login form.
Now I tried to override the Commerce Product Form using commerce-product-ui-product-form.tpl.php and this code in template.php:
function THEME_theme() {
$items = array();
$items['commerce_product_ui_product_form'] = array(
'render element' => 'form',
'template' => 'commerce-product-ui-product-form',
'preprocess functions' => array(
'THEME_preprocess_commerce_product_ui_product_form'
),
);
return $items;
}
But this doesn't seems to work for the Commerce Product Form. Is there a way to override the Commerce Product Form?
Comments
Comment #1
rszrama commentedI'd just try doing it with commerce_product_product_form instead. The UI form ID is just a wrapper of that form, so perhaps the theme system is using the base callback.