Forums / All Other Contributions/Addons / Dynamic Price Updater

Dynamic Price Updater

Views: 343,201

Results 1,661 to 1,680 of 1,701
16 Feb 2023, 4:20 PM
#1661
dbltoe avatar

dbltoe

Totally Zenned

Join Date:
Jan 2004
Location:
N of San Antonio TX
Posts:
9,849
Plugin Contributions:
18

Dynamic Price Updater

Unfortunately, I still get the error when both are "fixed"

      $this->responseText['priceTotal'] .= number_format($this->shoppingCart->total, $decimal_places, $decimal_point, $thousands_point);      $this->responseText['preDiscPriceTotal'] = number_format(zen_add_tax($this->shoppingCart->show_total_before_discounts, zen_get_tax_rate($product_check->fields['products_tax_class_id'])), $decimal_places, $decimal_point, $thousands_point);
    } else {
      $this->responseText['priceTotal'] .= $currencies->display_price($this->shoppingCart->total, 0 /* zen_get_tax_rate($product_check->fields['products_tax_class_id']) *//* 0 */ /* DISPLAY_PRICE_WITH_TAX */);
      $this->responseText['preDiscPriceTotal'] = $currencies->display_price($this->shoppingCart->show_total_before_discounts, zen_get_tax_rate($product_check->fields['products_tax_class_id']));
    }

