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

Dynamic Price Updater

Views: 342,329

Results 841 to 860 of 1,701
25 Aug 2011, 5:50 AM
#841
spiritcraft avatar

spiritcraft

New Zenner

Join Date:
May 2009
Posts:
34
Plugin Contributions:
0

Dynamic Price Updater

Thank you Mr Chrome...

let me know if you come up with a solution.

Thank you!

25 Aug 2011, 11:14 AM
#842
georgemicra avatar

georgemicra

New Zenner

Join Date:
Aug 2011
Posts:
1
Plugin Contributions:
0

Re: Dynamic Price Updater

Hello everybody!!! I am new to zen cart. I have installed the dynamic price updater which is a very helpful app but there is a little problem. When it calculates the price it gives a result of 1% more than it should be. Does anybody know what happens? You can see it in the following link: http://www.vapepal.gr/index.php?main_page=product_info&cPath=4&products_id=33

Any help would be appreciated.
Thank you in advance,

George.

5 Sep 2011, 10:19 PM
#843
harri avatar

harri

New Zenner

Join Date:
Oct 2010
Location:
Finland
Posts:
26
Plugin Contributions:
0

Re: Dynamic Price Updater

Hello and thanks for this great addon! I just updated to the latest version to fix some problems with sales and onetime charges.
Now DPU v2.0a (2.0.1) calculates all prices 1% too high, even the base price. All prices become correct, when added to cart. Do you have any ides how to fix this? I would appreciate your help a lot! :)

With the old version everything worked great, except when there was onetime charges included in the products - the price wasn't calculated at all. I would appreciate your help in this too, if you can help.

7 Sep 2011, 10:29 PM
#844
fjutt avatar

fjutt

New Zenner

Join Date:
Jul 2011
Location:
The Netherlands
Posts:
16
Plugin Contributions:
0

Re: Dynamic Price Updater

Hi Dan!

Not moaning! Just wondering if you have an update on the dual pricing?

Just curious!

Frans

11 Sep 2011, 8:31 PM
#845
kamelion0927 avatar

kamelion0927

Zen Follower

Join Date:
Dec 2009
Posts:
208
Plugin Contributions:
1

Re: Dynamic Price Updater

