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

Dynamic Price Updater

Views: 342,267

Results 261 to 280 of 1,701
25 Jan 2009, 8:54 PM
#261
lankeeyankee avatar

lankeeyankee

Totally Zenned

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

Dynamic Price Updater

MARCOJIMJ:

I'm looking for a "custom product" mod where the customer can select material, grade, & thickness, then enter length, and width. the mod would then calculate price and weight based on material and grade related properties and then send it to the order. Does this exist??? Thanks P.S. as a newbie this is driving me Wacko.:wacko:

Have you looked at using the attributes controller in the admin panel? We use attributes for various options and once selected and added to the cart it will adjust the price. Sounds like you would need to use text attributes for the length and width unless you created a dropdown list for those. The dynamic updater will update the price on the product info page. I think you would have to custom program the weight update calculation based on the options chosen, or perhaps you can set up individual products for different length and widths and set the weights normally for each one. Not as elegant perhaps but easier(and cheaper if you have to hire someone) to implement.

If you haven't already done so, I would highly highly recommend buying the book eStart Your Web Store With Zen Cart, there is a link in here somewhere. It is a great resource for basic ZC setup including attributes. I found it very helpful and still refer back to it now and again to double check something.

30 Jan 2009, 9:13 PM
#262
writeathome avatar

writeathome

New Zenner

Join Date:
Dec 2008
Posts:
50
Plugin Contributions:
0

Re: Dynamic Price Updater

Hi Chrome and all savvy updater people,

I'm sure my problem is just some small tweak I've overlooked, so maybe someone can help me. I've installed the updater, but the price doesn't show at all, nor does the sidebox.

My products have $0.00 price. The price is based off the attributes. I have radio buttons, dropdown menus, and text boxes. Some of them increase the price, some of them do not. I've taken off the + sign from my attribute pricing. I also do not have any price currently showing (I've taken off the "starting at:" price).

I have made some changes to the tpl_product_info_display, but I tried the original file and that didn't fix the problem.

I've tried adding a base price, putting the + sign back on, displaying the original price, and everything else I can think of to get it to show up. I've double checked the folder I originally placed the file in, and it's correct. What am I missing? Am I supposed to include some code in my product info display page?

Here is my test link: http://welcomingwalls.com/index.php?main_page=product_info&cPath=65&products_id=181

Thank you in advance for the help,

Kim :no:

30 Jan 2009, 9:18 PM
#263
writeathome avatar

writeathome

New Zenner

Join Date:
Dec 2008
Posts:
50
Plugin Contributions:
0

Re: Dynamic Price Updater

Just a bit more info on my problem I just posted:

I am using the lasted version of Zencart.

I don't have the Lightbox add-on, just IH2 and the Column Layout Grid.

I checked in both IE7 and Firefox, and neither are working.

Thanks,

Kim

30 Jan 2009, 10:31 PM
#264
lankeeyankee avatar

lankeeyankee

Totally Zenned

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

Re: Dynamic Price Updater

WriteAtHome:

Hi Chrome and all savvy updater people,

I'm sure my problem is just some small tweak I've overlooked, so maybe someone can help me. I've installed the updater, but the price doesn't show at all, nor does the sidebox.

My products have $0.00 price. The price is based off the attributes. I have radio buttons, dropdown menus, and text boxes. Some of them increase the price, some of them do not. I've taken off the + sign from my attribute pricing. I also do not have any price currently showing (I've taken off the "starting at:" price).

I have made some changes to the tpl_product_info_display, but I tried the original file and that didn't fix the problem.

I've tried adding a base price, putting the + sign back on, displaying the original price, and everything else I can think of to get it to show up. I've double checked the folder I originally placed the file in, and it's correct. What am I missing? Am I supposed to include some code in my product info display page?

Here is my test link: http://welcomingwalls.com/index.php?main_page=product_info&cPath=65&products_id=181

Thank you in advance for the help,

Kim :no:

I don't see where your price is supposed to display? Can you provide a screenshot of the page without the updater to get an idea of how it looks?

When the attribute price is $0, did you make it $.0001 in the attributes controller? You have to or it won't work. And, you can only have one set of attributes without the +, all others have to have the + to work, so I have found that it's best to use the no + attribute for the main one and the ones below have the +, even if it doesn't add to the price it still has to show +$0.00 or it won't work.

I'm sure we can get it working correctly, just need to figure out your setup and then take it from there.

BTW, your layout is broken in FF3 on XP. the main column overflows into both sideboxes, an easy fix in your CSS.

31 Jan 2009, 7:01 PM
#265
web28 avatar

web28

New Zenner

Join Date:
Sep 2005
Posts:
20
Plugin Contributions:
0

Re: Dynamic Price Updater

Hi, there is a problem with the default currency symbols

if there is no ":" in TEXT_BASE_PRICE in yourlanguage.php, Dynamic Price Updater do not work.

To fix this problem find

// try and find the default currency symbols
var temp = origHTML.match(/.*:\s*([^0-9 ]*)([0-9.,]+)(.*)/);

and change to

// try and find the default currency symbols
var temp = origHTML.replace(/<?echo(TEXT_BASE_PRICE);?>/g,''); //NEW filter for TEXT_BASE_PRICE		
temp= temp.match(/s*([^0-9 ]*)([0-9.,]+)(.*)/);

web28

31 Jan 2009, 8:23 PM
#266
writeathome avatar

writeathome

New Zenner

Join Date:
Dec 2008
Posts:
50
Plugin Contributions:
0

Re: Dynamic Price Updater

lankeeyankee:

I don't see where your price is supposed to display? Can you provide a screenshot of the page without the updater to get an idea of how it looks?

