Jump to content
ednique

[Contribution] Ship In Cart

Recommended Posts

YES YES YES YES .... Another version is available:

 

Extra's:

 

* when user is logged in the user can select an address from his address book.

 

* Free shipping now works for guests too

 

* Free shipping now allows to change address if logged in or allows top change country if guest.

:arrow: Changing a country can result in no more free shipping, as free shipping could be set to national

Share this post


Link to post
Share on other sites

Stuart

 

1) since version 1.5 i've excluded the contribution 1.4 of Hatim Daginawala because of the reasons you just described...

 

2) no prob... we don't hardcode the displayed texts but put them in a variable so that people can customize...

 

I think you all can thank yourself too ! For all the suggestions and feedback given on enhancing and maturing this contribution.

 

So Thank YOU! :lol:

Share this post


Link to post
Share on other sites

I challenge you all to find a solution to those pending issues:

 

1) Is the "free shipping over" incl tax or excl tax? iow do i need to add tax to the cart total to compare it whith the free shipping amount?

 

2) Download products are added to the Weight of the cart ? How come? Cause that makes the shipping charges incorrect... Add 20 downloads and 1 shippable product... Am I missing something, or is this a known bug?

 

Thanx.

Share this post


Link to post
Share on other sites

I really like the fix on the Free Shipping.

 

I did not even think to test the national and international ... glad you caught that one.

 

Looking snazzier all the time ... :D

 

Let me see what adding in the Downloads Controller does by default to this with the shipping and if it helps or breaks things on the 20 downloads.

 

And that is a known issue, btw. The new Attributes Sorter and Copier and Quantity Controller will have have attribute weight settings to fix that.

 

Working to have that out in the next couple days.

Share this post


Link to post
Share on other sites

Click on my www button to see next release 1.6 in alpha stage...

 

Tell me you like it...

Share this post


Link to post
Share on other sites

That could be a cool feature. Don't forget to add a define for SHIPPING_METHOD_SHOWS_CHEAPEST for whether or not to show the extra table.

 

I am such a saddist when it comes to code ... :wink:

Share this post


Link to post
Share on other sites

I've created CART_OT_SHOW to show/hide the order totals box...

 

But I'm not yet sure if all taxes are calculated correct...

The code I had to make for when the user isn't logged in, looks much simpler and has fewer lines than in the order class ...

Share this post


Link to post
Share on other sites

For that I wish you luck ... I so hate dealing with the taxes ... :roll:

Share this post


Link to post
Share on other sites
2) Download products are added to the Weight of the cart ? How come? Cause that makes the shipping charges incorrect... Add 20 downloads and 1 shippable product... Am I missing something, or is this a known bug?

I'm trying to understand this part. How can a downloadable product add weight? Wouldn't these be listed as "0" weight in the catalog?

 

David

Share this post


Link to post
Share on other sites

When a product can be bought and sent to your home or downloaded with the choice done via attributes the product has a 7lb weight.

 

But if you pick download ... then there really isn't a weight but it is still 7lbs.

 

The feature I am building in let's you alter the attribute weight per attribute so you can say -7lbs on the download so it weighs 0lbs in the cart.

Share this post


Link to post
Share on other sites

Why don't you (just) alter the cart class and check if a product is a download before adding it to the total weight of the cart?

Share this post


Link to post
Share on other sites

Because there are other reasons why you might want to adjust the weight of the product based on the attribute selected.

Share this post


Link to post
Share on other sites

Ship in cart 1.7 now available for download...

 

* some bug fixes

* order totals now show up in the cart (can be disabled if you want)

* Shipping methods selectable

 

Please have a look and inform me of any problems or suggestions...

 

I think this contribution is now at a final stage...

Only thing left to do, is putting the texts into the language files...

Share this post


Link to post
Share on other sites

I have installed shipincart 1.7 and I think its a fine contribution.

But i have a problem with the calculating of tax (german tax) and the total price.

If the customer is login the total will be calculated correct.

If the user isn't login the totalprice will not calculated correct.

Sample:

Item-price included tax: 19.50

Shipping-cost incl. tax : 6.00

tax (16% MwSt.) : 2.32 (included in item and shipping cost)

total cost included tax : 27.82

**but the correcct total price included tax must be 25.50

The Setting in the admin is: all prices will be shown incl. tax.

Share this post


Link to post
Share on other sites

Sorry guys, I am skiing in the alps right now....

So I will get back to you when i am back home (tuesday next week)...

 

Werner, thanks for the info, I'll get into this when i'm back

Share this post


Link to post
Share on other sites

Thanks for this excellent contribution!

 

However I also found the same bug as werner, with the tax being added to the total twice for non-logged in users if you have 'Show prices with tax' turned on.

 

I found that the solution was simply to comment out 1 line in shipping_estimator.php at approx line 303

 

        $order->info['tax'] += $tax_val;

       $order->info['tax_groups']["$products_tax_description"] += $tax_val;

       $order->info['total']+=$tax_val;

like so:



       $order->info['tax'] += $tax_val;

       $order->info['tax_groups']["$products_tax_description"] += $tax_val;

       //$order->info['total']+=$tax_val;

 

Thanks again for this great contribution.

 

Paul

Share this post


Link to post
Share on other sites

Thank you Paul,

I tried this, the tax now will be added only once.

But there is another bug too

 

the tax calculation is not correct

 

In the sample I posted before the right tax must be:

german tax 16% = 2.69 Euro

Share this post


Link to post
Share on other sites

I forget the tax 2.69 Euro, this is only the included 16% tax of the item ( 19.50 Euro).

16% tax (included in item and shipping cost = 25.50 Euro) must be 3.52 Euro

Share this post


Link to post
Share on other sites
Thank you Paul,

I tried this, the tax now will be added only once.

But there is another bug too

 

the tax calculation is not correct

 

In the sample I posted before the right tax must be:

german tax 16% = 2.69 Euro

 

That's well spotted, I'm using this contribution and I missed the incorrect tax calculation completely....

 

I think I have found the problem, at least it seems to be working ok for me now.

 

At approx line 298 of shipping_estimator.php:

 

FIND



       if (DISPLAY_PRICE_WITH_TAX == 'true') {

         $tax_val = ($products[$i]['final_price']-(($products[$i]['final_price']*100)/(100+$products_tax)))*$products[$i]['quantity'];

       } else {



REPLACE WITH



       if (DISPLAY_PRICE_WITH_TAX == 'true') {

         $tax_val = (($products[$i]['final_price']/100)*$products_tax)*$products[$i]['quantity'];

       } else {

 

Watch for line wrap above. If you do this along with the previous bug fix I posted all should be well.

 

Please post back if you find any more bugs with the tax calculations as I am using this contribution with 'Show prices with tax' set as well ....

Share this post


Link to post
Share on other sites

Thank you all sooooo much for this contribution, I think this puts Oscommerce in position for us to make some serious sales.

 

I was pleasantly surprised to see that for a logged in customer it shows the customers discount at the end below the total.

 

How can we then show "Total" as "Subtotal" and add a line with the discount subtracted and call it "Total"?

Share this post


Link to post
Share on other sites

I think a great idea would be to put a Checkout Button Below this module as well. Someone might get a bit confused as to have to scroll back up to click after they choose the shipping below. Just a suggestion

Thanks

Frank S

Share this post


Link to post
Share on other sites

I have a problem with this mod - it would be a fantastic one to have except that in my case it has a problem.

 

My store is located in Australia and for Australian addresses I use the State Based Shipping mod. Therefore, the default shipping (which is based on Store Location) uses the info for Australia. But, because it is State Based and the only option is Country then it says that there is no Shipping available for Australia, because Australia as a country has no shipping assigned to it in the Shipping Modules, but each individual state within Australia does. I hope this makes sense!

 

I need it to be able to:

 

a. load the default info based on the STATE my store is in and

 

b. offer other options for other states in Australia

 

 

As it is it looks terrible because the default says that there are no shipping options available at all, when obviously there are. People from Australia can't get an Estimate at all.

 

 

If you choose another country from the dropdown box and Recalculate it shows the correct shipping, because they are not using the State Based Shipping, but use International Zones which are defined by Country code.

 

 

ps. Try it at www.redinstead.com.au - add something to the Cart (not a live store)

 

thanks

 

 

Jen


I haven't lost my mind - I have it backed up on disk somewhere.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×