<?php
//Obfuscated by YAK Pro - Php Obfuscator 2.0.13 at 2025-05-27 11:22:22
 namespace App\Jobs; use App\PricingRule; use App\PricingRuleDetail; use App\PricingRuleDetailItem; use App\PricingRuleOption; use App\Product; use App\ProductDetail; use App\ProductDetailOptionDetail; use App\ProductOption; use App\ProductOptionDetail; use Illuminate\Bus\Queueable; use Illuminate\Bus\Batchable; use Illuminate\Contracts\Queue\ShouldBeUnique; use Illuminate\Contracts\Queue\ShouldQueue; use Illuminate\Foundation\Bus\Dispatchable; use Illuminate\Queue\InteractsWithQueue; use Illuminate\Queue\SerializesModels; class ProcessCopyProductDetail implements ShouldQueue { use Batchable, Dispatchable, InteractsWithQueue, Queueable, SerializesModels; protected $product; public $timeout = 3600; public $failOnTimeout = false; public function __construct(Product $aIVz_) { $this->onQueue(config("\161\165\145\x75\x65\56\143\x6f\x6e\156\x65\x63\164\x69\x6f\x6e\x73\x2e\x72\145\144\x69\163\x2e\x71\165\145\165\x65")); $this->product = $aIVz_->withoutRelations(); } public function isFailOnTimeout() : bool { return $this->failOnTimeout; } public function handle() { try { goto CZgER; aobja: mNsUv: $iFHYX = []; $AGy4r = $this->combinations($Ov7ZU); goto isdIZ; jOBip: foreach ($iFHYX as $THyac) { $hP1qk = []; foreach ($THyac->option_detail as $GROk7) { $hP1qk[] = $GROk7->product_option_detail_id; f6izW: } Lj8Fd: $i9uer[] = ["\x69\x64" => $THyac->id, "\160\x72\x69\x63\x65" => $or3Tl, "\157\160\164\x69\x6f\156\x5f\144\x65\164\141\x69\x6c\163" => $hP1qk]; RkP87: } TC7Mr: foreach ($rnxZl as $TdSBT) { $YDUDr = !empty($TdSBT->price) ? $TdSBT->price : $or3Tl; $KdXDc = []; foreach ($TdSBT->pricing as $P3nhB) { $SOlPP = []; foreach ($P3nhB->options as $VNqfC) { $SOlPP[] = $VNqfC->product_option_id; o3qcL: } qbWdZ: $KdXDc[] = ["\x69\x64" => $P3nhB->id, "\x70\x72\151\x63\145" => $P3nhB->price != '' && $P3nhB->price != null ? $P3nhB->price : $YDUDr, "\x6f\160\164\151\157\156\x73" => $SOlPP]; TLjsd: } VyTIz: $F5Ri9[] = ["\151\144" => $TdSBT->id, "\160\x72\151\x63\x65" => $YDUDr, "\147\x72\x6f\x75\x70\163" => $KdXDc]; cJKxS: } goto q8n5O; q8n5O: o2EqK: foreach ($F5Ri9 as $THyac) { foreach ($THyac["\x67\162\x6f\x75\160\163"] as $GROk7) { $speb7 = $GROk7["\160\162\x69\x63\145"]; foreach ($i9uer as $DKmAN => $kZeMw) { goto tmj8q; SV1lf: jFG3B: goto A1_Lb; QBYSf: if (!$acFE4) { goto y5r4l; } $i9uer[$DKmAN]["\160\x72\151\x63\145"] = $speb7; y5r4l: goto SV1lf; tmj8q: $acFE4 = true; foreach ($GROk7["\x6f\160\x74\151\157\x6e\163"] as $E5IUQ) { if (in_array($E5IUQ, $kZeMw["\157\x70\x74\151\157\x6e\137\144\145\164\141\151\x6c\163"])) { goto lcv4F; } $acFE4 = false; lcv4F: O_bpa: } egWlj: goto QBYSf; A1_Lb: } Y0pKG: RUUYb: } crMbM: lTy3c: } uwmbE: goto TaBbS; TaBbS: foreach ($i9uer as $THyac) { ProductDetail::where("\x69\x64", $THyac["\x69\144"])->update(["\x70\x72\151\143\145" => $THyac["\160\162\x69\143\x65"]]); RIFQG: } bkLZq: goto tWfx2; j1MbH: pM5O4: $iFHYX = null; $AGy4r = null; goto cH5_V; cH5_V: $aIVz_ = Product::where("\151\144", $this->product->id)->first(); $iFHYX = ProductDetail::with("\x6f\160\164\151\157\156\x5f\x64\145\164\x61\x69\154")->where("\x70\162\157\x64\x75\143\x74\x5f\151\144", $this->product->id)->get(); $rnxZl = PricingRule::with("\144\145\164\141\x69\154", "\160\x72\151\x63\x69\156\x67")->where("\x70\x72\157\144\165\x63\x74\x5f\x69\144", $this->product->id)->get(); goto LM6ml; isdIZ: foreach ($AGy4r as $pijmz => $B5I7p) { $iFHYX[] = ["\x73\153\165" => $pijmz + 1, "\x63\157\144\x65" => implode("\137", $B5I7p), "\x6f\x70\164\151\157\x6e\163" => $B5I7p]; OC1e2: } eEc2Y: foreach ($iFHYX as $THyac) { $TcUrD = ProductDetail::create(["\x70\x72\157\144\x75\143\x74\x5f\151\144" => $this->product->id, "\x73\153\165" => $this->product->sku . "\137" . $THyac["\163\153\165"], "\163\x6c\x75\x67" => $this->product->sku . "\x5f" . $THyac["\163\x6b\x75"], "\143\x6f\x64\x65" => md5($this->product->sku . "\137" . $THyac["\x63\157\x64\145"]), "\160\x72\151\143\x65" => $this->product->default_price, "\160\x6f\x73\x69\164\151\x6f\156" => 0, "\x69\x73\x5f\141\143\x74\151\x76\x61\164\x65\x64" => 1, "\x63\162\145\141\164\145\x64\137\x61\164" => date("\131\55\x6d\55\x64\40\110\72\x69\72\x73"), "\165\x70\x64\141\x74\x65\x64\x5f\141\164" => date("\x59\x2d\x6d\x2d\x64\x20\110\x3a\151\72\163")]); foreach ($THyac["\157\160\164\x69\x6f\x6e\x73"] as $VNqfC) { ProductDetailOptionDetail::create(["\160\162\x6f\x64\165\x63\x74\137\x64\x65\x74\x61\x69\154\x5f\151\x64" => $TcUrD->id, "\x70\162\157\144\x75\143\164\x5f\157\x70\164\151\157\156\137\144\145\164\x61\x69\154\137\151\144" => $VNqfC, "\143\162\145\141\164\x65\144\x5f\141\x74" => date("\131\55\155\55\x64\x20\x48\x3a\x69\72\163"), "\x75\160\x64\141\x74\145\144\137\141\164" => date("\131\x2d\155\x2d\144\x20\110\72\151\x3a\x73")]); jKP_i: } idNVT: p1kJC: } goto j1MbH; CZgER: $Ov7ZU = []; $FBcQe = ProductOption::select("\151\144")->where("\160\x72\x6f\x64\165\143\x74\x5f\151\144", $this->product->id)->get(); foreach ($FBcQe as $iZ4ME) { $ZjwB7 = ProductOptionDetail::select("\151\x64")->where("\x70\162\157\144\165\x63\164\137\x6f\160\x74\x69\157\156\137\151\x64", $iZ4ME->id)->pluck("\x69\144")->toArray(); if (!(count($ZjwB7) > 0)) { goto Vm_73; } $Ov7ZU[] = $ZjwB7; Vm_73: ZJP48: } goto aobja; LM6ml: $or3Tl = $aIVz_->default_price; $i9uer = []; $F5Ri9 = []; goto jOBip; tWfx2: } catch (\Exception $LBuc2) { logger("\125\160\x64\141\x74\x65\x20\x70\162\157\x64\165\143\164\x20\x64\145\164\x61\151\154\40\x65\x72\x72\157\x72\x3a\x20" . $LBuc2->getMessage()); } } private function combinations($obt1E, $XQ5jD = 0) { goto y4817; CZiRJ: $Wbu3A = $this->combinations($obt1E, $XQ5jD + 1); $v6JR2 = array(); foreach ($obt1E[$XQ5jD] as $csq_8) { foreach ($Wbu3A as $nbIhs) { $v6JR2[] = is_array($nbIhs) ? array_merge(array($csq_8), $nbIhs) : array($csq_8, $nbIhs); Hpudt: } ydvHK: kIPt9: } goto Vb5qS; y4817: if (isset($obt1E[$XQ5jD])) { goto E1Eow; } return array(); E1Eow: goto dnNlK; Vb5qS: DnUyE: return $v6JR2; goto I5TwN; dnNlK: if (!($XQ5jD == count($obt1E) - 1)) { goto p18eU; } return $obt1E[$XQ5jD]; p18eU: goto CZiRJ; I5TwN: } }