Post by micky » Fri Apr 20, 2007 3:15 pm

can i charge customer for shipping depend on how much weight the item, and where they wanted to send the item to..

Newbie

Posts

Joined
Fri Apr 20, 2007 3:13 pm

Post by Daniel » Fri Apr 20, 2007 7:05 pm

Yes you will need to create a new module.


I have done this once for a client I set a web site up for.

I will include it in the next release.

OpenCart®
Project Owner & Developer.


User avatar
Administrator

Posts

Joined
Fri Nov 03, 2006 6:57 pm

Post by d77 » Fri Apr 20, 2007 10:57 pm

cool - i am content with simple/flat rate shipping, but needed the option to change the flat rate if the order is out of country. was looking to implement this myself... but will your module in the new ver handle this?

User avatar
d77
Active Member

Posts

Joined
Sat Apr 14, 2007 8:04 am

Post by micky » Mon Apr 23, 2007 2:14 pm

i see, cost i see on the code and session, that total weight of the item is already counted...
and i think it would become more better if i could use the total weight to charge the customer the shipping cost...

but then i should modify the database structure then..^^

Newbie

Posts

Joined
Fri Apr 20, 2007 3:13 pm

Post by Daniel » Sun May 06, 2007 12:55 am

I already did this mod on a site I set up for a company. Its not hard to do. Unfortantly my access to the site has been removed otherwise I would have posted the code.

You need to create a field that will hold the costs.

Code: Select all

<?php
$rates = '20:2.85,50:5.00';

$data = explode(',', $rates);

$cost = 0;

foreach ($data as $value) {
  $array = explode(':', $value);
  
  if ($cart->weight <= $array[0]) {
    $cost = $array[1];

    break;
  }
}
?>

OpenCart®
Project Owner & Developer.


User avatar
Administrator

Posts

Joined
Fri Nov 03, 2006 6:57 pm

Post by moonshadow » Tue Aug 07, 2007 1:15 am

This would be very interesting to know. Can you post the module or is it included in the latest?

Newbie

Posts

Joined
Sun Aug 05, 2007 6:27 pm

Post by daydreamer » Wed Aug 15, 2007 12:47 pm

Where can I add shipping price for an item ?

daydreamer

Who is online

Users browsing this forum: No registered users and 25 guests