Ana Sayfa / Blog / WooCommerce B2B fiyatlandırma: plugin mı, custom code mı?

WooCommerce B2B fiyatlandırma: plugin mı, custom code mı?

B2B e-ticaret'te müşteriye göre fiyat farklı. Bulk discount, kategori indirimi, üyelik tier'ları. Plugin mi custom mı?

Klasik B2C WooCommerce’de fiyat statik. Herkes aynı görüyor. B2B işlerde durum farklı: kurumsal müşteri farklı fiyat, toptan alımda indirim, üyelik tier’ına göre percent off. Karmaşıklık başlıyor.

Onlarca WooCommerce B2B projesinde bu sorunu çözdüm. Plugin yeterli olduğu zaman da, custom kod’a gerektiği zaman da oldu. Bu yazıda karar kriterlerini anlatacağım.

B2B fiyatlandırma scenario’ları

Basit’ten karmaşık’a:

1. Müşteri grubu bazlı: Premium üyelik %10 indirim.

2. Miktar bazlı: 10+ alan %5, 50+ alan %15 indirim.

3. Kategori bazlı: “Electronics” kategorisinde distributor’lara %20.

4. Ürün bazlı: Belirli SKU’lar bazı müşterilere özel fiyat.

5. Müşteri-özel fiyat: Enterprise client’a individual negotiated pricing.

6. Zaman bazlı: Weekend’de wholesale %5 ek indirim.

7. Combined: Tüm yukarıdakilerin kombinasyonu. Karmaşık matrix.

Senaryonuz ne kadar karmaşık’sa seçim o kadar değişiyor.

Popular plugin options

Wholesale Prices by Rymera Web Co.
– Müşteri grubu bazlı pricing
– Bulk discount per product
– Role-based visibility
– $99/year

B2BKing
– Full B2B feature set
– Quote system, RFQ
– Custom pricing tiers
– $149/year

WooCommerce Dynamic Pricing (official)
– Cart-based discounts
– Tiered pricing
– Apply rules combo
– $129/year

Price Based on Country
– Geographic pricing
– Multi-currency

ELEX WooCommerce Dynamic Pricing
– Advanced rule engine
– BOGO offers

Plugin seçimi kriterleri

Plugin yeter:
– Standart B2B senaryoları (grup, miktar, kategori)
– Rule count 20 altı
– Kullanıcı database’i yönetilebilir (1000-5000 müşteri)
– Hosting performance OK
– Budget $100-200 mantıklı

Custom gerekli:
– Highly specific business rule’lar
– Multi-dimensional pricing matrix
– Enterprise integration (ERP fiyat feed)
– Performance critical (yüksek catalog + yüksek traffic)
– Plugin’lerin sunduğu’dan farklı UX flow

Plugin pitfalls

Plugin kullanmanın karanlık yönleri:

1. Database bloat. Her custom pricing rule ek meta row. Büyük store’larda wp_postmeta/wp_usermeta şişiyor.

2. Performance. Plugin her product view’da rule evaluate ediyor. 100+ rule varsa yüz milisaniyelik gecikme.

3. Conflict’ler. İki farklı pricing plugin aynı anda aktifse priceFilter chain karışık.

4. Vendor dependency. Plugin developer projeyi bıraktı. Support yok, upgrade yok.

5. Customization limit. Plugin author’un tasarladığı logic’ten dışarı çıkamıyorsun.

Custom implementation patterns

WooCommerce fiyat manipulation için filter’lar:

// Product fiyatı değiştir (listing, single)
add_filter('woocommerce_product_get_price', function($price, $product) {
    return apply_custom_pricing($price, $product, get_current_user());
}, 10, 2);

// Sale price
add_filter('woocommerce_product_get_sale_price', function($price, $product) {
    return apply_custom_pricing($price, $product, get_current_user());
}, 10, 2);

// Cart'ta fiyat (add_to_cart sonrası)
add_action('woocommerce_before_calculate_totals', function($cart) {
    foreach ($cart->get_cart() as $key => $item) {
        $custom_price = apply_custom_pricing(
            $item['data']->get_price(),
            $item['data'],
            get_current_user()
        );
        $item['data']->set_price($custom_price);
    }
});

Custom apply_custom_pricing function’ı your business logic.

Pricing engine architecture

Büyük B2B sistemlerde pricing engine ayrı bir layer:

