Zen Cart Logo
Forums / All Other Contributions/Addons / Dynamic Price Updater

Dynamic Price Updater

Views: 342,299

Results 1,361 to 1,380 of 1,701
31 Aug 2017, 9:15 AM
#1361
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Dynamic Price Updater

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?

31 Aug 2017, 9:55 AM
#1362
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

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.

31 Aug 2017, 2:52 PM
#1363
diamond1 avatar

diamond1

Zen Follower

Join Date:
Jan 2010
Location:
France
Posts:
295
Plugin Contributions:
0

Re: Dynamic Price Updater

Waiting for a solution I disable the plugins,

Attachment 17261

31 Aug 2017, 3:52 PM
#1364
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

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:

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() : ''; ?>",
31 Aug 2017, 4:09 PM
#1365
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: 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() : ''; ?>",

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.

31 Aug 2017, 5:58 PM
#1366
diamond1 avatar

diamond1

Zen Follower

Join Date:
Jan 2010
Location:
France
Posts:
295
Plugin Contributions:
0

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

31 Aug 2017, 6:11 PM
#1367
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: Dynamic Price Updater

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?

31 Aug 2017, 6:49 PM
#1368
diamond1 avatar

diamond1

Zen Follower

Join Date:
Jan 2010
Location:
France
Posts:
295
Plugin Contributions:
0

Re: Dynamic Price Updater

Spiders have to see the exact name of the link as it has always been, I would like an expert SEO opinion as to what impact will this url do not bring anywhere? Also, it is not possible to know where visitors are, what page they are visiting, of course, who is online is just about to know what the visitors are doing.

1 Sep 2017, 7:19 AM
#1369
diamond1 avatar

diamond1

Zen Follower

Join Date:
Jan 2010
Location:
France
Posts:
295
Plugin Contributions:
0

Re: Dynamic Price Updater

by doing local tests I noticed that on some products I get this kind of warning

Attachment 17264

1 Sep 2017, 7:38 AM
#1370
diamond1 avatar

diamond1

Zen Follower

Join Date:
Jan 2010
Location:
France
Posts:
295
Plugin Contributions:
0

Re: Dynamic Price Updater

another thing I noticed is that the DPU needs this file jscript_jquery.min.php to work, then it is not part of the package.

<script type="text/javascript">
if (typeof jQuery == 'undefined') {
    document.write(unescape("%3Cscript src='//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js' type='text/javascript'%3E%3C/script%3E"));
}
</script>
1 Sep 2017, 12:24 PM
#1371
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: Dynamic Price Updater

diamond1:

by doing local tests I noticed that on some products I get this kind of warning

Attachment 17264
Based on the above, I have to ask why have you either disabled zcJS or modified the DPU code not to use it although it has been recommended by the core developers to use zcJS and at least the associated ajax.php file?

1 Sep 2017, 12:30 PM
#1372
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: Dynamic Price Updater

diamond1:

another thing I noticed is that the DPU needs this file jscript_jquery.min.php to work, then it is not part of the package. ```php



Did you also happen to notice that the reference used there is to load it over the Internet instead of from your local fileset? How would such a set of files be included? Besides that, there has been a statement made by the ZC software moderator that such files should not be included in the package itself as using any recent version of ZC automatically includes such a file. Further the script operates such that it only attempts to load the associated file if one hasn't already been loaded, this way there should not be any conflict by loading this plugin in conjunction with any other that is up-to-date. 


If anything, I'd say that what has been pointed out is that likely the reference to the version is a little dated, though I doubt it plays a factor as a result of the above.
1 Sep 2017, 12:47 PM
#1373
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: Dynamic Price Updater

diamond1:

Spiders have to see the exact name of the link as it has always been, I would like an expert SEO opinion as to what impact will this url do not bring anywhere? Also, it is not possible to know where visitors are, what page they are visiting, of course, who is online is just about to know what the visitors are doing.
If you are looking for a specific answer to a specific question (even though in this case it was brought up as a result of this plugin) I would suggest initiating a new thread about the use of ajax.php and it's relationship to SEO. Then to provide a link here associated to that for interested readers.

As far as SEO "seeing" the link as it always was: what you see in who's online is data associated to what ZC has collected about the navigation within the software/site. It is not necessarily what a search engine sees. Though a search engine may put together the javascript parts to attempt to replicate performing the same action as a user. For this plugin, the effect is a change to the page/product price not necessarily "new content". There are ways to advise to the likes of google the variations in price unrelated to the operation of this plugin through the use of micro-data which is a discussion for a different thread.

1 Sep 2017, 2:08 PM
#1374
diamond1 avatar

diamond1

Zen Follower

Join Date:
Jan 2010
Location:
France
Posts:
295
Plugin Contributions:
0

Re: Dynamic Price Updater

Based on the above, I have to ask why have you either disabled zcJS or modified the DPU code not to use it although it has been recommended by the core developers to use zcJS and at least the associated ajax.php file?

First of all thank you for what you do for our community, I do not understand well I apologize, I have to translate in French with google and that's another thing. I have the original dpu files what do you mean zcJS disabled?

Did you also happen to notice that the reference used there is to load it over the Internet instead of from your local fileset? How would such a set of files be included? Besides that, there has been a statement made by the ZC software moderator that such files should not be included in the package itself as using any recent version of ZC automatically includes such a file. Further the script operates such that it only attempts to load the associated file if one hasn't already been loaded, this way there should not be any conflict by loading this plugin in conjunction with any other that is up-to-date. 


If anything, I'd say that what has been pointed out is that likely the reference to the version is a little dated, though I doubt it plays a factor as a result of the above.

the file did not sit in the zencart distribution I added because in test version 1.5.4 was the only file I had in and where dpu worked and if i removed the jscript_jquery.min.php file DPU it does not work.

Yes for the rest I can ask in the SEO section however you should see in whois online the visitors where they are but you do not have to have the whois online in zencart

1 Sep 2017, 5:20 PM
#1375
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: Dynamic Price Updater

diamond1:

Based on the above, I have to ask why have you either disabled zcJS or modified the DPU code not to use it although it has been recommended by the core developers to use zcJS and at least the associated ajax.php file?

> 
> First of all thank you for what you do for our community, I do not understand well I apologize, I have to translate in French with google and that's another thing. I have the original dpu files what do you mean zcJS disabled?
> 
> 
> 
> 
> ```html
Did you also happen to notice that the reference used there is to load it over the Internet instead of from your local fileset? How would such a set of files be included? Besides that, there has been a statement made by the ZC software moderator that such files should not be included in the package itself as using any recent version of ZC automatically includes such a file. Further the script operates such that it only attempts to load the associated file if one hasn't already been loaded, this way there should not be any conflict by loading this plugin in conjunction with any other that is up-to-date. 


