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

Dynamic Price Updater

Views: 342,272

Results 501 to 520 of 1,701
29 Sep 2009, 10:19 PM
#501
bigsy85 avatar

bigsy85

New Zenner

Join Date:
Aug 2008
Posts:
50
Plugin Contributions:
0

Dynamic Price Updater

Hi Chrome, there's an option in CEON to add an exception for a file which I did for dpu_Ajax.php.

Just come across another problem I think you can help with. I've installed http://www.zen-cart.com/index.php?main_page=product_contrib_info&products_id=994 'Attribute image replaces main product image on selecting attribute'

The problem is this is using Ajax to replace the image which is conflicting with the DPU script, when the page is loading both the attribute can be selected replacing the main image, and the price updates, but once the age loads only the price update?

Any thoughts?

Thanks

1 Oct 2009, 10:50 AM
#502
izar74 avatar

izar74

Zen Follower

Join Date:
Mar 2009
Location:
Italy
Posts:
155
Plugin Contributions:
0

Re: Dynamic Price Updater

Hi Chrome, I installed the mod succesfully, it work great but with one problem...
The decimal in the price are wrong... Let me explain, an item has a price of 2.40€ (2.00+Vat 20%), when i load the product page it shows rigt but after a sec it change from 2.40 to 2.42..
It's a very little difference but it's annoying.
I'm trying to fix it meanwhile if you have suggestion will be appreciated..

p.s. Zencart last versione
Php 5.x

For now the mod is not on a live server, just testing on local so i cannot link it.

1 Oct 2009, 11:21 AM
#503
chrome avatar

chrome

Zen Follower

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

Re: Dynamic Price Updater

Hi

Bigsy: This is one of the issues I'm trying to fix... There seems to be an issue with the Ajax object... I'm getting to it (need my test site back up and running first)

Izar: What value do you get if you add the item to your basket?

Cheers

Dan

1 Oct 2009, 12:58 PM
#504
izar74 avatar

izar74

Zen Follower

Join Date:
Mar 2009
Location:
Italy
Posts:
155
Plugin Contributions:
0

Re: Dynamic Price Updater

The right one Chrome, the basker work perfectly.
I've upload the mod on live server, here the link

http://www.laviadellincenso.it/commerce/index.php?main_page=product_info&cPath=2&products_id=61&number_of_uploads=0&language=en

The right price are 2.40, and each attributes add a rouded value so i dont' know where the decimal came from...

Until now i didn't find any clue...

1 Oct 2009, 1:15 PM
#505
chrome avatar

chrome

Zen Follower

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

Re: Dynamic Price Updater

Hi

Hmm, that's an odd one... It does look like a rounding error but the Updater uses the basket code to generate the prices... I'll take a look into it on my server when it's up and running (not long now I hope)

Dan

1 Oct 2009, 1:31 PM
#506
izar74 avatar

izar74

Zen Follower

Join Date:
Mar 2009
Location:
Italy
Posts:
155
Plugin Contributions:
0

Re: Dynamic Price Updater

Hmmm i'll take a look to the basket also, just a note, may it have something to do with the currency used? Or with the vat?
It' strange because the original value is rounded, 2,00 and it apply a vat of 20% so the result is yet rouded 2,40.
That 0,02 came from nowhere...
Still searching ;-)

1 Oct 2009, 1:46 PM
#507
chrome avatar

chrome

Zen Follower

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

Re: Dynamic Price Updater

Hi

Looking at other products it appears to be adding 0,01EUR per 1,00EUR (or there abouts)... Very odd... Again, it could be rounding

I can't look at the script at all for the moment but I will when I get home... Need to check a few things

Dan

1 Oct 2009, 3:00 PM
#508
izar74 avatar

izar74

Zen Follower

Join Date:
Mar 2009
Location:
Italy
Posts:
155
Plugin Contributions:
0

Re: Dynamic Price Updater

Thank You a lot Chrome, hope to solve this soon :-)

1 Oct 2009, 7:55 PM
#509
ksookma avatar

ksookma

Zen Follower

Join Date:
Aug 2009
Posts:
212
Plugin Contributions:
1

Re: Dynamic Price Updater

Yup, looking forward to it!:wink:

2 Oct 2009, 11:34 AM
#510
izar74 avatar

izar74

Zen Follower

Join Date:
Mar 2009
Location:
Italy
Posts:
155
Plugin Contributions:
0

Re: Dynamic Price Updater

Hi again, here some conclusions i got, unfortunatly i'm not good with java so i've not be able to spot the problem...

  1. It add a 0,01 for every 1,00 (1,00 will became 1,01 - 5,00 will become 5,05...)
  2. It doesn't effect the cart process, if you add product in the cart the price are right and all is fine.
  3. Maybe the problem is in the jscript_ajax_updater.php
  4. I try it on Mysql 4.x and 5.x with same results.
  5. It effect only the product page. (Think because the module just work with it...)

no other hints at the moment :-(

4 Oct 2009, 12:15 AM
#511
newbie76 avatar

newbie76

Zen Follower

Join Date:
Aug 2009
Posts:
100
Plugin Contributions:
0

Re: Dynamic Price Updater

This was just what I was looking for, I just added custom pc's to my site, works like a charm :)

4 Oct 2009, 6:09 PM
#512
newbie76 avatar

newbie76

Zen Follower

Join Date:
Aug 2009
Posts:
100
Plugin Contributions:
0

Re: Dynamic Price Updater

would have edited but was too late, just one question, how do I get it to show below a sidebox instead of above?

TIA!

5 Oct 2009, 2:08 PM
#513
izar74 avatar

izar74

Zen Follower

Join Date:
Mar 2009
Location:
Italy
Posts:
155
Plugin Contributions:
0

Re: Dynamic Price Updater

Hi again Crhome, sorry to bother you again, I wasn't able to figure out why DPU add 0,01 to every price in the product page, do you have any suggestion?
Wich file is responsable for the update of the price?

Many thanks

5 Oct 2009, 2:23 PM
#514
chrome avatar

chrome

Zen Follower

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

Re: Dynamic Price Updater

Hi

Newby: The sidebox has to live above another sidebox unfortunately... You can change the following line:

var _sidebox = 'manufacturers';

to state any sidebox you would like the Updater to appear above (use the ID of the sidebox)

Izar: The file which controls the price determination is in classes/dynamic_price_updater.php... Unfortunately I haven't yet solved this problem (still server issues until my site is transferred) and to be honest I'm not sure where to start... Usually I have an idea of what's wrong but this time I'm completely stumped

Thanks for your patience (again) everyone... I'll try to get this sorted ASAP

Dan

6 Oct 2009, 12:12 AM
#515
newbie76 avatar

newbie76

Zen Follower

Join Date:
Aug 2009
Posts:
100
Plugin Contributions:
0

Re: Dynamic Price Updater

Chrome:

Hi

Newby: The sidebox has to live above another sidebox unfortunately... You can change the following line:

var _sidebox = 'manufacturers';

> 
> to state any sidebox you would like the Updater to appear above (use the ID of the sidebox)

I saw that thanks chrome, basically where as I had it above manufacturers (default), my manufacturers box was at the top of the page (doesn't look right at the bottom), I tried to move tell a friend box to the bottom and put it above that but it didn't seem to like the spaces or using underscore to replace the space and wouldn't work.  

I basically need it at the bottom as I have my attributes after the description of the base unit which customers can have the optional upgrades on, so as they are down there making changes they can't see the box, I'll just have to keep manufacturers box down the bottom, still a great addition and very much appreciated for your time to code it.
7 Oct 2009, 12:12 AM
#516
chrome avatar

chrome

Zen Follower

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

Re: Dynamic Price Updater

Hi Newby

The ID of the 'Tell A Friend' sidebox is 'tellafriend', no spaces or caps... Give that a try :smile:

Cheers

Dan

7 Oct 2009, 9:58 AM
#517
izar74 avatar

izar74

Zen Follower

Join Date:
Mar 2009
Location:
Italy
Posts:
155
Plugin Contributions:
0

Re: Dynamic Price Updater

Hi Chrome, perhaps i found the Solution!!!

In dynamic_price_updater.php at the line 83 there is this code:

$product_check = $this->_db->Execute("select products_tax_class_id from " . TABLE_PRODUCTS . " where products_id = '" . (int)$this->_post['products_id'] . "'" . " limit 0");

I changed "limit 1" to "limit 0". Really i don't know exactly what it does but it work... the price are now correct..

The question is... which are the side effect of that change? :shocking:

10 Oct 2009, 2:05 AM
#518
newbie76 avatar

newbie76

Zen Follower

Join Date:
Aug 2009
Posts:
100
Plugin Contributions:
0

Re: Dynamic Price Updater

Chrome:

Hi Newby

The ID of the 'Tell A Friend' sidebox is 'tellafriend', no spaces or caps... Give that a try :smile:

Cheers

Dan

Thanks :smile:

15 Oct 2009, 8:43 PM
#519
chrome avatar

chrome

Zen Follower

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

Re: Dynamic Price Updater

Hi

First off, sorry all, things have been very, very busy of late... I know I've said this before but I'm going to try my best to get some new test code sorted over the next week

Izar: What you're doing there is disabling the tax... If it works for you that's great but it might indicate an issue somewhere else in the code... I'll wait for more feedback on this one as the matter of the Updater not playing with other Ajax modules is more pressing

News soon, I hope!

Dan

16 Oct 2009, 8:29 AM
#520
izar74 avatar

izar74

Zen Follower

Join Date:
Mar 2009
Location:
Italy
Posts:
155
Plugin Contributions:
0

Re: Dynamic Price Updater

Thanks Dan,

Until now It work great, dunno if the problem was caused from something in the tax, i'm from Italy so i've adjust the tax rate and so on. Disabling the calculation on tax rounded the value, to be precise the tax calculated are 20% of the value, Zencart is set to display the price WITH tax included, so if I've something which cost €10,00 it will show €12,00 on the product page.
The module add a 1% to the total value so 12,00 become €12,12.

Hope this will help addressing the problem in future.