Forums / All Other Contributions/Addons / Dynamic Price Updater

Dynamic Price Updater

Views: 343,198

Results 61 to 80 of 1,701
28 Aug 2007, 10:07 AM
#61
chrome avatar

chrome

Zen Follower

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

Dynamic Price Updater

Hi

The Updater should already be capable of understanding radio boxes

Give it a try... If it doesn't work post a link to the failing page here (or PM it to me) and I'll take a look

Dan

28 Aug 2007, 3:24 PM
#63
chrome avatar

chrome

Zen Follower

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

Re: Dynamic Price Updater

Hi Jeff

I think the problem here might be the line-break in the LABEL text

Can you try removing that and seeing what happens? If this does fix the problem I'll write a quick codefix and upload it

If that doesn't work could you switch on the debug function (instructions are a page or 2 back)? That may help track down the issue

Cheers

Dan

28 Aug 2007, 3:59 PM
#64
jmacdoug avatar

jmacdoug

New Zenner

Join Date:
Jun 2007
Location:
NJ
Posts:
84
Plugin Contributions:
0

Re: Dynamic Price Updater

I changed it to now read "Size" instead of 3 different words. I still does not work. I'll set up the debug when i get back from lunch.

thanks for your time

28 Aug 2007, 4:17 PM
#65
chrome avatar

chrome

Zen Follower

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

Re: Dynamic Price Updater

Hi

Slight misunderstanding here I think... When I said LABEL (capitalised as it's an HTML element) I meant the bit that says, e.g., 8"x10" (+$79.00)

The line-break appears between the 8"x10" and the (+$79.00) bits

The updater should be able to read the line-break but I don't think it is for some reason (as the BR is an HTML element, it's probably breaking the text into 2 distinct nodes, of which only one is being read... Thinking aloud :smile:)

I would say to drop the BR in the attribute name and see what happens... If this isn't possible or doesn't work switch on the debug and we'll go from there

HTH

Dan

28 Aug 2007, 7:46 PM
#67
chrome avatar

chrome

Zen Follower

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

Re: Dynamic Price Updater

Hi

I've had a look at the page and have noticed you've added a lot of radios and removed the break from the LABELs... That seems to have fixed it from what I can see

I think it's safe to turn the debug mode off now :smile:

If you want the sidebox to show up find this line:

var _sidebox = 'information';

I'd recommend changing the 'information' to 'whatsnew'

That should force the Updater sidebox to appear above the New Products sidebox

HTH and let me know how you get on

Dan

28 Aug 2007, 8:14 PM
#68
jmacdoug avatar

jmacdoug

New Zenner

Join Date:
Jun 2007
Location:
NJ
Posts:
84
Plugin Contributions:
0

Re: Dynamic Price Updater

I actually have another issue. My pricing for this product is controlled by the attributes. Do you notice that the price that shows up is incorrect?

Notice how when you go to the page it does indeed reflect the lowest attribute price. As soon as you check on another print size it appends the cost instead of just changing it. Do you have a suggestion on this?

28 Aug 2007, 9:14 PM
#69
chrome avatar

chrome

Zen Follower

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

Re: Dynamic Price Updater