This mod works fabulously on items that are priced by attribute (base prices are all $0) but on my items that are not priced by attribute (they don't even have any attributes), the displayed price is incorrect (it looks like the DPU is pulling prices from the upsell sidebox and recently viewed mod).

To correct this, I have been trying to add an if statement to jscript_ajax_updater.php to keep the DPU from loading on items that have a base price of more than $0, but have thus far been unsuccessful (obviously or I wouldn't be bugging you :smile:).

The most logical if statement for me to use (I think) would be something like

 $pibp = zen_get_products_base_price($pid);
 if ($pibp > 0) $load = false;

but it isn't working - the script is still loading on my products that have a base price of more than $0.

Help please? Thanks in advance.

11 Sep 2011, 8:46 PM
#846
chrome avatar

chrome

Zen Follower

Join Date:
Jul 2005
Location:
Wales, UK
Posts:
392
Plugin Contributions:
0

Re: Dynamic Price Updater

Hi all

Sorry it's taken me so long to reply... That old enemy, time, has not been on my side... I have been following the trouble people are experiencing with the display price and believe me I really want to get it sorted... I know I've said this before but I intend to try and fix the problems this week

Frans, I have done some work integrating with the dual pricing mod but it statically returns the display string rather than calculated results so I've been trying to strip them down to something I can work with... I don't want to alter the dual pricing mod's code... I'll get it sorted

kamelion0927, the Updater doesn't pull its prices from anywhere: it calculates them by creating a sandboxed shopping cart object and applying the attributes to it... Heavy-lifting of the price calculations is offloaded to core routines to future-proof against core updates and updated pricing routines... Unfortunately, it appears I'm applying something incorrectly... I need to look into it

Incidentally, have you tried echoing the $pibp var to see what it contains?

Dan

11 Sep 2011, 10:44 PM
#847
kamelion0927 avatar

kamelion0927

Zen Follower

Join Date:
Dec 2009
Posts:
208
Plugin Contributions:
1

Re: Dynamic Price Updater

Chrome:

kamelion0927, the Updater doesn't pull its prices from anywhere: it calculates them by creating a sandboxed shopping cart object and applying the attributes to it... Heavy-lifting of the price calculations is offloaded to core routines to future-proof against core updates and updated pricing routines... Unfortunately, it appears I'm applying something incorrectly... I need to look into it

Incidentally, have you tried echoing the $pibp var to see what it contains?

Dan

Sorry - I'm not talented enough to be a true coder so I always forget to utilize the echo statement :D (which, incidentally, would save me a lot of time trying to figure out what parts of the code to use on if statements - time for a sticky on the monitor).

Thanks for your time! I'll try echoing the statement and see what I get.

11 Sep 2011, 11:03 PM
#848
chrome avatar

chrome

Zen Follower

Join Date:
Jul 2005
Location:
Wales, UK
Posts:
392
Plugin Contributions:
0

Re: Dynamic Price Updater

kamelion0927:

Sorry - I'm not talented enough to be a true coder so I always forget to utilize the echo statement :D (which, incidentally, would save me a lot of time trying to figure out what parts of the code to use on if statements - time for a sticky on the monitor).

Thanks for your time! I'll try echoing the statement and see what I get.
Hi

The little piece of code that I always use is

echo '<pre>';
var_dump($theVarWithNoName);
echo '</pre>';

var_dump() is great because it gives you extended information... Also the variable can be an array, object or pretty much anything really... The <pre> tag makes it nice and readable :smile:

HTH

Dan

11 Sep 2011, 11:20 PM
#849
kamelion0927 avatar

kamelion0927

Zen Follower

Join Date:
Dec 2009
Posts:
208
Plugin Contributions:
1

Re: Dynamic Price Updater

Chrome:

Hi

The little piece of code that I always use is

echo '<pre>';
var_dump($theVarWithNoName);
echo '</pre>';

> var_dump() is great because it gives you extended information... Also the variable can be an array, object or pretty much anything really... The <pre> tag makes it nice and readable :smile:
> 
> HTH
> 
> Dan

LOL thanks but you almost totally lost me - you have to type slowly and clearly so I can keep up. :D

I added 

```php
$pibp = zen_get_products_base_price($pid);	
echo '<pre>';
var_dump($pibp);
echo '</pre>';

to jscript_ajax_updater right under

 $pidp = zen_get_products_display_price($pid);
	if (empty($pidp)) $load = false;

and above

if ($load) {

but nothing is showing on my product info pages. Am I putting the code in incorrectly?

11 Sep 2011, 11:26 PM
#850
chrome avatar

chrome

Zen Follower

Join Date:
Jul 2005
Location:
Wales, UK
Posts:
392
Plugin Contributions:
0

Re: Dynamic Price Updater

Hi

Crikey, you're right, it's in a javascript file... You should be able to see the results in the source of page, near the top... The echo option would have the same effect... Change the code to:

echo '// DEBUG';
var_dump($pibp);

Refresh the page, view source then hit CTRL+F and search for DEBUG... Convoluted but it should get you to your data

HTH

Dan

12 Sep 2011, 7:05 PM
#851
maxell6230 avatar

maxell6230

New Zenner

Join Date:
Nov 2009
Posts:
27
Plugin Contributions:
0

Re: Dynamic Price Updater

Hi could some one let me know how I stop the price displaying twice with this excellent mod. thanks,

12 Sep 2011, 7:22 PM
#852
harri avatar

harri

New Zenner

Join Date:
Oct 2010
Location:
Finland
Posts:
26
Plugin Contributions:
0

Re: Dynamic Price Updater

maxell6230:

Hi could some one let me know how I stop the price displaying twice with this excellent mod. thanks,

try this, open jscript_updater.php and find (line 35):
var _secondPrice = 'true';

and change to:
var _secondPrice = 'false';

12 Sep 2011, 8:05 PM
#853
maxell6230 avatar

maxell6230

New Zenner

Join Date:
Nov 2009
Posts:
27
Plugin Contributions:
0

Re: Dynamic Price Updater

ok thanks Hari changed it and it worked, although mine said var _secondPrice = 'cartAdd'; whioch I changed to false, does this make a differance?

Thanks,

12 Sep 2011, 8:19 PM
#854
harri avatar

harri

New Zenner

Join Date:
Oct 2010
Location:
Finland
Posts:
26
Plugin Contributions:
0

Re: Dynamic Price Updater

maxell6230:

ok thanks Hari changed it and it worked, although mine said var _secondPrice = 'cartAdd'; whioch I changed to false, does this make a differance?

Thanks,

Yep, "cartadd" was correct value for that. Good that it worked for you!

13 Sep 2011, 12:04 PM
#855
leearmstrong3 avatar

leearmstrong3

New Zenner

Join Date:
Sep 2011
Posts:
4
Plugin Contributions:
0

Re: Dynamic Price Updater

Hi All,

Thanks for taking the time to create this awesome module.

I have uploaded all files from the zip to a website im working on. However, after the upload, I recieve an error in google chrome:

"Status returned - "

On IE, I get a constant loading picture.. circle just keeps circling..

Any ideas on how to fix the issue?

Thanks,

Lee

13 Sep 2011, 3:36 PM
#856
kamelion0927 avatar

kamelion0927

Zen Follower

Join Date:
Dec 2009
Posts:
208
Plugin Contributions:
1

Re: Dynamic Price Updater

Chrome:

Hi

Crikey, you're right, it's in a javascript file... You should be able to see the results in the source of page, near the top... The echo option would have the same effect... Change the code to:

echo '// DEBUG';
var_dump($pibp);

> Refresh the page, view source then hit CTRL+F and search for DEBUG... Convoluted but it should get you to your data
> 
> HTH
> 
> Dan

Convoluted is the only way to go - makes life so much more interesting. :P

When I add the debugging echo, I get // DEBUGstring(7) "15.9500" (and a whole lotta odd W3C errors). But to be honest, have no idea what the debugstring means (or what to do to correct it).

Thanks so much for your time!
13 Sep 2011, 8:17 PM
#857
chrome avatar

chrome

Zen Follower

Join Date:
Jul 2005
Location:
Wales, UK
Posts:
392
Plugin Contributions:
0

Re: Dynamic Price Updater

Hi

Lee, do you have a link? I'll check it out

kamelion, the //DEBUG bit is just the echo string to find the output in the code... The var_dump() follows straight after and is saying the variable is a string, 7 characters long and it contains "15.9500"... It's odd that the code you have used doesn't work... I'm not firing on all cylinders at the moment but try

if ((float)$pibp > 0) $load = false;

That might work; I'm pretty tired so I may be missing something else... Let me know how you get on

Cheers

Dan

14 Sep 2011, 4:47 AM
#858
kamelion0927 avatar

kamelion0927

Zen Follower

Join Date:
Dec 2009
Posts:
208
Plugin Contributions:
1

Re: Dynamic Price Updater

Chrome:

Hi

Lee, do you have a link? I'll check it out

kamelion, the //DEBUG bit is just the echo string to find the output in the code... The var_dump() follows straight after and is saying the variable is a string, 7 characters long and it contains "15.9500"... It's odd that the code you have used doesn't work... I'm not firing on all cylinders at the moment but try

if ((float)$pibp > 0) $load = false;

> That might work; I'm pretty tired so I may be missing something else... Let me know how you get on
> 
> Cheers
> 
> Dan

That is so nice of you to help even though you're tired.  You have no idea how much I appreciate it!

I would love to put your code to the test but all the sudden this afternoon, the DPU decided to be stubborn and wouldn't work at all - even after I replaced the files with untainted ones. (I haven't made changes to any other files other than the ones specific to DPU.)

I'm getting 
Error: this._responseXML.getElementsByTagName("responseType")[0] is undefined

I thought it was because I have the css/js loader installed (don't know if you're familiar with it) which runs a minify script. So to get it to play nice, I did the workaround required if there's a javascript conflict and it's still reading the whole file except for that one line...

I don't suppose you have any ideas of how to fix it?
14 Sep 2011, 5:12 AM
#859
leearmstrong3 avatar

leearmstrong3

New Zenner

Join Date:
Sep 2011
Posts:
4
Plugin Contributions:
0

Re: Dynamic Price Updater

Chrome:

Hi

Lee, do you have a link? I'll check it out

kamelion, the //DEBUG bit is just the echo string to find the output in the code... The var_dump() follows straight after and is saying the variable is a string, 7 characters long and it contains "15.9500"... It's odd that the code you have used doesn't work... I'm not firing on all cylinders at the moment but try

if ((float)$pibp > 0) $load = false;

> That might work; I'm pretty tired so I may be missing something else... Let me know how you get on
> 
> Cheers
> 
> Dan

Hi Dan,

choosemypc.com.au - PM me if you want login details... Its just a test site..

Thanks,

Lee
14 Sep 2011, 12:19 PM
#860
chrome avatar

chrome

Zen Follower

Join Date:
Jul 2005
Location:
Wales, UK
Posts:
392
Plugin Contributions:
0

Re: Dynamic Price Updater

Hi

Kamelion, The Updater is failing because somehow a blank space is the first character is the returned XML... To be honest I have no idea why that might be happening... Usually this is caused by a blank space after the ?> which ends a PHP file, but the Updater's files are left open to guard against this anomaly... Currently I couldn't say why your site is exhibiting this behaviour but I will have a think about it

Lee, that link doesn't load

Cheers

Dan