{"id":2104,"date":"2025-09-11T15:33:35","date_gmt":"2025-09-11T12:33:35","guid":{"rendered":"https:\/\/saviorhost.com\/blog\/?p=2104"},"modified":"2025-09-11T15:33:35","modified_gmt":"2025-09-11T12:33:35","slug":"whmcs-promotionappliestoservice-hatasi-cozumu-orphan-service-fix-kupon-problemleri-rehberi","status":"publish","type":"post","link":"https:\/\/saviorhost.com\/blog\/whmcs-promotionappliestoservice-hatasi-cozumu-orphan-service-fix-kupon-problemleri-rehberi\/","title":{"rendered":"WHMCS Promotion::appliesToService Hatas\u0131 \u00c7\u00f6z\u00fcm\u00fc | Orphan Service Fix &#038; Kupon Problemleri Rehberi"},"content":{"rendered":"<p>WHMCS kullan\u0131c\u0131lar\u0131n\u0131n s\u0131kl\u0131kla kar\u015f\u0131la\u015ft\u0131\u011f\u0131 hatalardan biri:<\/p>\n<pre><code>TypeError: WHMCS\\Product\\Promotion::appliesToService(): Argument #1 ($serviceId) must be of type int, null given\r\n<\/code><\/pre>\n<p>Bu hata, promosyonlar\u0131n veya kuponlar\u0131n belirli bir hizmete uygulanmas\u0131 s\u0131ras\u0131nda <strong>serviceId<\/strong> de\u011ferinin <strong>null<\/strong> gelmesiyle olu\u015fur. \u00d6zellikle <strong>orphan (\u00fcr\u00fcns\u00fcz) hizmetler<\/strong> ve <strong>yanl\u0131\u015f promosyon ayarlar\u0131<\/strong> bu hatan\u0131n ana nedenlerindendir.<\/p>\n<h2 id=\"hatanin-baslica-nedenleri\">Hatan\u0131n Ba\u015fl\u0131ca Nedenleri<\/h2>\n<ul>\n<li><strong>Orphan (\u00fcr\u00fcns\u00fcz) hizmetler:<\/strong> <code>tblhosting.packageid<\/code> bo\u015f ya da silinmi\u015f \u00fcr\u00fcne ba\u011fl\u0131.<\/li>\n<li><strong>Promosyon ayarlar\u0131:<\/strong> Kuponun \u201cApplies To\u201d k\u0131sm\u0131nda art\u0131k mevcut olmayan \u00fcr\u00fcnler se\u00e7ili.<\/li>\n<li><strong>\u00dc\u00e7\u00fcnc\u00fc parti mod\u00fcller:<\/strong> Eksik veya yanl\u0131\u015f <code>serviceId<\/code> g\u00f6nderimi.<\/li>\n<li><strong>Bozulmu\u015f ili\u015fkiler:<\/strong> \u00dcr\u00fcn, grup veya sunucu ba\u011flar\u0131 hatal\u0131.<\/li>\n<\/ul>\n<h2 id=\"belirtiler\">Belirtiler<\/h2>\n<ul>\n<li>M\u00fc\u015fteri hizmet sayfalar\u0131nda hata mesaj\u0131<\/li>\n<li>Kupon uygulanam\u0131yor<\/li>\n<li>Faturalama veya cron g\u00f6revlerinde hata loglar\u0131<\/li>\n<\/ul>\n<h2 id=\"teshis-diagnostik-adimlari\">Te\u015fhis (Diagnostik) Ad\u0131mlar\u0131<\/h2>\n<h3 id=\"1-orphan-hizmetleri-bulma\">1) Orphan hizmetleri bulma<\/h3>\n<pre><code>SELECT id, userid, packageid, domain\r\nFROM tblhosting\r\nWHERE packageid IS NULL\r\n   OR packageid NOT IN (SELECT id FROM tblproducts);\r\n<\/code><\/pre>\n<h3 id=\"2-promosyon-ayarlarini-inceleme\">2) Promosyon ayarlar\u0131n\u0131 inceleme<\/h3>\n<p><em>Configuration \u2192 System Settings \u2192 Promotions<\/em> men\u00fcs\u00fcnden kuponu a\u00e7\u0131n. \u201cApplies To\u201d k\u0131sm\u0131ndaki \u00fcr\u00fcnlerin h\u00e2l\u00e2 mevcut oldu\u011fundan emin olun.<\/p>\n<h3 id=\"3-log-kontrolu\">3) Log kontrol\u00fc<\/h3>\n<p><em>System Logs \u2192 Activity Log<\/em> \u00fczerinden hatay\u0131 tetikleyen i\u015flem ad\u0131mlar\u0131n\u0131 inceleyin.<\/p>\n<h2 id=\"cozum-yontemleri\">\u00c7\u00f6z\u00fcm Y\u00f6ntemleri<\/h2>\n<h3 id=\"yontem-a-whmcs-arayuzu-ile-onarim-onerilen\">Y\u00f6ntem A \u2014 WHMCS Aray\u00fcz\u00fc ile Onar\u0131m (\u00d6nerilen)<\/h3>\n<ol>\n<li><strong>Hizmetleri d\u00fczeltin:<\/strong> Clients \u2192 Services k\u0131sm\u0131nda orphan hizmetleri do\u011fru \u00fcr\u00fcne ba\u011flay\u0131n.<\/li>\n<li><strong>Promosyonu g\u00fcncelleyin:<\/strong> Kuponun \u201cApplies To\u201d listesinden ge\u00e7ersiz \u00fcr\u00fcnleri \u00e7\u0131kar\u0131n.<\/li>\n<li><strong>Test edin:<\/strong> Kuponu tekrar uygulay\u0131n.<\/li>\n<\/ol>\n<h3 id=\"yontem-b-sql-ile-toplu-duzeltme-ileri-seviye\">Y\u00f6ntem B \u2014 SQL ile Toplu D\u00fczeltme (\u0130leri Seviye)<\/h3>\n<p><strong>\u26a0\ufe0f Yedek almadan uygulamay\u0131n!<\/strong><\/p>\n<pre><code>UPDATE tblhosting\r\nSET packageid = 123\r\nWHERE packageid IS NULL\r\n   OR packageid NOT IN (SELECT id FROM tblproducts);\r\n<\/code><\/pre>\n<h2 id=\"seo-anahtar-kelimeler\">SEO Anahtar Kelimeler<\/h2>\n<ul>\n<li>WHMCS Promotion::appliesToService hatas\u0131 \u00e7\u00f6z\u00fcm\u00fc<\/li>\n<li>WHMCS TypeError null given<\/li>\n<li>WHMCS kupon hatas\u0131<\/li>\n<li>WHMCS orphan service fix<\/li>\n<li>WHMCS promosyon kuponu \u00e7al\u0131\u015fm\u0131yor<\/li>\n<\/ul>\n<h2 id=\"onleyici-tedbirler\">\u00d6nleyici Tedbirler<\/h2>\n<ul>\n<li>G\u00fcnl\u00fck veritaban\u0131 yede\u011fi al\u0131n.<\/li>\n<li>WHMCS\u2019inizi g\u00fcncel tutun.<\/li>\n<li>\u00dcr\u00fcn\/sunucu silmeden \u00f6nce ba\u011f\u0131ml\u0131l\u0131klar\u0131 kontrol edin.<\/li>\n<li>Cron ve loglar\u0131 d\u00fczenli inceleyin.<\/li>\n<\/ul>\n<h2 id=\"sonuc\">Sonu\u00e7<\/h2>\n<p>Bu hata genellikle <strong>orphan hizmetler<\/strong> veya <strong>yanl\u0131\u015f promosyon hedefleri<\/strong> y\u00fcz\u00fcnden olu\u015fur. Orphan hizmetleri do\u011fru \u00fcr\u00fcnlere ba\u011flamak ve promosyonu g\u00fcncellemekle sorun kal\u0131c\u0131 olarak \u00e7\u00f6z\u00fcl\u00fcr. \u2705<\/p>\n","protected":false},"excerpt":{"rendered":"<p>WHMCS kullan\u0131c\u0131lar\u0131n\u0131n s\u0131kl\u0131kla kar\u015f\u0131la\u015ft\u0131\u011f\u0131 hatalardan biri: TypeError: WHMCS\\Product\\Promotion::appliesToService(): Argument #1 ($serviceId) must be of type int, null given Bu hata,&#8230;<\/p>\n","protected":false},"author":1,"featured_media":2105,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[73],"tags":[],"class_list":["post-2104","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-whmcs"],"_links":{"self":[{"href":"https:\/\/saviorhost.com\/blog\/wp-json\/wp\/v2\/posts\/2104","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/saviorhost.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/saviorhost.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/saviorhost.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/saviorhost.com\/blog\/wp-json\/wp\/v2\/comments?post=2104"}],"version-history":[{"count":1,"href":"https:\/\/saviorhost.com\/blog\/wp-json\/wp\/v2\/posts\/2104\/revisions"}],"predecessor-version":[{"id":2106,"href":"https:\/\/saviorhost.com\/blog\/wp-json\/wp\/v2\/posts\/2104\/revisions\/2106"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/saviorhost.com\/blog\/wp-json\/wp\/v2\/media\/2105"}],"wp:attachment":[{"href":"https:\/\/saviorhost.com\/blog\/wp-json\/wp\/v2\/media?parent=2104"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/saviorhost.com\/blog\/wp-json\/wp\/v2\/categories?post=2104"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/saviorhost.com\/blog\/wp-json\/wp\/v2\/tags?post=2104"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}