Skip to content

Instantly share code, notes, and snippets.

@edavydova
Created November 24, 2016 08:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save edavydova/d18a0b5bad11c0e0beb52557e77ccde6 to your computer and use it in GitHub Desktop.
Save edavydova/d18a0b5bad11c0e0beb52557e77ccde6 to your computer and use it in GitHub Desktop.
diff --git a/app/functions/fn.catalog.php b/app/functions/fn.catalog.php
index fce933f..7e0fe0e 100644
--- a/app/functions/fn.catalog.php
+++ b/app/functions/fn.catalog.php
@@ -7411,8 +7411,13 @@ function fn_get_products_views($simple_mode = true, $active = false)
foreach ($templates as $file_name => $file_info) {
$template_description = fn_get_file_description($file_info[Themes::PATH_ABSOLUTE], 'template-description', true);
$_title = fn_basename($file_name, '.tpl');
+ $template_path = str_replace(
+ Themes::factory($file_info['theme'])->getThemePath() . '/templates/',
+ '',
+ $file_info[Themes::PATH_ABSOLUTE]
+ );
$products_views[$_title] = array(
- 'template' => $file_info[Themes::PATH_ABSOLUTE],
+ 'template' => $template_path,
'title' => empty($template_description) ? $_title : $template_description,
'active' => array_key_exists($_title, $active_views)
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment