Results 1 to 10 of 1684

Hybrid View

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

    Default Re: Dynamic Price Updater

    Ok, apologies for all the responses, i'm kinda brainstorming aloud!
    So it seems, that the comment out of the

    pdpt = test[a];

    Also has an effect on my other issue on the shopping cart page!
    So if i comment out that line to stop the zeros occuring on the product page, then it affects the 'continue button' on the shopping cart page.
    If i uncomment that line, all my sale items get messed up, however the 'continue button' then works fine ?!?!

    I then changed the small amount of text within the 'UPDATER_PREFIX_TEXT' incase this was causing and issue, but no, the 0.00
    s return.

    Of note, the dpu loads far far far quicker with the

    //pdpt = test[a];

    in place.

    When uncommented it takes 2 -3 seconds for the prices to load on screen.

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

    Default Re: Dynamic Price Updater

    Quote Originally Posted by Calljj View Post
    Further to this, can force the error.
    includes/modules/pages/product_info/jscript_dynamic_price_update.php

    Code:
     // use the spans to see if there is a discount occuring up in this here house
      var test = thePrice.getElementsByTagName("span");
      var psp = false;
        var pdpt = false;
    
      for (var a=0,b=test.length; a<b; a++) {
          
      if (test[a].className === "normalprice") {
          pdpt = test[a];
         
    Leaving like this on a sale/special/reduced priced product, that is priced by attributes (product price is zero, attributes do all the work) gives:
    Price 0.00 Price 123
    Price 0.00 Price 234
    Price 0.00 Price 456

    Code:
    <h2 id="productPrices" class="productGeneral"><font size="0.5" color="#636363">Price: </font><font size="0.5" color="#636363">Price: </font><span class="normalprice">£0.00</span>&nbsp;<span class="productSpecialPrice"><font size="0.5" color="#636363">Price: </font>£726.75</span><span class="productPriceDiscount"><br>Save:&nbsp;25% off</span> 
     </h2>

    Comment out the
    Code:
    pdpt = test[a];
    And gives the same (lowest priced attribute) starting price for all the different priced attributes

    price 999 price 123
    price 999 price 234
    price 999 price 456


    My html on page is as follows:

    Code:
    <h2 id="productPrices" class="productGeneral">
    <font size="0.5" color="#636363">Price: </font><span class="normalprice">£969.00 </span>&nbsp;<span class="productSpecialPrice"><font size="0.5" color="#636363">Price: </font>£951.75</span><span class="productPriceDiscount"><br>Save:&nbsp;25% off</span> 
     </h2>


    /languages/english/extra_definitions/dynamic_price_updater.php contents:

    Code:
    <?php
    /**
    * @package Dynamic Price Updater
    * @author Design75
    * @version 3.0
    * @licence This module is released under the GNU/GPL licence
    */
    
    define('BOX_HEADING_DYNAMIC_PRICE_UPDATER_SIDEBOX', 'Price Breakdown'); // the heading that shows in the Updater sidebox
    define('DPU_BASE_PRICE', 'Base price');
    
    define('UPDATER_PREFIX_TEXT', '<font size="0.5" color="#636363">Price: </font>');
    define('UPDATER_PREFIX_TEXT_STARTING_AT', 'Starting at: ');
    define('UPDATER_PREFIX_TEXT_AT_LEAST', 'At least: ');
    define('DPU_SHOW_QUANTITY_FRAME', '&nbsp;(%s)');
    define('DPU_SIDEBOX_QUANTITY_FRAME', '&nbsp;x&nbsp;%s'); // how the weight is displayed in the sidebox.  Default is ' x 1'... set to '' for no display... %s is the quantity itself
    define('DPU_SIDEBOX_PRICE_FRAME', '&nbsp;(%s)'); // how the attribute price is displayed
    define('DPU_SIDEBOX_TOTAL_FRAME', '<span class="DPUSideboxTotalText">Total: </span><span class="DPUSideboxTotalDisplay">%s</span>'); // this is how the total should be displayed.  %s is the price itself as displayed in the
    define('DPU_SIDEBOX_FRAME', '<span class="DPUSideBoxName">%1$s</span>%3$s%2$s<br />'); // the template for the sidebox display.  Instructions below
    /*
     *DPU_SIDEBOX_FRAME has 3 variables you can use... They are:
     * %1$s - The attribute name
     * %2$s - The quantity display
     * %3$s - The individual price display
     * You can position these anywahere around the DPU_SIDEBOX_FRAME string or even remove them to prevent them from displaying
     */
    I've been thinking about this issue over the last week, trying to figure out how it is possible that with a fully installed series of software that
    1) The normalprice would get updated but.
    2) That the price presented as an update is 0.00.

    Just a few minutes ago, I thought about comparing the above provided code that is currently bolded to see if there was anything obvious considering that at least recently no web page has been presented for independent review (ie. posted with the likes of mysiteDOTcom). And the thing is that I do not see a history along the master path of the software that shows this code section as presented:

    Code:
     // use the spans to see if there is a discount occuring up in this here house
      var test = thePrice.getElementsByTagName("span");
      var psp = false;
        var pdpt = false;
    
      for (var a=0,b=test.length; a<b; a++) {
          
      if (test[a].className === "normalprice") {
          pdpt = test[a];
    There is some "key" code missing and if it has been relocated for some reason, that too has not been explained. The code snippet in this area should be:
    Code:
      // use the spans to see if there is a discount occuring up in this here house
      var test = thePrice.getElementsByTagName("span");
      var psp = false;
      var a;
      var b = test.length;
      var pdpt = false;
    
      for (a = 0; a < b; a += 1) {
        if (test[a].className === "normalprice") {
          pdpt = test[a];
    The for loop had been modified 10 months ago as part of 3.2.0 and before that the if statement checking for normalprice didn't exist, so there has been some amount of editing performed. Even within the code, there are other cases of using the variable a and a similar loop performed; however, the loop does not evaluate the normalprice className. If I remember correctly that was on purpose in the event of some sort of communication failure that at least a price remained visible, but I could be wrong there throughout. I would have to look again to see if there really is a reason to not evaluate normalprice in the other situations.

    Regardless, there is something that has been modified from the provided files and those changes have not been explained nor presented. As such I would not be surprised that the modifications (or lack of incorporation of changes) have caused the issues observered. I'm open to trying to further investigate but am not seeing the behavior that has been described when the provided software is loaded in full as provided.
    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

    just replaced all files from fresh donwload of 3.2
    issue is exactly the same.
    happy to pm url for you to see.

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

    Default Re: Dynamic Price Updater

    Quote Originally Posted by Calljj View Post
    just replaced all files from fresh donwload of 3.2
    issue is exactly the same.
    happy to pm url for you to see.
    Not fully done with the review, but I have at least found a few things with the applicable site. Appears that the jscript_responsive_framework.php file from includes/templates/template_default/jscript is not placed in the site's template directory. This means that the old XHR style of communication is used instead of the zcJS ajax method that is more built into ZC. I also noticed that there is a javascript error on at least one of the pages. In using Facebook pixel, the price (value) of the product > 999 is pushed to the page without any escape of the comma or quotes around the value. This results in a javascript error of SCRIPT1003: Expected ':' where the content is similar to the following:

    Code:
    fbq('track', 'ViewContent', {
    content_ids: ['1234'],
    content_type: 'product',
    value: 1,026.97,
    currency: 'GBP'
    });
    Basically could be seen as:
    Code:
    fbq('track', 'ViewContent', {
    content_ids: ['1234'],
    content_type: 'product',
    
    value: 1,
    026.97,
    
    currency: 'GBP'
    });
    Based on standard formatting it would "look" like the above and appear to be missing the right side of the parameter in the second row of red.

    My preliminary review so far is that there is something in this troubled store that has either modified the shopping_cart class or through observation modifies the operation. I can see that the data returned from the inside calculations at this site is indicating that a sale product has an "original" price
    ('preDiscPriceTotal')
    of 0.00, but I don't know what is causing that and whether it is related to changes made to attempt to adjust for tax.

    Possibly more to follow.
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

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

    Default Re: Dynamic Price Updater

    Quote Originally Posted by mc12345678 View Post

    Possibly more to follow.
    Thanks for looking.
    moved the file across.
    removed the comma from facebook pixel (although facebook was reading it fine through the Chrome Pixel addon checker thingy)
    still no change.

  6. #6
    Join Date
    Jan 2010
    Location
    France
    Posts
    291
    Plugin Contributions
    0

    Default Re: Dynamic Price Updater

    Google reports errors 400 Dynamic Price Updater (Version Installed) 3.2.0

    https://www.MYDOMAIN/ajax.php?produc...hod=dpu_update
    https://www.MYDOMAIN/ajax.php?produc...hod=dpu_update
    https://www.MYDOMAIN/ajax.php?produc...hod=dpu_update
    https://www.MYDOMAIN/ajax.php?produc...hod=dpu_update
    https://www.MYDOMAIN/ajax.php?produc...hod=dpu_update
    https://www.MYDOMAIN/ajax.php?produc...hod=dpu_update
    https://www.MYDOMAIN/ajax.php?produc...hod=dpu_update
    https://www.MYDOMAIN/ajax.php?produc...hod=dpu_update
    https://www.MYDOMAIN/ajax.php?produc...hod=dpu_update
    https://www.MYDOMAIN/ajax.php?produc...hod=dpu_update
    https://www.MYDOMAIN/ajax.php?produc...hod=dpu_update
    https://www.MYDOMAIN/ajax.php?produc...hod=dpu_update
    https://www.MYDOMAIN/ajax.php?produc...hod=dpu_update
    https://www.MYDOMAIN/ajax.php?produc...hod=dpu_update
    https://www.MYDOMAIN/ajax.php?produc...hod=dpu_update
    https://www.MYDOMAIN/ajax.php?produc...hod=dpu_update
    https://www.MYDOMAIN/ajax.php?produc...hod=dpu_update
    https://www.MYDOMAIN/ajax.php?produc...hod=dpu_update
    https://www.MYDOMAIN/ajax.php?produc...hod=dpu_update
    https://www.MYDOMAIN/ajax.php?produc...hod=dpu_update
    https://www.MYDOMAIN/ajax.php?produc...hod=dpu_update
    https://www.MYDOMAIN/ajax.php?produc...hod=dpu_update
    https://www.MYDOMAIN/ajax.php?produc...hod=dpu_update
    https://www.MYDOMAIN/ajax.php?produc...hod=dpu_update
    https://www.MYDOMAIN/ajax.php?produc...hod=dpu_update
    https://www.MYDOMAIN/ajax.php?produc...hod=dpu_update
    https://www.MYDOMAIN/ajax.php?produc...hod=dpu_update
    https://www.MYDOMAIN/ajax.php?produc...hod=dpu_update
    https://www.MYDOMAIN/ajax.php?produc...hod=dpu_update
    https://www.MYDOMAIN/ajax.php?produc...hod=dpu_update
    https://www.MYDOMAIN/ajax.php?produc...hod=dpu_update
    https://www.MYDOMAIN/ajax.php?produc...hod=dpu_update
    https://www.MYDOMAIN/ajax.php?produc...hod=dpu_update
    https://www.MYDOMAIN/ajax.php?produc...hod=dpu_update
    https://www.MYDOMAIN/ajax.php?produc...hod=dpu_update
    https://www.MYDOMAIN/ajax.php?produc...hod=dpu_update
    https://www.MYDOMAIN/ajax.php?produc...hod=dpu_update
    https://www.MYDOMAIN/ajax.php?produc...hod=dpu_update
    https://www.MYDOMAIN/ajax.php?produc...hod=dpu_update
    https://www.MYDOMAIN/ajax.php?produc...hod=dpu_update
    https://www.MYDOMAIN/ajax.php?produc...hod=dpu_update
    https://www.MYDOMAIN/ajax.php?produc...hod=dpu_update
    https://www.MYDOMAIN/ajax.php?produc...hod=dpu_update
    https://www.MYDOMAIN/ajax.php?produc...hod=dpu_update
    https://www.MYDOMAIN/ajax.php?produc...hod=dpu_update
    https://www.MYDOMAIN/ajax.php?produc...hod=dpu_update
    https://www.MYDOMAIN/ajax.php?produc...hod=dpu_update
    https://www.MYDOMAIN/ajax.php?produc...hod=dpu_update
    https://www.MYDOMAIN/ajax.php?produc...hod=dpu_update
    https://www.MYDOMAIN/ajax.php?produc...hod=dpu_update
    https://www.MYDOMAIN/ajax.php?produc...hod=dpu_update
    https://www.MYDOMAIN/ajax.php?produc...hod=dpu_update
    https://www.MYDOMAIN/ajax.php?produc...hod=dpu_update
    https://www.MYDOMAIN/ajax.php?produc...hod=dpu_update
    https://www.MYDOMAIN/ajax.php?produc...hod=dpu_update
    https://www.MYDOMAIN/ajax.php?produc...hod=dpu_update
    https://www.MYDOMAIN/ajax.php?produc...hod=dpu_update
    https://www.MYDOMAIN/ajax.php?produc...hod=dpu_update
    https://www.MYDOMAIN/ajax.php?produc...hod=dpu_update
    https://www.MYDOMAIN/ajax.php?produc...hod=dpu_update
    https://www.MYDOMAIN/ajax.php?produc...hod=dpu_update
    https://www.MYDOMAIN/ajax.php?produc...hod=dpu_update
    https://www.MYDOMAIN/ajax.php?produc...hod=dpu_update
    https://www.MYDOMAIN/ajax.php?produc...hod=dpu_update
    https://www.MYDOMAIN/ajax.php?produc...hod=dpu_update
    https://www.MYDOMAIN/ajax.php?produc...hod=dpu_update
    https://www.MYDOMAIN/ajax.php?produc...hod=dpu_update
    https://www.MYDOMAIN/ajax.php
    https://www.MYDOMAIN/ajax.php?produc...hod=dpu_update
    https://www.MYDOMAIN/ajax.php?produc...hod=dpu_update
    https://www.MYDOMAIN/ajax.php?produc...hod=dpu_update
    https://www.MYDOMAIN/ajax.php?produc...hod=dpu_update
    Giovanni,
    Zen Cart V2.1

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

    Default Re: Dynamic Price Updater

    Well, this is expected behavior based on the code associated with ajax requested and as incorporated in ZC 1.5.6 (which has been incorporated into this version of DPU).

    Essentially it has been determined that there is no value in indexing the ajax response.
    (Especially when the response requires data to be posted )
    Last edited by mc12345678; 13 Sep 2018 at 02:30 PM.
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  8. #8
    Join Date
    Jul 2012
    Posts
    16,816
    Plugin Contributions
    17

    Default Re: Dynamic Price Updater

    Quote Originally Posted by Calljj View Post
    Thanks for looking.
    moved the file across.
    removed the comma from facebook pixel (although facebook was reading it fine through the Chrome Pixel addon checker thingy)
    still no change.
    I still have not been able to reproduce this issue in a default store that has just DPU installed, regardless of tax included or not, without a change in base price nor with a special, a sale, or both.
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

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

    Default Re: Dynamic Price Updater

    Quote Originally Posted by mc12345678 View Post
    I still have not been able to reproduce this issue in a default store that has just DPU installed, regardless of tax included or not, without a change in base price nor with a special, a sale, or both.
    So can you just confirm for me.
    1) you set up a product with zero value priced only by attributes.
    2) you set up 3 attributes, priced at 10, 20, 30 (without the 'plus' sign infront in attribute manager).
    3) you go to products price manager, and add a special price of "10%".
    then on the website the original price (and of course sale price) changes when you select different atrributes?

    I pretty confident it wont. I don;t think becuase of dpu, i think becuase of the way zen handles special prices, with products of zero value and priced by attributes.

    for example, if you had everything setup as above, if you deleted the top attribute priced at 10, then the new attribute is assigned the sale price of the one deleted! This obviously then changes the overall disocunt on the new lowest attribute to be much more than intended!
    original:
    Click image for larger version. 

Name:	Untitled-1.jpg 
Views:	86 
Size:	18.5 KB 
ID:	18030
    10% discount:
    Click image for larger version. 

Name:	Untitled-2.jpg 
Views:	71 
Size:	10.6 KB 
ID:	18031
    Because zen converts the "special price" discount to an actual numerical value. Then that value then becomes the minimum used for that product, no matter the attributes.
    After deleting top attribute, price of second attribute gets changed to the value of the deleted one.
    Click image for larger version. 

Name:	Untitled-3.jpg 
Views:	71 
Size:	8.5 KB 
ID:	18032
    You can see this, buy then adding the attributes back in again, using same values as deleted, and everything returns to normal once more.

 

 

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