Dynamic Price Updater

Description
The Dynamic Price Updater is a module for Zen Cart that automatically updates the price display on product pages when a visitor changes an attribute or adjusts the cart quantity + Download Latest

Forum Support Thread

Submit An Updated Version


Github Repository
Zen Cart® Versions v1.5.1, v1.5.3, v1.5.4, v1.5.5
Original Author Chrome
Last Updated by mc12345678 - 22 Nov 2017
Downloads 4,617

Version History

Dynamic Price Updater   -   Version: 3.2.0
3.2.0, What changed:
- Identified this version as 3.2.0 because 1) this update provided significant new functionality and modified/provided new database features and 2) 3.1.0 had previously been identified in the github path/history and did not want to cause undo confusion.
- Commented out code that performed no operation/action.
- Added an update to the customer's latest page when using an ajax style call to improve display of information on the who's online admin page.
- Added a method to update price text to represent when none and less than all attributes have been selected.
- Added DPU_ATTRIBUTES_MULTI_PRICE_TEXT to be able to control which of the pretext(s) to allow to show.
- Added a variable to be able to update/display the text before the first price when price includes a special and/or a sale.
- Added ability to update what is known as the normalprice which is the price/value that is crossed out when there is a sale or other special.
- Added stock quantity update capability which incorporates the possibility of operating with ZC 1.5.x and control how the information is replaces other content. Guidance for display modifications provided in readme.txt.
- Corrected use of float casting to use code published in ZC 1.5.6 to support strict server mode.
- Reworked code to better account and control sub-functional area execution.
- Removed single quotes from SQL queries that included casted integers to minimize further processing.
- Expanded attribute text switching to more than product priced by attribute such that should apply to product that have attributes that affect the base price.
- Corrected price display and determination to include pricing associated with text (word and/or letter pricing, etc...)
- Updated javascript side to use exactly equal to instead of loosely comparing two values (in a majority of examples.
- Switched javascript calls to use dot notation where able.
- Added a fallback attempt for collecting/setting JSON response if responseJSON is empty but a non-fault responseText is provided.
- Moved javascript variable declaration out of most function calls.
- Corrected an issue reported by mvstudio of where the expected text to be in front of the priced item would not be displayed if the imgLoc variable in the includes/modules/pages/PRODUCT_TYPE/jscript_dynamic_price_updater.php file was not set to "replace". Essentially the result was that pspClass would be blank when sending to ajax.
- Added change detection and capture of the html element textarea and changed the text detection to an input event instead of a keyup event. This allows capture/detection of pasted content without firing off multiple events for the same modification. Additional testing may reveal the need to incorporate other event listeners. The process would be similar as shown for the number case.
- Updated ajax.php file to prevent known spiders from performing ajax requests. This is from the ZC 1.5.6 version of the file
- Moved the status notification from an alert to a console log when zcJS is not used and a 200 status result is not received.
  + Download
Zen Cart® Versions v1.5.1, v1.5.3, v1.5.4, v1.5.5
Date Added 22 Nov 2017
Author mc12345678
File Size 69.9 KB
PHP 5.3 Safe? No
Downloads 617
 
Dynamic Price Updater   -   Version: 3.0.8
3.0.8, What changed:
- Added a switch and code to support deactivating the use of currency symbols in the sidebox, similar to the display of the base product price.
- Corrected the use of the notifier to support using an observer to provide a prefix for displayed prices.
- Removed the specific comparison of an attribute being a checkbox for when processing attributes to identify the lowest price of the product. Inclusion of the attribute into the base price is controlled through the attributes controller and should not be just blindly omitted within this code.
- Updated the installer including to incorporate the version checker provided in the current alpha release of ZC 1.5.6 and to use that code instead of the built in code and instead of pulling the recent file into the distribution of the plugin (and then have multiple such versions out and about.)
- Updated the installer to write a debug log if the installer files have been incorrectly placed in the catalog side of the installer.
- Updated the installer to expect an admin to be logged in, and the page not currently being the login page or as a result of selecting the logoff option.
- Updated code for initial expected changes for PHP 7.2.
- Corrected the encoding (BOM) of the file that provides the ajax processing.
- Corrected issue with price being displayed as zero when it should be otherwise displayed.
- Added the general page information (though not with zen_href_link) and support understanding what the customer is looking at at the point of the call.
- Updated the jscript code for the product_music to match the product_info code.
- Added template jscript code to attempt to load jquery if it has not previously included or loaded to load jquery 1.12.4
  + Download
Zen Cart® Versions v1.5.1, v1.5.3, v1.5.4, v1.5.5
Date Added 26 Sep 2017
Author mc12345678
File Size 58.7 KB
PHP 5.3 Safe? No
Downloads 115
 
Dynamic Price Updater   -   Version: 3.0.7
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.
  + Download
Zen Cart® Versions v1.5.1, v1.5.3, v1.5.4, v1.5.5
Date Added 6 Jun 2017
Author mc12345678
File Size 53.3 KB
PHP 5.3 Safe? Yes
Downloads 102
 
Dynamic Price Updater   -   Version: 3.0.6
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.
  + Download
Zen Cart® Versions v1.5.1, v1.5.3, v1.5.4, v1.5.5
Date Added 3 Jun 2017
Author mc12345678
File Size 50.2 KB
PHP 5.3 Safe? Yes
Downloads 40
 
Dynamic Price Updater   -   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.
  + Download
Zen Cart® Versions v1.5.1, v1.5.3, v1.5.4, v1.5.5
Date Added 28 May 2017
Author mc12345678
File Size 45.5 KB
PHP 5.3 Safe? Yes
Downloads 35
 
Dynamic Price Updater   -   Version: 3.0.4
3.0.4 has a few bugfixes as well as general improvements for the overall operation.


- Added data sanitization to the database queries.
- Incorporated full database table names instead of providing some sort of prefix to the anticipated table name.
- Added ZC 1.5.5e ajax.php file for use to take the place of dpu_ajax.php
- Added zcDPU_Ajax class to support AJAX calls.
- Incorporated currency number formatting based on the currency selected in the session instead of with a hard value of 2.
- Converted code to be PHP 7.2 compliant regarding known deprecations.
- Split out the on_load code to its own file.
- Applied parenthesis around actions to be taken for if statements.
- Correct a potential javascript error if secondPrice isn't being used.
- Added ability for image to replace the text to be updated such that there is no line height adjustment.
- Remove the eval function and instead call the function dynamically that is expected.
- Converted single quotes to double quotes.
- Added evaluation of number style fields as an additional option.
- Made monitoring of entered data by event as an added event instead of a replacement event to improve Javascript interactions.
- Removed unnecessary underscore from variables.
- Added semi-colons to end of functions for appropriate Javascript syntax.
- Removed the code from dpu_ajax.php as the code is otherwise incorporated to use the ZC ajax.php file.
- Added tax for display of price with currency symbols.
- Replaced intval() with (int) casting.
- Copied changes from standard product_info to product_music_info.

brought to you by mc12345678.com
  + Download
Zen Cart® Versions v1.5.0, v1.5.1, v1.5.2, v1.5.3, v1.5.4, v1.5.5
Date Added 7 Apr 2017
Author mc12345678
File Size 37.6 KB
PHP 5.3 Safe? Yes
Downloads 97
 
Dynamic Price Updater   -   Version: 3.0.3
- Fix price update for sale price
- Test compatibility with zen cart 1.5.5
  + Download
Zen Cart® Versions v1.5.0, v1.5.1, v1.5.2, v1.5.3, v1.5.4, v1.5.5
Date Added 9 Jan 2017
Author khe817
File Size 27.5 KB
PHP 5.3 Safe? No
Downloads 135
 
Dynamic Price Updater   -   Version: 3.0.2
Irrational error reporting is disabled   + Download
Zen Cart® Versions v1.5.0, v1.5.1
Date Added 10 Jun 2014
Author Chrome
File Size 27.9 KB
PHP 5.3 Safe? Yes
Downloads 764
 
Dynamic Price Updater   -   Version: 3.0.1
3.0.1 contains a minor buxfix to includes/classes/dynamic_price_updater.php   + Download
Zen Cart® Versions v1.5.0, v1.5.1
Date Added 28 Jul 2013
Author Design75
File Size 32.1 KB
PHP 5.3 Safe? Yes
Downloads 639
 
Dynamic Price Updater   -   Version: 3.0
- Moving all the defines to language files, or the database
- Making DPU multilingual
- updating code to accommodate proper database calls, Zen Cart compliant.
- Added a real sidebox, only the content is dynamically build
- Added an admin configuration, to make changes to the configurable defines of DPU
  + Download
Zen Cart® Versions v1.5.0, v1.5.1
Date Added 9 Jul 2013
Author Design75
File Size 31.7 KB
PHP 5.3 Safe? Yes
Downloads 151
 
Dynamic Price Updater   -   Version: 2.02
The Dynamic Price Updater is a module for Zen Cart that automatically updates the price display on product pages when a visitor changes an attribute or adjusts the cart quantity

The issue with the 1% tax discrepancy has now been fixed
  + Download
Zen Cart® Versions v1.3.9
Date Added 20 Oct 2011
Author Chrome
File Size 17.5 KB
PHP 5.3 Safe? Yes
Downloads 1,513
 
Dynamic Price Updater   -   Version: 2.01
The Dynamic Price Updater is a module for Zen Cart that automatically updates the price display on product pages when a visitor changes an attribute or adjusts the cart quantity

The Updater now support sales (finally)
  + Download
Zen Cart® Versions
Date Added 3 Aug 2011
Author Chrome
File Size 17.5 KB
PHP 5.3 Safe? Yes
Downloads 409
 


disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR