Re: Dynamic Price Updater
Based on the additional information afforded by the above. There is a code modification that I am staging to github to address this issue such that DPU will still update prices of product with attributes even for product that are out-of-stock.
This change does not require modification of the template files. Further, it will identify the price associated based on the quantity identified by the ZC function zen_get_buy_now_qty for product that are out-of-stock and for quantity entered as zero or negative.
Re: Dynamic Price Updater
Pushed the update to github finally. To obtain the specific modification see: https://github.com/mc12345678/Dynami...d7002a43116075
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
Re: Dynamic Price Updater
I installed dpu, but I have a problem and I had to disable it.
The problem is that in admin I see who's online no longer has the normal link but this:
## /ajax.php?act=DPU_Ajax&method=dpu_update
Also if you look at generate generate source i get this one:
</ Head>
<Body id = "productinfoBody" onload = "try {
#### init ();
} Catch (dpu_err) {
#### console.log (dpu_err.stack);
}; ">
I think something in my installation does not go you even see who is online /ajax.php?act=DPU_Ajax&method=dpu_update
Re: Dynamic Price Updater
Quote:
Originally Posted by
diamond1
I installed dpu, but I have a problem and I had to disable it.
The problem is that in admin I see who's online no longer has the normal link but this:
## /ajax.php?act=DPU_Ajax&method=dpu_update
Also if you look at generate generate source i get this one:
</ Head>
<Body id = "productinfoBody" onload = "try {
#### init ();
} Catch (dpu_err) {
#### console.log (dpu_err.stack);
}; ">
I think something in my installation does not go you even see who is online /ajax.php?act=DPU_Ajax&method=dpu_update
If you rely on the who's online information to conduct business I will look into the proper formatting of appending the results of zen_get_all_get_params so that the applicable ajax call will include the parameters on the uri even though they are not directly used by DPU. As to the source code presentation, yes that try/catch takes multiple lines. This helps with debugging by allowing each line to be executed individually and there fore can be tracked in the browser. The page passes html validation, what "issue" was it causing for you?
Re: Dynamic Price Updater
Also, while the same result in who's online was seen, the plugin User Tracking did not show the issue of the user executing an ajax method and shows more of a history than what the very last "click" was.
1 Attachment(s)
Re: Dynamic Price Updater
Waiting for a solution I disable the plugins,
Attachment 17261
Re: Dynamic Price Updater
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:
Code:
this.XHR.open(strMode.toLowerCase(), this.url+"?act=DPU_Ajax&method=dpu_update"+(strMode.toLowerCase() == "get" ? "&" + this.compileRequest() : ""), true);
to:
Code:
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:
Code:
var option = { url : theURL+"?act=DPU_Ajax&method=dpu_update",
To:
Code:
var option = { url : theURL+"?act=DPU_Ajax&method=dpu_update<?php echo (!empty(zen_get_all_get_params())) ? '&' . zen_get_all_get_params() : ''; ?>",
Re: Dynamic Price Updater
Quote:
Originally Posted by
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:
Code:
this.XHR.open(strMode.toLowerCase(), this.url+"?act=DPU_Ajax&method=dpu_update"+(strMode.toLowerCase() == "get" ? "&" + this.compileRequest() : ""), true);
to:
Code:
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:
Code:
var option = { url : theURL+"?act=DPU_Ajax&method=dpu_update",
To:
Code:
var option = { url : theURL+"?act=DPU_Ajax&method=dpu_update<?php echo (!empty(zen_get_all_get_params())) ? '&' . zen_get_all_get_params() : ''; ?>",
Actually, tested now. Result is/was that provided all of the parameters in the uri except those excluded by the function (ie. don't get the main_page for example) which included the products_id and if present the cPath, etc... it also included an additional & at the end of the result which will be addressed separately to provide a cleaner result. So at least can identify at which product one is looking.
1 Attachment(s)
Re: Dynamic Price Updater
it's not still good, my fear is for spider search engines what do they see exactly even if we have the canonical link?
I can not take risks and leave it still off until there is a right solution.
Attachment 17262
Re: Dynamic Price Updater
Quote:
Originally Posted by
diamond1
it's not still good, my fear is for spider search engines what do they see exactly even if we have the canonical link?
I can not take risks and leave it still off until there is a right solution.
Attachment 17262
The result that is being logged is execution of ajax (javascript with php). A search engine is looking at the page. The "problem" that you are seeing is that the page is loaded, and then another page is loaded through ZC which when "recording" the current/last page visited appears as if accessed the ajax file. This has nothing to do with the actual loaded page. I don't know what you would rather see in your look at who's online, but as said in monitoring clicks/pages loaded through say User Tracking, the ajax action doesn't get registered and considering the use of that ajax call, there is no reason to show anything different/new.
How do you think that the information presented in who's online should relate to a search engine's results?