Re: Dynamic Price Updater
Quote:
Originally Posted by
dmm2020
Question on updater:
I am looking for a utility or MySQL code that will set all prices for all products to a set percentage above wholesale price. Also looking for a way to record wholesale prices in the databse along with a user defined formatted catalog ID number.
This is the wrong thread for your question. The dynamic price updater is for the product info display page to dynamically change the displayed price based on product attributes that are chosen by the user.
I think you can put a couple of the free mods together for what you want, Easy Populate is one and I think there might be one to add the wholesale cost to your product creation page in the admin(it's a profit calculator but it does add a field in the product creation page for your cost). You use a spreadsheet for EP and can easily multiply a column (the wholesale price(you will have to add this manually - see my post here:http://www.zen-cart.com/forum/showthread.php?t=116061)) by whatever percentage you want to derive the product's price.
As far as the user defined catalog ID number, wouldn't you just use the model number field in the product creation page?
I suggest starting a new thread for your questions to get more in depth answers.
Re: Dynamic Price Updater
at WriteAtHome
You have two things to change:
1: Attribute 6'' set the price to +0.0001 or use a dropdown
2: for="attrib-29-109">Same as Color 1<br> (+$0.00) - the problem is the <br> tag. Dynamic Price Updater can't read the price (+$0.00)
The code for Radiobuttons and Checkboxes read out the html-text until the next html-tag (nextSibling):
prArr[objInp.name]['n'] = objInp.nextSibling.innerHTML.replace(seeker, '');
web28
Re: Dynamic Price Updater
Quote:
Originally Posted by
web28
at WriteAtHome
You have two things to change:
1: Attribute 6'' set the price to +0.0001 or use a dropdown
2: for="attrib-29-109">Same as Color 1<br> (+$0.00) - the problem is the <br> tag. Dynamic Price Updater can't read the price (+$0.00)
The code for Radiobuttons and Checkboxes read out the html-text until the next html-tag (nextSibling):
prArr[objInp.name]['n'] = objInp.nextSibling.innerHTML.replace(seeker, '');
web28
Hi Web28, lankeeyankee, and everyone using the Dynamic Price Updater,
After many wonderful suggestions by WEb 28 and lankeeyankee I've perfected the price updater on my test website. You can view it here: http://welcomingwalls.com/index.php?...roducts_id=181
It's not exactly what I wanted the page to look, but having the updater work properly far outweighs the small details I had to forego. To help anyone else out there trying to make the updater work on their site, I'm going to give a rundown of everything I had to tweak to make it work for me. Maybe some of these suggestions will work for you as well.
1. I had too many custom tweaks to begin with that interfered with the updater, so my first suggestion would be to start with fresh and "untampered with" product_info pages. Once you get the updater working properly then you can make custom changes and test to make sure it doesn't mess with the updater. Web28 mentioned that you have to keep the "Starting at:" text or at least the ":" to make this work. This was one of the tweaks I had made that messed with the updater working for me.
2. My website uses radio buttons rather than dropdown menus because I needed to add images to my options. BUT, only some of the radio "Attribute Style for Radio Buttons/Checkbox" work:
Image Styles:
0= Images Below Option Names
1= Element, Image and Option Value
2= Element, Image and Option Name Below
3= Option Name Below Element and Image
4= Element Below Image and Option Name
5= Element Above Image and Option Name
Test them out for yourself, but for me the only one that worked was #3. I think this had something to do with Web28's suggestion in Post #272 about the (+3.00) being on a certain line.
3. My actual product I set a price of $0.00 because the pricing was based on the size chosen in the first attribute. The first attribute flags were all set to "no", except the discounted setting which is could be either way, and the first attribute is set as the default. As lankeeyankee stated in Post #264, the first attribute doesn't need the "+" in the pricing to work. Because I am using it as my base pricing I left the "+" out and it works fine.
4. The second attribute is color #1. I don't charge anything for the first color because it's part of the original price. So, I was able to take out the "+" and the pricing all together. Each of these attributes work independently from one another, so it didn't have any negative effect on the other attributes to leave the pricing out. All the attribute flags were set to "no", except discount and base price. These could go either way because their is no pricing involved.
5. For the third attribute, Color 2, this was the kicker. My first option value is "Same as Color 1", which means their is not an additional price because they didn't want a second color. The other option values added $3.00 for the second color of their choice. The options that added $3.00 worked fine, but if I then again chose "Same as Color 1" it wouldn't subtract the $3.00 back off. The only thing different between it and the other options was the price difference and the fact it didn't have an image. So, I added an image . . . and it worked perfectly. I don't know why it also has to have an image for the updater to work, but I suspect it has to do with Web28's suggestion in Post #272. For this attribute, the flags were all set to "no", except the discounted could go either way and the "Same as Color 1" is set as the default.
Anyway, I'd like to thank everyone who posted here, because I read all 27 pages trying to find the answers to my problems. I hope that maybe the settings I've posted here might help someone else who is having trouble.
Kim :smile:
1 Attachment(s)
Re: Dynamic Price Updater
at WriteAtHome
Quote:
Only some of the radio "Attribute Style for Radio Buttons/Checkbox" work:
Image Styles:
0= Images Below Option Names
1= Element, Image and Option Value
2= Element, Image and Option Name Below
3= Option Name Below Element and Image
4= Element Below Image and Option Name
5= Element Above Image and Option Name
I fixed this for Image Styles 0,1,2,3,5, only 4 is too difficult, because the <Label>Tag isn't after the <Input>Tag and the Dynamic Price Updater is looking for the <Label>tag after the <Input>Tag.
Please try the modified version. I tested it with ZenCart 1.3.8 and it works fine.
web28
1 Attachment(s)
Re: Dynamic Price Updater
I'm sorry, there a few mistakes in the postet Version
The newest version is v.0.92
In this version are some features specially for the german ZenCart Shop, but it work also fine with original ZenCart.
web28
Re: Dynamic Price Updater
Quote:
Originally Posted by
web28
I'm sorry, there a few mistakes in the postet Version
The newest version is v.0.92
In this version are some features specially for the german ZenCart Shop, but it work also fine with original ZenCart.
web28
Thanks Web28! That's awesome.
1 Attachment(s)
Re: Dynamic Price Updater
New multilangual Version
web28
Re: Dynamic Price Updater
OK, can someone tell me what I am doing wrong here?
I am not getting any updates to the pricing, although it appears things are working. Check out a sample here: http://www.craftycowleatherworks.com...&products_id=8
Any help would be greatly appreciated!
Re: Dynamic Price Updater
Hi hachaliah
Unfortunately I don't have my development files with me for stating line numbers but you need to open the jscript_updater.php file in an editor and find the following line
Code:
// try and find the default currency symbols
var temp = origHTML.match(/.*:\s*([^0-9 ]*)([0-9.,]+)(.*)/);
Try changing the line to read
Code:
var temp = origHTML.match(/(.*:\s*)?([^0-9 ]*)([0-9.,]+)(.*)/);
HTH and good luck
Dan
Re: Dynamic Price Updater
Thanks for the help.
It almost works!
Here's the link again:http://www.craftycowleatherworks.com...&products_id=8
The price adjusts when there is an adjustment to be made, but if the attribute is one that does not require a pricing adjustment, it gives me an error. Any thoughts? I certainly appreciate the help!
Also, how would I go about eliminating the pricing showing up twice? And how about the quantity appearing in parenthesis after the price.