class PricingEngine {
    public function calculatePrice(Product $product, User $user, int $quantity): float {
        $basePrice = $product->get_regular_price();
        
        // Apply rules in order of priority
        $rules = $this->getRulesFor($user, $product);
        
        foreach ($rules as $rule) {
            $basePrice = $rule->apply($basePrice, $product, $user, $quantity);
        }
        
        return apply_filters('b2b_final_price', $basePrice, $product, $user);
    }
}

Rule-based architecture: yeni rule eklemek class yazmak kadar basit.

ERP integration

Enterprise B2B’de fiyatlar ERP’den geliyor (SAP, Oracle, Microsoft Dynamics). WooCommerce sync.

Pattern:

  1. ERP price list API veya file export
  2. Cron job daily sync: ERP prices → WooCommerce custom table
  3. Pricing engine bu table’dan okuyor
  4. Cache invalidation ERP change’lerinde
// Custom table
CREATE TABLE wp_b2b_prices (
    id BIGINT UNSIGNED AUTO_INCREMENT PRIMARY KEY,
    product_id BIGINT NOT NULL,
    customer_group VARCHAR(50),
    min_quantity INT DEFAULT 1,
    price DECIMAL(10,2) NOT NULL,
    effective_from DATETIME,
    effective_to DATETIME,
    INDEX idx_product_group (product_id, customer_group)
);

Display considerations

Fiyat nasıl gösteriliyor:

Logged-out user: “Login to see prices” veya base price. B2B site’da public price gizli.

Logged-in customer: Their price görünüyor. Belki “List Price: $100, Your Price: $85” format.

Bulk pricing display:

Qty 1-9: $100 each
Qty 10-49: $95 each
Qty 50+: $85 each

Table/chart visualization useful. Custom theme work.

Cache considerations

Dynamic pricing full-page cache’i kırıyor.

Solution:
– Logged-out user: static price, full cache OK
– Logged-in user: bypass full page cache
– Fragment cache pricing block’ları için
– Object cache aggressive (user’ın rule’ları session boyunca stable)

Tax handling

B2B’de tax kompleks:
– Tax-exempt customers (reseller licenses)
– Reverse charge (EU B2B cross-border)
– Export exempt

WooCommerce tax class’ları ile handle, ama custom rules için:

add_filter('woocommerce_product_tax_class', function($tax_class, $product) {
    if (is_tax_exempt_customer()) {
        return 'zero-rate';
    }
    return $tax_class;
}, 10, 2);

Quote system (RFQ)

Bazı B2B ürünler listed price yerine “request quote”. Plugin veya custom.

Flow:
1. Product “Request Quote” buton
2. User form dolduruyor, requirement’lar
3. Admin’e email, admin dashboard
4. Admin price quote gönderiyor
5. User quote’u onaylıyor, order oluşturuluyor

B2BKing gibi plugin’ler bu flow’u sunuyor. Custom için 2-3 haftalık iş.

Real project decision tree

Danışmanlıkta karar verirken:

  1. Müşteri sayısı 1000’in altı, ürün sayısı 5000’in altı? Plugin yeter.
  2. Pricing rules 20’nin altı? Plugin yeter.
  3. Standart rule types (group, tier, bulk)? Plugin yeter.
  4. ERP sync gerekli? Custom integration + rule engine.
  5. Custom UX requirement (quote system, bulk order form)? Custom.
  6. Very large catalog (50K+ product)? Custom performance-optimized.
  7. Long-term product (5+ year)? Custom daha safe (vendor dependency yok).

Cost comparison

Plugin approach:
– License: $100-200/year
– Setup: 1-2 hafta
– Maintenance: plugin update’leriyle uyumlu kalmak

Custom approach:
– Development: 4-8 hafta ($8K-20K depending on developer rate)
– Maintenance: ongoing, senin ekibin
– Total Cost of Ownership 3-5 yılda eşitleniyor

Kısa vadede plugin ucuz. Uzun vadede custom flexibility kazandırıyor.

Sonuç

B2B pricing complexity’e göre karar. Simple scenarios’da plugin pragmatic. Enterprise-grade veya custom business logic varsa custom implementation.

Plugin seçerken: author reputation, update frequency, review count. Gerçekten kendinizi test etmek için temiz WooCommerce install’a koyup deneyin.

Custom yazacaksan rule engine architecture’ı baştan düşün. Yeni rule type eklemek sürekli olacak.

Bu konuda bir projeniz mi var?

Kısa bir özet bırakın, 24 saat içinde size dönüş yapayım.

İletişime Geç