View Issue Details

IDProjectCategoryView StatusLast Update
0005504OXID eShop (all versions)2.4. Administer productspublic2023-12-13 16:01
Reportermichael_keiluweit Assigned To 
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
Product Version4.8.0 / 5.1.0 
Fixed in Version7.0.0 
Summary0005504: individual template for one article doesn't work anymore without adapting code
DescriptionTo 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.
TagsNo tags attached.
ThemeAzure
BrowserAll
PHP VersionNot defined
Database VersionNot defined

Relationships

has duplicate 0005707 closedsvetlana alternative template can't show variants and stuff from oxw class 
related to 0006004 resolvedSvenBrunk Alternative Template is not used with variants 

Activities

martinwegele

2013-11-06 18:33

reporter   ~0009238

Last edited: 2018-01-11 10:03

workaround (in German): https://forum.oxid-esales.com/t/alternatives-template-fur-artikel-in-oxid-4-8-0/66924

suabo

2014-03-20 18:19

reporter   ~0009670

Last edited: 2018-01-11 10:01

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() ...}]

leofonic

2014-04-16 23:11

reporter   ~0009845

Last edited: 2014-04-17 00:49

I noticed oxwtemplate can be used in every widget, very nice!

(Didn't realize this at first because functionality is in oxwidgetconrol)

wiedeking

2014-12-18 14:41

reporter   ~0010555

This is not a duplicate of 0006004 !

in my shop the alternative templates work fine except for the variants!

Steven

2018-01-12 11:26

developer   ~0012351

Last edited: 2018-01-12 11:26

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

SvenBrunk

2023-12-13 16:01

administrator   ~0016081

Works in OXID 7