-
Re: Dynamic Price Updater
To further my earlier post, here is an error message that Firebug gives me in Firefox 2.0.0.2:
prArr[i].p has no properties
http://www.drumfactorydirect.com/dru...8/1410c-9.html
Line 441
and this is the line of code it refers to:
newText += prArr[i]['n'] + (prArr[i]['p'] != 0 ? ' - ' + (showQuantitySB ? quantity + 'x ' : '') + prArr[i]['l'] + prArr[i]['p'].toFixed(2) + prArr[i]['r']: '') + '<br/>';
The PriceUpdater debug has this to say:
SP Onload: Type: always
updSP: Duplicating price, by jove!
Onload quantity: Cart add INPUT discovered (1)
Onload base price: Price found: 12.55
Onload SELECT: Name - id[3] : ID - attrib-3
Onload RAD/CH: Name - id[3] : ID - attrib-3
Onload RAD/CH: Name - id[3] : ID - attrib-3
Onload RAD/CH: Name - id[3] : ID - attrib-3
updateR: *Adj* - Radio - Name: id[1] - Price adjust: 12.55 - Mode:
updatePriceNow: Item: http://www.drumfactorydirect.com/ima...4-10-or-SM.jpg
chrome - Mode: Base - Altering base to 12.55
updatePriceNow: Item: undefined -
updatePriceNow: Item: undefined -
updatePriceNow: Item: undefined -
updatePriceNow: Item: undefined -
updatePriceNow: Item: undefined -
updatePriceNow: Item: undefined -
updatePriceNow: Item: undefined -
updatePriceNow: Item: undefined -
updatePriceNow: Item: undefined -
updatePriceNow: Item: undefined -
updatePriceNow: Item: undefined -
updatePriceNow: Item: undefined -
updatePriceNow: Item: undefined -
updatePriceNow: Item: undefined -
updatePriceNow: Item: undefined -
updatePriceNow: Item: undefined -
updatePriceNow: Item: undefined -
updatePriceNow: Item: undefined -
updatePriceNow: Item: undefined -
updatePriceNow: Item: undefined -
updatePriceNow: Item: undefined -
updatePriceNow: Item: undefined -
updatePriceNow: Item: undefined -
updatePriceNow: Item: undefined -
updatePriceNow: Item: undefined -
updatePriceNow: Item: undefined -
updatePriceNow: Item: undefined -
updatePriceNow: Item: undefined -
updatePriceNow: Item: undefined -
updatePriceNow: Item: undefined -
updatePriceNow: Item: undefined -
updatePriceNow: Item: undefined -
updatePriceNow: Item: undefined -
updatePriceNow: Item: undefined -
updatePriceNow: Item: undefined -
updatePriceNow: Item: undefined -
updatePriceNow: Item: undefined -
updatePriceNow: Item: undefined -
updatePriceNow: Item: undefined
Hope that helps,
Matt
-
Re: Dynamic Price Updater
[quote=lankeeyankee;459599]http://musicalinstrumentsource.com/i...&products_id=1
quote]
I had to re-install zencart on this domain, it's my live testbed, so here's the new link:
http://musicalinstrumentsource.com/i...&products_id=1
Matt
-
Re: Dynamic Price Updater
Excellent mod!
I have a question, though, can you confirm whether or not the Price Updater is functioning with sale items yet? I know that it was in the works but after installing and messing with this mod, i'm finding its not working for me. It could be me though :) But right now its reverting to the original sales price whenever i select an attribute.
http://extremelytropical.com/index.p...products_id=62
thanks!
Sarah
-
Re: Dynamic Price Updater
Brilliant mod!
Is there a way to add the Price Breakdown to the main page rather than as a sidebox?
Many thanks in advance.
-
Re: Dynamic Price Updater
I just wanted to thank you Chrome for this. It was just what I needed and works perfectly. Again, thank you.
David...
-
Re: Dynamic Price Updater
Hello,
I spoke too soon. I am having one problem that I cannot figure out.
All my Attribute Values add up correctly when selected but my base price which is selected under one of the attributes is not carried over to the checkout.
Not sure if this make sense but basically the checkout price is everything selected minus the designated base price.
Any suggestions ?
Thanks,
-
Re: Dynamic Price Updater
Hi all
And firstly I'm really sorry I've been so negligent of the thread... I've been swamped, but I know there's no excuse
Thanks Matt for that excellent piece of information... I've never installed Lightbox nor considered it to be an issue so I'd never have spotted it... Good call
Sarah, I'm sorry the mod still doesn't support sale items
Still Crazy, great idea! I'll try to build that in
Pinwest, can you provide a URL for me to have a look at? You can PM it to me if you prefer
Thanks to all for your support... Over the next few days (honest this time) I'm going to start a redesign, hopefully with the help of Snorkpants
Dan
-
Re: Dynamic Price Updater
Hi Dan,
Does this work with 1.3.8? I have the file uploaded and when I change the attribute I get something like this:
Your price: undefined30.00undefined (1)
-
Re: Dynamic Price Updater
BTW, here goes the debug:
Code:
SP Onload: Type: always
updSP: Price node cloned!
updSP: Node inserted successfully
updSP: Duplicating price, by jove!
Onload quantity: Cart add INPUT discovered (1)
Onload base price: Price found: 95
Onload SELECT: Name - id[14] : ID - attrib-14
Onload SELECT: Name - id[15] : ID - attrib-15
Onload SELECT: Name - id[20] : ID - attrib-20
Onload SELECT: Name - id[12] : ID - attrib-12
Onload SELECT: Name - id[10] : ID - attrib-10
Onload RAD/CH: Name - id[10] : ID - attrib-10
Onload RAD/CH: Name - id[10] : ID - attrib-10
Onload RAD/CH: Name - id[10] : ID - attrib-10
Onload RAD/CH: Name - id[10] : ID - attrib-10
Onload RAD/CH: Name - id[10] : ID - attrib-10
Onload RAD/CH: Name - id[10] : ID - attrib-10
Onload RAD/CH: Name - id[10] : ID - attrib-10
Onload RAD/CH: Name - id[10] : ID - attrib-10
Onload RAD/CH: Name - id[10] : ID - attrib-10
Onload RAD/CH: Name - id[10] : ID - attrib-10
Onload RAD/CH: Name - id[10] : ID - attrib-10
Onload RAD/CH: Name - id[10] : ID - attrib-10
Onload RAD/CH: Name - id[10] : ID - attrib-10
Onload RAD/CH: Name - id[10] : ID - attrib-10
Onload RAD/CH: Name - id[10] : ID - attrib-10
Onload RAD/CH: Name - id[10] : ID - attrib-10
updatePrice: SELECT ID attrib-15 is now NULL
updatePriceNow: Item: undefined -
updatePriceNow: Item: undefined -
updatePriceNow: Item: undefined -
updatePriceNow: Item: undefined -
updatePriceNow: Item: undefined -
updatePriceNow: Item: undefined -
updatePriceNow: Item: undefined -
updatePriceNow: Item: undefined -
updatePriceNow: Item: undefined -
updatePriceNow: Item: undefined -
updatePriceNow: Item: undefined -
updatePriceNow: Item: undefined -
updatePriceNow: Item: undefined -
updatePriceNow: Item: undefined -
updatePriceNow: Item: undefined -
updatePriceNow: Item: undefined -
updatePriceNow: Item: undefined -
updatePriceNow: Item: undefined -
updatePriceNow: Item: undefined -
updatePriceNow: Item: undefined -
updatePriceNow: Item: undefined -
updatePriceNow: Item: undefined -
updatePriceNow: Item: undefined -
updatePriceNow: Item: undefined -
updatePriceNow: Item: undefined -
updatePriceNow: Item: undefined -
updatePriceNow: Item: undefined -
updatePriceNow: Item: undefined -
updatePriceNow: Item: undefined -
updatePriceNow: Item: undefined -
updatePriceNow: Item: undefined -
updatePriceNow: Item: undefined -
updatePriceNow: Item: undefined -
updatePriceNow: Item: undefined -
updSP: Duplicating price, by jove!
-
Re: Dynamic Price Updater
Hi Yellow
I haven't had a chance yet to even find a place on the server for 1.3.8 lol
Can you post a link to the site where the Updater is? I know I always ask for this, but it can be much easier to observe the behaviour in situ
Cheers
Dan
-
Re: Dynamic Price Updater
Dan, Matt,
To correct the issue with Lightbox (assuming that is the issue) I modified the jscript_updater.php as follows:
There are two places in the code that check if: (prArr[i] !== null)
I changed these two instances to: (prArr[i] == '')
This seems to work. I have not fully tested all use cases, but so far so good.
Dan, do you foresee any issues with using (prArr[i]=='') in place of (prArr[i]!==null)?
Thanks,
Clark
-
Re: Dynamic Price Updater
The site:
Edited: PM sent
I wonder if this has anything to do with lightbox.
-
Re: Dynamic Price Updater
Hi
Clark, time will tell on that... The Updater checks for a explicit NULL value and Lightbox could be affecting that... I'm genuinely not sure how (I thought it may be an event registration problem)... Please keep me updated as to how it goes; it may well work for other people
Feedback would be much appreciated :smile:
Yellow, I'm going to have a look at the site now... I'll let you know if I find anything... You might want to try Clark's solution to see if it works for you
News as I have it
Cheers
Dan
-
Re: Dynamic Price Updater
I tried the changes suggested by Clark but it doesnt seem to fix the error. I turned off lightbox for now, Price Updater is still not working however. But it may make things easier to debug.
-
Re: Dynamic Price Updater
Quote:
Originally Posted by
clarkjarvis
Dan, Matt,
To correct the issue with Lightbox (assuming that is the issue) I modified the jscript_updater.php as follows:
There are two places in the code that check if: (prArr[i] !== null)
I changed these two instances to: (prArr[i] == '')
This seems to work. I have not fully tested all use cases, but so far so good.
Dan, do you foresee any issues with using (prArr[i]=='') in place of (prArr[i]!==null)?
Thanks,
Clark
YES!!!!!! Thank you soooo much Clark!! That did it and now Lightbox and Updater are playing nicely together!:clap::clap::clap:
Matt
-
Re: Dynamic Price Updater
Nice one Clark! Looks like you may have fixed that one :smile:... I have no idea at all why that is :lol:
Yellow, I do have one idea for the moment... It may not work, but try finding the line that says
var seeker = new RegExp(/\(([+-]?)([^0-9]*)([0-9,]+\.[0-9]+)([^0-9)]*)\)/);
and change it to:
var seeker = new RegExp(/\\(\s*([+-]?)([^0-9]*)([0-9,]+\.[0-9]+)([^0-9)]*)\s*\)/);
Let me know what happens
Dan
-
Re: Dynamic Price Updater
Chrome: I applied your change your change and it price doesnt get updated anymore.
So I reverted it back, re-apply Clark's fix and it's partially working right now. Say if you add an attribute that costs 30 you will get:
Your price: +$30.00 (1)
Weird.
-
Re: Dynamic Price Updater
Hi Yellow
I think I might have had an idea... This does mean altering your attributes slightly, but try removing the brackets from around the text in the Extra Fabric attribute
Sorry this is being such a pain
Dan
-
Re: Dynamic Price Updater
No, I must thank you for taking your precious time to help me here.
"try removing the brackets from around the text in the Extra Fabric attribute"
If the brackets are causing the error, wouldn't the one for Custom Topper, which does not have the brackets should work fine?
BTW, you can visit the store before upgrading to 1.3.8 and adding several features by removing the "testsite" part from the link and you will see the Price Updater is working nicely.
The only possible problem I can think of now is the Lightbox.
-
Re: Dynamic Price Updater
One of the changes I made was to remove some sideboxes, and on the PU debug I saw:
createSB: Sidebox could not be created!
Can this be a problem?
-
Re: Dynamic Price Updater
Hi Yellow
Sorry, I'm an idiot... I didn't spot a typo in my regular expression
The var seeker = ... line should be changed to
var seeker = new RegExp(/\(\s*([+-]?)([^0-9]*)([0-9,]+\.[0-9]+)([^0-9)]*)\s*\)/);
That *should* work and I really hope it does
In theory if the updater reports it's unable to recreate the sidebox it will still run... The sideboxes in 1.3.8 are tableless and the Updater can't insert the sidebox because of this... Something else to look into :smile:
Sorry about the typo (especially if that's what it turns out to be)
Dan
-
Re: Dynamic Price Updater
Hey, you know what, it works now. You are a life saver.
So in conclusion for other people:
I modified:
/includes/modules/pages/product_info/jscript_updater.php
File the line which contains:
PHP Code:
var seeker = new RegExp
Replace the whole line by:
PHP Code:
var seeker = new RegExp(/\(\s*([+-]?)([^0-9]*)([0-9,]+\.[0-9]+)([^0-9)]*)\s*\)/);
If you have Lightbox installed, apply the below fix suggested by Clark:
Quote:
There are two places in the code that check if: (prArr[i] !== null)
I changed these two instances to: (prArr[i] == '')
-
Re: Dynamic Price Updater
Drat, floored by a typo!
Glad that worked for you
Matt and Clark, thanks for your help... I have listed the fix in the readme file and credited you both
To make things a little easier I have updated the regular expression to match the new one I gave to Yellow... It should work with any ZC version, provided I haven't made another typo
The new file can be found at http://chrome.me.uk/PriceUpdater.zip
Thanks for all the support and feedback
Dan
-
Re: Dynamic Price Updater
Hello Chrome,
Thank you very much for assisting Yellow1912. Yellow1912 was helping me out with my site and I do appreicate your assistance in getting the Dynamic Price Updater working in my store's environment.
David...
-
Re: Dynamic Price Updater
Quote:
Originally Posted by
Chrome
Sorry this is being such a pain
Dan
Yeah right!:laugh: I can't thank you enough for this cool mod! The community is what makes zen so great!!:yes:
I have a question or two, if I may. It seems as though the sidebox only wants to appear above a one word sidebox such as 'information' but not above 'shopping_cart'. Does anyone else experience this?
Also, how can I change it from appearing in a sidebox and instead appear in the main page? Can I set some div tags to hold the box? How would I do this?
Thanks!
Matt
-
Re: Dynamic Price Updater
Quote:
Originally Posted by
clarkjarvis
To correct the issue with Lightbox (assuming that is the issue) I modified the jscript_updater.php as follows:
There are two places in the code that check if: (prArr[i] !== null)
I changed these two instances to: (prArr[i] == '')
Hi Clark & Chrome
just to let you know that this fix is working fine for me (zen-cart 1.3.7 with lightbox). Glad to be able to use this excellent contribution now!
Thanks!
webchills
-
Re: Dynamic Price Updater
Hi
David, I thought I recognised the URL! I had a busy weekend so was planning to get round to some fixes... I'm glad it's finally working for you :smile:
Thanks Matt! :D The Updater certainly should be able to appear above any sidebox you choose... Can you set it to the sidebox you would like it to appear above then post the debug messages? Might be able to figure it from there (if not I'll need a link)
Currently the Updater can't be placed in the centre column due to the way it creates itself... It actually creates everything for itself as it goes... It may be a scoping adjustment to get it to show up in the main description... I'm definitely going to check this out as it has been mentioned before
I'm glad it's working for you Webchills :smile:... Thanks to Clark for that one, genius that he is
Thanks all again for the support and feedback
Dan
-
Re: Dynamic Price Updater
Here's something weird, I've been struggling with it for hours.....
So everything appeared to work on my super heavily modded cart with lightbox. I all happy that I can get them to work together. So I start adding new product with attributes, and guess what. The updater completely ignored the new attributes! It wouldn't even re-adjust the price "starting at" text like it usually does and didn't display the (1) next to the price. Now, when I added multiple products to the cart the updater would kick in with the right price for the default attribute but still wouldn't recognise the other attributes. I tried all sorts, but nothing worked. It was as if the updater was completely ignoring the attributes, the debugger wouldn't show them either. But the weird thing was that it was working perfect for my original test item, but when I added another attribute to that item it would ignore the new attribute. I'm tearing my hair out, was it something in the database that wasn't recognising the new attributes? I checked the database and indeed the new attributes were there. I combed through everything to make sure there weren't any differences with the new items and attributes versus the ones that were working from before. I was getting really stumped, I'm still a newbie although I am reading a lot of new programming books I'm at about Programming 202 level. Just as I was ready to stick my boot through the monitor I thought I would try one last thing.
The only difference, I realised (I wish it were 5 hours ago!), was the functioning attributes had images and all of the new ones didn't. I had regarded that as inconsequential, but lo and behold! as soon as I added attribute pictures everything started to behave again!!
I have far too many mods going to be able to decipher what is happening, so I am going to make my live test site more like my live site to see if I can figure out what is going on. At the end of the day it's no biggie because I am going to use pics with all of the attributes that the updater will care about. But I hate not knowing why something is happening the way it is, so I am chalking it up to a learning lesson! :D
So if anyone else out there that is using IH2, Lightbox and Updater has any problems like this make sure you have an attribute picture.:laugh:
Matt
-
Re: Dynamic Price Updater
To further my above post, here is the debugger info. The first is without attribute images:
Onload quantity: Cart add INPUT discovered (1)
Onload base price: Price found: 6.2
Onload RAD/CH: Price found: 6.2
Onload RAD/CH: Price found: 6.2
Onload RAD/CH: Price found: 6.2
Onload RAD/CH: Name - id[1] : ID - attrib-1-1
Onload RAD/CH: Name - id[1] : ID - attrib-1-2
Onload RAD/CH: Name - id[1] : ID - attrib-1-3
Onload RAD/CH:
Onload RAD/CH:
Onload RAD/CH:
Onload RAD/CH: Name - id[1] : ID - attrib-1-1
Onload RAD/CH: Name - id[1] : ID - attrib-1-2
Onload RAD/CH: Name - id[1] : ID - attrib-1-3
Onload: --- End of loading procedures ---
And this one is with attribute images:
Onload quantity: Cart add INPUT discovered (1)
Onload base price: Price found: 7
Onload RAD/CH: Price found: 7
Onload RAD/CH: Price found: 7
Onload RAD/CH: Price found: 7
updateR: *Adj* - Radio - Name: id[1] - Price adjust: 7 - Mode:
updatePriceNow: Item: http://www.drumfactorydirect.com/ima...U_lugthumb.jpg
chrome - Mode: Base - Altering base to 7
updSP: Cancelled
Onload RAD/CH: Name - id[1] : ID - attrib-1-1 : Adjusted!
Onload RAD/CH: Name - id[1] : ID - attrib-1-2 : Adjusted!
Onload RAD/CH:
Onload RAD/CH:
Onload RAD/CH:
updateR: *Adj* - Radio - Name: id[1] - Price adjust: 7 - Mode:
updatePriceNow: Item: http://www.drumfactorydirect.com/ima...U_lugthumb.jpg
chrome - Mode: Base - Altering base to 7
updSP: Cancelled
Onload RAD/CH: Name - id[1] : ID - attrib-1-1 : Adjusted!
Onload RAD/CH: Name - id[1] : ID - attrib-1-2 : Adjusted!
Onload: --- End of loading procedures ---
updateR: *Adj* - Radio - Name: id[1] - Price adjust: 8 - Mode:
updatePriceNow: Item: http://www.drumfactorydirect.com/ima...U_lugthumb.jpg
brass - Mode: Base - Altering base to 8
updSP: Cancelled
This could totally be something to do with my customized attributes controller and dual pricing. I am using the improved attributes controller-b with modification for adding a wholesale field. I tried to revert to the stock attributes controller but I was getting an error about the columns not lining up with the fields since the database was altered to allow the wholesale pricing and I was too rushed to try to fix that part of it since it made my whole live site go down. This will be the first area that I try to recreate in teh live test site to see if that is the issue.
Matt
-
Re: Dynamic Price Updater
Quote:
Originally Posted by
Chrome
The Updater certainly should be able to appear above any sidebox you choose... Can you set it to the sidebox you would like it to appear above then post the debug messages? Might be able to figure it from there (if not I'll need a link)
Here's the debugger info with the sidebox set to 'shopping_cart':
Onload quantity: Cart add INPUT discovered (1)
Onload base price: Price found: 7
Onload RAD/CH: Price found: 7
Onload RAD/CH: Price found: 7
Onload RAD/CH: Price found: 7
updateR: *Adj* - Radio - Name: id[1] - Price adjust: 7 - Mode:
updatePriceNow: Item: http://www.drumfactorydirect.com/ima...U_lugthumb.jpg
chrome - Mode: Base - Altering base to 7
createSB: Sidebox could not be created!
updSP: Cancelled
Onload RAD/CH: Name - id[1] : ID - attrib-1-1 : Adjusted!
Onload RAD/CH: Name - id[1] : ID - attrib-1-2 : Adjusted!
Onload RAD/CH:
Onload RAD/CH:
Onload RAD/CH:
updateR: *Adj* - Radio - Name: id[1] - Price adjust: 7 - Mode:
updatePriceNow: Item: http://www.drumfactorydirect.com/ima...U_lugthumb.jpg
chrome - Mode: Base - Altering base to 7
createSB: Sidebox could not be created!
updSP: Cancelled
Onload RAD/CH: Name - id[1] : ID - attrib-1-1 : Adjusted!
Onload RAD/CH: Name - id[1] : ID - attrib-1-2 : Adjusted!
Onload: --- End of loading procedures ---
I thought that perhaps because the shopping cart sidebox is set to appear only when there is an item in it that the updater would have a hard time placing the sidebox when the shopping cart wasn't there. So I set it to 'testimonials_manager' since that is always present but it's the same error message in the debugger. I thought that perhaps it had something to do with trying to set it in the right sidebox since the information sidebox default is on the left side in my site, but that wasn't right since I can set it above the search box in the right column. It appears that it just doesn't like the _ in the sidebox. I hope this helps shed some light. :smile:
Quote:
Currently the Updater can't be placed in the centre column due to the way it creates itself... It actually creates everything for itself as it goes... It may be a scoping adjustment to get it to show up in the main description... I'm definitely going to check this out as it has been mentioned before
Let me know if you need a tester. As you can see, I'm good at breaking things!:laugh:
Javascript seems so far to be the most abstract language to wrap my head around although I am only a couple of chapters into Flanagan's Javascript book and I'm waiting for a Beginning Javascript Novice to Pro book to arrive. Like the regExp you posted is soooo abstract, I hope that after reading and studying it will all make perfect sense!:smile:
Matt
-
Re: Dynamic Price Updater
I think I may have found another bug? Can someone check this out and let me know if they are experiencing the same thing?
I have the latest Updater installed, I am running on 1.3.7.1, many mods including IH2 and Lightbox 1.3 that's been modified to run a slideshow with additional images.
What I am experiencing is that all product prices get altered when more than one item is selected in the "Add to cart" quantity box on the product_info_default pages. If the item is $100, if you select 2 then the price that is displayed adjusts to Your price: 2 (2).(and not to $200) I didn't think that Updater affected non-attribute products, plus it doesn't show the right price or the $. I did some testing and the incorrect price is due to the MSRP mod that I have installed, creating an item with the MSRP field left blank allows Updater to show the correct price but still without the $.
I added a non-attributed item to my live test server that has only IH2 and Updater installed and it does the same thing to the price- changes it but without the $.
I'm assuming that the conflict between MSRP and Updater has something to do with the alterations to function_lookups that MSRP creates? I would so love to get these two important mods to play together nicely, does anyone have any suggestions?
I tried an older version of Updater from September but it creates the same problem, so it's nothing to do with the latest modifications to Updater.
The debugger doesn't really show anything, but here it is with a product with MSRP:
Onload quantity: Cart add INPUT discovered (1)
Onload base price: Price found: 1
Onload RAD/CH: Price found: 1
Onload RAD/CH: Price found: 1
Onload RAD/CH: Price found: 1
Onload RAD/CH:
Onload RAD/CH:
Onload RAD/CH:
Onload: --- End of loading procedures ---
Quantity change: 10
updSP: Cancelled
Quantity change: 1
updSP: Cancelled
Quantity change: 11
updSP: Cancelled
Quantity change: 111
updSP: Cancelled
Quantity change: 11
updSP: Cancelled
Quantity change: 1
updSP: Cancelled
Quantity change: 0
updSP: Cancelled
Help, please!
Matt
-
Re: Dynamic Price Updater
Hi Matt
Sorry for not replying to your earlier posts... I just plain forgot with everything going on (Xmas and all that)
Could you possibly supply me with a link to a faulty page (if you like you can private message it to me)? I'd like to get this sorted too, especially as you've helped me so much :smile:
As for beta-testing, as soon as I have a version for you to test you will be the first to know :smile:
Cheers
Dan
-
Re: Dynamic Price Updater
Quote:
Originally Posted by
Chrome
Hi Matt
Sorry for not replying to your earlier posts... I just plain forgot with everything going on (Xmas and all that)
Could you possibly supply me with a link to a faulty page (if you like you can private message it to me)? I'd like to get this sorted too, especially as you've helped me so much :smile:
As for beta-testing, as soon as I have a version for you to test you will be the first to know :smile:
Cheers
Dan
Hey, no worries, Mate!
Go to drumfactorydirect dot com and try any product, enter more than 1 into the cart quantity box and you will see what I mean. I guess the easiest way to get to a product is to scroll down to the featured items, there are still a lot of empty categories. :smile:
The only products with attributes are drum parts/lugs/tube lugs and snare drums/Global Drum Company/Performer. They work as advertised. The one product without MSRP is drumfactorydirect dot com/index.php?main_page=product_info&cPath=1_12&products_id=1789
It prices correctly for multiple quantities but doesn't display the $.
Thanks a million!!
Matt
-
Re: Dynamic Price Updater
BTW, I'm not complaining about all of the prices being updated by changing the quantity in the add to cart box, I guess I was just a bit surprised, and alarmed at first since it was breaking with the MSRP mod, since I though tit only worked with products with attributes. I would like to be able to keep the ability to update all prices based on quantity chosen, I'm just in a bit of a bind since all 1900 products that are currently on the site use MSRP. I can reset them all using easypopulate but the MSRP really sets the prices off well. But if I have to choose between that and Updater I will go with Updater! :D At least until I, or we!:smile:, can figure out how to get them to behave around each other!!:laugh:
Matt
-
Re: Dynamic Price Updater
Hi Matt
I've had a look at the page and I can confirm that the issue isn't related to any other module :smile:
It's being caused by the fact that there are no select or radio/checkbox attributes on the page... The 'seeker' RegEx pulls the currency identifiers from those attributes
Essentially you have found a situation I forgot to account for :smile:
Leave it with me; I have to go do some last minute shopping (should be fun this close to Xmas)... When I get back I'll post a NastyHack™ solution before actually preparing a proper solution
I'll get back to you as soon as I have a workaround :smile:
Cheers
Dan
-
Re: Dynamic Price Updater
Firstly I'd like to say that the concept of this mod is excellent, and I could really use it for a project I have where a client is requesting this functionality.
I am having several problems with it though, as follows:
1. I have a radio list on one page that has different side salad choices, and each of them is $2.95. But I have one option which is "none". If I choose any of the side salads it changes the price correctly, but if I then choose "none" again, the price is not changed back.
2. On some of my products, when I click a checkbox on one of the attributes, it changes the whole price to the price of the attribute. But on other products this does not happen.
Hopefully you're coming back soon!
Chris
-
Re: Dynamic Price Updater
OK scratch problem #2. I figured that one out. Needed to have that "+" sign in the attributes page.
But the problem with the radio boxes is still there.
Chris
-
Re: Dynamic Price Updater
Try having an attribute price of $.001 for the "none" field. That should allow it to work correctly. I will have a look at my attributes setup tomorrow if this isn't working for you. There are a couple of workarounds to get this great mod to work for these situations. I have found that if you are using the MSRP mod it will give Price Updater fits.
Let me know if that helps.
Matt
-
Re: Dynamic Price Updater
Thanks! That solved it!
Chris
-
Re: Dynamic Price Updater
Quote:
Originally Posted by
innovafire
Thanks! That solved it!
Chris
Cool, glad that helped!:smile:
Matt
-
Re: Dynamic Price Updater
Hi @ all.
This module is fantastic! THANKS a lott.
There are some questions.
1.)
Is it possible to use more languages than english? How can I implement language files???
There are two translations at the beginning "define..... Price Breaktdown AND Your Price:" but there is another word to trancelate "Product price". Where is it???
2.)
I need the current weight (in kg) next to the price. How can I add this information into the box?
3.)
Is it possible to set a limit for the weight?
Example:
Every product can be advanced with attributes. Every attribute has a spezial weight. The customer can choose so many attributes he wants, but there must be a limit in the weight. The limit should be 900g (0,9kg). Than the customer should get a massage "Sorry you have reach the limit of attributes", or something else...
This is very important for us, is it possible?
4.)
Is there an option to set the box allways on? At the moment the box is on If I choose an attribute. Is there no attribute activated I cant see the box.
That would be nice.
Thanks for your help.
Greetz
Webschnecke
-
Re: Dynamic Price Updater
Ive found something by my self...
AT LINE: 359 & 360
Code:
hText += 'Product price - ' + (showQuantitySB ? quantity + 'x ' : '') + l + addCommas(origPrice.toFixed(2)) + r + '<br/>';
newText += '<hr />Total: ' + l + addCommas((totalAdj * quantity).toFixed(2)) + r;
REPLACE WITH:
Code:
hText += '<?php echo UPDATER_BASIS; ?>' + (showQuantitySB ? quantity + 'x ' : '') + l + addCommas(origPrice.toFixed(2)) + r + '<br/>';
newText += '<hr /><?php echo UPDATER_TOTAL; ?>' + l + addCommas((totalAdj * quantity).toFixed(2)) + r;
AND AT THE BEGINNING: LINE 11
define('UPDATER_PREFIX_TEXT', 'aktueller Preis: ');
define('UPDATER_SB_TITLE', 'Dein Mix'); // the heading that shows in the Updater sidebox
define('UPDATER_BASIS', 'Basis: '); //LINE 361
define('UPDATER_TOTAL', 'Summe: '); //LINE 362
Greetz
Webschnecke
-
Re: Dynamic Price Updater
Is me... Hi
Ive got a Problem.
You see the copy of a product. At first two different attributes with checkboxes, than follows the debug, at at the end there ist the last attribute. But the last is under the "Onload: --- End of loading procedures ---"
This is a problem... the updater only use the two attributes at the beginning.
What is wrong?
[ ]=Checkbox
Headline, lorem ipsum....
[ ] Früchte
[ ] Annanas (+€0.54) (+0.9kg)
[ ] Banane (+€0.54) (+0.9kg)
Headline, lorem ipsum....
[ ] Nüsse & Kerne
[ ] Haselnuss (+€1.28) (+5kg)
[ ] Sonnenblumenkerne (+€1.77) (+0.1kg)
[ ] Wallnüsse (+€3.21) (+0.01kg)
###############################################
Debug messages
SP Onload: Type: always
updSP: Price node cloned!
updSP: Node inserted successfully
updSP: Duplicating price, by jove!
Onload quantity: Cart add INPUT discovered (1)
Onload base price: Price found: 3.75
Onload RAD/CH: Price found: 3.75
Onload RAD/CH: Price found: 3.75
Onload RAD/CH: Price found: 3.75
Onload RAD/CH: Name - id[4][7] : ID - attrib-4-7 : Adjusted!
Onload RAD/CH: Name - id[4][6] : ID - attrib-4-6 : Adjusted!
Onload RAD/CH: Name - id[6][11] : ID - attrib-6-11 : Adjusted!
Onload RAD/CH: Name - id[6][12] : ID - attrib-6-12 : Adjusted!
Onload RAD/CH: Name - id[6][13] : ID - attrib-6-13 : Adjusted!
Onload RAD/CH:
Onload RAD/CH:
Onload RAD/CH:
Onload RAD/CH: Name - id[4][7] : ID - attrib-4-7 : Adjusted!
Onload RAD/CH: Name - id[4][6] : ID - attrib-4-6 : Adjusted!
Onload RAD/CH: Name - id[6][11] : ID - attrib-6-11 : Adjusted!
Onload RAD/CH: Name - id[6][12] : ID - attrib-6-12 : Adjusted!
Onload RAD/CH: Name - id[6][13] : ID - attrib-6-13 : Adjusted!
Onload: --- End of loading procedures ---
###############################################
Headline, lorem ipsum....
[ ] Aubergine (+€1.61) (+1kg)
[ ] Gurke (+€0.59) (+0.03kg)
[ ] Möhre (+€1.61) (+1kg)
Greetz
Webschnecke
-
Re: Dynamic Price Updater
hey - don't know if this has been noticed yet or not (I'm still reading the whole thread!!!)
http://chrome.me.uk/shopdev/index.ph...&products_id=3
Using your test site - this particular item was on sale... changing the number of items only changes the original price, not the sale price...
just a FYI - I still plan to install it!
edit:
Ahhh - but it does go into the shopping cart with the correct price... nice - still usable.
-
Re: Dynamic Price Updater
OK - that was painless enough!!
I did have to make the Lightbox fix... then it started working...
I'm going to play with it more tomorrow...
Other ideas:
Don't let user choose more than your quantity on hand
Fix the problem with the sale price I saw earlier today
Would like to keep the Single Unit Price visible while calculations display somewhere else (formatting I can copy code from New Products page or something)
sure would be cool to have this same function on the Shopping Cart Page.
(on my site, most items will be sold in quatities more than one (fabric by the yard) - this way you can change quantities after "collecting" all the pieces you want...
for that matter, same as that - have it work on any page that shows multiple product listings... like New Products. ( but I also want "Add" buttons next to each product, instead of the one on top "add selected products to cart" - I don't think it very intuitive... IMO
I will probably play with that and see if I can help! (after I figure out another problem I have!! - a DOM event problem i have with my tree menu and lightbox)
:)
Thanks for a great function!!! I wanted something like this and I'm glad someone already went through the effort!!
-
Re: Dynamic Price Updater
So any thoughts on how to modify the look and feel of this?
I want to move where it displays... Like inside the cartAdd DIV
I don't want the actual price (inside the productPrices DIV) to change - just the one inside/next to the cartAdd DIV...
I've been able to move the Price Breakout to the main window, rather than a sidebox... I will change it's STYLEs by creating my own, or not haveing it at all if I modify that whole way it looks... especial if I also put the breakout in the cartAdd DIV as well...
Is there a way to "modularize" it? That would be kool... then we could put different "elements" wherever we want in our code...
And please take no OFFENSE to anything I'm saying here. I mean none. I think this is a great tool and I will be using it in my site.
-
Re: Dynamic Price Updater
well aren't i full of ideas??
is it possible, when time permits of course, to make a scaled back version of this tool?
what I mean is to not have any of the code generate all the DEBUG information... provide this version with the assumption that the code works as you like it to. But also distribute the debug version which would be developed in parallel to the "production" version, for when its needed.
That only reason for my request is because the resultant SOURCE code for a given page on my site is about 16 pages long, and a lot of it is this debug information (which I turned off in the JS) I don't want all that info visible to anyone who does a "View Source"
Thanks - again - in advance...
-
Re: Dynamic Price Updater
FYI
You can put the "Price Breakdown" anywhere you want: I put it above my review button:
var _sidebox = 'productReviewLink';
what I really want to do is put it INSIDE my cartAdd box!!
-
Re: Dynamic Price Updater
Eeek... its in a "few" places...
./includes/modules/pages/product_reviews_write/jscript_slimbox.php
./includes/modules/pages/product_music_info/jscript_slimbox.php
./includes/modules/pages/document_product_info/jscript_slimbox.php
./includes/modules/pages/product_reviews/jscript_slimbox.php
./includes/modules/pages/document_general_info/jscript_slimbox.php
./includes/modules/pages/product_reviews_info/jscript_slimbox.php
./includes/modules/pages/product_free_shipping_info/jscript_slimbox.php
Maybe an link (or a shortcut for you M$soft folks) would have been good here... just a thought... it would certainly make it footprint smaller... (will ZIP copy them as links, or follow them?) You could use TAR and gzip...
Have one file and then all these would just "point/link" to it...
For my solution, though, its a little more hairy... I would have to put the snippet into each of these TPL files... that would actually suck
-
Re: Dynamic Price Updater
Oops - I put that in the WRONG thread - I'm multitasking - sorry guys.
Maybe someone can delete This and My last post - please??!! :)
-
Re: Dynamic Price Updater
OK - I got the idea of placing the updated price info somewhere...
but it required me to put DIV's inside the cartAdd DIV...
in file tpl_product_info_display.php (make a copy of it in your own template area)
like this:
Quote:
<?php
$display_qty = '<div id="PriceUpdate">' . (($flag_show_product_info_in_cart_qty == 1 and $_SESSION['cart']->in_cart($_GET['produ
cts_id'])) ? '<p>' . PRODUCTS_ORDER_QTY_TEXT_IN_CART . $_SESSION['cart']->get_quantity($_GET['products_id']) . '</p>' : '');
if ($products_qty_box_status == 0 or $products_quantity_order_max== 1) {
// hide the quantity box and default to 1
$the_button = '<input type="hidden" name="cart_quantity" value="1" />' . zen_draw_hidden_field('products_id', (int)$_G
ET['products_id']) . zen_image_submit(BUTTON_IMAGE_IN_CART, BUTTON_IMAGE_IN_CART_HOVER, BUTTON_IN_CART_ALT);
} else {
// show the quantity box
$the_button = PRODUCTS_ORDER_QTY_TEXT . '<input type="text" name="cart_quantity" value="' . (zen_get_buy_now_qty($_GET['products
_id'])) . '" maxlength="6" size="4" />' . zen_get_products_quantity_min_units_display((int)$_GET['products_id']) . '</div>' . zen_dr
aw_hidden_field('products_id', (int)$_GET['products_id']) . zen_image_submit(BUTTON_IMAGE_IN_CART, BUTTON_IMAGE_IN_CART_HOVER, BUTTO
N_IN_CART_ALT);
}
$display_button = zen_get_buy_now_button($_GET['products_id'], $the_button);
?>
<?php if ($display_qty != '' or $display_button != '') { ?>
<div id="cartAdd">
<?php
echo $display_qty;
echo $display_button;
?>
</div>
-
Re: Dynamic Price Updater
If anyone wants to check out some of my progress - it's TOTALLY in beta right now... graphics will all come later!!!
www.whereisellstuff.com
try adding something to your cart! I have a little nifty...
Eventually I want to make a "sliding" cart, that kinda comes out of the top of the page or somewhere...
-
Re: Dynamic Price Updater
How do I get it to understand qty discounts.. it only reads the base price, if a customer adds 25 pieces it still syas they are 20.00 each instead of 15.00 each, yet when you add ot cart the right price is included there.
thanks
wayne
-
Re: Dynamic Price Updater
Hi all,
first thanks for this wonderful concept. My products are mostly attribute-priced, so this is exactly what I am looking for. Some concerns although:
1.: I get it to work only with dropdown-menues, never with radio-buttons (???)
2.: The Prices read like "undefined22.00undefined" instead of a currency-symbol, what I would expect here???
I have adjusted everything like shown in the post#144 in this thread, but ... ???
Maybe, someone of you guys gan show me the way?
Thanks in advance,
jens
-
Re: Dynamic Price Updater
anyone know why my product page is showing "your price:" twice, I have exhaused my attempts to remove one or the other. I noticed when I edit the tpl_product_info_display.php file, I move the <add to cart box> section and one of my YOUR PRICE follows that one. and if I move <product price block> one YOUR PRICE follows that one, but if I remove this section of the script BOTH disappear. I am stumped.
-
Re: Dynamic Price Updater
Quote:
Originally Posted by
bobio
anyone know why my product page is showing "your price:" twice, I have exhaused my attempts to remove one or the other. I noticed when I edit the tpl_product_info_display.php file, I move the <add to cart box> section and one of my YOUR PRICE follows that one. and if I move <product price block> one YOUR PRICE follows that one, but if I remove this section of the script BOTH disappear. I am stumped.
open the updater javascript file, at line 32 set this statement to false:
Code:
var _secondPrice = 'false';
you can also choose to not display the sidebox with the price breakdown, or move it to another location. Look through the first 37 lines to see that variables that can be changed.
-
Re: Dynamic Price Updater
Thanks for everything, you are terrific.
-
Re: Dynamic Price Updater
:oops:
Quote:
Originally Posted by
Chrome
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
I think radio boxes work?
The debug script was a surprise. I'll leave it on for now.
if "Product Priced by Attributes:" = true
{
it counts shipping twice; Shipping was already calculated by Zencart because its radiobox was already the
"*Display price will include lowest group attributes prices plus price"
http://quebecinter.net/regaliax/inde...&products_id=3
}else{
it displays a total of attributes and ignores the Zencart calculated price
http://quebecinter.net/regaliax/inde...products_id=11
}
I have no shipping module installed, in fact. I'm being obstinate about doing this, until I get a coder to make me one.
-
Re: Dynamic Price Updater
Hey Guys! Great contribution. For those who are interested, I have found a way to solve the issue whereby the site was only referring to the original price, and not the sales price of a product. The way I did it (and there may very well be a better way) was to navigate to includes/functions/functions_prices.php and find this:
Code:
if ($display_special_price) {
$show_normal_price = '<span class="normalprice">' . $currencies->display_price($display_normal_price, zen_get_tax_rate($product_check->fields['products_tax_class_id'])) . ' </span>';
I replaced that with this:
Code:
if ($display_special_price) {
$show_normal_price = '';
Which removed the original pricing altogether, and lets the javascript target the sales price instead. Next, I navigated to where the special pricing was being called:
Code:
} else {
$show_special_price = ' ' . '<span class="productSpecialPrice">' . $currencies->display_price($display_special_price, zen_get_tax_rate($product_check->fields['products_tax_class_id'])) . '</span>';
And I replaced that with this:
Code:
} else {
$show_special_price = ' ' . '<span class="productSpecialPrice">' . $currencies->display_price($display_special_price, zen_get_tax_rate($product_check->fields['products_tax_class_id'])) . '</span><br />Original Price: <span class="normalprice">' . $currencies->display_price($display_normal_price, zen_get_tax_rate($product_check->fields['products_tax_class_id'])) . ' </span>';
What this is doing is moving the original price down a line below the sales price, so that the resulting cart output looks like this:
Starting at: $199.95
Original Price: $220.00
Save: 9% off
As opposed to:
Starting at: $199.95 (the price to the left has a strikethrough) $220.00
Save: 9% off
Now, you will probably want to tweak the look of the special pricing and original price in your stylesheet, but otherwise this method should work well if you have applied a sale price to your product. There are a few other areas that I didn't touch because I don't need them for my application, such as product_is_free, but you should be able to modify those in the same fashion to achieve the desired result. Let me know how this works for you! Again, thanks for the attribute pricing contribution.
-
Re: Dynamic Price Updater
Quote:
Originally Posted by
jensderknipser
2.: The Prices read like "undefined22.00undefined" instead of a currency-symbol, what I would expect here???
Hey Guys, cool mod...
1. I'm having exactly the same problem, my price comes up with "undefined" on either side of the price instead of I'm guessing a dollar sign to the left.
2. Also, when someone selects a "2XL" shirt or the like, the price adds $1.99 as it's supposed to, but if they then go back and select "small" as an option the price does not go back to normal, i.e. the higher price remains there. Any idea how to make this work properly?
Thanks!
Example here: http://www.choppertown.net/store/ind...roducts_id=185
-
Re: Dynamic Price Updater
After re-reading the entire thread I re-tried the "Lightbox fix" seems to have worked.
prArr[i] == ''
This has to be inserted exactly for it to work.
-
Re: Dynamic Price Updater
Hi there,
Thank you for making this great code, I have been really stumped by a problem though...
My radio buttons don't cause the sidebox to change at all - not even the total changes. Only the quantity works. The Products are Priced by Attributes. There are 2 attributes, off 0 and on +8. Everything else is working, I just can't get the attributes to show up in the price.
debug:
Onload quantity: Cart add INPUT discovered (25)
Onload base price: Price found: 50
Onload RAD/CH: Price found: 50
Onload RAD/CH: Price found: 50
Onload RAD/CH: Price found: 50
Onload RAD/CH: Name - id[2] : ID - attrib-2-1
Onload RAD/CH: Name - id[2] : ID - attrib-2-6
Onload RAD/CH: Name - id[3] : ID - attrib-3-2
Onload RAD/CH: Name - id[3] : ID - attrib-3-5
Onload RAD/CH:
Onload RAD/CH:
Onload RAD/CH:
Onload RAD/CH: Name - id[2] : ID - attrib-2-1
Onload RAD/CH: Name - id[2] : ID - attrib-2-6
Onload RAD/CH: Name - id[3] : ID - attrib-3-2
Onload RAD/CH: Name - id[3] : ID - attrib-3-5
Onload: --- End of loading procedures ---
Please note, I have tried select boxes and checkboxes, none of them have an effect. Any help would be great.
-
Re: Dynamic Price Updater
Are you using the latest version? Are you using lightbox or IH2?
I have found, at least with my heavily modified cart, that I have to have an attribute image for each attribute to get the updater to work. Give it a try. If you don't want to have images, I use a 1x1 px transparent gif image for those attributes without pics.
Another thing to try, is have +0 instead of 0, and on my cart I have to use +.0001 and then it all works fine.
Let me know if that works.
Matt
-
Re: Dynamic Price Updater
Thanks for your reply!
Well, I tried both but it didn't resolve the issue. I think I know what it is, this code is matching text on the page, but my text is in Japanese, this code isn't going to allow for Japanese:
var seeker = new RegExp(/\(\s*([+-]?)([^0-9]*)([0-9,]+\.[0-9]+)([^0-9)]*)\s*\)/);
I will try to figure it out, if anyone has a suggestion, please help.
-
Re: Dynamic Price Updater
Well, I changed all the attribute text to Englsh and I'm using drop downs instead. Have images on the attributes and used +0.0001 for the 0 attributes.
Now I am getting closer, but...
Onload quantity: Cart add INPUT discovered (50)
Onload base price: Price found: 50
Onload SELECT: Name - id[2] : ID - attrib-2
Onload SELECT: Name - id[3] : ID - attrib-3
Onload RAD/CH: Name - id[3] : ID - attrib-3
Onload RAD/CH: Name - id[3] : ID - attrib-3
Onload RAD/CH: Name - id[3] : ID - attrib-3
Onload SELECT: Name - id[2] : ID - attrib-2
Onload SELECT: Name - id[3] : ID - attrib-3
Onload RAD/CH: Name - id[3] : ID - attrib-3
Onload RAD/CH: Name - id[3] : ID - attrib-3
Onload RAD/CH: Name - id[3] : ID - attrib-3
Onload: --- End of loading procedures ---
updatePrice: SELECT ID attrib-2 is now NULL
createSB: Sidebox created!
updSP: Cancelled
updatePrice: SELECT ID attrib-2 is now NULL
updSP: Cancelled
updatePrice: SELECT ID attrib-3 is now NULL
updSP: Cancelled
The NULL error occurs when I toggle the drop down between values. Any ideas? My version is 1.3.0.2
-
Re: Dynamic Price Updater
Finally got it working. Just in case anybody else is trying to do it, to handle the yen currency, I changed the RegExp to:
new RegExp(/\(\s*([+-])([0-9]+)([^0-9)?]*)\s*\)/);
Removed the 'r' value after the currency, it doesn't exist for the yen currency.
Changed:
prArr[objSel[i].id]['p'] = Number(matches[3].replace(/,/, ''));
to
prArr[objSel[i].id]['p'] = Number(matches[2].replace(/,/, ''));
and priceAdj = Number(matches[3].replace(/,/g, ''));
to
priceAdj = Number(matches[2].replace(/,/g, ''));
Anybody know how I can edit this code to recognize quantity discounts on one of the attributes?
http://www.sixcentpress.jp/stage/ind...&products_id=1
-
Re: Dynamic Price Updater
I'm happy to hear that you got it working with the yen!
I think that there has always been an issue with sales and discounts. I know that the author was looking into working out those bugs but he hasn't been around much lately.
If there is any other javascript wizard that can take up the job of finishing this fantastic mod, please help us out!:smile:
-
Re: Dynamic Price Updater
Thanks, I got the attribute discounts working now. Just need to get the product discounts working now!
-
Re: Dynamic Price Updater
Hello,
I'm working on a realization of a german shop with zencart. There we change the signs for the Decimal Point and the Thousands Point at the currencies configuration. That means our Decimal Point ist "," an our Thousands Point is ".".
If I adjust this in the admin menu the dynamic price updater gives me wrong results. I've tried to edit the jscript_updater.php but without success.
from:
Code:
var seeker = new RegExp(/\(\s*([+-]?)([^0-9]*)([0-9,]+\.[0-9]+)([^0-9)]*)\s*\)/);
to:
Code:
var seeker = new RegExp(/\(\s*([+-]?)([^0-9]*)([0-9\.]+,[0-9]+)([^0-9)]*)\s*\)/);
It would be nice if anyone can help me. What changes I have to realise to get the right result.
By the way, I'm very pleased about that the download works again. Thanks to Chrome.
Curiosus
-
Re: Dynamic Price Updater
First of all, thanks to Chrome for the fantastic mod.
I am, however, having a few small problems with it, and after reading through the entire thread, I have not been able to find a solution. The relevant URLS are pasted below and I have switched the debugger back on.
http://buildingbadges.com/shop/100-x...ges-p-567.html
1) The main problem is that if any attribute is selected that has no price attached to it, the $ sign is dropped from the price. I saw this mentioned earlier in the thread (here), but it seemed to get lost amongst a myriad of requests.
http://buildingbadges.com/shop/25-x-...dges-p-30.html
2) On products that have no priced attributes, changing the "Add to Cart" quantity causes the price to disappear completely. It still appears in the SideBox correctly, although with no $ sign.
Debugger says the following:
Quantity change: 2
updSP: Cancelled
If anyone could offer any advice that would be most appreciated.
The mod is a great idea and I really want to put it to use on my future Zen Stores as it does exactly what I need... it's just that these little things are currently making it unusable in a live environment.
Thanks in advance.
-
Re: Dynamic Price Updater
Hey all
Firstly, sorry for being away for so long and not moving this contribution forward or appearing to supply any support
I've finally got some free time to continue development of the Updater if anyone is interested :smile:
To start, and on request, I've fixed the bug with the fantastic disappearing currency symbol (for $ and £ at least)... There is still some work to do on other languages (especially those that include non-UK/US characters) and feedback/examples of failure would be much appreciated
I also hope to have made a start on getting discounts working... The Updater can identify a normal sale at present (by normal see here) but that's about it... But, it's a start :smile:
XHTML compliance has been knocked up a notch (bam!) with the use of the CDATA declaration and escaping of certain characters
I know I still have to
- Address the Lightbox issue... I'd like to remove the need to replace that line
- Get other sales working
- Something i remembered just a moment ago but can't remember now
- Make up for months of being completely ignorant
My test shop is currently here
As always feedback and suggestions are very welcome
Oh that's right: the new file... Dynamic Price Updater - Experimental Edition(tm)... Nearly forgot that bit
I'd like to thank exoticcorpse for testing my fixes off the forum... Also I'd like to thank Matt (that yankee bloke :wink: ) for picking up the slack during my absence
Cheers
Dan
-
Re: Dynamic Price Updater
Quote:
Originally Posted by
Chrome
Hi Chrome,
would like to try the new version, but the link is not working.
Cheers
webchills
-
Re: Dynamic Price Updater
Hi
Yep sorry about that... You caught me between file renaming and posting the changes here... My fault for deciding to work shortly before my bed started calling me
I've now made the experimental Updater the only updater so please use the link in my signature... Sorry for the confusion and I'll put in place a system that helps distinguish between experimental and release versions
The news is that the Updater is currently up on ramps with bits scattered all around it... I've decided the original methods for tracking objects and rewriting page content isn't up to scratch so I've bitten the bullet an decided on a major overhaul
I'll release versions when they're ready for testing if anyone has a few spare minutes to play Guinea pig :smile:
Updated version should be heading out sometime late/shortly after the weekend (fingers crossed)
Cheers
Dan
-
1 Attachment(s)
Re: Dynamic Price Updater
Chrome,
Thanks for making probably the most useful add-on there is (IMO). The one complaint that I have, which seems to make the add-on difficult for most users, is the method used to create and maintain the sidebox. It's very limiting to be required to place the side box above an existing sidebox. So.... I decided to make a few modifications.
I combined your add-on with Kurio's Blank SideBox and modified the code to directly update the new sidebox. This allows the user to add, hide, place, ... the sidebox using the Admin/Tools/Layout Box Controller page. I've tested it out that best that I could and it seems to work as intended.
I'm attaching the code, all the original unnecessary code has been commented out and all additional code has been commented with the "// Clark "
Hopefully this will prove useful to all who use the Price Updater add-on
-Clark
-
Re: Dynamic Price Updater
Hi
Thanks Clark :smile:, I'll grab that later this evening and have a look at it
I will concede that the operation of the sidebox is clunky, but this was one of the drawbacks to my easy-install idea... Maybe if I can switch out some usage based on what's available I can make an easier to use mod
Cheers for your work!
Watch this space
Dan
-
Re: Dynamic Price Updater
Hi Chrome:
Great mod!
I will be using it on a client's website. Currently working a bit on other things. I've started working on an "extension" to your code that would read price tables. Will post when I have more material if is of interest.
Thanks.
-
Re: Dynamic Price Updater
I'm currently working on the One Time prices product attributes for this add-on. If anyone knows if it already can do it, let me know, so I don't reinvent the wheel.
;)
-
1 Attachment(s)
Re: Dynamic Price Updater
Ok, guys, just for the upgrade, I post here an update of the code. Still very Beta working on it... (attributes with both one-time prices and normal prices doesn't yet work).
For it to work, you have also to include:
Code:
foreach($quantityDiscounts as $key=>$quantityDiscount) {
//calculations for the js code
$js_quantity_discount[] = array(
'qty' =>trim( $quantityDiscount['show_qty'], "+" ),
'price' =>trim( $currencies->display_price($quantityDiscount['discounted_price'], zen_get_tax_rate($products_tax_class_id)), "$" )
);
}
//output for the js code
echo '<div id="js_qty_discount">';
foreach ($js_quantity_discount as $k=>$current_discount){
echo $current_discount['qty'] . "," . $current_discount['price'] . ";";
}
echo '</div>';
on the tpl_modules_products_quantity_discounts.php file
Right now not much time to explain, so I will check later.
Again, thanks you all and Chrome for the base mod...
will be working on this...
-
Re: Dynamic Price Updater
Thank you for one awesome mod!
I was just wondering, I have my attributes on a tab....is there a way to get the "force" attribute function to work when on a tab...meaning if they click on add to cart and no attributes were selected it will give them an error message....If I remove the attributes from the tab this feature works fine....but it does not seem to work when the attributes are on the tab?!?!?!
Hope this makes sense!!!
Thanks again.....this is exactly what I needed!!!
-
Re: Dynamic Price Updater
wow I have been looking for a solution like this for a while, thanks very much
can the price scroll with the page so it is always visible?
I have a long list of product options and would love it if I could get the price to scroll down so it is always visible, I know how to do absolute positioning but I would know where to start programming, I see when I save a product page page it says
HTML Code:
<!--bof Add to Cart Box -->
<DIV id=cartAdd>Add to Cart: <INPUT maxLength=6 size=4 value=1
name=cart_quantity><BR><BR><INPUT type=hidden value=180
name=products_id><INPUT title=" Add to Cart " type=image alt="Add to Cart"
src="HOPC1 [HOPC1] - $281_00 OZM Systems, Powerful Custom Computers_files/button_in_cart.gif">
</DIV><!--eof Add to Cart Box-->
which is what I want to scroll, but where do I start
thanks for all of your efforts
:clap:
-
Re: Dynamic Price Updater
actually the code to have the price and the add to cart button float on the top right is
HTML Code:
<DIV style="position: fixed; top: 56px; right: 30px; width: 240px; height: 40px;" id=cartAdd><H2 class=productGeneral id=productPrices>Starting at: $281.00</H2>Add to Cart: <INPUT maxLength=6 size=4 value=1
name=cart_quantity><BR><BR><INPUT type=hidden value=180
name=products_id><INPUT title=" Add to Cart " type=image alt="Add to Cart"
src="HOPC1 [HOPC1] - $281_00 OZM Systems, Powerful Custom Computers_files/button_in_cart.gif">
</DIV>
but again this is only works when I save the product page and add this code
obviously I need it to be done by the cart but I'm not sure what code to edit
I know the site is compiled from a bunch of files, I just need to find the file that calls for the div id=cartadd on the product detail page I think
any help would be greatly appreciated
-
Re: Dynamic Price Updater
ok, figured it out
you need to open the file tpl_product_info_display.php which is located in \includes\templates\template_default\templates
before the <!--bof Product Price block -->
I added
HTML Code:
<div style="position: fixed; top: 56px; right: 30px; width: 240px; height: 40px;">
and a closing div tag after <!--eof Product Price block -->
also I edited the div id="cartAdd" to
HTML Code:
<div style="position: fixed; top: 76px; right: 30px; width: 240px; height: 40px;" id="cartAdd">
(the closing div is already there)
then save it and upload it, the look of the box is a thin black line which I will try and also get the price breakdown to display too
WOW Zen Cart Rocks, together we can do anything with it
-
Re: Dynamic Price Updater
argh... only works on firefox...I will have to find out how to position it correctly in IE:oops:
-
Re: Dynamic Price Updater
Chrome,
Hows the new version coming along? I want to install this but I dont want to do it if there the new version coming soon. Also have you got it to work with quantity discounts?
Joe
-
Re: Dynamic Price Updater
When the option type is RADIO and the value 0 is selected, the price doesn't change back to previous amount.
i.e:
Price: $100
option 1: +0
option 2: +100
option 1 selected -> price $100
option 2 selected -> price $200
option 1 reselected (option 2 automatically unselected) -> price stays at $200, doesn't go back to $100.
Any idea how to work around this issue?
Thanks
-
Re: Dynamic Price Updater
you can use checkboxes to get around the price adjustment issue
the code for positioning I posted works in IE7+, FF, Opera and others
I'm still working on getting the code to place the information in a decent spot on IE6
I figured out how to put the price breakdown on the side so it scrolls with the page too (you will need to turn it off in the admin under tools layout box controller)
insert this code anywhere, end of the page is fine
HTML Code:
<div style="position: fixed; top: 426px; right: 30px; width: 200px; height: 30px;"; align="center">
<!--// bof: priceupdatersidebox //-->
<div class="rightBoxContainer" id="priceupdatersidebox" style="width: 150px">
<h3 class="rightBoxHeading" id="priceupdatersideboxHeading">Price Breakdown</h3>
<div id="priceupdatersideboxContent" class="sideBoxContent"></div></div>
<!--// eof: priceupdatersidebox //-->
</div>
add a div tag before the <!--bof Product Price block --> and a closing div tag like so
HTML Code:
<div style="position: fixed; top: 266px; right: 30px; width: 200px; height: 30px;"; align="center">
<!--bof Product Price block -->
<h2 id="productPrices" 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>
<!--eof Product Price block -->
</div>
style the div id="cartAdd" like so
HTML Code:
<div style="position: fixed; top: 306px; right: 60px; width: 100px; height: 40px; background-color:#81c481" id="cartAdd" align="center">
<?php
echo $display_qty;
echo $display_button;
?>
</div>
This will display the price, add this to my cart button and the price breakdown
This doesn't work on IE6 and below, I'm still working on a viable workaround for IE6 not supporting fixed positioning
-
Re: Dynamic Price Updater
Excellent contribution, thanks :)
-
Re: Dynamic Price Updater
Thank you so much for this great mod! The only thing I cannot get to work is my Radio Button choice. For example:
http://www.ilovephotogifts.com/index...roducts_id=131
I have it set to option 4 where the element is below image and option name--this will not work with the price updater...neither does option 5, but 0-3 work fine?!?!!?
I just read this whole thread but have not been able to find anything relevant to this issue?
-
Re: Dynamic Price Updater
same problem with "Momokui"
Issue of Price Updater. if i select price by attribute in product entry.
Price: $100
option 1: +0
option 2: +100
option 1 selected -> price $100
option 2 selected -> price $200
option 1 reselected (option 2 automatically unselected) -> price stays at $200, doesn't go back to $100.
please help... thanks :smile:
JYNKZ™
-
Re: Dynamic Price Updater
For some reason I seem to be getting a (1) around the price of the product when an attribute is selected. I'm using radio buttons, and the price scales up and down correctly depending on which attribute I choose, yet the (1) still stays at the top of the page next to the price.
I've looked through this thread a few times trying to get everything figured out, but can't find a solution to this problem. Anyone able to help me out? :)
Thanks,
Terps
-
Re: Dynamic Price Updater
EDIT: Nevermind this post. Still getting (1) next to the price.
-
Re: Dynamic Price Updater
The (1) is the quantity, change the quantity and the number will change and show the correct price for that quantity of items. If you don't want that to display go to the jscript_updater.php file and around line 17 change this:
var showQuantity = true;
to
var showQuantity = false;
-
Re: Dynamic Price Updater
Thank you lankee. Works perfectly :)
-
Re: Dynamic Price Updater
Quote:
Originally Posted by
jynkz
same problem with "Momokui"
Issue of Price Updater. if i select price by attribute in product entry.
Price: $100
option 1: +0
option 2: +100
option 1 selected -> price $100
option 2 selected -> price $200
option 1 reselected (option 2 automatically unselected) -> price stays at $200, doesn't go back to $100.
please help... thanks :smile:
JYNKZ™
for the option you want to show as 0 input .001 as the price, it will show as 0, that way if someone picks an option and then wants to take it off they can, (also drop down menus work, but they will display first in the pricebreakdown, if you are using all dropdowns this isn't a problem)
-
Re: Dynamic Price Updater
Quote:
Originally Posted by
stevenlee
for the option you want to show as 0 input .001 as the price, it will show as 0, that way if someone picks an option and then wants to take it off they can, (also drop down menus work, but they will display first in the pricebreakdown, if you are using all dropdowns this isn't a problem)
Didn't work, maybe I did wrong, would you please explain more detail. Thanks
-
Re: Dynamic Price Updater
I forgot to mention that drop down menus is not an option in my case, because it always shows the price different, unless you can tell me how to hide that price different.
drop down menu: $123 (+100) -> only shows $123
Thanks.
-
Re: Dynamic Price Updater
Hi all
I tried to use the Dynamic Price Updater but I don t understand anything.
I installled the jscript_updater.php file in the includes/modules/pages/product_info/ folder.
But that does not work !! When I change attributes to an object, the price is not updated.
Can anyone explain me how to set it up ?
Thanks !!
-
Re: Dynamic Price Updater
Guess I'm jumping into the end of the fray, but I just came into the issue because of the company I did the install for now has their shorts in a knot because they feel ( and I agree) that it is confusing for the customer to see a drop-down menu that gives information on a product and lists the price as +1.86, which they are supposed to add to the original $3.29.
The simplest solution to me seems to alter the data that is being displayed in the drop-down menu, and not that which deals with the price of the product as it is in the payment structure. What is confusing to the customer is the price that is displayed (+$1.86). Wouldn't it be a simple fix to change the formula that says: display the amount of increase/decrease to: display the amount of increase/decrease + the original price, and let the rest of the calculations stand as is?
Thanks. Shepherd
-
Re: Dynamic Price Updater
I've been using this addon on my website for a while now and its been working excellently. But I've recently ran into a problem...
I need a product to be priced by attributes (with some attributes set to be selected on default), but when I set it to this and I load the product page, the price updater makes the total price = the priced by attributes price + the price of the attributes selected.
This makes the dynamic price 2x what the price is when you add the item to your cart. Is there any way around this?
-
Re: Dynamic Price Updater
Hi all
I've been away for ages and I'm sorry for that... Things have been, er, odd to say the least
I'll reply in a largely random order :smile:
terpsnation: there is a post on this thread about how to fix this issue... Essentially the fix is to get the display price for a single unit to 0... Unfortunately I can't remember how exactly the fix works... Have a trawl through the previous posts to see if you can find it... If not shout back and I'll see what i can do :smile:
Shepherd348: In theory adjusting the display of the attribute values to match the selected attributes is a great idea... In fact someone suggested it just the other day... At the moment, with the current incarnation of the Updater, I think it will cause issues when the attributes are 'read' to be adjusted... This is something I'm looking into
I've only had a chance to quickly skim the latest posts on the thread so if I've missed anyone please let me know
I know I've said this before but I'm restarting development on the Updater (I haven't worked on ZC for a number of months and need time to get back into it)... I'll try to keep regular updates and post files for those daring enough to test
Thanks to everyone for the support and, I hope, patience :smile:
Cheers
Dan