Find this useful? Enter your email to receive occasional updates for securing PHP code.

Signing you up...

Thank you for signing up!

PHP Decode

<?php /* __________________________________________________ | Copyright by admorr..

Decoded Output download

<?php 
/*   __________________________________________________ 
    |  Copyright by admorris.pro  | 
    |__________________________________________________| 
*/ 
 namespace Plugindmorris_pro; use JTL\Catalog\Product\Preise; use JTL\Cart\Cart; use JTL\Checkout\Versandart; use JTL\Language\LanguageModel; use JTL\Helpers\Text; use JTL\Helpers\ShippingMethod; use JTL\Shop; use JTL\Session\Frontend; use JTL\Country\Country; class ShippingCostProgressBar { use SettingsTrait; public float|int $warenkorbWert; public $versandLand; public $fVersandkostenfreiAbX; public bool $active; public bool $cart; public bool $mini_cart; public bool $descriptors; public string $color_under; public string $color_over; function __construct(private $plugin) { $this->mapSettings = ["cart", "mini_cart", "descriptors", "color_under", "color_over"]; $this->settingPrefix = "marketing_shipping_cost_progress_bar"; $smarty = Shop::Smarty(); $this->initSettings(); $this->versandLand = locale_get_display_region("sl-Latn-" . $_SESSION["cLieferlandISO"] . "-nedis", Text::convertISO2ISO639($_SESSION["cISOSprache"])); $this->warenkorbWert = Frontend::getCart()->gibGesamtsummeWarenExt([C_WARENKORBPOS_TYP_ARTIKEL], true, true, $this->versandLand); } public function init() { $smarty = Shop::Smarty(); $dataArray = $smarty->getTemplateVars("admorris_pro_marketing_shipping_cost_progress_bar_array"); if (!empty($dataArray)) { goto lUk_x; } return; lUk_x: if (!($this->warenkorbWert > 0)) { goto yqEDw; } if (!(Shop::getPageType() === PAGE_WARENKORB && $this->cart)) { goto HNuAz; } $this->displayInCart(); HNuAz: yqEDw: } private function displayInCart() { $smarty = Shop::Smarty(); if ($this->mini_cart) { goto hWFrK; } $this->loadStyles(true); hWFrK: $template = $this->plugin->getPaths()->getFrontendPath() . "templates/marketing_shipping_cost_progress_bar/marketing_shipping_cost_progress_bar_cart.tpl"; $template = $smarty->fetch($template); \cssSelector("shipping_cost_progress_bar_cart", $template); } public function getOutputArray() { goto rN2BS; rN2BS: $smarty = Shop::Smarty(); $versandArt = null; $templateFavShipping = $smarty->getTemplateVars("FavourableShipping"); $diffVersandkostenfrei = 0; if (isset($_SESSION["Versandart"]) && isset($_SESSION["Versandart"]->fPreis)) { goto KMoMi; } if (!empty($templateFavShipping)) { goto MEq4U; } if (!($this->warenkorbWert != 0)) { goto ha6eJ; } $customerGroupID = ($id = Frontend::getCustomer()->kKundengruppe) > 0 ? $id : Frontend::getCustomerGroup()->getID(); $shoppingCart = new Cart(); $shippingFreeMin = ShippingMethod::getFreeShippingMinimum($customerGroupID, $_SESSION["cLieferlandISO"]); goto HpYde; abg7b: $am_shippingCostBarArr["rightDescriptor"] = $fVersandkostenfreiAbXLocalized; goto gqIkD; xU2BX: $this->descriptors = false; gqIkD: $am_shippingCostBarArr["showDescriptors"] = $this->descriptors; $am_shippingCostBarArr["colorUnder"] = $this->color_under; $am_shippingCostBarArr["colorOver"] = $this->color_over; return $am_shippingCostBarArr; goto NK1xY; A48hY: $am_shippingCostBarArr["bisVersandkostenfrei"] = 0; goto rX0zv; hCC1k: $prozentVonVersandkostenfrei = $this->warenkorbWert / $this->fVersandkostenfreiAbX * 100; $am_shippingCostBarArr["progressBarValue"] = $prozentVonVersandkostenfrei; $am_shippingCostBarArr["bisVersandkostenfrei"] = $diffVersandkostenfrei; $am_shippingCostBarArr["bisVersandkostenfreiLocalized"] = $diffVersandkostenfreiLocalized; rX0zv: if ($this->descriptors && $this->fVersandkostenfreiAbX != 0.0) { goto tggCm; } if ($this->fVersandkostenfreiAbX == 0.0) { goto xU2BX; } goto SYTfV; HpYde: if ($shippingFreeMin != 0) { goto fs3Iu; } $this->fVersandkostenfreiAbX = 0; goto Ey1BC; fs3Iu: $versandArt = $shippingFreeMin; $this->fVersandkostenfreiAbX = $versandArt->fVersandkostenfreiAbX; $diffVersandkostenfrei = ShippingMethod::getShippingFreeDifference($versandArt, $this->warenkorbWert); Ey1BC: ha6eJ: goto KoTIm; goto xQuzF; xc3Vn: if (!($this->warenkorbWert == 0 || empty($versandArt) || $this->fVersandkostenfreiAbX == 0 && $versandArt->fPreis != 0 || $this->fVersandkostenfreiAbX == 0 && $versandArt->fPreis == 0 && $versandArt->kVersandberechnung != "1")) { goto yYQXz; } return null; yYQXz: $am_shippingCostBarArr = []; $diffVersandkostenfreiLocalized = Preise::getLocalizedPriceString($diffVersandkostenfrei); $am_shippingCostBarArr["versandLand"] = self::getShippingFreeCountriesString($versandArt); $am_shippingCostBarArr["miniCart"] = $this->mini_cart; $am_shippingCostBarArr["Cart"] = $this->cart; if ($diffVersandkostenfrei > 0 && $versandArt->fPreis != 0 || $diffVersandkostenfrei > 0 && $versandArt->kVersandberechnung != "1") { goto hCC1k; } $am_shippingCostBarArr["progressBarValue"] = 100; goto A48hY; xQuzF: KMoMi: $versandArt = $_SESSION["Versandart"]; $this->fVersandkostenfreiAbX = $versandArt->fVersandkostenfreiAbX; $diffVersandkostenfrei = ShippingMethod::getShippingFreeDifference($_SESSION["Versandart"], $this->warenkorbWert); goto KoTIm; MEq4U: $versandArt = $templateFavShipping; $this->fVersandkostenfreiAbX = $templateFavShipping->fVersandkostenfreiAbX; $diffVersandkostenfrei = ShippingMethod::getShippingFreeDifference($templateFavShipping, $this->warenkorbWert); KoTIm: goto xc3Vn; SYTfV: goto gqIkD; tggCm: if ($this->fVersandkostenfreiAbX == round($this->fVersandkostenfreiAbX)) { goto Blxat; } $fVersandkostenfreiAbXLocalized = Preise::getLocalizedPriceString($this->fVersandkostenfreiAbX); goto bqFbI; Blxat: $fVersandkostenfreiAbXLocalized = Preise::getLocalizedPriceString($this->fVersandkostenfreiAbX, null, true, 0); bqFbI: $leftDescriptorLocalized = Preise::getLocalizedPriceString(0, null, true, 0); $am_shippingCostBarArr["leftDescriptor"] = $leftDescriptorLocalized; goto abg7b; NK1xY: } private function loadStyles($critical = false) { $smarty = Shop::Smarty(); if (!$critical) { goto RLnpp; } \pq("head")->append("<link type="text/css" href="{$this->plugin->getPaths()->getFrontendURL()}css/shipping-cost-progress-bar.css?v={$this->plugin->getMeta()->getVersion()}" rel="stylesheet">"); goto DjNET; RLnpp: $assetLoader = AssetLoader::getInstance(); $assetLoader->addToHead($this->plugin->getPaths()->getFrontendURL() . "css/shipping-cost-progress-bar.css", "shipping_cost_progress_bar"); DjNET: } public static function getShippingFreeCountriesString($shippingMethod) : string { if (\is_object($shippingMethod)) { goto iZJNy; } return ''; iZJNy: $cacheID = "bvkfls_" . $shippingMethod->fVersandkostenfreiAbX . \mb_strlen($shippingMethod->cLaender) . "_" . Shop::getLanguageID(); if (!(($shippingFreeCountries = Shop::Container()->getCache()->get($cacheID)) === false)) { goto dwOS9; } $shippingFreeCountries = \implode(", ", rray_map(static function (Country $e) { return $e->getName(); }, Shop::Container()->getCountryService()->getFilteredCountryList(rray_filter(\explode(" ", $shippingMethod->cLaender)))->toArray())); Shop::Container()->getCache()->set($cacheID, $shippingFreeCountries, [\CACHING_GROUP_OPTION]); dwOS9: return $shippingFreeCountries; } } ?>

