Rank: Member
Joined: 1/18/2008(UTC) Posts: 50
|
Hello, I am wondering if it is any way possible to make a customized section under Shared Choices -> HTML Area, so you can actually modify the 'Your Price' field of a product. I am hoping it can perform the same built-in function as the built-in product modifiers. Basically, I am building a calculator using javascript to calculate a more complex set of choices the user makes. For ex, I have made this so far, but have not figured out how to connect it to change the price field: http://www.uniquebanners...Sports__SCH-spc-001.aspxThanks, Dave
|
|
|
|
Rank: Member
Joined: 3/3/2006(UTC) Posts: 1,737
|
Dave, have a look: http://www.missionfurnis...-rails__MAS801heavy.aspxhttp://www.missionfurnis...ne-Cabinet__MAS751R.aspxThe 'starting' price is set on the product edit page and the price goes up via modifiers, a few dollars per inch. I can very quickly change the price of the item by editing the starting price on the product edit page. I can also limit the sizes entered so I have control. The fractions are free. The choices are saved with the product in the wish-list so a complicated product build can be saved and recalled. If you get your input working, please share. We're all looking for another way to make it easy for our customers to shop. |
Optimists invent airplanes, Pessimists buy parachutes. |
|
|
|
Rank: Member
Joined: 3/3/2006(UTC) Posts: 1,737
|
Also, something to consider is how the information entered will be passed to email and print templates as well as shipping. I'd imagine a 10' x 20' banner will cost more to ship than a 2'x3' banner.
These are a few of the reasons I had to give up on the java input. I'd love to get back to it and get it working though. |
Optimists invent airplanes, Pessimists buy parachutes. |
|
|
|
Rank: Member
Joined: 1/18/2008(UTC) Posts: 50
|
Hi Mitch,
Thank you for you input, this is a daunting task. Are you calculating an average price in the drop-downs? I may have to suffice with the built-in features.
Our problem is that based on what material is chosen, the price per square footage changes. for ex, if Polyester is chosen, ppsf = $9, but vinyl is $6.
Also, if I just had drop downs for the height and length of the banner, I need to calculate the total square footage.
I'm looking into how to access the system file that controls the 'Your Price' field, but so far the BV folks haven't gotten back to me.
I'll share my code (though it is sloppy) if I can get it to work.
|
|
|
|
Rank: Member
Joined: 3/3/2006(UTC) Posts: 1,737
|
I know... sq ft... I can go with perimeter. Not average, addition.
Picture frames: Base price + (11" x 2.77) + (14" x 2.77) = site price.
Cabinets is similar.
Only thing is, only the base price is passed to Fed Ex, so I've got to edit to get 100% insurance.
This is how I set it up years ago for my resellers in Excel. I just made a new modifier list for each frame. Took a few nights. |
Optimists invent airplanes, Pessimists buy parachutes. |
|
|
|
Rank: Member
Joined: 1/18/2008(UTC) Posts: 50
|
Hi Mitch, I think I get it, you need to create a lookup table list of values for each calculation.....makes sense. I did make some progress on the javascript, and since I am stubborn I'm not giving up. I found that if you use the document.getElementById() function, you can access the 'Your Price' id label and change it as follows : elem = document.getElementById("ctl00_MainContentHolder_lblSitePrice"); // this is the label id then set it to my square foot calculation: elem.innerHTML = form.C1.value*form.D1.value*(8) // sf = l * w * ppsf See my example: http://www.uniquebanners...Sports__SCH-spc-001.aspxIt changes it, and that is all good, but when I hit checkout the original base price still appears. I think there is another variable to access, I may be close...or not. Any ideas? Thanks, Dave
|
|
|
|
Rank: Member
Joined: 3/3/2006(UTC) Posts: 1,737
|
|
Optimists invent airplanes, Pessimists buy parachutes. |
|
|
|
Rank: Member
Joined: 5/14/2005(UTC) Posts: 398
|
Dave, I wrote an add-on for BV2004 that does exactly what you want to do in BV5. Changing the label that is displayed to the user isn't going to do the trick, you will need to set the price in the product object that used in the code behind. Be careful to test everything through the checkout process though because the price may be recalled and reset to the original value later on in the checkout process. |
|
|
|
|
Rank: Member
Joined: 1/18/2008(UTC) Posts: 50
|
Hello,
Thank you for your response, I knew it wasn't going to be that simple.
I'm wondering, to access the product object, will I need to access this directly, or can I use existing system code to perform the update?
I noticed there is some javascript code in a product modifier, for ex:
onchange="javascript:Anthem_FireCallBackEvent(this,event,'ctl00$MainContentHolder$VariantsDisplay$choiceTemplate2$ChoiceList','',false,'','','',true,null,null,null,true,true);return false;">
that appears to be updating the price with the built-in drop-down modifiers.
I've tried to use this but it doesn't seem to work, even if I copy the entire code and put it in a new html block modifier.
Thanks again, I'll share what I've discovered today....probably after two pots of coffee.
Dave
|
|
|
|
Rank: Member
Joined: 1/18/2008(UTC) Posts: 50
|
Hi, Can anyone offer some advice on this before I give this up? I need to change the product object apparently but I'm not finding it anywhere. Do I do this in the vb code on can I do it on the fly using javascript? I tried to access the "siteprice" class with no success. as below: <span id="ctl00_MainContentHolder_lblSitePrice" class="siteprice">$44.00</span></span></td> and I found that setting the label (ctl00_MainContentHolder_lblSitePrice) innerHTML will change the price on the page but not in the system code so when you hit add item it reverts back to the $44. My javascript code works fine, but I cannot find a way to update the price. my example: http://www.uniquebanners...Sports__SCH-spc-001.aspxPlease help, I will send beer...
|
|
|
|
Rank: Member
Joined: 1/18/2008(UTC) Posts: 50
|
OK, I switched to the VB code.
I think the variable I need to change is : productDisplay.SitePrice .. but I'm not sure.
I was able to perform a change in the VB code to the productDisplay.ListPrice, but when I try it on the productDisplay.SitePrice, I get a read only error:
d:\hosting\member\uniquebanner\site1\BVModules\ProductTemplates\Bvc5\Product.aspx.vb(118): error BC30526: Property 'SitePrice' is 'ReadOnly'
Am I anywhere near solving this??
Any help out there? .. please
|
|
|
|
Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.