Re: Dynamic Price Updater
Quote:
Originally Posted by
rbarbour
I'd like to use this with a inline ajax popup.
However, I would need to pass the products_id in a link to the script instead of the script requesting it through the GET method.
Any quick ideas or solutions?
Not sure how quick the solution/idea came, but a specific solution was identified to support this request and it seemed to jive with the above/previous discussion.
In the end, the javascript/jquery code that was being used included an ajax call/function. Primarily it allows display of the content at a link's destination within a window. But, for this particular module, in order to "properly" fire it off, the dpu code had to be called/activated in order to process. Basically, one way for DPU to work within this popup was to call/process the content of the includes/modules/pages/YOUR_PAGE/on_load_dpu.js file after the ajax work of the javascript/jquery program successfully completed.
So the answer is yes it can be used for the most part as is but integrated into other code as that code needs...
Re: Dynamic Price Updater
Quote:
Originally Posted by
mc12345678
Not sure how quick the solution/idea came, but a specific solution was identified to support this request and it seemed to jive with the above/previous discussion.
In the end, the javascript/jquery code that was being used included an ajax call/function. Primarily it allows display of the content at a link's destination within a window. But, for this particular module, in order to "properly" fire it off, the dpu code had to be called/activated in order to process. Basically, one way for DPU to work within this popup was to call/process the content of the includes/modules/pages/YOUR_PAGE/on_load_dpu.js file after the ajax work of the javascript/jquery program successfully completed.
So the answer is yes it can be used for the most part as is but integrated into other code as that code needs...
@mc12345678
Thanks for the quick response and solution provided. I will try it later today on my test site. I really appreciate the time spent looking into this and will certainly send a few cups of coffee your way.
Re: Dynamic Price Updater
Quote:
Originally Posted by
rbarbour
@mc12345678
Thanks for the quick response and solution provided. I will try it later today on my test site. I really appreciate the time spent looking into this and will certainly send a few cups of coffee your way.
Okay, I had a little extra time this morning. I have worked with that specific "popup" on allot of projects, can't believe I didn't go that route.
Seems to be good, I'll run a few tests, I'm really grateful, haven't had much time these days.
Re: Dynamic Price Updater
Quote:
Originally Posted by
rbarbour
Okay, I had a little extra time this morning. I have worked with that specific "popup" on allot of projects, can't believe I didn't go that route.
Seems to be good, I'll run a few tests, I'm really grateful, haven't had much time these days.
Sometimes a fresh set of eyes can make all the difference. Besides with all that you've done for the ZC responsive design and other useful programs, glad I was able to both make the changes to this plugin that actually made it possible (moving the requery out of the php space and into the on_load event) and help show a way for that code to ZC "friendly". :)
Re: Price Updater - plugin keeps disabling
Hello.
Could someone please advise on the following Dynamic Price Updater question?
- ZC version v1.5.5b
- responsive Sheffield Blue template
- DPU version v3.0.4
I installed all of the plugin files and verified that they are in the correct locations.
DPU worked the very first time I tried to test it, but only once- something seems to be changing the status of the plugin to "false" (off).
I can turn it back on in admin, and it works, but only until I refresh the product page, or if I close the browser page entirely and relaunch the site to go to the home page. Any action that closes or refreshes a page causes the plugin to be disabled.
Any advice on how to fix, or where I might start looking for the problem is most welcome. TIA.
Michael
Re: Price Updater - plugin keeps disabling
Quote:
Originally Posted by
MichaelT
Hello.
Could someone please advise on the following Dynamic Price Updater question?
- ZC version v1.5.5b
- responsive Sheffield Blue template
- DPU version v3.0.4
I installed all of the plugin files and verified that they are in the correct locations.
DPU worked the very first time I tried to test it, but only once- something seems to be changing the status of the plugin to "false" (off).
I can turn it back on in admin, and it works, but only until I refresh the product page, or if I close the browser page entirely and relaunch the site to go to the home page. Any action that closes or refreshes a page causes the plugin to be disabled.
Any advice on how to fix, or where I might start looking for the problem is most welcome. TIA.
Michael
So you're saying that your admin setting to have it on is getting turned to the off position/condition when navigating the store front?
If so it sounds like another plugin is "listening" for the setting and disabling the plugin. I don't recall the constants name, but you would want to search the files (tools->developers tool kit) for that constant and identify where it is used other than the files provided by the plugin.
Re: Price Updater - plugin keeps disabling
Thank you for the reply.
> So you're saying that your admin setting to have it on is getting turned to the off position/condition when navigating the store front?
Yes, exactly:
- Turn on plugin (make "true")(on)
- Launch the site in a browser
- Refresh, the admin, and the setting has changed to "false" (off).
> If so it sounds like another plugin is "listening" for the setting and disabling the plugin. I don't recall the constants name, but you would want to search the files (tools->developers tool kit) for that constant and identify where it is used other than the files provided by the plugin.
I tried uninstalling and then installing the previous version (3.0.4) with the same result. I know how to use the DTK, but not exactly sure what a constant is, what it might be called, or where to look.
Re: Price Updater - plugin keeps disabling
Quote:
Originally Posted by
MichaelT
Thank you for the reply.
> So you're saying that your admin setting to have it on is getting turned to the off position/condition when navigating the store front?
Yes, exactly:
- Turn on plugin (make "true")(on)
- Launch the site in a browser
- Refresh, the admin, and the setting has changed to "false" (off).
> If so it sounds like another plugin is "listening" for the setting and disabling the plugin. I don't recall the constants name, but you would want to search the files (tools->developers tool kit) for that constant and identify where it is used other than the files provided by the plugin.
I tried uninstalling and then installing the previous version (3.0.4) with the same result. I know how to use the DTK, but not exactly sure what a constant is, what it might be called, or where to look.
Had a chance to look it up. The constant (in ZC a define of an all capitalized "string" to a value that can not be changed after it is defined) is: DPU_STATUS
The problem is not in DPU but caused by other code that either loads in advance of the database and prevents the constant from being defined to on, or it allows a single use and in the process of that loading changes the database setting so that the next time the database data is loaded (page refresh or other navigation of the site) the value is set to off... more than likely it is done by that plugin because DPU used to override the javascript to listen to changes in the attribute options and therefore that plugin would not function as expected, or that there were conflicting actions that would occur and the only way for the specific "plugin" (could be a template) is to not allow DPU to do what it does.
Anyways, you'll be looking for code that is not in the DPU fileset that monitors and modifies the constant DPU_STATUS.
Re: Price Updater - plugin keeps disabling
Quote:
Originally Posted by
mc12345678
Had a chance to look it up. The constant (in ZC a define of an all capitalized "string" to a value that can not be changed after it is defined) is: DPU_STATUS
The problem is not in DPU but caused by other code that either loads in advance of the database and prevents the constant from being defined to on, or it allows a single use and in the process of that loading changes the database setting so that the next time the database data is loaded (page refresh or other navigation of the site) the value is set to off... more than likely it is done by that plugin because DPU used to override the javascript to listen to changes in the attribute options and therefore that plugin would not function as expected, or that there were conflicting actions that would occur and the only way for the specific "plugin" (could be a template) is to not allow DPU to do what it does.
Anyways, you'll be looking for code that is not in the DPU fileset that monitors and modifies the constant DPU_STATUS.
Yikes.
I just made what is probably a really inelegant fix, but it seems to have worked.
I looked for the DPU_STATUS per your suggestion; it lives in two (identical) files that are part of the DPU package. I changed the code from:
//-- DYNAMIC PRICE UPDATER ORIGINAL VERSION
//$sql = "INSERT INTO ".DB_PREFIX."configuration VALUES (NULL, 'Dynamic Price Updater Status', 'DPU_STATUS', 'false', 'Enable Dynamic Price Updater?', '".$dpu_configuration_id."', 10, NOW(), NOW(), NULL, 'zen_cfg_select_option(array(''true'', ''false''),')";
to:
//-- DYNAMIC PRICE UPDATER VERSION TO FIX FALSE RESET ISSUE
$sql = "INSERT INTO ".DB_PREFIX."configuration VALUES (NULL, 'Dynamic Price Updater Status', 'DPU_STATUS', 'true', 'Enable Dynamic Price Updater?', '".$dpu_configuration_id."', 10, NOW(), NOW(), NULL, 'zen_cfg_select_option(array(''true'', ''true''),')";
I'm supposing that this change prevents the disabling of the DPU via admin, which is OK, because I'll want it on all of the time anyway.
I'll obviously test this thoroughly. I'm new to coding and don't know if this change is OK, or playing with fire. Opinions welcome.
Grateful thanks to mc12345678 for your time and excellent guidance.
- Michael
Re: Price Updater - plugin keeps disabling
Quote:
Originally Posted by
MichaelT
Yikes.
I just made what is probably a really inelegant fix, but it seems to have worked.
I looked for the DPU_STATUS per your suggestion; it lives in two (identical) files that are part of the DPU package. I changed the code from:
//-- DYNAMIC PRICE UPDATER ORIGINAL VERSION
//$sql = "INSERT INTO ".DB_PREFIX."configuration VALUES (NULL, 'Dynamic Price Updater Status', 'DPU_STATUS', 'false', 'Enable Dynamic Price Updater?', '".$dpu_configuration_id."', 10, NOW(), NOW(), NULL, 'zen_cfg_select_option(array(''true'', ''false''),')";
to:
//-- DYNAMIC PRICE UPDATER VERSION TO FIX FALSE RESET ISSUE
$sql = "INSERT INTO ".DB_PREFIX."configuration VALUES (NULL, 'Dynamic Price Updater Status', 'DPU_STATUS', 'true', 'Enable Dynamic Price Updater?', '".$dpu_configuration_id."', 10, NOW(), NOW(), NULL, 'zen_cfg_select_option(array(''true'', ''true''),')";
I'm supposing that this change prevents the disabling of the DPU via admin, which is OK, because I'll want it on all of the time anyway.
I'll obviously test this thoroughly. I'm new to coding and don't know if this change is OK, or playing with fire. Opinions welcome.
Grateful thanks to mc12345678 for your time and excellent guidance.
- Michael
What are the contents of: YOUR_ADMIN/includes/auto_loaders/config.dpu.php
For your files on your server?
The only way that you wouldn't face errors by inserting an existing key is if it was being uninstalled as part of a load and immediately reinstalled...
Also what files were involved with your search? You said two identical places...