Hello,

I would like to customize the commerce-line-item-summary.tpl.php file, so, as always, I copied the file into my theme folder and begin to customize it.

But it seems that the original file commerce_kickstart/commerce_kickstart_lite_product_ui/themecommerce-line-item-summary.tpl.php is still read instead of mine.

I cleaned cache several times, but didn't change anythine.

Don't took (and have) time to look further, but the template file call is probably hard coded somewhere.

Regards,

Alex

Comments

zmove’s picture

Status: Active » Needs work

After a look into the code, it seems that the problem is in the file commerce_kickstart_lite_product_ui.module in function commerce_kickstart_lite_product_ui_theme_registry_alter

By removing the line below, it resolve the problem.

  // Remove cart block total label & add cart link on item.
  $theme_registry['commerce_line_item_summary']['path'] = drupal_get_path('module', 'commerce_kickstart_lite_product_ui') . '/theme';
  $theme_registry['commerce_line_item_summary']['template'] = 'commerce-line-item-summary';

I understand that the module need to tweak the output a little for a nice out of the box demo site, but I think that the user should be able to override it in his theme, always. So some additionnal conditions to check if the file is defined in the theme folder (or subfolder as core drupal support it) and, if not, load the one in the module.

Regards,

Alex

vasike’s picture

Version: 7.x-2.0-rc2 » 7.x-2.x-dev
Status: Needs work » Needs review

here is gerrit commit that should allow commerce-line-item-summary.tpl.php to be overriden from theme.
https://code.drupalcommerce.org/#/c/573/

similar to #1790258-2: Wrong templates path on user page if overridden in theme (user-profile-category.tpl.php).

bojanz’s picture

Status: Needs review » Fixed

Merged.

Status: Fixed » Closed (fixed)

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