Find Jobs
Hire Freelancers

Simple PHP shipping module modification - Opencart

$10-30 AUD

Đã hoàn thành
Đã đăng vào gần 10 năm trước

$10-30 AUD

Thanh toán khi bàn giao
I need someone to help write a line of PHP code for my opencart shipping module. A section of the shipping module PHP file is below. Fastway and A-national are both courier companies. Currently the script does this: All products will be shipped with fastway courier. However If the item is over 25kg and over 100cm, then it will be shipped with A-national. What i need to do is simply add a line of code which makes all products from a certain manufacture to always use the A-national courier. There is a manufacturer field inside opencart and all products under this manufacturer will have to use the A-national courier. A-National Courier shipping quote is using this calculation, you can see in script. $calprice=$baseprice+$weight*$perkilo; $calfuel=($calprice*16.9/100)+$calprice; $calfuel=$calfuel+($calfuel*0.1); Its a pretty quick and straight forward job i think and it will be easy for someone who knows PHP very well and some familiarity with opencart. ------------------------------------------------------------------------ class ModelShippingFastway extends Model { function getQuote($address) { $lengths=$this->cart->getProducts(); $ll=0; foreach ($lengths as $length){ if ($length['length']>=100) {$ll=$ll+1;} } $query=$this->db->query('select * from expresspost where postcode="'.$address['postcode'].'" '); // if ( ($ll > 0 || $this->cart->getWeight() >25) || ($this->cart->getWeight() >25) && $query->row['status']==0 ) { if ( !empty($query->row) && $ll > 0 && $query->row['status']==1 || $this->cart->getWeight() >25 ) { $zone=$this->db->query("select * from expresszone where zone='".$query->row['zone']."'"); $weight = intval($this->weight->convert($this->cart->getWeight(), $this->config->get('config_weight_class_id'), $this->config->get('fastway_weight_class_id'))); $baseprice=$zone->row['baseprice']; $perkilo=$zone->row['perkilo']; $minprice=$zone->row['minprice']; $calprice=$baseprice+$weight*$perkilo; $calfuel=($calprice*16.9/100)+$calprice; $calfuel=$calfuel+($calfuel*0.1); $query = $this->db->query("SELECT * FROM " . DB_PREFIX . "zone_to_geo_zone WHERE geo_zone_id = '" . (int)$this->config->get('flat_geo_zone_id') . "' AND country_id = '" . (int)$address['country_id'] . "' AND (zone_id = '" . (int)$address['zone_id'] . "' OR zone_id = '0')"); if (!$this->config->get('flat_geo_zone_id')) { $status = true; } elseif ($query->num_rows) { $status = true; } else { $status = false; } $method_data = array(); if ($status) { $quote_data = array(); $quote_data['fastway'] = array( 'code' => '[login to view URL]', 'title' => "A - National Courier", 'cost' => $calfuel, 'tax_class_id' => $this->config->get('flat_tax_class_id'), 'text' => $this->currency->format($this->tax->calculate($calfuel, $this->config->get('flat_tax_class_id'), $this->config->get('config_tax'))) ); $method_data = array( 'code' => 'fastway', 'title' => "A - National Courier", 'quote' => $quote_data, 'sort_order' => $this->config->get('fastway_sort_order'), 'error' => false ); } return $method_data; } else { $this->load->language('shipping/fastway');
Mã dự án: 6106506

Về dự án

20 đề xuất
Dự án từ xa
Hoạt động 10 năm trước

Bạn muốn kiếm tiền?

Lợi ích khi chào giá trên Freelancer

Thiết lập ngân sách và thời gian
Nhận thanh toán cho công việc
Phác thảo đề xuất của bạn
Miễn phí đăng ký và cháo giá cho công việc
Đã trao cho:
Avatar người dùng
Hi, I am Opencart expert and I have worked for you earlier. I can do this job. So you need if any product belongs to specified manufacturer, then regardless of cart weight it will use A-national courier? Thanks Harsh
$34 AUD trong 1 ngày
4,9 (629 nhận xét)
8,3
8,3
20 freelancer chào giá trung bình $42 AUD cho công việc này
Avatar người dùng
Hello There, we are able to help u now and will complete in few hrs only ....we have opencart expert team here... thanks
$34 AUD trong 1 ngày
4,9 (293 nhận xét)
8,4
8,4
Avatar người dùng
A proposal has not yet been provided
$45 AUD trong 1 ngày
4,9 (822 nhận xét)
8,3
8,3
Avatar người dùng
Dear Sir, We claim to get it done perfectly for you EXACTLY in the way you want it - Kindly give we a chance and we will prove myself - Ready to prove our words, let's get it done right away and I mean RIGHT AWAY !! Looking forward to hear from you soon - GOD Bless You.
$74 AUD trong 1 ngày
4,9 (190 nhận xét)
6,8
6,8
Avatar người dùng
hi we could do it perfectly with accuracy, please let us know if you want any clarification. if you want us to share our skill and previous work please initiate the chat..
$39 AUD trong 1 ngày
4,7 (186 nhận xét)
7,2
7,2
Avatar người dùng
This could be accomplished ,though manufacturer stuff needs other setting too mAXimum opencart reviews .............................. Regards Shambhal
$35 AUD trong 1 ngày
4,9 (208 nhận xét)
6,6
6,6
Avatar người dùng
Hi Its Tanveer here, I am experienced developer so I can help you to finish it. please response for further discussion. thanks
$16 AUD trong 1 ngày
4,9 (54 nhận xét)
6,3
6,3
Avatar người dùng
Check my feedback... I'm expert in opencart. Let me know if you want me to do this...............................................................................................................
$66 AUD trong 2 ngày
4,8 (52 nhận xét)
5,8
5,8
Avatar người dùng
A proposal has not yet been provided
$84 AUD trong 1 ngày
5,0 (12 nhận xét)
4,4
4,4
Avatar người dùng
We are a team of experienced developers and just started new company also we have done similar jobs before, give me chance we can do your job well.
$27 AUD trong 0 ngày
5,0 (6 nhận xét)
2,4
2,4
Avatar người dùng
A proposal has not yet been provided
$15 AUD trong 1 ngày
0,0 (0 nhận xét)
0,0
0,0
Avatar người dùng
I am Eugene. Have been working on lot of PHP web applications for the past 4 years. How I plan to complete the task: Precondition: I need to have information of the manufacturer either manufacturer id or the name. TODO: (changes on the model) - Loop through all the products for checkout by the user in opencart. - Separate those products from the manufacturer to those which should use the A-national courier and those which are not. - Calculate for both separated products the $calprice and $calfuel. - Calculate the sum of both calculated $calprice and $calfuel. - Set the method code of method_data to be 'fastway-national' to indicate that it will be shipped using both courier and return the method array. On checkout: - Add the code to check if the method is 'fastway-national', and create 2 order each with its own shipping details.
$20 AUD trong 1 ngày
0,0 (0 nhận xét)
0,0
0,0

Về khách hàng

Cờ của AUSTRALIA
Sydney, Australia
5,0
32
Phương thức thanh toán đã xác thực
Thành viên từ thg 9 5, 2011

Xác thực khách hàng

Cảm ơn bạn! Chúng tôi đã gửi email chứa đường link để bạn lấy tín dụng miễn phí.
Đã xảy ra lỗi trong khi gửi email của bạn. Hãy thử lại.
Người Dùng Đã Đăng Ký Tổng Số Việc Đã Đăng
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Đang tải xem trước
Đã cấp quyền truy cập vị trí.
Phiên đăng nhập của bạn đã hết hạn và bạn đã bị đăng xuất. Hãy đăng nhập lại.