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

Dynamic Price Updater

Views: 342,268

Results 361 to 380 of 1,701
27 Jul 2009, 12:48 PM
#361
chrome avatar

chrome

Zen Follower

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

Dynamic Price Updater

Hi Oli

You need to open the jscript_updater.php file in a text editor and find the line that says

var _debug = true;

If you change that to

var _debug = false;

You should be good to go

Let me know if there are any other issues

Dan

27 Jul 2009, 1:04 PM
#362
ojm avatar

ojm

New Zenner

Join Date:
Oct 2007
Posts:
68
Plugin Contributions:
0

Re: Dynamic Price Updater

Now why didn't I spot that...

Thanks!

27 Jul 2009, 1:31 PM
#363
ojm avatar

ojm

New Zenner

Join Date:
Oct 2007
Posts:
68
Plugin Contributions:
0

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;

<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

27 Jul 2009, 1:47 PM
#364
chrome avatar

chrome

Zen Follower

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

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

27 Jul 2009, 2:58 PM
#365
ojm avatar

ojm

New Zenner

Join Date:
Oct 2007
Posts:
68
Plugin Contributions:
0

Re: Dynamic Price Updater

Brill, cheers Dan! Totally understand other commitments! Thanks!

27 Jul 2009, 3:30 PM
#366
webbo1969 avatar

webbo1969

New Zenner

Join Date:
Aug 2006
Posts:
24
Plugin Contributions:
0

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

28 Jul 2009, 12:16 AM
#367
chrome avatar

chrome

Zen Follower

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

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:

objPrice = document.getElementById('productPrices');

and change it to:

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

28 Jul 2009, 12:24 AM
#368
chrome avatar

chrome

Zen Follower

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

Re: Dynamic Price Updater

Hi Steve

I think I might have found the problem with your site... Find this line

var temp = origHTML.match(/.*:\s*([^0-9 ]*)([0-9.,]+)(.*)/);

and change it to

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

28 Jul 2009, 12:50 AM
#369
chrome avatar

chrome

Zen Follower

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

Re: Dynamic Price Updater

Hi Oli

I've got something for you to try... Find the function called createSB()... After the line that contains

if (temp) { 

There is a solid block of code... This needs to be replaced with

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

objSB.getElementsByTagName('DIV')[0].innerHTML = hText + newText;

and change it to

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

28 Jul 2009, 7:57 AM
#370
ojm avatar

ojm

New Zenner

Join Date:
Oct 2007
Posts:
68
Plugin Contributions:
0

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!

28 Jul 2009, 8:39 AM
#371
chrome avatar

chrome

Zen Follower

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

Re: Dynamic Price Updater

Hi Oli

I have to confess at being quite surprised, and very pleased, that that worked... I wrote it completely blind and couldn't test it

Glad it works though!

Dan

28 Jul 2009, 9:57 AM
#372
ojm avatar

ojm

New Zenner

Join Date:
Oct 2007
Posts:
68
Plugin Contributions:
0

Re: Dynamic Price Updater

Works perfectly!

Might be good to package it up like that for download, as it's now the same format as the standard sideboxes etc.

Cheers mate!

28 Jul 2009, 2:09 PM
#373
webbo1969 avatar

webbo1969

New Zenner

Join Date:
Aug 2006
Posts:
24
Plugin Contributions:
0

Re: Dynamic Price Updater

Hi Dan

We've lost the IE javascript error but the price update is still not working when there is more than one attribute with a price difference.

http://www.prestigeringcompany.com/index.php?main_page=product_info&cPath=1_2_3&products_id=55
Only updates the price from the second of 2 priced attributes.

http://www.prestigeringcompany.com/index.php?main_page=product_info&cPath=1_6_7&products_id=137
Updates from the first and only priced attribute, of two attributes.

Hope you can help further with this.

Cheers,

Steve

28 Jul 2009, 2:26 PM
#374
chrome avatar

chrome

Zen Follower

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

Re: Dynamic Price Updater

Hi Steve

I think here that the type of attributes you are using are causing the Updater to get confused... It is really only effective when a base price is specified and every other attribute is an increase on that (this will give the attribute prices the format of, e.g., (+£100) rather than (£100))

The Updater is trying to change 2 base prices... I think this issue was first addressed when the Updater was in its infancy but it's something I wasn't able to resolve at that time... I'm not sure what I can do about it now but the Updater is a constant beta (always in development) so I will look into it

Let me know what you think

Cheers

Dan

29 Jul 2009, 12:45 AM
#375
webbo1969 avatar

webbo1969

New Zenner

Join Date:
Aug 2006
Posts:
24
Plugin Contributions:
0

Re: Dynamic Price Updater

Hi Dan

Ooooooh that's a blow. Due to the nature of the product ranges and the variable attributes, a base price is not what my client wants to use, but he also really wants the dynamic price updater. I have advised him of the situation and await his feedback to see if he is happy/prepared to restructure pricing or lose the dynamic price updater.

Do you feel with time you could achieve a resolution for the problem and if so is this likely to be in the near or distant future? I understand your time and effort is precious, therefore I have no problem in asking if a resolution could be achieved at a price?

Cheers,

Steve

29 Jul 2009, 3:47 PM
#376
chrome avatar

chrome

Zen Follower

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

Re: Dynamic Price Updater

Hi Steve

Unfortunately Updater plans for base price in this version doesn't look too good at the moment... I will keep the thread updated if anything arises though... I can say that there is no timescale currently

If you would like to discuss alternative options feel free to send me a PM on here or visit my site (http://chrome.me.uk) to contact me directly

Sorry I couldn't be more help at this time

Dan

29 Jul 2009, 4:10 PM
#377
lndlyb4 avatar

lndlyb4

New Zenner

Join Date:
Mar 2009
Posts:
78
Plugin Contributions:
0

Re: Dynamic Price Updater

Hi Dan,

I followed your instructions, but the price does not update when I choose a different option from the drop-down list. It does however, send the correct price to the shopping cart.

Thank you for helping me. If you have any other suggestions, I would appreciate it.

Bill

29 Jul 2009, 4:37 PM
#378
chrome avatar

chrome

Zen Follower

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

Re: Dynamic Price Updater

Hi Bill

You're quite right that doesn't work... Sorry about that... Such is the way of coding without being able to test! I'll take another look at this later as I have to head out just now

Hopefully I'll have a fix for you soon

Cheers

Dan

31 Jul 2009, 1:55 AM
#379
webbo1969 avatar

webbo1969

New Zenner

Join Date:
Aug 2006
Posts:
24
Plugin Contributions:
0

Re: Dynamic Price Updater

Hi Dan

The client is now going to restructure his pricing system with a base price, so hopefully all will be well from here.

Many thanks for your time.

Cheers,

Steve

31 Jul 2009, 8:36 AM
#380
chrome avatar

chrome

Zen Follower

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

Re: Dynamic Price Updater

Hi Steve

Sorry it has to be done this way... But if there are any other issues you experience let me know

Cheers

Dan