If anything, I'd say that what has been pointed out is that likely the reference to the version is a little dated, though I doubt it plays a factor as a result of the above.

the file did not sit in the zencart distribution I added because in test version 1.5.4 was the only file I had in and where dpu worked and if i removed the jscript_jquery.min.php file DPU it does not work.

Yes for the rest I can ask in the SEO section however you should see in whois online the visitors where they are but you do not have to have the whois online in zencart

So a couple of things. On my side, I apologize to all for assuming that the site in question was a ZC 1.5.5e site based on the current tagline which states so. (future readers, this tag line may be different and therefore any posts by the OP stating to see the tagline should be taken with a grain of salt). Secondly for not asking directly which version was involved.

That said, ZC 1.5.4 comes with the same or similar jscript_framework.php file as in ZC 1.5.5 in the folder includes/templates/template_default/jscript. That file, when incorporated with the current template will provide zcJS which is preferred over the included/legacy XHR that was kept with this plugin for compatibility and potential of others having built on it.

Also, it was pointed out aboutthe jquery file not being included (whether in whole or by "reference". Looking through the file structure, it is not present as identified, though there was a bit of a language barrier issue/misinterpretation on my part. I thought the concern was not having provided the referenced file. The concern was that there was nothing that ensured that jquery (or rather javascript) was loaded.

So, from that short discussion there are improvements available to be made to the instruction to cover these two topics and possible an "alternate" folder to provide the loading of jquery if something is not there already.

So, on the issue of the pop up message. It occurs when zcJS is not used, the enquiry to the system is complete and the status response is not 200. It could be a response of no change or some other result. To identify, would suggest monitoring the network traffic through the browser and noting the response that occurs when that message is presented. It may be something to "catch".

As to the data in who's online... this plugin with the unique data that is at the beginning of the displayed url identifies that the visitor is looking at a product. Then with the provided modification, the pertinent data such as the products_id (unique identifier) and if present the category is provided. Therefore, one can tell at least when/where such info is made available what is being looked at. Generally speaking, any product type (main_page=PRODUCT_TYPE_info) could be substituted to see the actual product if it was not familiar to the admin.

Hope that helps.

2 Sep 2017, 7:52 AM
#1376
diamond1 avatar

diamond1

Zen Follower

Join Date:
Jan 2010
Location:
France
Posts:
295
Plugin Contributions:
0

Re: Dynamic Price Updater

DPU is installed both in zencart 1.5.4 and in zencart 1.5.5 as in the signature, the problems are identical on the two distributions of zencart 1.5.5 and 1.5.4, I also noticed that if there are no attributes the price remains zero . someone can tell me if he has installed DPU and that he has no problems I can give me a link. I also do the prose both locally and online when I can for a few seconds and the errors are both local and online.

2 Sep 2017, 10:40 AM
#1378
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: Dynamic Price Updater

What version are you using because the issue of a "zero" price for product without attributes was corrected some time ago. The referenced post or post area even indicates that the issue has been corrected in more recent copies of the code. If you are still seeing that the price of a product without attributes is displayed as 0 for the given/selected currency, then I would say that the DPU for the store has not been properly upgraded and would suggest verifying that dpu's class file is up-to-date.

2 Sep 2017, 1:49 PM
#1379
diamond1 avatar

diamond1

Zen Follower

Join Date:
Jan 2010
Location:
France
Posts:
295
Plugin Contributions:
0

Re: Dynamic Price Updater

I have version 3.7 this https://www.zen-cart.com/downloads.php?do=file&id=1301 and the files are all original. Also I did not understand how to do to remove the pop up Status returned and how do I ever keep the file jscript_jquery.min.php what do I do to see DPU work?

2 Sep 2017, 1:52 PM
#1380
diamond1 avatar

diamond1

Zen Follower

Join Date:
Jan 2010
Location:
France
Posts:
295
Plugin Contributions:
0

Re: Dynamic Price Updater

Dynamic Price Updater (Version Installed) 3.0.7