One checker advised to change protected string $responseType = 'success'; to ```
protected $responseType = 'success';


One checker also suggested that the $_post variables are not properly set before being used.

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

16 Feb 2023, 10:12 PM
#1662
goldbuckle avatar

goldbuckle

Zen Follower

Join Date:
Dec 2006
Location:
near Atlanta Georgia
Posts:
220
Plugin Contributions:
0

Re: Dynamic Price Updater

I have installed a new test site with v1.5.8 using the Responsive Classic template and then installed DPU v4.0.0 Beta 3 (https://github.com/Zen4All-nl/Zen-Cart-Dynamic-Price-Updater/) Ajax-loader.gif is spinning upon entering a quantity in the quantity box or selecting an attribute but no price is displaying. Is it compatible with v158?

https://test.discountprintingservice.com/index.php?main_page=product_info&cPath=66&products_id=181

Thanks,
John

Best,
Goldbuckle

16 Feb 2023, 10:15 PM
#1663
dbltoe avatar

dbltoe

Totally Zenned

Join Date:
Jan 2004
Location:
N of San Antonio TX
Posts:
9,849
Plugin Contributions:
18

Re: Dynamic Price Updater

GoldBuckle:

I have installed a new test site with v1.5.8 using the Responsive Classic template and then installed DPU v4.0.0 Beta 3 (https://github.com/Zen4All-nl/Zen-Cart-Dynamic-Price-Updater/) Ajax-loader.gif is spinning upon entering a quantity in the quantity box or selecting an attribute but no price is displaying. Is it compatible with v158?

https://test.discountprintingservice.com/index.php?main_page=product_info&cPath=66&products_id=181

Thanks,
John

Are you looking at the previous posts?

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

16 Feb 2023, 10:37 PM
#1664
goldbuckle avatar

goldbuckle

Zen Follower

Join Date:
Dec 2006
Location:
near Atlanta Georgia
Posts:
220
Plugin Contributions:
0

Re: Dynamic Price Updater

Reading through it now. Console is showing:

jquery-3.6.1.min.js:2
POST https://test.discountprintingservice.com/ajax.php?act=DPU_Ajax&method=getDetails 500
send @ jquery-3.6.1.min.js:2
ajax @ jquery-3.6.1.min.js:2
(anonymous) @ index.php?main_page=…&products_id=181:70
Deferred @ jquery-3.6.1.min.js:2
zcJS.ajax @ index.php?main_page=…&products_id=181:36
getPrice @ index.php?main_page=…products_id=181:407
(anonymous) @ index.php?main_page=…products_id=181:654

dbltoe:

Are you looking at the previous posts?

Best,
Goldbuckle

16 Feb 2023, 10:41 PM
#1665
goldbuckle avatar

goldbuckle

Zen Follower

Join Date:
Dec 2006
Location:
near Atlanta Georgia
Posts:
220
Plugin Contributions:
0

Re: Dynamic Price Updater

Okay, just missed this one I guess. Will install v5 and report back soon. Thanks dbltoe!

dbltoe:

Perfect!

Temporary location for updated files at https://github.com/dbltoe/Zen-Cart-Dynamic-Price-Updater/tree/158

Those files will NOT work prior to 1.5.8

Best,
Goldbuckle

17 Feb 2023, 6:44 AM
#1666
goldbuckle avatar

goldbuckle

Zen Follower

Join Date:
Dec 2006
Location:
near Atlanta Georgia
Posts:
220
Plugin Contributions:
0

Re: Dynamic Price Updater

Upgraded to ZC v158, store and admin work as should. Install v5 and store works but admin gives me an error. Delete all v5 files and admin works again. And yes I change the Your Admin and Your Template folders as necessary.

This page isn’t working

https://www.discountprintingservice.com is currently unable to handle this request.
HTTP ERROR 500

Thanks,
John

Best,
Goldbuckle

17 Feb 2023, 2:55 PM
#1667
goldbuckle avatar

goldbuckle

Zen Follower

Join Date:
Dec 2006
Location:
near Atlanta Georgia
Posts:
220
Plugin Contributions:
0

Re: Dynamic Price Updater

@lat9 and @dbltoe

Had working v158 store and admin in test folder and added DPU v5 with no other modules installed and store works but admin gives a 500 error. I had changed the <Your Admin> and <Your Template> folders accordingly. Has either of you got v5 to work with v158?

dbltoe:

Are you looking at the previous posts?

GoldBuckle:

Upgraded to ZC v158, store and admin work as should. Install v5 and store works but admin gives me an error. Delete all v5 files and admin works again. And yes I change the Your Admin and Your Template folders as necessary.

This page isn’t working

www.discountprintingservice.com is currently unable to handle this request.
HTTP ERROR 500

Thanks,
John

Best,
Goldbuckle

17 Feb 2023, 3:00 PM
#1668
goldbuckle avatar

goldbuckle

Zen Follower

Join Date:
Dec 2006
Location:
near Atlanta Georgia
Posts:
220
Plugin Contributions:
0

Re: Dynamic Price Updater

I do get the ZC Admin login page but after the submit button I get a 500 error page.

Best,
Goldbuckle

17 Feb 2023, 3:19 PM
#1669
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,110
Plugin Contributions:
56

Re: Dynamic Price Updater

GoldBuckle:

I do get the ZC Admin login page but after the submit button I get a 500 error page.
500 error implies a PHP log present in the site's /logs sub-directory. Since you can't log in, view that sub-directory either using an FTP program (e.g. WinSCP or FileZilla) or via your webhost's cPanel's File Manager tool.

Remember that since the log was issued from the admin, its contents will include reference to your admin directory's name. Be sure and xxx those occurrences out and post a pertinent log within a "CODE" tag (the big # in the menu bar shown when you're writing your response).

17 Feb 2023, 3:37 PM
#1670
goldbuckle avatar

goldbuckle

Zen Follower

Join Date:
Dec 2006
Location:
near Atlanta Georgia
Posts:
220
Plugin Contributions:
0

Re: Dynamic Price Updater

[17-Feb-2023 10:01:43 America/New_York] PHP Parse error: Unterminated comment starting line 2 in admin/includes/installers/dpu/4_0_0-beta_1.php on line 2

[17-Feb-2023 10:01:43 America/New_York] PHP Parse error: Unterminated comment starting line 2 in admin/includes/installers/dpu/4_0_0-beta_1.php on line 2.

Does this help?

lat9:

500 error implies a PHP log present in the site's /logs sub-directory. Since you can't log in, view that sub-directory either using an FTP program (e.g. WinSCP or FileZilla) or via your webhost's cPanel's File Manager tool.

Remember that since the log was issued from the admin, its contents will include reference to your admin directory's name. Be sure and xxx those occurrences out and post a pertinent log within a "CODE" tag (the big # in the menu bar shown when you're writing your response).

Best,
Goldbuckle

17 Feb 2023, 3:48 PM
#1671
goldbuckle avatar

goldbuckle

Zen Follower

Join Date:
Dec 2006
Location:
near Atlanta Georgia
Posts:
220
Plugin Contributions:
0

Re: Dynamic Price Updater

@lat9 admin/includes/installers/dpu/4_0_0-beta_1.php on line 2

4_0_0-beta_1.php:

<?php /** V4.0.0, What changed: - updated the jquery to 4.3.1 - rewritten the class and javascript. Removing all the ancient code, and moving to the builtin ajax functions of Zen Cart - removed the Multi code formthe class, as it is not used (since v1). If neededit can always be put back in. 4_0_0-beta_2.php <?php /** V4.0.0, What changed: - updated the jquery to 4.3.1 - rewritten the class and javascript. Removing all the ancient code, and moving to the builtin ajax functions of Zen Cart - removed the Multi code formthe class, as it is not used (since v1). If neededit can always be put back in. 4_0_0-beta_3.php <?php /** V4.0.0, What changed: - updated the jquery to 4.3.1 - rewritten the class and javascript. Removing all the ancient code, and moving to the builtin ajax functions of Zen Cart - removed the Multi code form the class, as it is not used (since v1). If neededit can always be put back in. - Added code changes from Torvista, MC12345678, and Zen4All I just removed all three php files above and wallah it now works! I feel like I accomplished something!

Best,
Goldbuckle

17 Feb 2023, 3:56 PM
#1672
goldbuckle avatar

goldbuckle

Zen Follower

Join Date:
Dec 2006
Location:
near Atlanta Georgia
Posts:
220
Plugin Contributions:
0

Re: Dynamic Price Updater

Now that I can get into my test site's admin I tested a product and I am just getting the spinning ajax-gif, price never loads.

Best,
Goldbuckle

17 Feb 2023, 9:10 PM
#1673
dbltoe avatar

dbltoe

Totally Zenned

Join Date:
Jan 2004
Location:
N of San Antonio TX
Posts:
9,849
Plugin Contributions:
18

Re: Dynamic Price Updater

Yep, those old installers were supposed to be gone. They are now.

You should have a log file for the spinner. Check for that.

AND, a new fix for the spinner. fingers crossed

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

22 Feb 2023, 5:07 PM
#1674
goldbuckle avatar

goldbuckle

Zen Follower

Join Date:
Dec 2006
Location:
near Atlanta Georgia
Posts:
220
Plugin Contributions:
0

Re: Dynamic Price Updater

I updated the DPU using the v5 file on Git from your update Friday. Still not working. Ajax gif doesn't stop spinning on product page. After login page on admin side I get blank page and 500 error.

Do I need to re-install zc and then re-install DPU?

Thanks,
John

dbltoe:

Yep, those old installers were supposed to be gone. They are now.

You should have a log file for the spinner. Check for that.

AND, a new fix for the spinner. fingers crossed

Best,
Goldbuckle

22 Feb 2023, 8:31 PM
#1675
goldbuckle avatar

goldbuckle

Zen Follower

Join Date:
Dec 2006
Location:
near Atlanta Georgia
Posts:
220
Plugin Contributions:
0

Re: Dynamic Price Updater

After multiple failed attempts of 158 and DPU v5 with a test site with data from 157 db I created a new test site with a blank database added 1 product with 2 attributes and 2 options each. Installed DPU v5 and when I go to the login page for admin enter credentials I get a blank page and 500 error. Need some help here as it seems something in v5 is not right using dbltoe 's revision from Friday in the Github.
Thanks,
John

Best,
Goldbuckle

22 Feb 2023, 8:33 PM
#1676
goldbuckle avatar

goldbuckle

Zen Follower

Join Date:
Dec 2006
Location:
near Atlanta Georgia
Posts:
220
Plugin Contributions:
0

Re: Dynamic Price Updater

Trying to multi-quote previous posts, please see post prior to this one.

lat9:

500 error implies a PHP log present in the site's /logs sub-directory. Since you can't log in, view that sub-directory either using an FTP program (e.g. WinSCP or FileZilla) or via your webhost's cPanel's File Manager tool.

Remember that since the log was issued from the admin, its contents will include reference to your admin directory's name. Be sure and xxx those occurrences out and post a pertinent log within a "CODE" tag (the big # in the menu bar shown when you're writing your response).

dbltoe:

Yep, those old installers were supposed to be gone. They are now.

You should have a log file for the spinner. Check for that.

AND, a new fix for the spinner. fingers crossed

Best,
Goldbuckle

22 Feb 2023, 10:58 PM
#1677
goldbuckle avatar

goldbuckle

Zen Follower

Join Date:
Dec 2006
Location:
near Atlanta Georgia
Posts:
220
Plugin Contributions:
0

Re: Dynamic Price Updater

I have narrowed the offending file down: config.dpu.php (admin/includes/autoloaders)

looks like it is missing "?>" at the end of the below code. Anyone else see any problems?

<?php // Dynamic Price Updater 5.0 if (!defined('IS_ADMIN_FLAG')) { die('Illegal Access'); } if (IS_ADMIN_FLAG === true) { $autoLoadConfig[999][] = array( 'autoType' => 'init_script', 'loadFile' => 'init_dpu_config.php' ); } else { trigger_error(__FILE__ . ' loaded from catalog side, verify upload of files.', E_USER_WARNING); @unlink(__FILE__); } // uncomment the following line to perform a uninstall // $uninstall = 'uninstall'; > **lat9:** > > 500 error implies a PHP log present in the site's /logs sub-directory. Since you can't log in, view that sub-directory either using an FTP program (e.g. WinSCP or FileZilla) or via your webhost's cPanel's File Manager tool. > > Remember that since the log was issued from the admin, its contents will include reference to your admin directory's name. Be sure and xxx those occurrences out and post a pertinent log within a "CODE" tag (the big # in the menu bar shown when you're writing your response). > **dbltoe:** > > Yep, those old installers were supposed to be gone. They are now. > > You should have a log file for the spinner. Check for that. > > AND, a new fix for the spinner. fingers crossed

Best,
Goldbuckle

8 Mar 2023, 12:18 PM
#1678
torvista avatar

torvista

Totally Zenned

Join Date:
Aug 2007
Location:
Gijón, Asturias, Spain
Posts:
2,875
Plugin Contributions:
7

Re: Dynamic Price Updater

Note to Admin, please link plugin to this active repository:

https://github.com/dbltoe/Zen-Cart-Dynamic-Price-Updater

The code in "158" is being actively reviewed but currently installs and works in ZC158.

I'm currently reviewing this complex plugin.
So, if others have bugs or points to make, first try out the code from the "158" branch on a vanilla ZC158 site to reproduce the bug/demonstrate your point, then raise an issue on the repository, then someone may try and fix it if you can't.

Steve
github.com/torvista: BackupMySQL, Structured Data, Multiple Copy-Move-Delete, Google reCaptcha, Image Checker, Spanish Language Pack and more...

17 Apr 2023, 8:09 PM
#1680
torvista avatar

torvista

Totally Zenned

Join Date:
Aug 2007
Location:
Gijón, Asturias, Spain
Posts:
2,875
Plugin Contributions:
7

Re: Dynamic Price Updater

After spending a stupid amount of time intending to clear such errors,

https://github.com/dbltoe/Zen-Cart-Dynamic-Price-Updater/issues/26

I eventually gave up as I have to do real work and could not justify any more fettling.

It.Is.Complicated.

But, you could start hacking from here:
https://github.com/dbltoe/Zen-Cart-Dynamic-Price-Updater/blob/7c50b02ff28f4e595af9c8a931c868b0c550b60e/Installation_files/includes/classes/ajax/zcDPU_Ajax.php#L127

that's where all these permutations are constructed.

Steve
github.com/torvista: BackupMySQL, Structured Data, Multiple Copy-Move-Delete, Google reCaptcha, Image Checker, Spanish Language Pack and more...