Yeah I have seen this issue before... It's down to the way the Updater reads the attributes... I'm waiting for 1.3.8 to really get to fixing that (largely because I don't have it quite sorted yet :smile:)

For now there are 2 solutions I can suggest, though neither are a satisfactory long term remedy

1 - Set the base price of the product to 0 and preselect the lowest attribute (so the starting price would be $0.00 but the 8"x10" radio is selected)

2 - I don't actually know how to do this but I think you can remove the + displayed in the price of the attribute (so it shows as ($83.99) rather than (+$83.99))... This forces the Updater to treat the price as a base price adjustment

If neither of these work for any reason or you're not able to implement them let me know and I'll sort something out for you

Sorry about that

Dan

29 Aug 2007, 1:41 AM
#70
jmacdoug avatar

jmacdoug

New Zenner

Join Date:
Jun 2007
Location:
NJ
Posts:
84
Plugin Contributions:
0

Re: Dynamic Price Updater

Well, I already tried suggestion 1 and can't figure out #2. Also didn't find in any threads. hmmm. Sorry to be a bother my friend. You are most helpful.

Jeff

:smartalec:

29 Aug 2007, 9:39 AM
#71
chrome avatar

chrome

Zen Follower

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

Re: Dynamic Price Updater

Having had a look around, I think I've found the answer to option #2

In the attributes controller, under Price and Weight, there are 2 INPUT fields that allow you to control the price... One of these boxes (the one on the left) contains a + symbol... deleting that on your attributes should, I think, have the desired effect

I've attached a little image to the post so you can see where I'm talking about :smile:

Hope that works... Let me know :smile:

Dan

29 Aug 2007, 2:17 PM
#72
jmacdoug avatar

jmacdoug

New Zenner

Join Date:
Jun 2007
Location:
NJ
Posts:
84
Plugin Contributions:
0

Re: Dynamic Price Updater

Well, I think you have done it! Take a look at http://www.printsxpress.com/index.php?main_page=product_info&products_id=1

I turned OFF all of the + signs at appropriate attributes. However, I left a plus sign on the attribute for Sawtooth Hanger since I do want that to add on a cost of $4.00

Finally, I made 8"x10" attribute the "default" selection.

There we have it.

So far so good and I can't thank you enough.

I'll let you know if I come accross anything else like this. Is 1.3.8 coming soon? I hear it is basically bug fixes.

29 Aug 2007, 2:54 PM
#73
chrome avatar

chrome

Zen Follower

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

Re: Dynamic Price Updater

I'm glad that worked :smile:... it was an education for me as well

I don't know the release date of 1.3.8 I'm afraid... But I think you're right and it's mostly bugfixes

One of the bugs that is due to be fixed relates to attributes that use textareas (IIRC), which prompted me to hang fire with true code updates (it is the plan that the Updater will work with any and all attributes)

Let me know if you do have any more trouble... I know the Updater can be a bit quirky so I'll support it as best I can

Dan

2 Sep 2007, 8:34 PM
#74
lankeeyankee avatar

lankeeyankee

Totally Zenned

Join Date:
Jan 2007
Posts:
1,514
Plugin Contributions:
1

Re: Dynamic Price Updater

I'm having problems getting this to work. I keep getting errors when selecting a radio button, it says "undefined(price)undefined(quanitity)" and the sidebox says chrome has broken something. I am running this on a xampp test server on my local computer so you can't see what's going on. I enabled debug and here's what it says:

[B]Onload quantity:[/B] Cart add INPUT discovered (1)
[B]Onload base price:[/B] Price found: 12.5
[B]Onload RAD/CH:[/B] Price found: 12.5
[B]Onload RAD/CH:[/B] Price found: 12.5
[B]Onload RAD/CH:[/B] Price found: 12.5
[B]Onload RAD/CH:[/B] Name - id[1] : ID - attrib-1-1
[B]Onload RAD/CH:[/B] Name - id[1] : ID - attrib-1-2 : Adjusted!
[B]Onload RAD/CH:[/B] Name - id[1] : ID - attrib-1-3 : Adjusted!
[B]Onload RAD/CH:[/B] 
[B]Onload RAD/CH:[/B] 
[B]Onload RAD/CH:[/B] 
[B]Onload RAD/CH:[/B] Name - id[1] : ID - attrib-1-1
[B]Onload RAD/CH:[/B] Name - id[1] : ID - attrib-1-2 : Adjusted!
[B]Onload RAD/CH:[/B] Name - id[1] : ID - attrib-1-3 : Adjusted!
[B]Onload:[/B] --- End of loading procedures ---
[B]updateR:[/B] *Adj* - Radio - Name: id[1] - Price adjust: 17.5 - Mode: 
[B]updatePriceNow:[/B] Item: brass - Mode: Base - Altering base to 17.5
[B]updatePriceNow:[/B] Item: undefined - 
[B]updatePriceNow:[/B] Item: undefined - 
[B]updatePriceNow:[/B] Item: undefined - 
[B]updatePriceNow:[/B] Item: undefined - 
[B]updatePriceNow:[/B] Item: undefined - 
[B]updatePriceNow:[/B] Item: undefined - 
[B]updatePriceNow:[/B] Item: undefined - 
[B]updatePriceNow:[/B] Item: undefined - 
[B]updatePriceNow:[/B] Item: undefined - 
[B]updatePriceNow:[/B] Item: undefined - 
[B]updatePriceNow:[/B] Item: undefined - 
[B]updatePriceNow:[/B] Item: undefined - 
[B]updatePriceNow:[/B] Item: undefined - 
[B]updatePriceNow:[/B] Item: undefined - 
[B]updatePriceNow:[/B] Item: undefined - 
[B]updatePriceNow:[/B] Item: undefined - 
[B]updatePriceNow:[/B] Item: undefined - 
[B]updatePriceNow:[/B] Item: undefined - 
[B]updatePriceNow:[/B] Item: undefined - 
[B]updatePriceNow:[/B] Item: undefined - 
[B]updatePriceNow:[/B] Item: undefined - 
[B]updatePriceNow:[/B] Item: undefined - 
[B]updatePriceNow:[/B] Item: undefined - 
[B]updatePriceNow:[/B] Item: undefined - 
[B]updatePriceNow:[/B] Item: undefined - 
[B]updatePriceNow:[/B] Item: undefined - 
[B]updatePriceNow:[/B] Item: undefined - 
[B]updatePriceNow:[/B] Item: undefined - 
[B]updatePriceNow:[/B] Item: undefined - 
[B]updatePriceNow:[/B] Item: undefined - 
[B]updatePriceNow:[/B] Item: undefined - 
[B]updatePriceNow:[/B] Item: undefined - 
[B]updatePriceNow:[/B] Item: undefined - 
[B]updatePriceNow:[/B] Item: undefined - 
[B]createSB:[/B] Sidebox created!

This happens with both IE7 and the latest version of FireFox. It seems as if there is something funny going on with my local computer because I have a problem with the jscript in xsell advanced, too. When I loaded xsell advanced and price updater onto the live remote server the js works for both mods in both browsers.

Do you have any ideas as to why it doesn't work on my localhost? I have FF configured with javascript enabled, I couldn't see where to enable it in IE7.

Another thing about Price Updater, with radio buttons at least, when you select an attribute and it updates the price and then you change it to a different attribute it sometimes sticks and the price won't change. Any ideas as to why this is happening?

I love the concept of this mod, it's super slick, so I hope that you will continue developing it. I am really impressed by your ability to create this and I hope that after a few years of self-taught nightschool I too will be able to code such innovative ideas.:smile:

Matt


Zen Cart and it's community are the best!!

2 Sep 2007, 9:33 PM
#75
chrome avatar

chrome

Zen Follower

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

Re: Dynamic Price Updater

Hi Matt

Thanks for the great compliment :smile:

I've got to hand it to you though, you've found a fault I have no explanation for

I know things can be a little bit weird running a local server (I run WAMPServer) but in I think honesty JS should be platform agnostic... There may be an issue in how the files are served up (maybe a headers problem... not too great with server stuff)

Does other JS run ok when served up locally?

Let me know and I'll see if I can find any info that might help

The problem with the radio boxes is something I've noticed... The issue only arises when the users clicks back onto an attribute that doesn't have a price adjustment (i.e. doesn't adjust the price)... I'd forgotten about that but I'll get it fixed over the next few days

If I'm not mistaken the settings for JS in IE are under tools -> security -> custom level... Near the bottom of that option list (enabled by default)

Dan

2 Sep 2007, 9:46 PM
#76
lankeeyankee avatar

lankeeyankee

Totally Zenned

Join Date:
Jan 2007
Posts:
1,514
Plugin Contributions:
1

Re: Dynamic Price Updater

Well both browsers have js enabled then...

I assume that Lightbox and Image Handler 2 both use jscript and they run fine. I am having a problem with Price Updater and Just Another Cross Sell Advanced. It seems like they are both having the same or similar problems - Price Updater says undefined around the price and X Sell says addfield is not defined. So they must both work in a similar function. I guess it's no big deal since this is just a test server but I'm one of those people that can't let an unresolved issue go. :D Like a dog with a bone I guess.:laugh:

Matt


Zen Cart and it's community are the best!!

2 Sep 2007, 10:02 PM
#77
chrome avatar

chrome

Zen Follower

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

Re: Dynamic Price Updater

Hey

Yeah, Lightbox does use JS but I don't know what it does (never checked it out)

It seems like it's a DOM (Document Object Model) issue... Strangely it resembles the situation that arises when using innerHTML but in this case I notice it's patchy

I know what you mean though: I hate unresolved issues too, even if they seem unimportant :smile:

If I do manage to find anything out I'll post it on here

On a purely "I'm being really pedantic" point, JScript is something a bit different... Back in the Bad Old Days(tm) of the browser wars, Netscape/Mozilla and MS had their own ideas for client-side scripting... MS created JScript and NS/Mozilla created ECMAScript... They're really similar and Javascript is an umbrella term... This is a very abridged description and I'm sure if it's inaccurate a fellow pedant will correct me :smile:

All learning is good learning :smile:

Dan

3 Sep 2007, 9:43 AM
#78
ryk avatar

ryk

Totally Zenned

Join Date:
Oct 2004
Location:
Southport, UK
Posts:
3,644
Plugin Contributions:
6

Re: Dynamic Price Updater

I have with 3 problems with this great mod - the first 2 can do nothing about but hopefully Dan can; the third I can offer guidance for:

  1. Ignores quantity discounts and therefore shows the wrong total.

  2. Ignores one-time charges.

  3. A client pointed out that if the price is in its usual location (i.e. up at the top of the page with the product name) then quite often the Attributes and Add to Cart sections are below the fold, so the benefits of this super mod are lost.

My solution was to copy the section for the base price display (EXCLUDING the quantity discounts section) in tpl_product_info_display.php ...

<h2 id="[B]productPrices[/B]" class="productGeneral">
<?php
// base price
  if ($show_onetime_charges_description == 'true') {
    $one_time = '<span >' . TEXT_ONETIME_CHARGE_SYMBOL . TEXT_ONETIME_CHARGE_DESCRIPTION . '</span><br />';
  } else {
    $one_time = '';
  }
  echo $one_time . ((zen_has_product_attributes_values((int)$_GET['products_id']) and $flag_show_product_info_starting_at == 1) ? TEXT_BASE_PRICE : '') . zen_get_products_display_price((int)$_GET['products_id']);
?></h2>
```and insert it closer to the Add to Cart box, giving this new element an id of productPrices2.

Then in jscript_updater.php, copy line 250 ...

document.getElementById('productPrices').innerHTML = '<?php echo UPDATER_PREFIX_TEXT; ?>' + l + addCommas(newPrice) + r + (showQuantity ? ' (' + quantity + ')' : '');


You can then use css to position/style as you need.

Now what would be really neat (and I'm sure it can be done but I don't know how) is to hide this second display of the price until after a change has been made.

Because of the quantity discounts issue, I've had to remove it from the live site for now, but you can see the ide on the test site [here](http://www.fastlec.co.uk/0-TESTING-CLONE/index.php?main_page=product_info&cPath=33_75_77&products_id=348)

Development Manager @ JSWeb Ltd - suppliers of Applepay/Googlepay for Zencart
20 years with Zencart !

3 Sep 2007, 8:07 PM
#79
chrome avatar

chrome

Zen Follower

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

Re: Dynamic Price Updater

Hi

There is so much to Zen Cart it's difficult to remember it all lol... This mod has shown me just how flexible the system is

I need to do some research on the first 2 points but I'm sure I can sort it (at least, I hope I can lol)

The third point I'm aware of... Careful positioning of the sidebox can help with this but I'm also debating creating a 'floating' price container (like a detached sidebox) that will either stick in place when scrolling or can be dragged around

I do like the idea of the price at the bottom too... I think I'll steal the idea :D

I'll make an option to have it hidden until a change is made or to be always shown or not shown at all... I think that covers the bases :smile:

Thanks for the feedback and ideas... I'll post when an update is available... Probably over the next few days

Dan

3 Sep 2007, 8:22 PM
#80
ryk avatar

ryk

Totally Zenned

Join Date:
Oct 2004
Location:
Southport, UK
Posts:
3,644
Plugin Contributions:
6

Re: Dynamic Price Updater

Chrome:

I think I'll steal the idea :D

This isn't stealing! I WANTED you to have it...and make it work in that fashion. :thumbsup:

Development Manager @ JSWeb Ltd - suppliers of Applepay/Googlepay for Zencart
20 years with Zencart !