Results 1 to 10 of 1684

Hybrid View

  1. #1
    Join Date
    Mar 2009
    Location
    Essex, UK
    Posts
    446
    Plugin Contributions
    0

    Default Re: Price Updater - plugin keeps disabling

    Hi mc

    Thanks for the advice ref the ZenID. I have set this properly now.

    How can I add a suffix to the 2nd price?

    Just to pinpoint, this is the price which shows below the add cart button at https://sitstandforbusiness.com/heig...dule-p-29.html
    Debbie Harrison
    DVH Design | Web Design blog

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

    Default Re: Price Updater - plugin keeps disabling

    Quote Originally Posted by dharrison View Post
    Hi mc

    Thanks for the advice ref the ZenID. I have set this properly now.

    How can I add a suffix to the 2nd price?

    Just to pinpoint, this is the price which shows below the add cart button at https://sitstandforbusiness.com/heig...dule-p-29.html
    Unable to access your site at the moment to identify the details of what is going on; however, if all that is needed is to add something at the end of the text, then this could be done within the includes/modules/pages/product_info/jscript_dynamic_price_updater.php file within the objXHR.prototype.updSP = function () { section such as:

    Code:
        if (objSP === false) { // create the second price object
          if (!temp || !itemp) {
            flag = true;
          }
          if (!flag) {
            objSP = temp.cloneNode(true);
            objSP.id = temp.id + "Second";
            itemp.parentNode.insertBefore(objSP, itemp.nextSibling);
          }
        }
        objSP.innerHTML = temp.innerHTML + " suffix";
    The content between the double quotes could be php provided to depend on settings of the store or to use a constant that is language dependent for example.
    Code:
        objSP.innerHTML = temp.innerHTML + " <?php if ($condition) { echo CONSTANT;} else { echo CONSTANT2; } ?>";
    If the suffix is to be added elsewhere within the content, then some additional javascript or other php could/would be used to split out temp.innerHTML to the desired parts in order to insert the associated text.

    This area was chosen because the updSP (Second price location) is not presented until one of the attributes has been changed and that text is dependent on/reflects the content of the primary price display.
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  3. #3
    Join Date
    Mar 2009
    Location
    Essex, UK
    Posts
    446
    Plugin Contributions
    0

    Default Re: Price Updater - plugin keeps disabling

    Thanks. The first method worked.
    Debbie Harrison
    DVH Design | Web Design blog

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

    Default Re: Price Updater - plugin keeps disabling

    Quote Originally Posted by dharrison View Post
    Thanks. The first method worked.
    Glad that worked.

    The "second" method is intended to support multiple languages and demonstrates a simple if/then/else comparison or operation, but requires at least one define to be added into the includes/languages file structure such as either at the base language file includes/languages/YOUR_LANGUAGE.php (overrideable at includes/languages/YOUR_TEMPLATE/YOUR_LANGUAGE.php) or the applicable product type (also overrideable) as in includes/languages/YOUR_LANGUAGE/product_info.php or preferably includes/languages/YOUR_LANGUAGE/YOUR_TEMPLATE/product_info.php for example. If placed in the individual product type file, then it would need to be duplicated across product types used on the site; however, by being placed in the probably more preferred overridden main language file, then it is entered once and applied across all product types that may be used in the store.

    The define(s) would be similar to:
    Code:
      define('CONSTANT', 'suffix text');
     define('CONSTANT2', 'other suffix text');
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

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

    Default Re: Price Updater - plugin keeps disabling

    Apologies for the late notification.

    Last weekend, I uploaded an updated copy of DPU for review; however, in true fashion shortly after doing so I discovered a couple of issues when I attempted to use the features from a specific mobile device which ultimately was a result of using a default value in a parameter within the javascript code. By review of javascript discussions, this shouldn't have been a problem, but it would seem that the particular device wasn't playing by "today's" standards, so a resolution to that has been created. Also, in rewriting a portion of the dpu class code, I had not taken into account changes that would be needed for the provided/included sidebox. Also, the newly included installer includes a check for updated versions; however, it also expects the ability to disable version checking which was not included in the installer sql.

    Anyways, all of that said, I am working on the instruction to address the updates/modifications most of which are available currently from github: https://github.com/mc12345678/Dynamic_Price_Updater

    So stay tuned for version 3.0.6, I would like to have it pushed to the forum for review over the weekend, other projects pending.

    Version 3.0.5:
    - Improved installation/installer
    - Previous process for installation included a delete of previous settings. This is now performed using insert ignore style sql and as necessary to update settings with a focus of configuration sort order.
    - Rewrote the data collection about a product to improve ability to compare to the active cart.
    - If using the class function of insertProducts, the resulting prid is an integer only and does not include the possibility of addressing attributes based on the change(s) made here. This is equivalent to a standard product being listed in the product listing screen being added to the cart where attributes are "typically" not selectable.
    - Modified quantity reporting to provide quantity already in cart for selected attributes if the quantity is greater than zero.
    - Incorporated forum correction for operation when DPU_SHOW_LOADING_IMAGE is set to false.
    - Added JSON response information when retrieving results.
    - Incorporated the use of Zen Cart's provided zcJS when it is available.
    - Made the DPU class part of the overall system to better support additional observers as needed.
    - Maintained the "default" XML response if JSON is not requested to align with potential historical alterations.
    - Added the restoration of the price display if the transaction fails.
    - Added jscript function to perform data/screen update/swap.
    Available here.
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

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

    Default Re: Price Updater - plugin keeps disabling

    Submitted v3.0.6, awaiting review. When posted should be available from here: https://www.zen-cart.com/downloads.php?do=file&id=1301

    Description provided:
    3.0.6:
    - Modified/updated the class information to provide the sidebox data.
    - Correct additional javascript errors to prevent having to catch them.
    - Modified sidebox to not display/be active if the page's javascript for dpu is not active.
    - Added additional type casting to force data to the expected type.
    - Incorporate the tax calculation correction posted in the forum into the code.
    - Removed the use of default parameters because some browsers do/did not support it.
    - Add separate control for update checking of this plugin.
    - Updated installer version check to ZC 1.5.5e version.
    - Corrected installer code to validate new version exists.
    Anyone that has fully installed version 3.0.5 should be notified through their admin when version 3.0.6 is made available for download.
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

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

    Default Re: Price Updater - plugin keeps disabling

    Quote Originally Posted by mc12345678 View Post
    Submitted v3.0.6, awaiting review. When posted should be available from here: https://www.zen-cart.com/downloads.php?do=file&id=1301

    Description provided:


    Anyone that has fully installed version 3.0.5 should be notified through their admin when version 3.0.6 is made available for download.
    Version 3.0.6 has been posted for download; however, there were a few additional things discovered that are addressed in version 3.0.7 (also on github):
    3.0.7, What changed:
    - Corrected issue that price of product without attributes was not incorporated/considered because
    the dpu javascript code basically prevented overwriting the price until corrections were made
    in version 3.0.6 that would automatically rewrite the current price display based on what
    dpu determined based on the product. (This additional feature was added to support display of
    the appropriate information when returning to the product from the shopping cart.)
    - Because the price is automatically calculated based on arriving at a product, if a product is
    priced by attributes and not all of the "mandatory" attributes are selected then the price
    was only showing the price point of those that were selected. The code now calculates the
    lowest available price based on the selections already made. The displayed text has not been
    edited to account for this "feature" yet, but could be modified to support the condition.
    Only the dpu class file was modified in version 3.0.7 as compared to 3.0.6 and the addition of the installer "version" file.

    When the software review team has made it through the review and posting of the update it should be available here: https://www.zen-cart.com/downloads.php?do=file&id=1301

    Welcome further feedback/suggestions of how these additional features/calculations are presented. See at least one place where an additional notifier could maybe add some functionality to the code.
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

 

 

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