Did this file decode correctly?

Original Code

<?php
/*   __________________________________________________
    |  Copyright by admorris.pro  |
    |__________________________________________________|
*/
 namespace Plugin\admorris_pro; use JTL\Catalog\Product\Preise; use JTL\Cart\Cart; use JTL\Checkout\Versandart; use JTL\Language\LanguageModel; use JTL\Helpers\Text; use JTL\Helpers\ShippingMethod; use JTL\Shop; use JTL\Session\Frontend; use JTL\Country\Country; class ShippingCostProgressBar { use SettingsTrait; public float|int $warenkorbWert; public $versandLand; public $fVersandkostenfreiAbX; public bool $active; public bool $cart; public bool $mini_cart; public bool $descriptors; public string $color_under; public string $color_over; function __construct(private $plugin) { $this->mapSettings = ["\143\141\x72\164", "\x6d\151\156\x69\x5f\143\141\162\x74", "\144\145\163\143\162\x69\160\164\x6f\162\x73", "\x63\x6f\154\x6f\162\x5f\165\x6e\144\145\x72", "\x63\x6f\154\x6f\x72\x5f\x6f\166\x65\x72"]; $this->settingPrefix = "\x6d\141\162\153\x65\x74\151\156\x67\x5f\x73\150\151\x70\x70\151\x6e\147\x5f\143\157\163\164\137\x70\x72\157\147\x72\145\x73\x73\x5f\x62\x61\x72"; $smarty = Shop::Smarty(); $this->initSettings(); $this->versandLand = locale_get_display_region("\x73\x6c\x2d\x4c\x61\x74\x6e\55" . $_SESSION["\x63\114\151\145\x66\x65\162\154\x61\x6e\144\111\x53\x4f"] . "\55\156\x65\x64\151\163", Text::convertISO2ISO639($_SESSION["\143\x49\x53\x4f\123\x70\162\x61\x63\150\145"])); $this->warenkorbWert = Frontend::getCart()->gibGesamtsummeWarenExt([C_WARENKORBPOS_TYP_ARTIKEL], true, true, $this->versandLand); } public function init() { $smarty = Shop::Smarty(); $dataArray = $smarty->getTemplateVars("\x61\144\x6d\157\x72\162\x69\x73\x5f\160\162\157\137\155\x61\x72\153\x65\x74\151\156\x67\137\163\150\151\x70\160\x69\x6e\x67\137\x63\157\x73\164\x5f\x70\162\157\x67\162\x65\x73\163\x5f\142\141\x72\x5f\141\x72\x72\x61\171"); if (!empty($dataArray)) { goto lUk_x; } return; lUk_x: if (!($this->warenkorbWert > 0)) { goto yqEDw; } if (!(Shop::getPageType() === PAGE_WARENKORB && $this->cart)) { goto HNuAz; } $this->displayInCart(); HNuAz: yqEDw: } private function displayInCart() { $smarty = Shop::Smarty(); if ($this->mini_cart) { goto hWFrK; } $this->loadStyles(true); hWFrK: $template = $this->plugin->getPaths()->getFrontendPath() . "\164\145\x6d\160\154\x61\164\x65\163\x2f\x6d\141\162\153\x65\x74\151\156\x67\x5f\163\150\151\x70\160\x69\x6e\x67\x5f\x63\x6f\x73\x74\x5f\x70\x72\157\147\x72\x65\163\x73\137\x62\141\162\57\x6d\x61\x72\153\x65\164\151\156\x67\x5f\163\x68\151\160\160\151\x6e\x67\137\x63\x6f\x73\x74\x5f\x70\x72\x6f\147\x72\145\163\163\137\x62\x61\162\x5f\143\x61\x72\164\x2e\x74\160\x6c"; $template = $smarty->fetch($template); \cssSelector("\x73\x68\x69\x70\160\151\x6e\x67\137\x63\x6f\163\164\137\160\x72\x6f\x67\162\x65\163\163\137\x62\x61\x72\137\143\141\162\164", $template); } public function getOutputArray() { goto rN2BS; rN2BS: $smarty = Shop::Smarty(); $versandArt = null; $templateFavShipping = $smarty->getTemplateVars("\x46\x61\x76\157\x75\x72\141\142\x6c\x65\123\150\151\160\160\x69\x6e\147"); $diffVersandkostenfrei = 0; if (isset($_SESSION["\126\x65\x72\163\141\x6e\x64\x61\x72\x74"]) && isset($_SESSION["\x56\145\x72\163\141\x6e\x64\141\x72\164"]->fPreis)) { goto KMoMi; } if (!empty($templateFavShipping)) { goto MEq4U; } if (!($this->warenkorbWert != 0)) { goto ha6eJ; } $customerGroupID = ($id = Frontend::getCustomer()->kKundengruppe) > 0 ? $id : Frontend::getCustomerGroup()->getID(); $shoppingCart = new Cart(); $shippingFreeMin = ShippingMethod::getFreeShippingMinimum($customerGroupID, $_SESSION["\143\x4c\151\145\146\145\162\x6c\x61\156\x64\x49\123\x4f"]); goto HpYde; abg7b: $am_shippingCostBarArr["\162\x69\x67\x68\164\104\x65\x73\143\162\x69\x70\x74\157\x72"] = $fVersandkostenfreiAbXLocalized; goto gqIkD; xU2BX: $this->descriptors = false; gqIkD: $am_shippingCostBarArr["\163\x68\x6f\167\x44\145\163\143\x72\151\160\164\157\x72\x73"] = $this->descriptors; $am_shippingCostBarArr["\143\x6f\x6c\x6f\162\x55\x6e\144\145\162"] = $this->color_under; $am_shippingCostBarArr["\x63\x6f\x6c\x6f\162\117\x76\145\x72"] = $this->color_over; return $am_shippingCostBarArr; goto NK1xY; A48hY: $am_shippingCostBarArr["\x62\x69\x73\126\145\162\163\141\156\x64\153\x6f\x73\x74\145\x6e\146\162\145\x69"] = 0; goto rX0zv; hCC1k: $prozentVonVersandkostenfrei = $this->warenkorbWert / $this->fVersandkostenfreiAbX * 100; $am_shippingCostBarArr["\160\x72\157\147\162\145\x73\163\x42\141\162\x56\141\154\x75\145"] = $prozentVonVersandkostenfrei; $am_shippingCostBarArr["\142\151\163\x56\x65\162\163\x61\156\x64\153\157\x73\164\x65\156\146\x72\x65\151"] = $diffVersandkostenfrei; $am_shippingCostBarArr["\142\151\163\126\145\x72\163\x61\156\x64\x6b\x6f\x73\164\145\x6e\146\x72\x65\151\114\157\x63\x61\154\151\172\145\x64"] = $diffVersandkostenfreiLocalized; rX0zv: if ($this->descriptors && $this->fVersandkostenfreiAbX != 0.0) { goto tggCm; } if ($this->fVersandkostenfreiAbX == 0.0) { goto xU2BX; } goto SYTfV; HpYde: if ($shippingFreeMin != 0) { goto fs3Iu; } $this->fVersandkostenfreiAbX = 0; goto Ey1BC; fs3Iu: $versandArt = $shippingFreeMin; $this->fVersandkostenfreiAbX = $versandArt->fVersandkostenfreiAbX; $diffVersandkostenfrei = ShippingMethod::getShippingFreeDifference($versandArt, $this->warenkorbWert); Ey1BC: ha6eJ: goto KoTIm; goto xQuzF; xc3Vn: if (!($this->warenkorbWert == 0 || empty($versandArt) || $this->fVersandkostenfreiAbX == 0 && $versandArt->fPreis != 0 || $this->fVersandkostenfreiAbX == 0 && $versandArt->fPreis == 0 && $versandArt->kVersandberechnung != "\x31")) { goto yYQXz; } return null; yYQXz: $am_shippingCostBarArr = []; $diffVersandkostenfreiLocalized = Preise::getLocalizedPriceString($diffVersandkostenfrei); $am_shippingCostBarArr["\x76\x65\x72\163\141\156\x64\x4c\x61\156\x64"] = self::getShippingFreeCountriesString($versandArt); $am_shippingCostBarArr["\155\151\x6e\151\x43\141\162\164"] = $this->mini_cart; $am_shippingCostBarArr["\x43\x61\162\x74"] = $this->cart; if ($diffVersandkostenfrei > 0 && $versandArt->fPreis != 0 || $diffVersandkostenfrei > 0 && $versandArt->kVersandberechnung != "\61") { goto hCC1k; } $am_shippingCostBarArr["\x70\x72\157\147\162\x65\x73\x73\102\141\x72\x56\x61\154\165\145"] = 100; goto A48hY; xQuzF: KMoMi: $versandArt = $_SESSION["\126\x65\x72\x73\x61\x6e\144\141\162\164"]; $this->fVersandkostenfreiAbX = $versandArt->fVersandkostenfreiAbX; $diffVersandkostenfrei = ShippingMethod::getShippingFreeDifference($_SESSION["\126\145\x72\x73\141\x6e\144\141\162\x74"], $this->warenkorbWert); goto KoTIm; MEq4U: $versandArt = $templateFavShipping; $this->fVersandkostenfreiAbX = $templateFavShipping->fVersandkostenfreiAbX; $diffVersandkostenfrei = ShippingMethod::getShippingFreeDifference($templateFavShipping, $this->warenkorbWert); KoTIm: goto xc3Vn; SYTfV: goto gqIkD; tggCm: if ($this->fVersandkostenfreiAbX == round($this->fVersandkostenfreiAbX)) { goto Blxat; } $fVersandkostenfreiAbXLocalized = Preise::getLocalizedPriceString($this->fVersandkostenfreiAbX); goto bqFbI; Blxat: $fVersandkostenfreiAbXLocalized = Preise::getLocalizedPriceString($this->fVersandkostenfreiAbX, null, true, 0); bqFbI: $leftDescriptorLocalized = Preise::getLocalizedPriceString(0, null, true, 0); $am_shippingCostBarArr["\x6c\x65\x66\x74\x44\x65\163\143\162\x69\160\164\x6f\162"] = $leftDescriptorLocalized; goto abg7b; NK1xY: } private function loadStyles($critical = false) { $smarty = Shop::Smarty(); if (!$critical) { goto RLnpp; } \pq("\150\145\x61\144")->append("\74\x6c\151\156\153\40\164\x79\x70\145\75\42\164\145\x78\x74\x2f\143\163\x73\42\40\x68\x72\145\x66\x3d\42{$this->plugin->getPaths()->getFrontendURL()}\143\x73\x73\x2f\x73\x68\x69\160\x70\x69\156\147\x2d\x63\157\163\164\x2d\160\162\157\x67\162\x65\163\163\x2d\x62\x61\162\x2e\x63\163\x73\77\166\75{$this->plugin->getMeta()->getVersion()}\x22\x20\162\145\154\75\42\163\164\171\x6c\x65\163\x68\x65\x65\x74\42\76"); goto DjNET; RLnpp: $assetLoader = AssetLoader::getInstance(); $assetLoader->addToHead($this->plugin->getPaths()->getFrontendURL() . "\x63\163\x73\x2f\163\x68\x69\x70\x70\x69\156\x67\x2d\143\157\x73\x74\55\160\x72\x6f\147\x72\145\163\x73\55\x62\141\x72\x2e\x63\x73\x73", "\x73\x68\151\160\x70\x69\156\x67\137\143\157\x73\164\x5f\x70\x72\x6f\147\162\x65\163\163\137\x62\x61\x72"); DjNET: } public static function getShippingFreeCountriesString($shippingMethod) : string { if (\is_object($shippingMethod)) { goto iZJNy; } return ''; iZJNy: $cacheID = "\142\166\153\x66\154\x73\137" . $shippingMethod->fVersandkostenfreiAbX . \mb_strlen($shippingMethod->cLaender) . "\137" . Shop::getLanguageID(); if (!(($shippingFreeCountries = Shop::Container()->getCache()->get($cacheID)) === false)) { goto dwOS9; } $shippingFreeCountries = \implode("\x2c\x20", \array_map(static function (Country $e) { return $e->getName(); }, Shop::Container()->getCountryService()->getFilteredCountryList(\array_filter(\explode("\40", $shippingMethod->cLaender)))->toArray())); Shop::Container()->getCache()->set($cacheID, $shippingFreeCountries, [\CACHING_GROUP_OPTION]); dwOS9: return $shippingFreeCountries; } }

Function Calls

None

Variables

None

Stats

MD5 e7e962ed13d16b63fa847f269f8dccd7
Eval Count 0
Decode Time 65 ms