Re: Dynamic Price Updater
I've add the DPU and having one problem.
I'd need to keep the format of the sale price with the ORIGINAL price strike through, the SALE PRICE in red, and Save: 20% Off.
Right Now when the price updates is just displays the Updated price in regular font and the rest is gone.
Try it here:
http://focalpointhardware.net/index....products_id=18
Is there a way to remedy this?
Thanks!
Re: Dynamic Price Updater
Thanks for this great mod. :clap:
A small suggestion for a possible future release is to make it multi lingual
Re: Dynamic Price Updater
cheers Dan, I figured it out.
awesome mod!
thanks
Re: Dynamic Price Updater
Hi all
Rosp: Glad you got it working :smile: What was the issue?
Design75: Thanks! Hmm, multilingual... I hadn't thought of that... Nice idea, I'll give it some thought
BrooklynArtist: Unfortunately, the Updater doesn't provide the display style you require at this time... Currently, I'm having to devote all my time to a project with a quite frankly insane deadline... That deadline is the end of the month so I should have some more time to look into things then... If you need this functionality urgently please PM me so we can arrange something
Thanks to all for the support :smile:
Dan
Re: Dynamic Price Updater
hey Chrome. I appreciate the fact that you're busy. I'm trying to fix some thing up that I can be satisfied with at the moment just as it is.
Just one more quick question for you.
I was able to change "Your Price" to a red font "Sale Price:" just by replacing 'Your Price:' with '<span class="priceupdater">SALE PRICE:</span>', and then styling it in the stylesheet.
Is there somewhere in the code, though, that I can create a html/css tag for the dynamically updated price itself so I can turn it red also?
Thanks! I don't a lot about javascript but I'll read through the script myself to see if I can figure it out.
Re: Dynamic Price Updater
Hi
I notice you're using V1... That's not as efficient or customisable as V2... Also V2 is much better at calculating prices as it uses the native cart functions
With V1 I believe the line you're looking for is 316 in jscript_updater.php... You should be able to customise the string sent to the price element (it's been years since I worked with V1)
Let me know how you get on and good luck :smile:
Dan
Re: Dynamic Price Updater
I did come up with this! I changed 'Your Price' to 'Sale: ' and added a new definition under it
Code:
define('UPDATER_PREFIX_TEXT', 'Sale: ');
define('UPDATER_SALEMESSAGE_TEXT', 'Save: 20% off');
Then around line 316 I added in the HTML tags:
Code:
document.getElementById('productPrices').innerHTML = '<span class="priceupdater">'+'<?php echo UPDATER_PREFIX_TEXT; ?>'+ l + addCommas(newPrice) + '<br>' + '<?php echo UPDATER_SALEMESSAGE_TEXT; ?>' + '</span>' + r + (showQuantity ? ' (' + quantity + ')' : '');
The result is something very close to what I have styled BEFORE one selects and attribute. The only thing missing is the price before the discount with the strikethrough.
I can live with this for now.
BTW, can you point me to the download link for version 2?
Thanks, again for this awesome code!
Re: Dynamic Price Updater
Hi
The download for V2 is on the same page as V1 and featured in my sig... Installation is a tiny bit more tricky as there are 4 files but they are in the correct structure so essentially just upload them... Like V1 there is nothing to do to get it working as it will fire itself up... To uninstall V1 just prefix jscript_updater.php with an underscore and it won't run but will be there should you need it
Good job with the display :smile:... But if I might offer a suggestion: use <br /> rather than just <br>... The former is XHTML compatible
Dan
1 Attachment(s)
Re: Dynamic Price Updater
Hi Chrome,
Since I installed the mod the product price is shown in its normal place, but also on the bottom. Is this normal behaviour? How can I remove the price at the bottom. Has it something to do with TPP?
Re: Dynamic Price Updater
Hi
The second price bit was added for pages with a long description... It has a switch in modules/pages/product_info/jscript_ajax_updater.php on line 36 that says:
Code:
var _secondPrice = 'cartAdd';
Change this to:
Code:
var _secondPrice = false;
HTH
Dan