View Issue Details

IDProjectCategoryView StatusLast Update
0006236OXID eShop (all versions)1. ----- eShop frontend -----public2024-02-29 07:11
Reporterkeywan.ghadami Assigned To 
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
Fixed in Version7.0.0 
Summary0006236: javascripts executed twice
DescriptionBehavior: scripts are executed twice when variants are switched on detail page.
Expected Behavior: custom javascripts are only executed once

Problem with the current behavior:
This can cause strange behavior on customized themes that include javascript which is not designed to be executed twice. For default shop functionality i could not find a problem yet.
Steps To Reproducefrom head:
1. add
[{oxscript add="alert('this message should only be displayed once but we will see..')"}] to htdocs\application\views\[YOUR_THEME]\tpl\page\details\inc\productmain.tpl
2. open a browser and navigate to a product (tested in Firefox)
3. the message will appear once (ok so far)
4. switch the variant by selecting color , size or whatever
5. the message appears -> press ok
6. the message appears again -> BUG



Additional Informationthe javascript:
htdocs\out\azure\src\js\widgets\oxarticlevariant.js
runs:
oxAjax.evalScripts( contentTarget );

This seams to be unnecessary because scripts are automatically executed by jquery in the moment they are added to the dom see "domManip" function in jquery i checked version 1.11.2 and 2.1.4.

btw i saw similar code in oxminibasket.js (duplicate code, so maybe we have the same problem here)
TagsNo tags attached.
ThemeNot defined
BrowserNot defined
PHP VersionNot defined
Database VersionNot defined

Activities

keywan.ghadami

2015-10-05 17:13

reporter   ~0011250

Last edited: 2015-10-05 17:14

EE 5.2.5

Sven Brunk

2024-02-29 07:11

administrator   ~0016324

This was fixed in the latest version of the framework with Twig and the Apex theme