Re: Dynamic Price Updater
Hi Oli
You need to open the jscript_updater.php file in a text editor and find the line that says
If you change that to
Code:
var _debug = false;
You should be good to go
Let me know if there are any other issues
Dan
Re: Dynamic Price Updater
Now why didn't I spot that...
Thanks!
Re: Dynamic Price Updater
Me again...
I'm not great with JavaScript, so can't work out how to do this...
What I'm trying to do, is to change the sidebox the Updater creates, so it follows the same structure as other sideboxes, and so I can use the same (or similar) CSS. Ie;
Code:
<div id=updaterSB" class="box" style="width: 175px;">
<div class="box_head">Price Breakdown</div>
<div class="box_body">
<div id="updaterSBContent" class="sideBoxContent">
blah blah
</div>
</div>
</div>
Is this possible?
Cheers
Re: Dynamic Price Updater
Hi again
Yes that's possible... The javascript that creates the sidebox will need to be updated... More concerning is that the sidebox update code will also need altering to accomodate locating the new div to update (wrapping it in another DIV will move the sidebox in the DOM tree)
I am going to be looking at sites tonight so I'll quickly code up a new sidebox creation routine (this will be specific for your site) that you will need to add to jscript_updater.php
From there there may be some trial and error getting the locator right but it shouldn't take too long
I do have priorities to other posters on the thread but I will try my best to get all issues addressed this evening
Cheers
Dan
Re: Dynamic Price Updater
Brill, cheers Dan! Totally understand other commitments! Thanks!
Re: Dynamic Price Updater
Hi Dan
Many thanks for your response. Apologies that I have only just replied as I have been away.
Is this an issue caused by the currency converter Mod which I installed as I have un-installed this now but the problem still exists?
I look forward to an update.
Regards,
Steve
Re: Dynamic Price Updater
Hi Bill
In order that the issues have come to me I'll try to address yours first... Hopefully this will work... Firstly, find the line that says:
Code:
objPrice = document.getElementById('productPrices');
and change it to:
Code:
objPrice = document.getElementById('price').getElementsByTagName('P')[0];
Your template has a different document structure to what the Updater is expecting... Hopefully that's the only difference but give it a try and let me know what happens
Cheers
Dan
Re: Dynamic Price Updater
Hi Steve
I think I might have found the problem with your site... Find this line
Code:
var temp = origHTML.match(/.*:\s*([^0-9 ]*)([0-9.,]+)(.*)/);
and change it to
Code:
var temp = origHTML.match(/s*([^0-9 ]*)([0-9.,]+)(.*)/);
I hope that works... Fixing problems is never easy when there's no way to test :smile:... Give it a try and let me know how it goes
Cheers
Dan
Re: Dynamic Price Updater
Hi Oli
I've got something for you to try... Find the function called createSB()... After the line that contains
There is a solid block of code... This needs to be replaced with
Code:
objSB = document.createElement('DIV'); // create the sidebox wrapper
objSB.id = 'updaterSB';
objSB.className = 'box'; // set the CSS reference
// create the heading bit
var tempH = document.createElement('DIV');
tempH.id = 'updateSBHeading';
tempH.className = 'box_head';
tempH.innerHTML = 'Price Breakdown';
objSB.appendChild(tempH);
// create the content div
var tempC = document.createElement('DIV');
tempC.id = 'updaterSBContentBody';
tempC.className = 'box_body';
objSB.appendChild(tempC);
// create special inner inner div
var tempD = document.createElement('DIV');
tempD.id = 'updaterSBContent';
tempD.className = 'sideBoxContent';
tempD.innerHTML = 'innerHTML is cheating!';
tempC.appendChild(tempD);
Next you need to find this line
Code:
objSB.getElementsByTagName('DIV')[0].innerHTML = hText + newText;
and change it to
Code:
objSB.getElementById('updaterSBContent').innerHTML = hText + newText;
and hopefully that should do it... Either that or break the whole thing in a spectacular way... Let me know
Cheers
Dan
Re: Dynamic Price Updater
Legend! Works perfectly! Thank you Dan!
If you visit the link I posted before, you'll see it in action - didn't even need to add any CSS to style it up!
Thank you!