Charging a fee for Personalization using a TextBox.
Charging a fee for Personalization using a TextBox.
If I add a Textbox template (in Catalog, Product Templates)
there is no way I can charge a fee for this.
If a customer wants some Personalization (engraving, custom printing, etc, . .)
they are usually charged for this.
But the Textbox just appears and there is no way to apply a charge for it if it is used.
I would think this would be a very popular and useful feature.
The website I'm converting over to AC7 uses Engraving on most items and
I know I need this feature right now before I purchase this product again:
viewtopic.php?f=42&t=11853
there is no way I can charge a fee for this.
If a customer wants some Personalization (engraving, custom printing, etc, . .)
they are usually charged for this.
But the Textbox just appears and there is no way to apply a charge for it if it is used.
I would think this would be a very popular and useful feature.
The website I'm converting over to AC7 uses Engraving on most items and
I know I need this feature right now before I purchase this product again:
viewtopic.php?f=42&t=11853
Re: Charging a fee for Personalization using a TextBox.
This is not out of the box but the following customization might work.
Add an option for No Engraving / Engraving (+ $9.99) and add a product template field for the personalization text.
Then in BuyProductDialog conlib and / or ProductHelper.cs, put in code that adds javascript to the Engraving drop down that enables / disables the personalization text field. (It should probably blank out the field if no engraving is selected.)
Even better (though I'm not sure where), you can probably create some global javascript routine to add the necessary javascript routine on any product page so you wouldn't even need to modify the code behind. Just add a javascript routine at the bottom of every page to search for the necessary Engraving dropdown and matchin personalization.
You need to worry about element id naming and existence of elements but I think this is pretty doable. Good Luck!
Add an option for No Engraving / Engraving (+ $9.99) and add a product template field for the personalization text.
Then in BuyProductDialog conlib and / or ProductHelper.cs, put in code that adds javascript to the Engraving drop down that enables / disables the personalization text field. (It should probably blank out the field if no engraving is selected.)
Even better (though I'm not sure where), you can probably create some global javascript routine to add the necessary javascript routine on any product page so you wouldn't even need to modify the code behind. Just add a javascript routine at the bottom of every page to search for the necessary Engraving dropdown and matchin personalization.
You need to worry about element id naming and existence of elements but I think this is pretty doable. Good Luck!
Re: Charging a fee for Personalization using a TextBox.
Thanks ZLA, . . that's a good idea.
I'm far from a JavaScript wizard though, . . that's why I was looking server side.
I'm far from a JavaScript wizard though, . . that's why I was looking server side.
Re: Charging a fee for Personalization using a TextBox.
If you go with my concept you'll still need some javascript. But injecting it from code behind means you'll know the correct element ids to use.
Here's a link on the javascript side of it: http://www.webmasterworld.com/javascript/3193661.htm. I would suggest the following:
Here's a link on the javascript side of it: http://www.webmasterworld.com/javascript/3193661.htm. I would suggest the following:
- put a javascript routine into the HEAD section of the product pages defined something like this:
Code: Select all
function popupProductHTML(textboxClientId) { // disable code goes here }
- In the code behind, add code to the dropown's onchange event to call the function something like this:
Code: Select all
mydropdown.Attributes("onchange")="popupProductHTML('" + mytextbox.ClientId + "')";
- NC Software
- AbleCommerce Partner
- Posts: 4620
- Joined: Mon Sep 13, 2004 6:06 pm
- Contact:
Re: Charging a fee for Personalization using a TextBox.
Thanks Neal, . .
That really is the only option, but, . . there is a problem if the person doesn't check the box.
Not all people work on the "honor system"
Plus if some people forget to check the box you have to notify them and then charge an additional amount.
It took a long time to figure out, but I was able to
check for text in the textbox and then these condition:
1. Engraving has text but was not selected - add charge.
2. Engraving was selected but no text entered - remove charge.
I basically made it "idiot proof".
That really is the only option, but, . . there is a problem if the person doesn't check the box.
Not all people work on the "honor system"
Plus if some people forget to check the box you have to notify them and then charge an additional amount.
It took a long time to figure out, but I was able to
check for text in the textbox and then these condition:
1. Engraving has text but was not selected - add charge.
2. Engraving was selected but no text entered - remove charge.
I basically made it "idiot proof".
- NC Software
- AbleCommerce Partner
- Posts: 4620
- Joined: Mon Sep 13, 2004 6:06 pm
- Contact:
Re: Charging a fee for Personalization using a TextBox.
I agree, we just have to monitor the orders as there is no way to validate it without the javascript as suggested. Amazingly I haven't had anyone miss it yet having been live since July 1st.
Neal Culiner
NC Software, Inc.
NC Software, Inc.
Re: Charging a fee for Personalization using a TextBox.
>> no way to validate it without the javascript as suggested.
I did it all in the code-behind. Not JavaScript. I'm not good at JavaScript, or care to be.
It's safer in the code-behind too - it's validated on the server.
I did it all in the code-behind. Not JavaScript. I'm not good at JavaScript, or care to be.
It's safer in the code-behind too - it's validated on the server.
- igavemybest
- Captain (CAPT)
- Posts: 388
- Joined: Sun Apr 06, 2008 5:47 pm
Re: Charging a fee for Personalization using a TextBox.
Why dont you just addit as a seperate varient and have them leave it in the notes section after checkout?