It’s called “Flat Rates Plus!”... for lack of a better name. Essentially it allows you to specify different shipping rates for people based in different parts of the world. It’s very simple, you just specify the country code and optionally a state and from then how much you want to charge per weight unit to that place.
This extension is in beta and comes with no warranty but it is free! In return, we’d love it if you could help us make it better and more reliable by providing us with your feedback.
UIStudio, I’ve made a few amendments to our shipping plugin and have put together something which should do what you’re after. Let me know if it does the job.
I’m looking at using your plugin so thanks a million for sharing it. My client has a very variable product range so the weight / location combination is great.
I have what I’m afraid is a fairly basic question about the checkout page process - I’m an EE User rather than a coder so forgive any stupidity… Is the following correct?
1. Set the regions / cost per unit in the plugin.
2. On the Basket page, display cart items & option to estimate shipping.
3. The country select drop down is generated by using the exp:cartthrob:country_select option.
...Is there a way to limit the countries displayed in the dropdown, or do you just have to show all?
Thanks Chris - using the plugin I can set the shipping cost by using the default option in the Blis plugin - but I haven’t worked out how to update the cart total by changing location in the customer information form… I realise this is probably painfully obvious, but, er… how do I do that?
EDIT / Please ignore that… worked out the painfully obvious part… sigh.
I’m having some difficulty with this. I’m trying to use the Blis plugin with my authorize.net gateway and it’s not pulling in any prices that I have set. I haven’t touched the variable names, and I’ve added states and countries into the Flat Rates Plus option fields. Then after I go through the checkout process to the final step (where I am displaying all my varification before the user submits the order) the shipping cost stays at zero.
I have given each product a weight as well. Still no luck.
You need to capture the shipping location BEFORE you get to the checkout page… OR you need to use ajax to update the checkout form when you change the shipping location.
So I’m not capturing the shipping location when I am using {exp:cartthrob:checkout_form}{gateway_fields}{/exp:cartthrob:checkout_form}? I have my shipping info in there that I want to pull out for the checkout page.
Yes, you are capturing it, but the checkout is the last step. If you want to show shipping costs on that page, you need to have allowed someone to select their location BEFORE they get to that checkout page, OR use ajax to update the values while they’re on it.
Make sense? CartThrob doesn’t automatically use ajax, because carttthrob doesn’t have a bunch of templates with preset expectations. You can add ajax so that you can do fancier stuff like this, but it’s something you’d need to build.
Here’s an ajax example of recalculating tax, which is similar:
// bind to the change event of the state select in the checkout form $('#checkout_state').change(function(){
// display a message indicating that we're updating the tax cost $('#cart_tax').html( 'Updating...' ); $('#cart_total').html( 'Updating...' );
// update the value of the hidden form field $('#hidden_state_field').val( $(this).val() );
// use the jquery form plugin method ajaxSubmit to send the form $('#save_customer_info_form').ajaxSubmit({ success: function(data) { // load the updated tax value back into the page $('#cart_tax').load('{path=includes/cart_tax}'); $('#cart_total').load('{path=includes/cart_total}');
} }); }); }); [removed] </head> <body> <!-- somewhere in your page, have this hidden form, which will be used to update the customers state--> <div style="display:none;"> {exp:cartthrob:save_customer_info_form id="save_customer_info_form"} <input type="hidden" name="state" id="hidden_state_field" /> {/exp:cartthrob:save_customer_info_form} </div> {exp:cartthrob:cart_items_info} {title} {item_price} x {quantity}<br /> {/exp:cartthrob:cart_items_info}
{exp:cartthrob:checkout_form} <select name="state" id="checkout_state"> <option value="NH">New Hampshire (No Sales Tax)</option> <option value="AR">Arkansas (Tax)</option> <option value="MO">Missouri (Tax)</option> </select> {/exp:cartthrob:checkout_form} <!-- this is your display of the cart tax --> {exp:cartthrob:customer_info} Tax:<div id="cart_tax"> <!-- using a conditional, we can display a message if they haven't already selected a state --> {if '{customer_state}' == '} You must first select your state to calculate tax. {if:else} {exp:cartthrob:cart_tax} {/if} </div> <br /> Cart Shipping: <div id="cart_shipping">{exp:cartthrob:cart_shipping}</div><br /> Cart Subtotal: <div id="cart_sub_total">{exp:cartthrob:cart_subtotal}</div><br /> Cart Total: <div id="cart_total">{exp:cartthrob:cart_total}</div>
I have three separate pages for the checkout process.
The first step (page) shows the current items in the cart.
The second step (page) shows the payment gateway fields. This includes billing information, shipping information and credit card information.
The third step (page) is the verification page. This will be a page that shows the price of shipping and lists out what products they are ordering, where it will be shipped to, etc.
So I want to pull the shipping price based on the location they indicated for the shipping address. If they are shipping to California, I want the price I have indicated in the Flat_Rate_Plus shipping plugin. If they are shipping to Texas, it would be that shipping cost I have indicated in the plugin.
Im using the Blis Weight / Location plugin - I’ve just noticed that it is calculating combined shipping for seperate products, its not combining shipping for multiple instances of one product.
I have is when I set ‘Allow items to appear more than once in cart’ and ‘Split multiple quantities into single items’ both set to No.