Zen Follower
- Join Date:
- Dec 2006
- Location:
- near Atlanta Georgia
- Posts:
- 220
- Plugin Contributions:
- 0
Dynamic Price Updater
Is there anyone in the ZenCart community that can update this plugging for the latest version 1.5.8 or 1.5.8a?
Best,
Goldbuckle
Views: 343,202
Zen Follower
Is there anyone in the ZenCart community that can update this plugging for the latest version 1.5.8 or 1.5.8a?
Best,
Goldbuckle
Totally Zenned
You can try an updated version in branch 158 here:
https://github.com/dbltoe/Zen-Cart-Dynamic-Price-Updater
with no guarantees.
Due to the complexity of this mod, the development and support is pretty forked-up, as various well-meaning people have attempted to keep it alive.
This functionality really should be a core function, but it is not trivial to implement once it touches discount-pricing-hell.
Steve
github.com/torvista: BackupMySQL, Structured Data, Multiple Copy-Move-Delete, Google reCaptcha, Image Checker, Spanish Language Pack and more...
Totally Zenned
Just a bit question... I was done some stuff and bored.. I turned on, signed 158a and put the files for DPU, I put the create language files and it works now! I need some testing and work for additional image swapped with it, but it's not working yet. I think both worked better with one then two plugins.
Dave
Always forward thinking... Lost my mind!
Totally Zenned
davewest:
Just a bit question... I was done some stuff and bored.. I turned on, signed 158a and put the files for DPU, I put the create language files and it works now! I need some testing and work for additional image swapped with it, but it's not working yet. I think both worked better with one then two plugins.
The zip file includes a language file for the admin and the shop. The language file for the shop should be placed in includes/languages/english/extra_definitions/ versus includes/languages/english/extra_definitions/responsive_classic. Otherwise, the language file would only work when the selected template was exactly responsive_classic. Putting it directly in extra_definitions allows any template to use the language file.
Need a hand with Zen Cart? Hire the team at myZenCartZone.com for upgrades, repairs, and custom plugins.
Zen Cart Certified hosting at myZenCartHost.com
Totally Zenned
dbltoe:
The zip file includes a language file for the admin and the shop. The language file for the shop should be placed in includes/languages/english/extra_definitions/ versus includes/languages/english/extra_definitions/responsive_classic. Otherwise, the language file would only work when the selected template was exactly responsive_classic. Putting it directly in extra_definitions allows any template to use the language file.
You no, but I like template. Also I can try with or without php strict, it still worked...
My system:
Zen Cart 1.5.8a
Database Patch Level: 1.5.8
Server Linux 6.2.0-33-generic
Apache 2.4.53 (Unix)
PHP 8.1.6 (Zend: 4.1.6)
MySQL 10.4.24-MariaDB
jQuery v3.5.1
Dave
Always forward thinking... Lost my mind!
Totally Zenned
Note that with the inclusion of POSM (stock control of attributes) in ZC 2.1.0, this add-on
https://vinosdefrutastropicales.com/index.php?main_page=product_info&cPath=2_7&products_id=60
can replace DPU.
Steve
github.com/torvista: BackupMySQL, Structured Data, Multiple Copy-Move-Delete, Google reCaptcha, Image Checker, Spanish Language Pack and more...
Totally Zenned
Are you running it successfully with EO installed?
Need a hand with Zen Cart? Hire the team at myZenCartZone.com for upgrades, repairs, and custom plugins.
Zen Cart Certified hosting at myZenCartHost.com
Totally Zenned
I don't use Edit Orders.
Steve
github.com/torvista: BackupMySQL, Structured Data, Multiple Copy-Move-Delete, Google reCaptcha, Image Checker, Spanish Language Pack and more...
zennedOut
New Zenner
torvista:
Note that with the inclusion of POSM (stock control of attributes) in ZC 2.1.0, this add-on
https://vinosdefrutastropicales.com/index.php?main_page=product_info&cPath=2_7&products_id=60
can replace DPU.
I s there a demo page to demonstrate the price updating?
Administrator
Georgecy:
I s there a demo page to demonstrate the price updating?
https://zc158.vinosdefrutastropicales.com/zc158/index.php?main_page=product_info&cPath=66&products_id=1
Zen Follower
The price changes with options selected but does not change when I change the quantity from 1 to 2 or 3 etc etc. That is what makes DPU so great.
lat9:
Best,
Goldbuckle
Totally Zenned
Note that this change to ajax.php
https://github.com/zencart/zencart/blob/811e641d9fce1649c9313a3553285c2ecfb1ed17/ajax.php#L51
only allows alpha-numeric characters/does not allow an underscore in either of the parameters.
So this call from DPU gets failed:
https://yoursite/ajax.php?act=DPU_Ajax&method=getDetails
as can be seen on the browser console network XHR with the 400 responses.
A quick fix is add the underscore to the check
!preg_match('/^[a-zA-Z0-9_]+$/', $_GET['act'])
but the class/use of this variable needs to be renamed.
Since DPU needs to taken behind the shed to be shot/replaced with this add-on to the core attributes stock manager
https://vinosdefrutastropicales.com/index.php?main_page=product_info&cPath=2_7&products_id=60
I'm just giving a heads-up.
Steve
github.com/torvista: BackupMySQL, Structured Data, Multiple Copy-Move-Delete, Google reCaptcha, Image Checker, Spanish Language Pack and more...
Totally Zenned
ZC 2.1.0 / PHP 8.3 / Using ZCABootstrap as template.
Managed to get everything to work by using the version loaded in from the GitHub, but changing attribute options on a product page, I get the following error:
[03-Dec-2024 22:50:55 America/New_York] Request URI: /justuptown/ajax.php?act=DPU_Ajax&method=getDetails, IP address: 127.0.0.1, Language id 1#0 E:\xampp\htdocs\justuptown\includes\classes\ajax\zcDPU_Ajax.php(110): zen_debug_error_handler()
#1 E:\xampp\htdocs\justuptown\ajax.php(77): zcDPU_Ajax->getDetails()
--> PHP Warning: Undefined property: DPU::$sideboxActive in E:\xampp\htdocs\justuptown\includes\classes\ajax\zcDPU_Ajax.php on line 110.
[03-Dec-2024 22:50:55 America/New_York] Request URI: /justuptown/ajax.php?act=DPU_Ajax&method=getDetails, IP address: 127.0.0.1, Language id 1
#0 E:\xampp\htdocs\justuptown\includes\classes\ajax\zcDPU_Ajax.php(110): zen_debug_error_handler()
#1 E:\xampp\htdocs\justuptown\ajax.php(77): zcDPU_Ajax->getDetails()
--> PHP Warning: Undefined property: DPU::$sideboxActive in E:\xampp\htdocs\justuptown\includes\classes\ajax\zcDPU_Ajax.php on line 110.
Totally Zenned
retched:
ZC 2.1.0 / PHP 8.3 / Using ZCABootstrap as template.
Managed to get everything to work by using the version loaded in from the GitHub, but changing attribute options on a product page, I get the following error:
[03-Dec-2024 22:50:55 America/New_York] Request URI: /justuptown/ajax.php?act=DPU_Ajax&method=getDetails, IP address: 127.0.0.1, Language id 1#0 E:\xampp\htdocs\justuptown\includes\classes\ajax\zcDPU_Ajax.php(110): zen_debug_error_handler()
#1 E:\xampp\htdocs\justuptown\ajax.php(77): zcDPU_Ajax->getDetails()
--> PHP Warning: Undefined property: DPU::$sideboxActive in E:\xampp\htdocs\justuptown\includes\classes\ajax\zcDPU_Ajax.php on line 110.
[03-Dec-2024 22:50:55 America/New_York] Request URI: /justuptown/ajax.php?act=DPU_Ajax&method=getDetails, IP address: 127.0.0.1, Language id 1
#0 E:\xampp\htdocs\justuptown\includes\classes\ajax\zcDPU_Ajax.php(110): zen_debug_error_handler()
#1 E:\xampp\htdocs\justuptown\ajax.php(77): zcDPU_Ajax->getDetails()
--> PHP Warning: Undefined property: DPU::$sideboxActive in E:\xampp\htdocs\justuptown\includes\classes\ajax\zcDPU_Ajax.php on line 110.
Okay... this is a bandaid, the errors have stopped but I fear this is only temporary:
include/classes/ajax/zcDPU_Ajax.php:
Change line about 110:
```php
if ($this->dpu->sideboxActive) {
to
if ($this->dpu->sideboxActive ?? FALSE) {
And change \includes\templates\bootstrap\jscript\jscript_dynamic_price_updater.php, line 79 from:
const DPUsideboxActive = ('<?php echo $dpu->sideboxActive; ?>' === '1');
to
const DPUsideboxActive = ('<?php echo $dpu->sideboxActive ?? NULL; ?>' === '1');
I do not like these, but not sure where to go about declaring the property.
Totally Zenned
Can anyone confirm if the GitHub version of the Dynamic Price Updater v5 (linked below) is compatible with Zen Cart 2.10?
https://github.com/dbltoe/Zen-Cart-Dynamic-Price-Updater
I'm encountering an issue where the price is not updating, and the browser console logs a 400 Bad Request error for the AJAX call.
I noticed that I had the same issue as described in the last post of this thread by retched. I applied the two suggested edits, which resolved that specific problem, but the 400 Bad Request error persists.
Any insights or confirmation on compatibility would be greatly appreciated!
Thanks in advance!
marcopolo
Zen Cart 2.2.2 | PHP 8.5.11 | MariaDB 10.11.14
Totally Zenned
The 'quick fix' in this post fixed the 400 error for me in v2.1.0. I have not (needed to) apply the two suggested edits.
Simon
Totally Zenned
simon1066:
The 'quick fix' in this post fixed the 400 error for me in v2.1.0. I have not (needed to) apply the two suggested edits.
Thank you that fixed it!
marcopolo
Zen Cart 2.2.2 | PHP 8.5.11 | MariaDB 10.11.14
Totally Zenned
While reviewing the tightening up of the use of pID/pid as a GET name:
https://github.com/zencart/zencart/pull/7413
I discovered that the use of $pID in the Ask a Question page was being overwritten by the use of pID in the DPU javascript.
Since the support and development of this mod has fallen by the wayside/is in multiple GitHub forks, I'm just pointing this out for reference as something users of this mod should review, maybe not now, but definitely if adding DPU to the upcoming 2.2.0 release.
And to repeat, the DPU functionality is in the commercial add-on to POSM, so use that and dump this.
Steve
github.com/torvista: BackupMySQL, Structured Data, Multiple Copy-Move-Delete, Google reCaptcha, Image Checker, Spanish Language Pack and more...
Zen Follower
Is the a live demo I can see showing the customer side of POSM? I want to see how the DPU functionality works in POSM?
torvista:
While reviewing the tightening up of the use of pID/pid as a GET name:
https://github.com/zencart/zencart/pull/7413I discovered that the use of $pID in the Ask a Question page was being overwritten by the use of pID in the DPU javascript.
Since the support and development of this mod has fallen by the wayside/is in multiple GitHub forks, I'm just pointing this out for reference as something users of this mod should review, maybe not now, but definitely if adding DPU to the upcoming 2.2.0 release.
And to repeat, the DPU functionality is in the commercial add-on to POSM, so use that and dump this.
Best,
Goldbuckle
Tell staff why this post should be reviewed.