Page 1 of 2 12 LastLast
Results 1 to 10 of 1684

Hybrid View

  1. #1
    Join Date
    Mar 2007
    Posts
    251
    Plugin Contributions
    6

    Default Re: Dynamic Price Updater

    Quote Originally Posted by mc12345678 View Post
    This is the function in question at the end of the file:

    $data is an array that is created in the function, $this->responseText is populated throughout the class, but it contains only the key/response information captured throughout the process and XML is not at all captured in that process from what I see of the file. The die at the end of each if statement is present to prevent processing any further information.
    outputs:

    Code:
     Array
    (
        [responseType] => success
        [data] => Array
            (
                [priceTotal] => <font size="0.5" color="#636363">Price: </font>&pound;909.00
                [preDiscPriceTotalText] => <font size="0.5" color="#636363">Price: </font>
                [preDiscPriceTotal] => &pound;757.50
                [stock_quantity] => 1
                [weight] => 7
            )
    
    )

  2. #2
    Join Date
    Jul 2012
    Posts
    16,817
    Plugin Contributions
    17

    Default Re: Dynamic Price Updater

    Quote Originally Posted by Calljj View Post
    outputs:

    Code:
     Array
    (
        [responseType] => success
        [data] => Array
            (
                [priceTotal] => <font size="0.5" color="#636363">Price: </font>&pound;909.00
                [preDiscPriceTotalText] => <font size="0.5" color="#636363">Price: </font>
                [preDiscPriceTotal] => &pound;757.50
                [stock_quantity] => 1
                [weight] => 7
            )
    
    )
    Would you mind trying something?

    file: includes/modules/pages/product_info/jscript_dynamic_price_updater.php
    Line: 137

    Change:
    Code:
    _this.responseJSON = jqXHR.responseJSON;
    to:
    Code:
    _this.responseJSON = response;
    Also, could you in the watch screen enter the following and identify what version of software we are talking about?
    Code:
    jQuery.fn.jquery
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  3. #3
    Join Date
    Mar 2007
    Posts
    251
    Plugin Contributions
    6

    Default Re: Dynamic Price Updater

    Quote Originally Posted by mc12345678 View Post
    Would you mind trying something?

    file: includes/modules/pages/product_info/jscript_dynamic_price_updater.php
    Line: 137

    Change:
    Code:
    _this.responseJSON = jqXHR.responseJSON;
    to:
    Code:
    _this.responseJSON = response;
    Also, could you in the watch screen enter the following and identify what version of software we are talking about?
    Code:
    jQuery.fn.jquery
    so changing the line not made any difference, the error is thrown back as a result of the request, whereas that line is processing a successfull request?

    jquery gives 3.2.1

    thanks for continued help on this.

  4. #4
    Join Date
    Jul 2012
    Posts
    16,817
    Plugin Contributions
    17

    Default Re: Dynamic Price Updater

    Quote Originally Posted by Calljj View Post
    so changing the line not made any difference, the error is thrown back as a result of the request, whereas that line is processing a successfull request?

    jquery gives 3.2.1

    thanks for continued help on this.
    That seem to indicate that for some reason returning from the class back to the page, the data is basically being stripped...

    By making that change, the variable _this.responseJSON was supposed to be set to the response data, the if statement is intended to offer an alternate way of processing as has/had been identified maybe possible; however, now the responseText seems to not be formatted within the parse call to support making that conversion. So need to see what can be done/altered for that.

    Can you also provide the value of responseText as identified just before that error? I'm going to try to see what I can offer as a modified suggestion, but I'm also wondering if some other header information needs to be sent from the class to prevent "screening" the data away.
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  5. #5
    Join Date
    Jul 2012
    Posts
    16,817
    Plugin Contributions
    17

    Default Re: Dynamic Price Updater

    Quote Originally Posted by Calljj View Post
    so changing the line not made any difference, the error is thrown back as a result of the request, whereas that line is processing a successfull request?

    jquery gives 3.2.1

    thanks for continued help on this.
    Could you try:
    in includes/classes/dynamic_price_updater.php
    at/around line 746
    just below:
    Code:
          // output the header for JSON
          header('Content-Type: application/json');
    adding:
    Code:
          header('X-Content-Type-Options: nosniff');
    so that area of the code would look like:
    Code:
          // output the header for JSON
          header('Content-Type: application/json');
          header('X-Content-Type-Options: nosniff');
    By the way is this happening on one browser only or any?
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  6. #6
    Join Date
    Mar 2007
    Posts
    251
    Plugin Contributions
    6

    Default Re: Dynamic Price Updater

    Quote Originally Posted by mc12345678 View Post
    Could you try:
    so that area of the code would look like:
    Code:
          // output the header for JSON
          header('Content-Type: application/json');
          header('X-Content-Type-Options: nosniff');
    By the way is this happening on one browser only or any?
    Changed code,no difference.
    happening on all browsers.

  7. #7
    Join Date
    Jul 2012
    Posts
    16,817
    Plugin Contributions
    17

    Default Re: Dynamic Price Updater

    Quote Originally Posted by Calljj View Post
    Changed code,no difference.
    happening on all browsers.
    Done a little more leg work... Looks like there might be an extra "blank" line somewhere in the process.

    Check the following file to ensure that before the first <?php that there is no "hidden" character or return. If necessary delete the entire first line and retype the text of that line using your favorite plain text editor. Or should be able to copy the file from the latest distribution or from github.

    includes/classes/ajax/zcDPU_Ajax.php

    Also be sure that there is no closing ?> in the files. Having such a closing followed by a return could cause the same issue.

    Further, I highly suspect the includes/classes/ajax/zcDPU_Ajax.php file as having from a while back the UTF8 BOM (Byte Order Mark) "character" that was accidentally added in when I was working on various filetypes some time ago. The file may look the same as the current version, but it is not and it will cause the problem described. I'll try to see if there is anything there in the current fileset, but if installation was done by comparison, then that character may have been missed. It is not a visible character like the text on this screen, but it would provide the opening content of the responseText where it shows: \r\n\ufeff

    Once the responseText is "parsed" it turns that section into a carriage returned new line with the BOM character being the first character on the second line that is causing the issue.

    Whatever method you use, could you please explain what was tried, what worked, and what didn't? I know someone else was having a somewhat similar problem, but it hadn't dawned on me as much about what was going on.
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  8. #8
    Join Date
    Mar 2007
    Posts
    251
    Plugin Contributions
    6

    Default Re: Dynamic Price Updater - SOLVED

    Quote Originally Posted by mc12345678 View Post
    Further, I highly suspect the includes/classes/ajax/zcDPU_Ajax.php file as having from a while back the UTF8 BOM (Byte Order Mark) "character" that was accidentally added in when I was working on various filetypes some time ago.

    So problem finally solved!
    I would never have even thought of looking at the encoding issues of a file, the first time i've come across such an issue!
    Indeed, it was not a character that was the issue, but the entire includes/classes/ajax/zcDPU_Ajax.php file being encoded in UTF8-BOM.
    I opened the file in notepad++, changed the encoding to standard UTF8 and saved, and worked instantly!
    Thank you again for your patience.

  9. #9
    Join Date
    Dec 2006
    Location
    near Atlanta Georgia
    Posts
    217
    Plugin Contributions
    0

    Default Re: Dynamic Price Updater

    Any idea when the v4.0.0 will be out of beta?
    Best,
    Goldbuckle

  10. #10
    Join Date
    Apr 2008
    Posts
    446
    Plugin Contributions
    1

    Default Re: Dynamic Price Updater

    Hello. I'm having an issue with a brand new ZC installation. ZC version is 1.5.7d and the latest of this module found in the plugin area.

    DPU works fine, except on radio buttons. For some reason the wheel won't stop spinning.

    I remember I had this or similar issue a few years back, and we had made changes to a few files.

    The files we modified were the pages>product_info>jscript_dynamic_price_updater.php and the includes>classes>dynamic_price_updater.php.

    This is the page where the issue appears https://www.byvalenti.com/ZCBASE/tin...ul-colors-p-33

    Would you be able to help out?

    Thank you!
    Last edited by mvstudio; 17 Mar 2022 at 04:16 PM.

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. v151 Help with dynamic price updater
    By anderson6230 in forum All Other Contributions/Addons
    Replies: 1
    Last Post: 23 Jul 2014, 08:52 AM
  2. v139h Dynamic Price Updater 3.0 Help!
    By Newbie 2011 in forum All Other Contributions/Addons
    Replies: 0
    Last Post: 12 Mar 2014, 06:46 AM
  3. Dynamic Price Updater Error
    By Inxie in forum All Other Contributions/Addons
    Replies: 4
    Last Post: 26 Oct 2012, 06:19 PM
  4. Alternative to Dynamic Price Updater?
    By thebigkick in forum General Questions
    Replies: 0
    Last Post: 9 Jul 2012, 11:41 PM
  5. Dynamic Price Updater with href
    By maxell6230 in forum All Other Contributions/Addons
    Replies: 1
    Last Post: 1 Mar 2012, 12:34 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg