Forums / All Other Contributions/Addons / Dynamic Price Updater

Dynamic Price Updater

Results 1 to 20 of 1,701
14 Jul 2007, 18:03
#1
chrome avatar

chrome

Zen Follower

Join Date:
Jul 2005
Posts:
392
Plugin Contributions:
0

Dynamic Price Updater

Hi

I don't know if this module will be of any use to anyone but I've been asked to include it a couple of times so thought I'd release it into the wild to see if anyone can make use of it... Here's what it does:

When you have a product with attributes that alter the price this module will update the price displayed on the page instantly... This gives customers an at-a-glance price total as opposed to having to work it out themselves

The updater should (in theory) work with any amount of attributes

There is a readme included in the ZIP but installation is literally to just upload the file... It overwrites nothing, has no database hooks and is completely autonomous... if it breaks just delete the file

Currently it only works with attributes that are SELECTs... If it works for people I will update it to handle the radio boxes and checkboxes

The file can be found at

https://www.zen-cart.com/index.php?main_page=product_contrib_info&products_id=1973

A working version can be seen at http://www.studio5.uk.com/index.php?main_page=product_info&cPath=2&products_id=3

Let me know if it does/doesn't work or if anyone wants anything added or changed

Dan
14 Jul 2007, 18:17
#2
kim avatar

kim

Obaa-san

Join Date:
Jun 2003
Posts:
26,564
Plugin Contributions:
0

Re: Dynamic Price Updater

:thumbsup: Very nice Dan!
14 Jul 2007, 18:27
#3
misty avatar

misty

Inactive

Join Date:
Apr 2004
Posts:
5,752
Plugin Contributions:
1

Re: Dynamic Price Updater

Great contribution Dan.. thank you and adding options
for check/radio boxes would also me most welcome
:clap:
14 Jul 2007, 18:30
#4
chrome avatar

chrome

Zen Follower

Join Date:
Jul 2005
Posts:
392
Plugin Contributions:
0

Re: Dynamic Price Updater

Thanks!

Forgot to mention that at present the updater isn't currently currency-aware... If there is interest I will update that

This means that if your currency symbol is anything but £ you need to open the jscript_updater.php file and set the UPDATER_CURRENCY_SYMBOL constant to your currency symbol (e.g. $)

You can also alter the displayed text by changing the UPDATER_PREFIX_TEXT constant

Dan
14 Jul 2007, 19:08
#5
heathenmagic avatar

heathenmagic

Totally Zenned

Join Date:
May 2005
Posts:
730
Plugin Contributions:
0

Re: Dynamic Price Updater

Wow! That looks great. Definitely will be an essential mod.
14 Jul 2007, 19:45
#6
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Posts:
62,757
Plugin Contributions:
1

Re: Dynamic Price Updater

Looking nice ... :cool:

Have you a solution to when coming from the Shopping Cart and attributes are already set so the price isn't starting at the original base but at the settings already set in the dropdowns? :smile:
14 Jul 2007, 19:52
#7
chrome avatar

chrome

Zen Follower

Join Date:
Jul 2005
Posts:
392
Plugin Contributions:
0

Re: Dynamic Price Updater

Ajeh:

Looking nice ... :cool:

Have you a solution to when coming from the Shopping Cart and attributes are already set so the price isn't starting at the original base but at the settings already set in the dropdowns? :smile:


Hey now that's a great idea... I will look into it

I'm trying to keep this mod as simple as possible (1 file, no adjustments) but I reckon that should be doable... I'll get the radio/check boxes working then I'll get onto a 'memory' for added products :smile:

Thanks for the feedback... Looks like this might be worth building on

Dan
14 Jul 2007, 19:54
#8
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Posts:
62,757
Plugin Contributions:
1

Re: Dynamic Price Updater

Most definitely worth building ... many would like to see something like this work ...
14 Jul 2007, 20:02
#9
chrome avatar

chrome

Zen Follower

Join Date:
Jul 2005
Posts:
392
Plugin Contributions:
0

Re: Dynamic Price Updater

That's good to hear... I genuinely thought it would be one of those things that only clients of ours would want lol

Good news is I can update pre-selected attributes fairly easily... Should have that implemented over the weekend along with, hopefully, support for the other attribute types

Watch this space and thanks to all for the positive feedback (especially at this early stage)

Dan
14 Jul 2007, 21:05
#10
chrome avatar

chrome

Zen Follower

Join Date:
Jul 2005
Posts:
392
Plugin Contributions:
0

Re: Dynamic Price Updater

I've updated the updater to handle previously set attributes (e.g. a customer clicking from their shopping cart)... As before the updater doesn't care where its values come from; it just 'reads' the page (sorta)

One thing to note is that if you add a product to the cart then revisit that product through the normal channels (i.e. not clicking from the cart) the price will show as the starting price and the updater will not attempt to reconstruct the values in the cart... I consider this to be natural enough behaviour... A product with attributes can be ordered many times with different attributes for each shopping cart item... The updater respects this

The link for the mod is http://chrome.me.uk/PriceUpdater.zip

A working version is here http://www.studio5.uk.com/index.php?main_page=product_info&cPath=2&products_id=3 (this is always up-to-date because it's my testing ground for this)

Dan
14 Jul 2007, 21:08
#11
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Posts:
62,757
Plugin Contributions:
1

Re: Dynamic Price Updater

umm ... sorta ... getting a bit too much on the price there ... :unsure:
14 Jul 2007, 21:14
#12
chrome avatar

chrome

Zen Follower

Join Date:
Jul 2005
Posts:
392
Plugin Contributions:
0

Re: Dynamic Price Updater

Yikes I've broken something!

Er fixy time

Dan
14 Jul 2007, 21:15
#13
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Posts:
62,757
Plugin Contributions:
1

Re: Dynamic Price Updater

You just added the selected attributes to the already calculated price ... :eek:
14 Jul 2007, 21:16
#14
kim avatar

kim

Obaa-san

Join Date:
Jun 2003
Posts:
26,564
Plugin Contributions:
0

Re: Dynamic Price Updater

yeps- little whoops when you go back to the Prod_Info from the cart - i.e. I have $20.50 in my cart I go back to the page I see $32.50 ...
14 Jul 2007, 21:24
#15
voltage avatar

voltage

Totally Zenned

Join Date:
Apr 2005
Posts:
1,356
Plugin Contributions:
0

Re: Dynamic Price Updater

Chrome:

I genuinely thought it would be one of those things that only clients of ours would want lol


No way! I am so glad to see this feature. Eventually this should be part of the core code as it doesn't make sense to force customers to do the math themselves (or have to add it to the cart to figure it out).

Thanks a ton. I will implement it and report my results.

On your test site, I found that if I added something to the cart (i.e. $8 base price, $30 with attributes), and then followed the cart link back to the product page, the attributes are still selected, but only base price shows until you make a new selection.
14 Jul 2007, 21:27
#16
chrome avatar

chrome

Zen Follower

Join Date:
Jul 2005
Posts:
392
Plugin Contributions:
0

Re: Dynamic Price Updater

For some reason the onload is firing twice... fixeded now

File at the same place (http://chrome.me.uk/PriceUpdater.zip)

Sorry 'bout that

And thanks voltage... There may be some further tweaks that this mod needs that I'll fix as I get feedback... Unfortunately it is dependant on the quirks of browsers... There are some it won't work in (until I get the notification it doesn't and fix it :smile:)

Dan
14 Jul 2007, 21:30
#17
kim avatar

kim

Obaa-san

Join Date:
Jun 2003
Posts:
26,564
Plugin Contributions:
0

Re: Dynamic Price Updater

:clap: that is much better
14 Jul 2007, 21:32
#18
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Posts:
62,757
Plugin Contributions:
1

Re: Dynamic Price Updater

Now to really mess with your head ...

Add to Cart ... prices good ...

Come from Cart ... prices good ...

Change attributes ... :eek:

Now it adds the old price plus the new attributes ... :frusty:

Ever wonder why this isn't yet done in the core? :lamo:

Thanks for working on this ... it will be great when you are done ... then I will have to really test it ... :cool:
14 Jul 2007, 21:46
#19
chrome avatar

chrome

Zen Follower

Join Date:
Jul 2005
Posts:
392
Plugin Contributions:
0

Re: Dynamic Price Updater

Logic order problem

Fixed... I hope... Oh I hope lol

Let me know if anything else breaks :smile:

Dan
14 Jul 2007, 22:57
#20
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Posts:
62,757
Plugin Contributions:
1

Re: Dynamic Price Updater

Well ... the good news is ... I did not break it in the first 5 seconds ... :smile:

Bad news is ... I still have 101 tests to try to really mangle the heck out of this nifty add-on ... :eek:

So far it looks good ... thanks for the effort in getting this on track ... :smile: