Adding a set-up fee to specific products

Request and discuss enhancements to ShopSite

Adding a set-up fee to specific products

Postby earthlygoods » Fri May 08, 2015 9:14 am

We are redesigning our website, and have a number of products that carry what is called a 'printing set-up fee'. It's a set fee amount, but may differ in amount by the type of product.

For example, an order for seed paper bookmarks has a set-up fee of $35, no matter how many are ordered. Custom seed packets have a $55 set up fee, no matter the quantity ordered.

There does not appear to be a way to add this fee, that's fixed and not associated to the quantity ordered.

Shopsite has a surcharge and extra handling fee.

The surcharge seems to be global, meaning everything we sell would have the extra charge, even if it is not applicable to that product.

The handling fee seems to be applied to quantity. So a $35.00 handling fee assigned to a product would end up being $3,500 additional cost for an order of 100.

There is a one time fee option under the recurring payment feature. BUT, you have to be using a payment processor or gateway to handle your CC transactions, which I do not.

While our current site uses 'ship by weight' the redesigned site will not, so a custom shipping API with the fee added to the appropriate products isn't an option either.

There needs to be some way to add an extra fee to specific products.
earthlygoods
 
Posts: 4
Joined: Fri May 08, 2015 9:00 am

Re: Adding a set-up fee to specific products

Postby ShopSite Lauren » Fri May 08, 2015 9:35 am

You could do this with an extra product field, the surcharge feature, and some custom javascript.

1. Select a currently unused extra product field, and add the product type into that field, such as "seed packet" or "seed paper bookmark".

2. Setup the surcharge pull down menu (Commerce Setup > Order System > Shopping Cart) with all possible types and combinations (or if there are too many types and combinations, just add options in $1 increments).

3. In your shopping cart template, replace the surcharge tag with your own custom javascript that looks at all products in the cart, and checks their extra product field that is setup in step 1, and adds the correct amount (selects the correct surcharge option) to add to the cart.

You could title the surcharge as "printing setup fee" so that it is on it's own line in the totals table in the cart.
- ShopSite Lauren
Contact me for help with any of your
custom ShopSite template questions.
ShopSite Lauren
 
Posts: 889
Joined: Fri Aug 11, 2006 1:35 pm
Location: Orem, UT

Re: Adding a set-up fee to specific products

Postby earthlygoods » Fri May 08, 2015 9:38 am

Thanks, Lauren--we will take a look at this.
earthlygoods
 
Posts: 4
Joined: Fri May 08, 2015 9:00 am

Re: Adding a set-up fee to specific products

Postby earthlygoods » Sat May 09, 2015 6:08 am

Lauren, couple more questions:

Is there a link you can reference for the custom javascript? I assume this will work in Shopsite 11 or will I need to upgrade?
earthlygoods
 
Posts: 4
Joined: Fri May 08, 2015 9:00 am

Re: Adding a set-up fee to specific products

Postby ShopSite Lauren » Mon May 11, 2015 8:52 am

Yes it will work with ShopSite 11.

I don't have a link that will show the custom javascript because this is a custom request, there isn't an example that will exactly work for your store. However, it would be something similar to the following (this code has not been tested, but should point you, or your designer in the right direction).

1. This example is using the extra product field 1. The two options for extra product field 1 in this example are "seed packet" and "seed paper bookmark".

2. The surcharge field is setup as follows for this example:
Code: Select all
No Printing Set-Up Fee
Printing Set-Up Fee;35
Printing Set-Up Fee;55
Printing Set-Up Fee;90


3. The custom code that would replace the surcharge tag in the shopping cart template would be something like:
Code: Select all
<span><input id="surchargevalue" type="hidden" name="shipoptmenu:0" value="No Printing Set-Up Fee"></span>
<script type="text/javascript">
var field1array = ss_field1;
var surchargeprice = 0;

if (field1array.indexOf("seed packet") != -1) {surchargeprice = parseInt(surchargeprice) + 35;}
if (field1array.indexOf("seed paper bookmark") != -1) {surchargeprice = parseInt(surchargeprice) + 55;}

document.getElementById("surchargevalue").value = "Printing Set-Up Fee;" + surchargeprice;
</script>
- ShopSite Lauren
Contact me for help with any of your
custom ShopSite template questions.
ShopSite Lauren
 
Posts: 889
Joined: Fri Aug 11, 2006 1:35 pm
Location: Orem, UT

Re: Adding a set-up fee to specific products

Postby workingdog » Wed May 13, 2015 7:08 pm

Hi,
I have an additional question. I follow all three steps, but how does the ID surcharge value get added back into the SC_total?

I tried the three steps, the input field will change from

<input id="surchargevalue" type="hidden" name="shipoptmenu:0" value="No Printing Set-Up Fee">

to this...

<input id="surchargevalue" type="hidden" name="shipoptmenu:0" value="Printing Set-Up Fee;90">

if I have two items in the cart, one equaling 35.00 the other 55.00.

What is NOT happening, the surcharge is not changing the cart total. what else is missing that will change the cart total?
workingdog
 
Posts: 4
Joined: Mon May 11, 2015 7:28 am

Re: Adding a set-up fee to specific products

Postby workingdog » Mon Nov 02, 2015 9:29 pm

I was able to get this to work, but I did notice something. If I have more than two setup fees, like below, the shopsite cart seems to go into a a weird loop. Meaning the cart seems to keep re-loading the page with the processing spinner flashing.

if (field1array.indexOf("seed packet") != -1) {surchargeprice = parseInt(surchargeprice) + 35;}
if (field1array.indexOf("seed paper bookmark") != -1) {surchargeprice = parseInt(surchargeprice) + 55;}

It doesn't matter what the price is for the setup fee. It seems to be if there's more than two. Is there a limit to the IndexOf array?
workingdog
 
Posts: 4
Joined: Mon May 11, 2015 7:28 am

Re: Adding a set-up fee to specific products

Postby workingdog » Mon Nov 02, 2015 9:32 pm

More clarification. If I have this


if (field1array.indexOf("seed packet") != -1) {surchargeprice = parseInt(surchargeprice) + 35;}
if (field1array.indexOf("seed paper bookmark") != -1) {surchargeprice = parseInt(surchargeprice) + 55;}
if (field1array.indexOf("seed packet") != -1) {surchargeprice = parseInt(surchargeprice) + 70;}

I would get the loop.

But if I have this

if (field1array.indexOf("seed packet") != -1) {surchargeprice = parseInt(surchargeprice) + 35;}
if (field1array.indexOf("seed paper bookmark") != -1) {surchargeprice = parseInt(surchargeprice) + 55;}

I don't get the loop.
workingdog
 
Posts: 4
Joined: Mon May 11, 2015 7:28 am

Re: Adding a set-up fee to specific products

Postby ShopSite Lauren » Thu Nov 05, 2015 5:31 pm

I am guessing it is because the math doesn't add up any more. The Setup Fee (surcharge) pull down menu, only has three pricing options. The custom javascript is trying to set specific pricing, which doesn't match up with the surcharge menu, so it gets stuck trying to re-set the value to the correct value, and can't because the correct value doesn't exist.
- ShopSite Lauren
Contact me for help with any of your
custom ShopSite template questions.
ShopSite Lauren
 
Posts: 889
Joined: Fri Aug 11, 2006 1:35 pm
Location: Orem, UT


Return to Enhancement Requests

Who is online

Users browsing this forum: No registered users and 2 guests

cron