Projekt

Allgemein

Profil

Aktionen

GX-Bug #68427

geschlossen

ThemeContentView doesn't use the MainFactory to load Smarty / ThemeContentView nutzt nicht die MainFactory, um Smarty zu laden

Von Timo Backhaus vor etwa 3 Jahren hinzugefügt. Vor fast 3 Jahren aktualisiert.

Status:
Erledigt
Priorität:
Hoch
Zugewiesen an:
Moritz Bunjes
Kategorie:
Core
Zielversion:
% erledigt:

0%

Geschätzter Aufwand:
Steps to reproduce:
Betroffene Versionen:
4.3.3.1, 4.4.0.0
Release Notes Langtext:

ThemeContentView benutzt jetzt die MainFactory, um Smarty zu laden.


Beschreibung

In the Theme System you cannot overload Smarty because the ThemeContentView class creates Smarty directly (without MainFactory). This means that overloading of the Smarty class is not possible.

Steps to reproduce:

  1. Create an overload of GXSmarty
  2. Activate a theme
  3. Open the shop frontend
  4. Check, if the overload is loaded

Expected behavior: The overload is loaded

Actual behavior: The overload isn't loaded

Solution: Use the MainFactory to load the GXSmarty class
GXMainComponents/View/ThemeContentViews/core/ThemeContentView.inc.php

$this->v_coo_smarty = MainFactory::create('GXSmarty');

========================================================================================

Im Theme System kann man Smarty nicht überladen, weil die ThemeContentView Klasse Smarty direkt erzeugt (ohne MainFactory). Dadurch ist kein Overloading der Smarty Klasse möglich.

Schritte zum Reproduzieren:

  1. Erzeuge einen Overload der GXSmarty Klasse
  2. Aktiviere ein Theme
  3. Öffne den Shopbereich
  4. Prüfe, ob der Overload geladen wird

Erwartetes Verhalten: Der Overload wird geladen

Aktuelles Verhalten: Der Overload wird nicht geladen

Lösung: Verwende die MainFactory, um die GXSmarty Klasse zu laden
GXMainComponents/View/ThemeContentViews/core/ThemeContentView.inc.php

$this->v_coo_smarty = MainFactory::create('GXSmarty');

Aktionen

Auch abrufbar als: Atom PDF