View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0005504 | OXID eShop (all versions) | 2.4. Administer products | public | 2013-11-06 12:29 | 2023-12-13 16:01 |
Reporter | michael_keiluweit | Assigned To | |||
Priority | normal | Severity | minor | Reproducibility | always |
Status | resolved | Resolution | fixed | ||
Product Version | 4.8.0 / 5.1.0 | ||||
Fixed in Version | 7.0.0 | ||||
Summary | 0005504: individual template for one article doesn't work anymore without adapting code | ||||
Description | To have an own alternative article detail page before 4.8 / 5.1 you could use the input field in the administration area "alternative template". But with 4.8 / 5.1 a widget is introduced which loads the fullproductinfo.tpl. To make the shop use your own fullproductinfo.tpl, you have to adapt the widget class oxwArticleDetails, especially the variable $_sThisTemplate. Then the widget loads the individual template. Currently you can only replace the file \application\views\azure\tpl\page\details\details.tpl and so you're losing the widget functionality when you wouldn't like to write a complete new widget for an alternative template. | ||||
Tags | No tags attached. | ||||
Theme | Azure | ||||
Browser | All | ||||
PHP Version | Not defined | ||||
Database Version | Not defined | ||||
|
workaround (in German): https://forum.oxid-esales.com/t/alternatives-template-fur-artikel-in-oxid-4-8-0/66924 |
|
Your workaround is the solution, which should better be placed in the doku here i think: https://oxidforge.org/en/widgets-in-4-7-5-0.html You can also think about passing the template all the way like this to the widget to be able to hold/repeat all the functionallity to the custom templates, like variant list getter or image getter, so on. [{... oxwtemplate=$oView->getTemplateName() ...}] |
|
I noticed oxwtemplate can be used in every widget, very nice! (Didn't realize this at first because functionality is in oxwidgetconrol) |
|
This is not a duplicate of 0006004 ! in my shop the alternative templates work fine except for the variants! |
|
I tried the workaround posted by martinwegele but it doesn't worked for me as described in the forum post. I used the hints and prepared the following solution for me: Copy and rename the following files: /application/views/[yourtheme]/page/details/details.tpl /application/views/[yourtheme]/page/details/inc/fullproductinfo.tpl /application/views/[yourtheme]/page/details/inc/productmain.tpl /application/views/[yourtheme]/widget/product/details.tpl In my description I renamed all the files with the suffix '2' (details.tpl -> details2.tpl). In your /page/details/details2.tpl: change [{oxid_include_widget cl="oxwArticleDetails" _parent=$oView->getClassName() nocookie=1 force_sid=$force_sid _navurlparams=$oViewConf->getNavUrlParams() _object=$oView->getProduct() anid=$oViewConf->getActArticleId() iPriceAlarmStatus=$oView->getPriceAlarmStatus() sorting=$oView->getSortingParameters() skipESIforUser=1}] to [{oxid_include_widget cl="oxwArticleDetails" oxwtemplate="widget/product/details2.tpl" _parent=$oView->getClassName() nocookie=1 force_sid=$force_sid _navurlparams=$oViewConf->getNavUrlParams() _object=$oView->getProduct() anid=$oViewConf->getActArticleId() iPriceAlarmStatus=$oView->getPriceAlarmStatus() sorting=$oView->getSortingParameters() skipESIforUser=1}] change [{include file="page/details/inc/fullproductinfo.tpl"}] to [{include file="page/details/inc/fullproductinfo2.tpl"}] In your fullproductinfo2.tpl: change [{include file="page/details/inc/productmain.tpl"}] to [{include file="page/details/inc/productmain2.tpl"}] In your productmain2.tpl: Do the changes you want. In your /widget/product/details2.tpl: change [{include file="page/details/details.tpl" blWorkaroundInclude=true}] to [{include file="page/details/details2.tpl" blWorkaroundInclude=true}] After these changes, set the alternative template in backend: page/details/details2.tpl This (modified) workaround was succesfully tested in v4.10.6 and v6.0.0 |
|
Works in OXID 7 |