Jump to content

Standar Cart File JS on Plesk Windows


Recommended Posts

Hello,

I use WHMCS with plesk on windows I found that standar_cart when searching for a domain that does not run correctly, I found that the fault is in the file {$WEB_ROOT}/templates/orderforms/standard_cart/js/scripts.min.js?v={$versionHash}

I made a change to the file {$WEB_ROOT}/templates/orderforms/standard_cart/js/scripts.js?v={$versionHash} to inspect what the error was

I found that the functions in windows servers do not correctly convert the string into arrays

// primary lookup handler
            lookup.done(function (data) {
               jQuery.each(data.result, function(index, domain) {
                    var pricing = null,
                        result = jQuery('#primaryLookupResult'),
                        available = result.find('.domain-available'),
                        availablePrice = result.find('.domain-price'),
                        unavailable = result.find('.domain-unavailable'),

this is solved by adding the following statements to the functions data = JSON.parse(data);

// primary lookup handler
            lookup.done(function (data) {
                            data = JSON.parse(data);
                jQuery.each(data.result, function(index, domain) {
                    var pricing = null,
                        result = jQuery('#primaryLookupResult'),
                        available = result.find('.domain-available'),
                        availablePrice = result.find('.domain-price'),
                        unavailable = result.find('.domain-unavailable'),

I attached the js with the correction and a video of the error and how to solve it in windows

Video: https://drive.google.com/file/d/12c8EaGcDc326LvrsNlpCdK-ycW4u3Ce4/view 

scripts.js

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated