Zen Follower
- Join Date:
- Jul 2005
- Location:
- Wales, UK
- Posts:
- 392
- Plugin Contributions:
- 0
Dynamic Price Updater
Hi all
I'm having some issues building a test environment, but I think I can fix this without it... Could I ask for volunteers?
Dan
Views: 342,345
Zen Follower
Hi all
I'm having some issues building a test environment, but I think I can fix this without it... Could I ask for volunteers?
Dan
Totally Zenned
Chrome:
Hi all
I'm having some issues building a test environment, but I think I can fix this without it... Could I ask for volunteers?
Dan
Here's one
Zen Follower
Hi Design75
Sorry the time taken to respond; I decided to rewrite the fix... I'll also resubmit for verification after testing
File is attached
Thanks!
Dan
Zen Follower
Hi all
I've added a few changes to the Updater's class file... Here are the changes:
Changed the way the sidebox switch works (more a cosmetic/elegance alteration than anything, really)
Fixed the errors caused by the reset() and each() calls (I hope)... This error was my making
Altered the error logging method... Here I owe Design75 an apology as I incorrectly thought it was an example of bad design, but rather it's (I think) throwError() might be a magic function that's called in the event of any error in the class, rather than explicitly... It took me a while to figure out quite why the files were being created... After I figured this out I realised Design75's intention to alert the user to any error that had happened... I've added a drink icon as a peace offering to Design75 and my unreserved apologies... I'm sorry I reacted without fully checking and considering the situation... The logger now creates a single file in the logs folder and appends errors there
All that said, I've attached a replacement file for anyone that's kind enough to test it for me... The file only contains the affected class in its folder structure... Here's what needs to be tested:
The _runDeep var that switches the sidebox on and off... This var is set in the class constructor
The noted errors about reset() and each() to make sure they're squashed
The new error logger... Easiest test is to manually call the logger directly, e.g. $this->throwError("Test error logger"); in the constructor
The _runSilent flag that controls whether errors should be logged... Check that the log file is being created and it's in the correct place... Run the error test several times to ensure content is appending and not overwriting (this shouldn't be a problem)... Var is set in the constructor
All changes are commented but if anyone has any questions, please feel free to post here
Many thanks to everyone that tests and, again, my sincere apologies to Design75 (I really don't know where my head was)
Cheers
Dan
Totally Zenned
Chrome:
Hi all
I've added a few changes to the Updater's class file... Here are the changes:
Changed the way the sidebox switch works (more a cosmetic/elegance alteration than anything, really)
Fixed the errors caused by the reset() and each() calls (I hope)... This error was my making
Altered the error logging method... Here I owe Design75 an apology as I incorrectly thought it was an example of bad design, but rather it's (I think) throwError() might be a magic function that's called in the event of any error in the class, rather than explicitly... It took me a while to figure out quite why the files were being created... After I figured this out I realised Design75's intention to alert the user to any error that had happened... I've added a drink icon as a peace offering to Design75 and my unreserved apologies... I'm sorry I reacted without fully checking and considering the situation... The logger now creates a single file in the logs folder and appends errors there
All that said, I've attached a replacement file for anyone that's kind enough to test it for me... The file only contains the affected class in its folder structure... Here's what needs to be tested:
The _runDeep var that switches the sidebox on and off... This var is set in the class constructor
The noted errors about reset() and each() to make sure they're squashed
The new error logger... Easiest test is to manually call the logger directly, e.g. $this->throwError("Test error logger"); in the constructor
The _runSilent flag that controls whether errors should be logged... Check that the log file is being created and it's in the correct place... Run the error test several times to ensure content is appending and not overwriting (this shouldn't be a problem)... Var is set in the constructor
All changes are commented but if anyone has any questions, please feel free to post here
Many thanks to everyone that tests and, again, my sincere apologies to Design75 (I really don't know where my head was)
Cheers
Dan
:laugh: No apologies needed. We al have our bad day, and you thought you were doing the right thing. I really appreciate you are back here and trying to make this module better. :hug:
Zen Follower
Hi
Thank you Design75, I very much appreciate that :smile: :hug:
I've decided it's time to move the Updater forward... Firstly, an installer: To save mistakes and make it easier for newer users I plan to make an installer that sets the admin folder and template folder names and puts all the files in the correct place
Secondly, rather than digging about in the files for switches and changes, it's time for an admin page... Digging about in code files isn't for the faint of heart
So here are a few questions in anyone fancies a ponder:
Should this version be a replacement (v4.0) or should it be a parallel version (offered at the same time as v3, which remains supported)? Is there a case for someone preferring or requiring the v3 over the installer version with admin panel?
Apart from the standard switches (sidebox switch, error switch, quantity display switch etc.), what else could be added to help tweak and control the Updater? This can be anything from display to adding features that have never existed on the public side... So any feature request really
Thanks for all the support
Dan
Totally Zenned
The latest version already contain an auto installer. It is not the best, since this was one of my first modules to upgrade ;) At the same time I also moved most, if not all settings to the admin.
One feature I would like, and which I have not had the time to start on, is when there is a minimal amount of products that needs to be added to a cart, the updater does not update when opening the product_info page.
Chrome:
Hi
Thank you Design75, I very much appreciate that :smile: :hug:
I've decided it's time to move the Updater forward... Firstly, an installer: To save mistakes and make it easier for newer users I plan to make an installer that sets the admin folder and template folder names and puts all the files in the correct place
Secondly, rather than digging about in the files for switches and changes, it's time for an admin page... Digging about in code files isn't for the faint of heart
So here are a few questions in anyone fancies a ponder:
Should this version be a replacement (v4.0) or should it be a parallel version (offered at the same time as v3, which remains supported)? Is there a case for someone preferring or requiring the v3 over the installer version with admin panel?
Apart from the standard switches (sidebox switch, error switch, quantity display switch etc.), what else could be added to help tweak and control the Updater? This can be anything from display to adding features that have never existed on the public side... So any feature request really
Thanks for all the support
Dan
Zen Follower
Hi
I now have my test area set up, so I can see that you have added the admin bit... Great! I hope you don't mind that I build upon that code
The idea I had for the installer is purely to rename the folders automatically after upload... In tandem with your installer, that would be ideal
I'm just now doing some testing, then I'm going straight onto the upgrades... I have a few ideas myself, so I'll start building on them
Cheers!
Dan
Totally Zenned
Chrome:
Hi
I now have my test area set up, so I can see that you have added the admin bit... Great! I hope you don't mind that I build upon that code
The idea I had for the installer is purely to rename the folders automatically after upload... In tandem with your installer, that would be ideal
I'm just now doing some testing, then I'm going straight onto the upgrades... I have a few ideas myself, so I'll start building on them
Cheers!
Dan
Be my guest, to modify the code at your will :smile:. I am still available if you need a tester.
Zen Follower
Hi Dan,
good to see You back :smile:
Chrome:
So here are a few questions in anyone fancies a ponder:
Should this version be a replacement (v4.0) or should it be a parallel version (offered at the same time as v3, which remains supported)? Is there a case for someone preferring or requiring the v3 over the installer version with admin panel?
Apart from the standard switches (sidebox switch, error switch, quantity display switch etc.), what else could be added to help tweak and control the Updater? This can be anything from display to adding features that have never existed on the public side... So any feature request really
Thanks for all the support
Dan
This version should be a replacement (v4.0) not a parallel one. Personally io dont like when there are "parallel" version, it is always confusing.
The thing that i always loved of DPU is it's simplicity, works well because it's "simple". I would not add too many functions or options, the basic options are already enough.
Zen Follower
Hi izar74
On point #1 I'm in complete agreement; I just wanted to make sure (I will support older versions (within reason) of course)
With point 2 I was thinking of splitting the features into Essential and Advanced: Essential would be what's already there (with the possible exception of some new switches)... Advanced would have things like control over classnames, other code-level display tweaks
Thanks again to Design75! Did you try the single file replacement I last posted? Can you spot anything weird in there?
I'm working on the Updater now and may even (FINALLY) have a proper crack at multiple updates (I recall this request being almost as old as the thread)
Thanks to all for the support!
Dan
Zen Follower
Hi, Ive just installed this mod and I get a popup saying "Internal Server Error"
I used version 3.0, my store is 1.39h. The details for 3.0 say its for 1.5x, does it also work with 1.39h?
I always get confused on this point as so many mods still work even when it says 1.5x in the Zencart versions.
If it works with 1.39h, what might my problem be? I search this thread for "Internal Server Error" and only found one mention of the problem but no fix.
Zen Follower
Hi
This version certainly should work for 1.3.9h, but I can't offer a guarantee
As for the Infernal Server Error, you will have to have a look at your apache_error.log to figure out what exactly is happening... If you can, provide the error messages I will try to help you get to the bottom of this
Cheers
Dan
Zen Follower
Hi, that file is pretty big, 83 meg. There is another error on that site which is in relation to something else so Ive had no luck really locating anything in the file. What should I search for perhaps?
Zen Follower
Hi Chargin
Here's what I'd do:
I don't know what kind of access you have but PHP can store its own error log. Do you have access to whether the logging feature is access and that file? If you do then make sure that PHP error logging is switched on before carrying out the above steps (probably should work on the order of my instructions)
If you have any questions or results please post them here
Cheers
Dan
New Zenner
Hi All
I have had the dynamic price updater on my site for ages all fine, then I move the site to a new server and it no longer works. I have updated it to a newer version still nothing. It show the graphic when you change qty etc but the price stays the same, the amount changes to the correct one when you add to basket. The site https://www.countbanners.co.uk. Im at a loss now as to why.
Thanks in advance
Drew
New Zenner
ZC 1.5.1 With the DPU 3.0.2
Copied files to the correct directory- tried to open my ZC admin- got a HTTP500 error. I went in and removed Admin>Includes>auto_loaders>config.dpu.php and the ZC Admin will open with no error. Now, of course the DPU didn't load, but I think I've narrowed down the offending file.
Can anyone assist. Any ideas why I can't get the DPU to load into ZCADMIN without an error?
Thanks. https://www.infidelbodyarmor.com
Zen Follower
Hi All
Anderson, I wasn't able to get that URL to load; are you sure it's correct?
Infidel, there is a post a little further up the page about 500 errors. Could you try the advice from there and see what you find? Let me know
Cheers
Dan
New Zenner
Hi Dan my bad its https://www.countybanners.co.UK thanks Drew
Zen Follower
Hi
I did think countbanners,com was a bit, well, niche
I'll take a look now
Dan
Fields marked required must be completed.
Tell staff why this post should be reviewed.