mc12345678 / Dynamic_Price_Updater

This module for Zen Cart automatically updates the product price when a atrribute is added to the product
Other
0 stars 0 forks source link

Dynamic Price Updater v3.2.0 -=-=-=-=-=-=-=-=-=-=-=-=-=-

3.2.0, What changed:

3.0.8, What changed:

3.0.7, What changed:

3.0.6:

3.0.5:

3.0.4 has a few bugfixes as well as general improvements for the overall operation.

3.0.3 has a minor bugfix, in jscript files

This is (IMHO) an improved version of DPU 2

Installation / Upgrade

NOTE: If you have a version of Updater installed earlier than 3.0 please remove the files first

  1. Rename the YOUR_ADMIN folder to the name of your secret foldername.

  2. Rename the YOUR_TEMPLATE folders to the name of your custom template folder name.

  3. upload the files included in the "Installation files" folder (they are in the correct folder structure). For reference the file paths are:

    ajax.php YOUR_ADMIN/includes/auto_loaders/config.dpu.php YOUR_ADMIN/includes/init_includes/init_dpu_config.php YOUR_ADMIN/includes/installers/dpu/ (all files in the folder) YOUR_ADMIN/includes/languages/english/extra_definitions/dynamic_price_updater.php images/ajax-loader.gif includes/auto_loaders/config.dynamic_price_updater.php includes/classes/dynamic_price_updater.php includes/languages/english/extra_definitions/dynamic_price_updater.php includes/modules/pages/product_info/jscript_ajax_updater.php includes/modules/pages/product_music_info/jscript_ajax_updater.php includes/modules/sideboxes/YOUR_TEMPLATE/dynamic_price_updater_sidebox.php includes/templates/YOUR_TEMPLATE/sideboxes/tpl_dynamic_price_updater_sidebox.php includes/templates/YOUR_TEMPLATE/jscript/jscript_jquery.min.dpu.php

    dpu_ajax.php has been removed from the fileset as far as necessary code. After all files are in the place provided it may be removed from the server. it is expected that to support use of the ZC zcJS ajax process, that includes/templates/YOUR_TEMPLATE/jscript/ contains the file jscript_framework.php that can be found in includes/templates/template_default/jscript/ it is also expected that your template loads a version of jQuery preferably 1.12.0 or above. jscript_jquery.min.dpu.php is provided to remotely load jQuery 1.12.4 if a form of jQuery has not yet been loaded when the file is executed.

  4. Log in to your webshop's admin panel, and the module will install automatically. There are no seperate sql files needed.

  5. Installation is now complete.

  6. By default DPU is disabled. Go to configuration=>Dynamic Price Updater set the status to true to enable DPU

  7. To allow DPU to update the display of product quantity available (in particular if using Stock By Attributes): 7.a. edit includes/templates/YOUR_TEMPLATE/templates/tpl_product_info_display.php with a plain text editor. 7.b. find: $products_quantity . 7.c. and surround it by a span tag (replace with below) so that it will look like: '' . $products_quantity . '' . 7.d. perform the same for each PRODUCT_TYPE file such as product_music_info, etc...

NOTE: If you have a version of Updater installed earlier than 3.0 please remove the files first

Settings

The module is now set through the admin, more instructions to be added later

As of Version 3.2.0 the settings include the following configuration options Dynamic Price Updater Status true - Allow disabling DPU in whole Dynamic Price Updater Version 3.2.0 - Radio button style presentation of installed version Dynamic Price Updater Version Check? true - Allow DPU to check for latest ZC issued version? Where to display the price productPrices - Class in which DPU prices are to be shown/updated Define used to set a variable for this script cart_quantity - Value of name field for form that contains attributes and quantities. Where to display the weight productWeight - id object that is to display the product weight. show a small loading graphic true - While data is being retrieved from the system, show a loading picture. Show currency symbols true - If desired to see the symbols ($) associated with the customer's chosen currency then choose true. Show product quantity false - This is the quantity of the specifically selected/entered combination of attributes that are in the cart. Where to display the second price cartAdd - This is the id of the location to display the calculated price as a second location. Show sidebox currency symbols true - Show currency symbols in the sidebox (when displayed). Show alternate text for partial selection start_at_least When selections are being made that affect the price of the product, what alternate text if any should be shown to the customer. For example if when no selections have been made, the ZC starting at text may be displayed. When one selection of many has been made, then the text may be changed to at least this amount indicating that there are selections to be made that could increase the price. Then once all selections have been made as expected/required the text is or should change to something like Your Price:. Show or update the display of out-of-stock quantity_replace Allows display of the current stock status of a product while the customer remains on the product information page and offers control about the ajax update when the product is identified as out-of-stock. Modify minimum attribute display price all On what should the minimum display price be based for product with attributes? Only product that are priced by attribute or for all product that have attributes? The id tag for product_quantity productDetailsList_product_info_quantity This is the ID where your product quantity is displayed.

Support

As always support is located on the Zen Cart forums at:

http://www.zen-cart.com/forum/showthread.php?t=70577

Credits

Version 3.2.0 brought to you by mc12345678: http://mc12345678.com with thank yous to: mvstudio for identifying issues with strict operation, as well as edge case operation. izar74 for a potential way to display out-of-stock information. diamond1 for identifying the need of these instructions to contain just a little more. Calljj for the idea of updating the "base" price while making attribute selections on product that are on special or on sale. This allows seeing the true price reduction/difference for chosen options.

Versions 3.0.5 through 3.0.8 brought to you by mc12345678: http://mc12345678.com

This update (V3.0.4 base content) : Erik Kerkhoven (Design75) http://zen4all.nl brought by mc12345678: http://mc12345678.com

Original author : Dan Parry (Chrome) http://chrome.me.uk

Thanks to Jay (4jDesigns on the forum) for finding the 1% tax issue

Thanks to Thomas Achache for giving me the inspiration for the mechanism

Thanks to web28 for the idea of preventing loading under certain circumstances

Thanks to Matt (lankeeyankee) for testing and correcting my inevitable mistakes

Copyright

Parts of copyright 2009 Dan Parry (Chrome) 2013 Erik Kerkhoven (Design75) Zen4All.nl 2017 mc12345678 http://mc12345678.com