Cara Hide Ongkir Classes & Shipping zones
Updated on August 2, 2021 in Plugin Ongkos Kirim
8 on July 29, 2021

Halo, bisakah plugin ini di hide untuk class & shipping zones tertentu?
Misal saya menjual beberapa barang di class A dan beberapa barang di class B

Saya membagi shipping zones menjadi 2: 1.Jawa dan 2.Sumatera.

Saya ingin menyembunyikan plugin untuk semua barang di class A karena ingin set Free shipping untuk pulau jawa dan Flat rate untuk Sumatera.

Saya ingin plugin tetap berjalan di class B baik untuk zona jawa maupun sumatera dan menghilangkan flatrate dan free shipping.

Kalo plugin woongkir ada pilihan untuk menghilangkan penggunaan plugin untuk zona.

  • Liked by
Support Hours:
Weekdays: 09.00 - 17.00
Weekend: Off
Sorry, our support is not available at this time. We will reply at the next working hour.

By using the forum you are agree with tonjoo studio license agreement

Moderator 0 on July 30, 2021

Halo,

Sayangnya tidak ada opsi di plugin untuk menghandle kasus tersebut.
Jika Anda developer, Anda bisa menggunakan hook filter ‘pok_rates’ untuk menyembunyikan opsi ongkir di kondisi tertentu. Silahkan cek dokumentasi hook tersebut di http://pustaka.tonjoostudio.com/plugins/woo-ongkir-manual/#section-hook

  • Liked by
Cancel
Support Hours:
Weekdays: 09.00 - 17.00
Weekend: Off
Sorry, our support is not available at this time. We will reply at the next working hour.

By using the forum you are agree with tonjoo studio license agreement

Message :
0 on July 30, 2021

Saya pake hooknya tapi logicnya belum dapet. bisa bantu kak?

Btw, class bisa di call pake id atau slug,
kalo zona / regions bisa di call pake apa ya?

  • Liked by
Cancel
Support Hours:
Weekdays: 09.00 - 17.00
Weekend: Off
Sorry, our support is not available at this time. We will reply at the next working hour.

By using the forum you are agree with tonjoo studio license agreement

Message :
Moderator 0 on July 30, 2021

Zones bisa didapat dari class WC_Shipping_Zones, seperti contoh: https://gist.github.com/igorbenic/1069a627ed3a70d101aa8f730775e864

Value dari zones tersebut bisa diloop dan dicocokan dengan alamat yang dipilih user dimana data ini disimpan di parameter $package di hook filter ‘pok_rates’

  • Liked by
Cancel
Support Hours:
Weekdays: 09.00 - 17.00
Weekend: Off
Sorry, our support is not available at this time. We will reply at the next working hour.

By using the forum you are agree with tonjoo studio license agreement

Message :
0 on July 30, 2021

Kalo Call untuk Ekspedisi dari plugin gimana ya? Kalo id flat_rate bisa di inspect tapi saya pake value misal pok-jne-1 juga tidak bisa pake
$method_key_id = array(‘JNE – REG’, ‘TIKI – REG’,);

juga tidak bisa

  • Liked by
Cancel
Support Hours:
Weekdays: 09.00 - 17.00
Weekend: Off
Sorry, our support is not available at this time. We will reply at the next working hour.

By using the forum you are agree with tonjoo studio license agreement

Message :
Moderator 0 on July 30, 2021

Coba gunakan contoh berikut:
https://gist.github.com/gamaup/aab5e5ed183fdb448fb21d837438d1cf

  • Liked by
Cancel
Support Hours:
Weekdays: 09.00 - 17.00
Weekend: Off
Sorry, our support is not available at this time. We will reply at the next working hour.

By using the forum you are agree with tonjoo studio license agreement

Message :
0 on July 31, 2021

kak itu kalo untuk disembunyiin di shipping _class tertentu gimana ya?

saya gini

foreach ($rates as $r) {
foreach( $package[‘contents’] as $item ) {
if (in_array($r[‘class’], $selected_courier) && $item[‘data’]->get_shipping_class_id() == ’30’) {
unset($r[$selected_courier]);
break;

kalo return $filtered_rates : hilang disemua shipping class

kalo saya return ke $rates: classnya gak ke filter.

mohon bantuannya

  • Liked by
Cancel
Support Hours:
Weekdays: 09.00 - 17.00
Weekend: Off
Sorry, our support is not available at this time. We will reply at the next working hour.

By using the forum you are agree with tonjoo studio license agreement

Message :
0 on August 1, 2021

Kak, yang ini udah solved. Tapi pertanyaan lain: Gimana cara supaya shipping calculated di page /cart/?

  • Liked by
Cancel
Support Hours:
Weekdays: 09.00 - 17.00
Weekend: Off
Sorry, our support is not available at this time. We will reply at the next working hour.

By using the forum you are agree with tonjoo studio license agreement

Message :
Moderator 0 on August 2, 2021

Plugin Ongkos Kirim memang tidak bisa jalan di halaman cart karena keterbatasan fungsi di woocommerce

  • Liked by
Cancel
Support Hours:
Weekdays: 09.00 - 17.00
Weekend: Off
Sorry, our support is not available at this time. We will reply at the next working hour.

By using the forum you are agree with tonjoo studio license agreement

Message :
Loading more replies
You are not logged in

Please login here or simply sign up here .