To summarize the current situation of DPU, the posted/identified issues and the solutions or the proposed solution, the following posts have been made since issue of 3.0.7 with either a link or some form of direction on how to correct. The most latest forum posted code has not been massaged to remove an extra & from the end, but it allows identifying the product information when viewing the ZC default who's online. It seems like it may be beneficial to have some internal "switch" to allow not capturing the ajax call as a "who's online" condition such as perhaps a session variable when set to bypass the who's online "logging", clear the session variable and continue on. Seeing as the who's online table really only keeps the last unique record (i.e. the last "click"), filtering has to occur up front when the "action" is being taken rather than at some point later as in at the point of viewing the list/record. Obviously would be concerned about some sort of security "black out". I guess another solution is to incorporate a who's online update within the code so that the "position" of the current user does not appear as if in the ajax code... Brings about something of a sigh.
Also, one can see the changes that have been made and stored to keep a functional version of the plugin (changes to be incorporated into the next version plus any new features) by using the following link which compares the current code to the associated issued version (in this case 3.0.7): https://github.com/mc12345678/Dynamic_Price_Updater/compare/v3.0.7...master
mani:
Now got one more warning
[18-Jul-2017 06:57:14 UTC] Request URI: /ajax.php?act=DPU_Ajax&method=dpu_update, IP address: 192.168.200.28
#1 DPU->removeExtraSelections() called at [/home/yabba1/public_html/includes/classes/dynamic_price_updater.php:62]
#2 DPU->getDetails() called at [/home/yabba1/public_html/includes/classes/ajax/zcDPU_Ajax.php:14]
#3 zcDPU_Ajax->dpu_update()
#4 call_user_func() called at [/home/yabba1/public_html/ajax.php:72]
[18-Jul-2017 06:57:14 UTC] PHP Warning: Invalid argument supplied for foreach() in /home/yabba1/public_html/includes/classes/dynamic_price_updater.php on line 150
How do I get this fixed?
mani:
I copied the contents of the file from classes/dynamic_price_updater.php from
https://github.com/mc12345678/Dynamic_Price_Updater/blob/9857cf302f2ec06562dc40d60b79eea406dd84cf/Installation%20files/includes/classes/dynamic_price_updater.php
and now it doesnt create a log file
Is it the right approach?
Module version installed is downloaded from
https://www.zen-cart.com/downloads.php?do=file&id=1301
and only
classes/dynamic_price_updater.php has been updated from github!
mc12345678:
Pushed the update to github finally. To obtain the specific modification see: https://github.com/mc12345678/Dynamic_Price_Updater/commit/8e10237fc1038529c4f92c07efd7002a43116075
It as well as a few minor updates/fixes for the ZC released version are now in the master branch of the github repo at: https://github.com/mc12345678/Dynamic_Price_Updater
mc12345678:
Untested but should carry the information that would normally be seen in Who's online:
Two places each in two provided files to change to support both "methods" of operation:
includes/modules/pages/product_info/jscript_dynamic_price_updater.php
and
includes/modules/pages/product_music_info/jscript_dynamic_price_updater.php
Line 125 change from:
this.XHR.open(strMode.toLowerCase(), this.url+"?act=DPU_Ajax&method=dpu_update"+(strMode.toLowerCase() == "get" ? "&" + this.compileRequest() : ""), true);
> to:
> ```
this.XHR.open(strMode.toLowerCase(), this.url+"?act=DPU_Ajax&method=dpu_update"+(strMode.toLowerCase() == "get" ? "&" + this.compileRequest() : "")+<?php echo (!empty(zen_get_all_get_params())) ? '"&' . zen_get_all_get_params() . '"' : '""'; ?>, true);
Line 132 change from:
var option = { url : theURL+"?act=DPU_Ajax&method=dpu_update",
> To:
> ```
var option = { url : theURL+"?act=DPU_Ajax&method=dpu_update<?php echo (!empty(zen_get_all_get_params())) ? '&' . zen_get_all_get_params() : ''; ?>",
diamond1:
[02-Sep-2017 18:38:04 Europe/Rome] PHP Warning: Invalid argument supplied for foreach() in /home/blablabla/public_html/includes/classes/dynamic_price_updater.php on line 150
But I have this as a mistake now with the edit