Jump to content

  • You cannot start a new topic
  • You cannot reply to this topic

Logical Mistake In Core.js Rate Topic   - - - - -

 
  • impulsgraw
  • Newbie
  • Trial users
  • Join Date: 28-Jan 18
  • 1 posts

Posted 28 January 2018 - 12:29 AM #1

Dear developers, please consider code in file /js/tygh/core.js starting from line 996 (CS Cart version 4.3.9):

var dlg = $('.cm-dialog-auto-open');
dlg.ceDialog('open', $.ceDialog('get_params', dlg));

There is a logical error admitted in a code sample. As dlg.length can be greater than 1, so, what is the definite result of $.ceDialog('get_params', dlg) ? Result of invocation of $.ceDialog.bind('get_params') in this case returns params of the whole dlg objects collection, which is incorrect. The correct behavior can be reproduced by something like

$('.cm-dialog-auto-open').each(function(){
    $(this).ceDialog('open', $.ceDialog('get_params', this));
});

Regards.



 
  • eComLabs
  • CS-Cart Expert
  • Authorized Reseller
  • Join Date: 27-Jan 14
  • 19976 posts

Posted 29 January 2018 - 06:49 AM #2

Please post issue to the bug tracker

 

http://forum.cs-cart.com/tracker/


GET A FREE QUOTE | CS-Cart Add-ons | CS-Cart Licenses | CS-Cart Development | CS-Cart Design | Server Configuration | UniTheme and YOUPI
CS-Cart                USD 345     Multi-Vendor              USD 1250    Multi-Vendor PLUS           USD 3100 (2775)
CS-Cart Ultimate  USD 775     CS-Cart + YOUPI      USD 545      Multi-Vendor Ultimate       USD 7500 (6000)