When the attribute price is $0, did you make it $.0001 in the attributes controller? You have to or it won't work. And, you can only have one set of attributes without the +, all others have to have the + to work, so I have found that it's best to use the no + attribute for the main one and the ones below have the +, even if it doesn't add to the price it still has to show +$0.00 or it won't work.

I'm sure we can get it working correctly, just need to figure out your setup and then take it from there.

BTW, your layout is broken in FF3 on XP. the main column overflows into both sideboxes, an easy fix in your CSS.

Thank you lankeeyankee for the guidance. I made the changes you suggested and the price updater actually shows up now! Wahoo! But, it doesn't update the prices.

Here's my link again: http://welcomingwalls.com/index.php?main_page=product_info&cPath=65&products_id=181

I will go over this thread again for others with the same problem and try to find a solution. Otherwise, if you have any more good suggestions, I would be happy to hear from you.

BTW, I was in the middle of messing with my divs when you found my firefox issue. It's fixed now :wink:

1 Feb 2009, 12:32 AM
#267
web28 avatar

web28

New Zenner

Join Date:
Sep 2005
Posts:
20
Plugin Contributions:
0

Re: Dynamic Price Updater

at WriteAtHome

(I've taken off the "starting at:" price).

Thats may be the problem. In your define TEXT_BASE_PRICE is no ":" and the Price Updater don't work.

Change the code with my fix.

web28

1 Feb 2009, 2:11 AM
#268
writeathome avatar

writeathome

New Zenner

Join Date:
Dec 2008
Posts:
50
Plugin Contributions:
0

Re: Dynamic Price Updater

Thank you Web28, you were right on target with the "colon" thing. Now I've got the updater working for the first attribute which is the size. The second attribute is free. But for the third attribute where I add $3.00 for the extra color choice, the updater isn't adding it at all.

I changed the sort order of the third attribute to the first one and it still doesn't work, but the size attribute still works as third in the sort order. So, I know it specifically has to do with the settings in that particular attribute. All my attributes are radio buttons, so I know it doesn't have anything to do with that.

I'm sure it's just another little thing I've overlooked. Any other suggestions would be most welcome.

Here's my website again: http://welcomingwalls.com/index.php?main_page=product_info&cPath=65&products_id=181

Thank You!

1 Feb 2009, 3:11 AM
#269
lankeeyankee avatar

lankeeyankee

Totally Zenned

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

Re: Dynamic Price Updater

WriteAtHome:

Thank you Web28, you were right on target with the "colon" thing. Now I've got the updater working for the first attribute which is the size. The second attribute is free. But for the third attribute where I add $3.00 for the extra color choice, the updater isn't adding it at all.

I changed the sort order of the third attribute to the first one and it still doesn't work, but the size attribute still works as third in the sort order. So, I know it specifically has to do with the settings in that particular attribute. All my attributes are radio buttons, so I know it doesn't have anything to do with that.

I'm sure it's just another little thing I've overlooked. Any other suggestions would be most welcome.

Here's my website again: http://welcomingwalls.com/index.php?main_page=product_info&cPath=65&products_id=181

Thank You!

You need to put a price for the 6", you'll notice that if you select one of the other sizes it will change the price as expected but then go back to the 6" and the price stays at the last size's. This may be what is needed to make the third set of attributes work correctly. Also, you might want to make the 6" size the default selected like the other 2 option sets have. Let me know how it works after you add the price to the 6".

1 Feb 2009, 3:30 AM
#270
dmm2020 avatar

dmm2020

Zen Follower

Join Date:
Feb 2009
Posts:
157
Plugin Contributions:
0

Re: Dynamic Price Updater

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.

1 Feb 2009, 7:52 AM
#271
lankeeyankee avatar

lankeeyankee

Totally Zenned

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

Re: Dynamic Price Updater

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.

1 Feb 2009, 10:38 AM
#272
web28 avatar

web28

New Zenner

Join Date:
Sep 2005
Posts:
20
Plugin Contributions:
0

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

2 Feb 2009, 2:17 AM
#273
writeathome avatar

writeathome

New Zenner

Join Date:
Dec 2008
Posts:
50
Plugin Contributions:
0

Re: Dynamic Price Updater

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?main_page=product_info&cPath=65&products_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.

  1. 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.

  2. 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.

  3. 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:

2 Feb 2009, 1:41 PM
#274
web28 avatar

web28

New Zenner

Join Date:
Sep 2005
Posts:
20
Plugin Contributions:
0

Re: Dynamic Price Updater

at WriteAtHome

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

2 Feb 2009, 5:16 PM
#275
web28 avatar

web28

New Zenner

Join Date:
Sep 2005
Posts:
20
Plugin Contributions:
0

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

3 Feb 2009, 1:14 AM
#276
writeathome avatar

writeathome

New Zenner

Join Date:
Dec 2008
Posts:
50
Plugin Contributions:
0

Re: Dynamic Price Updater

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.

11 Feb 2009, 9:34 AM
#279
chrome avatar

chrome

Zen Follower

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

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

// try and find the default currency symbols
var temp = origHTML.match(/.*:\s*([^0-9 ]*)([0-9.,]+)(.*)/);

Try changing the line to read

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

HTH and good luck

Dan

11 Feb 2009, 3:00 PM
#280
hachaliah avatar

hachaliah

New Zenner

Join Date:
Feb 2009
Posts:
6
Plugin Contributions:
0

Re: Dynamic Price Updater

Thanks for the help.
It almost works!

Here's the link again:http://www.craftycowleatherworks.com/store/index.php?main_page=product_info&cPath=3&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.