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 error_reporting(E_ERROR); class Wyomind_Simplegoogleshopping_Model_Simplegooglesho..
Decoded Output download
<?php error_reporting(E_ERROR);
class Wyomind_Simplegoogleshopping_Model_Simplegoogleshopping extends Mage_Core_Model_Abstract { public $x30 = 0; public $x31 = 0; protected $_filePath; public $_limit = false; public $_display = false; public $_rates = false; public $_sqlSize = 1500; public $_errorReport = array(); public $_flagErrorReport = array(); public function x161($x32, $x33) { $x147="str_replace"; $x148="utf8_encode"; $x149="preg_match_all"; $x14a="preg_match"; $x14b="is_null"; $x14c="number_format"; $x14d="is_numeric"; $x14e="preg_split"; $x14f="utf8_decode"; $x150="is_string"; $x151="json_decode"; $x152="is_array"; $x153="array_push"; $x154="print_r"; $x155="version_compare"; $x156="in_array"; $x157="array_pop"; $x158="str_pad"; $x159="array_shift"; $x15a="array_reverse"; $x15b="array_values"; $x15c="preg_replace"; $x15d="strip_tags"; $x15e="html_entity_decode"; $x15f="mb_strtolower"; $x160="mb_strtoupper"; if (strlen($x32) == strlen($x33)) { return 0; } return (strlen($x32) < strlen($x33)) ? 1 : -1; } public function x161Array($x32, $x33) { $x147="str_replace"; $x148="utf8_encode"; $x149="preg_match_all"; $x14a="preg_match"; $x14b="is_null"; $x14c="number_format"; $x14d="is_numeric"; $x14e="preg_split"; $x14f="utf8_decode"; $x150="is_string"; $x151="json_decode"; $x152="is_array"; $x153="array_push"; $x154="print_r"; $x155="version_compare"; $x156="in_array"; $x157="array_pop"; $x158="str_pad"; $x159="array_shift"; $x15a="array_reverse"; $x15b="array_values"; $x15c="preg_replace"; $x15d="strip_tags"; $x15e="html_entity_decode"; $x15f="mb_strtolower"; $x160="mb_strtoupper"; $x147="str_replace"; $x148="utf8_encode"; $x149="preg_match_all"; $x14a="preg_match"; $x14b="is_null"; $x14c="number_format"; $x14d="is_numeric"; $x14e="preg_split"; $x14f="utf8_decode"; $x150="is_string"; $x151="json_decode"; $x152="is_array"; $x153="array_push"; $x154="print_r"; $x155="version_compare"; $x156="in_array"; $x157="array_pop"; $x158="str_pad"; $x159="array_shift"; $x15a="array_reverse"; $x15b="array_values"; $x15c="preg_replace"; $x15d="strip_tags"; $x15e="html_entity_decode"; $x15f="mb_strtolower"; $x160="mb_strtoupper"; if (strlen(implode('', $x32)) == strlen(implode('', $x33))) { return 0; } return (strlen(implode('', $x32)) < strlen(implode('', $x33))) ? -1 : 1; } public function x163($myPattern, $product, $x34 = true) { $x147="str_replace"; $x148="utf8_encode"; $x149="preg_match_all"; $x14a="preg_match"; $x14b="is_null"; $x14c="number_format"; $x14d="is_numeric"; $x14e="preg_split"; $x14f="utf8_decode";
$x150="is_string"; $x151="json_decode"; $x152="is_array"; $x153="array_push"; $x154="print_r"; $x155="version_compare"; $x156="in_array"; $x157="array_pop"; $x158="str_pad"; $x159="array_shift"; $x15a="array_reverse"; $x15b="array_values"; $x15c="preg_replace"; $x15d="strip_tags"; $x15e="html_entity_decode"; $x15f="mb_strtolower"; $x160="mb_strtoupper"; $myPattern = $x147('<?', $x148('__PHP__'), $myPattern); $myPattern = $x147('?>', $x148('/__PHP__'), $myPattern); $x35 = $x148('#(__PHP__)(.*?)/#s'); $x149($x35, $myPattern, $x36); if (isset($x36[1])) { foreach ($x36[0] as $x37 => $x38) { if ($x34 == 1) { if (@eval($x36[2][$x37] . '; ')) $myPattern = $x147($x38, eval($x36[2][$x37] . '; '), $myPattern); else $myPattern = $x147($x38, '', $myPattern); } else { if (@eval($this->unescapeStr($x36[2][$x37] . '; '))) $myPattern = $x147($x38, $this->escapeStr(eval($this->unescapeStr($x36[2][$x37]) . '; ')), $myPattern); else $myPattern = $x147($x38, '', $myPattern); } } } return $myPattern; } protected function x164($x39) { $x147="str_replace"; $x148="utf8_encode"; $x149="preg_match_all"; $x14a="preg_match"; $x14b="is_null"; $x14c="number_format"; $x14d="is_numeric"; $x14e="preg_split"; $x14f="utf8_decode"; $x150="is_string"; $x151="json_decode"; $x152="is_array"; $x153="array_push"; $x154="print_r"; $x155="version_compare"; $x156="in_array"; $x157="array_pop"; $x158="str_pad"; $x159="array_shift"; $x15a="array_reverse"; $x15b="array_values"; $x15c="preg_replace"; $x15d="strip_tags"; $x15e="html_entity_decode"; $x15f="mb_strtolower"; $x160="mb_strtoupper"; return $this->getCollection()->addFieldToFilter("simplegoogleshopping_filename", array("eq" => $x39))->count(); } protected function _construct() { $x147="str_replace"; $x148="utf8_encode"; $x149="preg_match_all"; $x14a="preg_match"; $x14b="is_null"; $x14c="number_format"; $x14d="is_numeric"; $x14e="preg_split"; $x14f="utf8_decode"; $x150="is_string"; $x151="json_decode"; $x152="is_array"; $x153="array_push"; $x154="print_r"; $x155="version_compare"; $x156="in_array"; $x157="array_pop"; $x158="str_pad"; $x159="array_shift"; $x15a="array_reverse"; $x15b="array_values"; $x15c="preg_replace"; $x15d="strip_tags"; $x15e="html_entity_decode"; $x15f="mb_strtolower"; $x160="mb_strtoupper"; $this->_sqlSize = Mage::getStoreConfig("simplegoogleshopping/system/sqlsize"); $this->_init('simplegoogleshopping/simplegoogleshopping'); } protected function _beforeSave() { $x147="str_replace"; $x148="utf8_encode"; $x149="preg_match_all"; $x14a="preg_match"; $x14b="is_null"; $x14c="number_format"; $x14d="is_numeric"; $x14e="preg_split"; $x14f="utf8_decode"; $x150="is_string"; $x151="json_decode"; $x152="is_array"; $x153="array_push"; $x154="print_r"; $x155="version_compare";
$x156="in_array"; $x157="array_pop"; $x158="str_pad"; $x159="array_shift"; $x15a="array_reverse"; $x15b="array_values"; $x15c="preg_replace"; $x15d="strip_tags"; $x15e="html_entity_decode"; $x15f="mb_strtolower"; $x160="mb_strtoupper"; $x3a = new Varien_Io_File(); $x3b = $x3a->getCleanPath(Mage::getBaseDir() . '/' . $this->getSimplegoogleshoppingPath()); if (!$x3a->fileExists($x3b, false)) { Mage::throwException(Mage::helper('simplegoogleshopping')->__('Please create the specified folder %s before saving the googleshopping.', Mage::helper('core')->htmlEscape($this->getSimplegoogleshoppingPath()))); } if (!$x3a->isWriteable($x3b)) { Mage::throwException(Mage::helper('simplegoogleshopping')->__('Please make sure that %s is writable by web-server.', $this->getSimplegoogleshoppingPath())); } if (!$x14a('#^[a-zA-Z0-9_\-\.]+$#', $this->x165())) { Mage::throwException(Mage::helper('simplegoogleshopping')->__('Please use only letters (a-z or A-Z), numbers (0-9) or underscore (_) in the filename. No spaces or other characters are allowed.')); } if (!$x14a('#\.xml$#', $this->getSimplegoogleshoppingFilename())) { $this->setSimplegoogleshoppingFilename($this->getSimplegoogleshoppingFilename() . '.xml'); } if (!$this->getSimplegoogleshoppingId() && $this->x164($this->x165())) { Mage::throwException(Mage::helper('simplegoogleshopping')->__('This data feed name is already used. Please specify a new one.')); } $this->setSimplegoogleshoppingPath(rtrim($x147($x147('\', '/', Mage::getBaseDir()), '', $x3b), '/') . '/'); return parent::_beforeSave(); } protected function getPath() { $x147="str_replace"; $x148="utf8_encode"; $x149="preg_match_all"; $x14a="preg_match"; $x14b="is_null"; $x14c="number_format"; $x14d="is_numeric"; $x14e="preg_split"; $x14f="utf8_decode"; $x150="is_string"; $x151="json_decode"; $x152="is_array"; $x153="array_push"; $x154="print_r"; $x155="version_compare"; $x156="in_array"; $x157="array_pop"; $x158="str_pad"; $x159="array_shift"; $x15a="array_reverse"; $x15b="array_values"; $x15c="preg_replace"; $x15d="strip_tags"; $x15e="html_entity_decode"; $x15f="mb_strtolower"; $x160="mb_strtoupper"; if ($x14b($this->_filePath)) { $this->_filePath = $x147('//', '/', Mage::getBaseDir() . $this->getSimplegoogleshoppingPath()); } return $this->_filePath; } protected function x165($x3c = '.temp') { $x147="str_replace"; $x148="utf8_encode"; $x149="preg_match_all"; $x14a="preg_match"; $x14b="is_null"; $x14c="number_format"; $x14d="is_numeric"; $x14e="preg_split"; $x14f="utf8_decode"; $x150="is_string"; $x151="json_decode"; $x152="is_array"; $x153="array_push"; $x154="print_r"; $x155="version_compare"; $x156="in_array"; $x157="array_pop"; $x158="str_pad"; $x159="array_shift"; $x15a="array_reverse"; $x15b="array_values"; $x15c="preg_replace"; $x15d="strip_tags"; $x15e="html_entity_decode"; $x15f="mb_strtolower"; $x160="mb_strtoupper"; $x3d = $this->getSimplegoogleshoppingFilename() . $x3c; return $x3d; } public function getPreparedFilename() { $x147="str_replace"; $x148="utf8_encode"; $x149="preg_match_all"; $x14a="preg_match"; $x14b="is_null"; $x14c="number_format"; $x14d="is_numeric"; $x14e="preg_split"; $x14f="utf8_decode"; $x150="is_string"; $x151="json_decode"; $x152="is_array"; $x153="array_push"; $x154="print_r"; $x155="version_compare"; $x156="in_array"; $x157="array_pop"; $x158="str_pad"; $x159="array_shift"; $x15a="array_reverse"; $x15b="array_values"; $x15c="preg_replace"; $x15d="strip_tags"; $x15e="html_entity_decode";
$x15f="mb_strtolower"; $x160="mb_strtoupper"; return $this->getPath() . $this->x165(); } public function x166($x3e, $x3f) { $x147="str_replace"; $x148="utf8_encode"; $x149="preg_match_all"; $x14a="preg_match"; $x14b="is_null"; $x14c="number_format"; $x14d="is_numeric"; $x14e="preg_split"; $x14f="utf8_decode"; $x150="is_string"; $x151="json_decode"; $x152="is_array"; $x153="array_push"; $x154="print_r"; $x155="version_compare"; $x156="in_array"; $x157="array_pop"; $x158="str_pad"; $x159="array_shift"; $x15a="array_reverse"; $x15b="array_values"; $x15c="preg_replace"; $x15d="strip_tags"; $x15e="html_entity_decode"; $x15f="mb_strtolower"; $x160="mb_strtoupper"; $x40 = $this->_currencies; if (isset($x40[$x3f])) return $x3e * $x40[$x3f]; else { return $x3e; } } public function x167($x3e, $x41, $x42, $x43 = false) { $x147="str_replace"; $x148="utf8_encode"; $x149="preg_match_all"; $x14a="preg_match"; $x14b="is_null"; $x14c="number_format"; $x14d="is_numeric"; $x14e="preg_split"; $x14f="utf8_decode"; $x150="is_string"; $x151="json_decode"; $x152="is_array"; $x153="array_push"; $x154="print_r"; $x155="version_compare"; $x156="in_array"; $x157="array_pop"; $x158="str_pad"; $x159="array_shift"; $x15a="array_reverse"; $x15b="array_values"; $x15c="preg_replace"; $x15d="strip_tags"; $x15e="html_entity_decode"; $x15f="mb_strtolower"; $x160="mb_strtoupper"; $x44 = $this->_rates; $x3e = $x14c($x3e, 2, '.', ''); if ($x43 === false) { if (!$x41 && isset($x44[$x42])) { if (count($x44[$x42]) > 1) { return $x3e; } else { return $x3e * ($x44[$x42][0]['rate'] / 100 + 1); } } else { return $x3e; } } elseif ($x43 === "0") { if ($x41 && isset($x44[$x42])) { if (count($x44[$x42]) > 1) { return $x3e; } else { return 100 * $x3e / (100 + ($x44[$x42][0]['rate'])); } } else { return $x3e; } } else { if ($x14d($x43)) { if ($x42 != 0) { return $x3e * ($x43 / 100 + 1); } elseif ($x42 == 0) { return $x3e; } } else { $x43 = explode('/', $x43); $x45 = 0; $x46 = false; if (substr($x43[0], 0, 1) == "-") { $x43[0] = substr($x43[0], 1); $x46 = true; } if ($x44[$x42]) { foreach ($x44[$x42] as $x47) { if ($x47['country'] == $x43[0]) { if (!isset($x43[1]) || $x47['code'] == $x43[1]) { $x45 = $x47['rate']; break; } } } if (!$x46) return $x3e * ($x45 / 100 + 1); else { return 100 * $x3e / (100 + ($x45)); } } else { return $x3e; } } } } public function x168($x48, $x49 = true) { $x147="str_replace"; $x148="utf8_encode"; $x149="preg_match_all"; $x14a="preg_match"; $x14b="is_null"; $x14c="number_format"; $x14d="is_numeric"; $x14e="preg_split"; $x14f="utf8_decode"; $x150="is_string"; $x151="json_decode"; $x152="is_array"; $x153="array_push"; $x154="print_r"; $x155="version_compare"; $x156="in_array"; $x157="array_pop"; $x158="str_pad"; $x159="array_shift"; $x15a="array_reverse"; $x15b="array_values"; $x15c="preg_replace";
$x15d="strip_tags"; $x15e="html_entity_decode"; $x15f="mb_strtolower"; $x160="mb_strtoupper"; $x35 = '/(<[^>^\/]+>)([^<]*)(<\/[^>]+>)/s'; $x149($x35, $x48, $x36); foreach ($x36[1] as $x37 => $x4a) { $x4b = trim($x36[2][$x37]); if (empty($x4b) && !$x14d($x4b)) $x48 = $x147($x36[0][$x37], '', $x48); else { if ($x49) $x48 = $x147($x36[0][$x37], ($x36[1][$x37]) . '<![CDATA[' . $x4b . ']]>' . ($x36[3][$x37]), $x48); else $x48 = $x147($x36[0][$x37], ($x36[1][$x37]) . $x4b . ($x36[3][$x37]), $x48); } } $x32 = $x14e("/
/s", $x48); $x4c = ''; foreach ($x32 as $x4d) { (strlen(trim($x4d)) > 0) ? $x4c.=$x4d . "
" : false; } $x48 = $x4c; return $x48; } public function x169($x48) { $x147="str_replace"; $x148="utf8_encode"; $x149="preg_match_all"; $x14a="preg_match"; $x14b="is_null"; $x14c="number_format"; $x14d="is_numeric"; $x14e="preg_split"; $x14f="utf8_decode"; $x150="is_string"; $x151="json_decode"; $x152="is_array"; $x153="array_push"; $x154="print_r"; $x155="version_compare"; $x156="in_array"; $x157="array_pop"; $x158="str_pad"; $x159="array_shift"; $x15a="array_reverse"; $x15b="array_values"; $x15c="preg_replace"; $x15d="strip_tags"; $x15e="html_entity_decode"; $x15f="mb_strtolower"; $x160="mb_strtoupper"; if ($this->_display) return ($x48); else { if ($this->_chartset == 'ISO') return $x14f($x48); else { return ($x48); } } } public function checkReference($x4e, $product) { $x147="str_replace"; $x148="utf8_encode"; $x149="preg_match_all"; $x14a="preg_match"; $x14b="is_null"; $x14c="number_format"; $x14d="is_numeric"; $x14e="preg_split"; $x14f="utf8_decode"; $x150="is_string"; $x151="json_decode"; $x152="is_array"; $x153="array_push"; $x154="print_r"; $x155="version_compare"; $x156="in_array"; $x157="array_pop"; $x158="str_pad"; $x159="array_shift"; $x15a="array_reverse"; $x15b="array_values"; $x15c="preg_replace"; $x15d="strip_tags"; $x15e="html_entity_decode"; $x15f="mb_strtolower"; $x160="mb_strtoupper"; if (($x4e == "parent" || $x4e == "configurable") && isset($this->configurable[$product->getId()])) return $this->configurable[$product->getId()]; elseif (($x4e == "parent" || $x4e == "grouped") && isset($this->grouped[$product->getId()])) return $this->grouped[$product->getId()]; elseif (($x4e == "parent" || $x4e == "bundle") && isset($this->bundle[$product->getId()])) return $this->bundle[$product->getId()]; else { return $product; } } public function x16a($x4f, $x50, $x51) { $x147="str_replace"; $x148="utf8_encode"; $x149="preg_match_all"; $x14a="preg_match"; $x14b="is_null"; $x14c="number_format"; $x14d="is_numeric"; $x14e="preg_split"; $x14f="utf8_decode"; $x150="is_string"; $x151="json_decode"; $x152="is_array"; $x153="array_push"; $x154="print_r"; $x155="version_compare"; $x156="in_array"; $x157="array_pop"; $x158="str_pad"; $x159="array_shift"; $x15a="array_reverse"; $x15b="array_values"; $x15c="preg_replace"; $x15d="strip_tags"; $x15e="html_entity_decode"; $x15f="mb_strtolower"; $x160="mb_strtoupper";
$x4f->streamOpen($x50); $x4f->streamWrite($x51); } public function generateXml() { $x147="str_replace"; $x148="utf8_encode"; $x149="preg_match_all"; $x14a="preg_match"; $x14b="is_null"; $x14c="number_format"; $x14d="is_numeric"; $x14e="preg_split"; $x14f="utf8_decode"; $x150="is_string"; $x151="json_decode"; $x152="is_array"; $x153="array_push"; $x154="print_r"; $x155="version_compare"; $x156="in_array"; $x157="array_pop"; $x158="str_pad"; $x159="array_shift"; $x15a="array_reverse"; $x15b="array_values"; $x15c="preg_replace"; $x15d="strip_tags"; $x15e="html_entity_decode"; $x15f="mb_strtolower"; $x160="mb_strtoupper"; Mage::log("
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> --------------- START PROCESS FOR " . strtoupper($this->x165(false)) . "-----------------", null, $this->x165('.log')); ini_set('memory_limit', Mage::getStoreConfig("simplegoogleshopping/system/memory_limit") . 'M'); $this->_debug = (isset($_GET['debug'])) ? true : false; include(Mage::getBaseDir() . "/lib/Wyomind/Google/Requirements.php"); $x3a = new Varien_Io_File(); $x4f = new Varien_Io_File(); $x52 = Mage::getBaseDir() . DS . 'var' . DS . 'tmp' . DS; $x53 = $x52 . "sgs_" . $this->getSimplegoogleshoppingId() . ".flag"; $x3a->setAllowCreateFolders(true); if (!$this->_display) { $x3a->open(array('path' => $this->getPath())); if ($x3a->fileExists($this->x165()) && !$x3a->isWriteable($this->x165())) { Mage::throwException(Mage::helper('simplegoogleshopping')->__('File "%s" cannot be saved. Please, make sure the directory "%s" is writeable by web server.', $this->x165(), $this->getPath())); } $x3a->streamOpen($this->x165()); $x4f->open(array('path' => $x52)); if ($x4f->fileExists($x53, false)) { $x4f->streamOpen($x53, 'r'); $x4d = $x4f->streamReadCsv(";"); $x54 = $x4f->streamStat(); if ($x4d[0] == "PROCESSING") { $x55 = $x54["mtime"]; $x56 = $x4d[3]; if (!(Mage::getSingleton('core/date')->gmtTimestamp() > $x55 + ($x56 * 10) || Mage::getSingleton('core/date')->gmtTimestamp() > $x55 + ($x56 * 2))) { Mage::throwException(Mage::helper('simplegoogleshopping')->__('File "%s" is already processing. Please wait the end of the process.', $this->x165(), $this->getPath())); } } } else { $x4f->streamOpen($x53); } } $x57 = array("ac" => "activation_code", "ak" => "activation_key", "bu" => "base_url", "md" => "md5", "th" => "this", "dm" => "_demo", "ext" => "sgs", "ver" => "9.0.1"); $x150(Mage::app()->getRequest()->getParam("store_id")) ? $x58 = Mage::app()->getRequest()->getParam("store_id") : $x58 = $this->getStoreId(); $x59 = Mage::getSingleton('core/date')->gmtDate('Y-m-d'); $x5a = Mage::getDesign()->getSkinUrl(); $x5b = Mage::getStoreConfig("catalog/placeholder/image_placeholder", $x58); $x5c = Mage::getStoreConfig("currency/options/base", $x58); $x5d = Mage::getStoreConfig("cataloginventory/item_options/manage_stock", $x58); $x5e = Mage::getStoreConfig("cataloginventory/item_options/backorders", $x58); $x5f = Mage::app()->getStore($x58)->getBaseUrl(Mage_Core_Model_Store::URL_TYPE_WEB, false); $x60 = Mage::getModel('core/store')->load($x58)->getBaseUrl(); $x61 = Mage::app()->getStore($x58)->getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA, false); $x62 = Mage::getStoreConfig(Mage_Tax_Model_Config::CONFIG_XML_PATH_PRICE_INCLUDES_TAX, $x58); $x63 = Mage::app()->getStore($x58)->getRootCategoryId(); $x64 = Mage::app()->getStore()->getStoreId(); $x65 = array( "activation_key" => Mage::getStoreConfig("simplegoogleshopping/license/activation_key"), "activation_code" => Mage::getStoreConfig("simplegoogleshopping/license/activation_code"), "base_url" => Mage::getStoreConfig("web/secure/base_url"), ); $x150(Mage::app()->getRequest()->getParam("simplegoogleshopping_xmlitempattern")) ? $x66 = Mage::app()->getRequest()->getParam("simplegoogleshopping_xmlitempattern") : $x66 = $this->getSimplegoogleshoppingXmlitempattern(); $x150(Mage::app()->getRequest()->getParam("simplegoogleshopping_title")) ? $x67 = Mage::app()->getRequest()->getParam("simplegoogleshopping_title") : $x67 = $this->getSimplegoogleshoppingTitle(); $x150(Mage::app()->getRequest()->getParam("simplegoogleshopping_description")) ? $x68 = Mage::app()->getRequest()->getParam("simplegoogleshopping_description") : $x68 = $this->getSimplegoogleshoppingDescription(); $x150(Mage::app()->getRequest()->getParam("simplegoogleshopping_categories")) ? $x69 = $x151(Mage::app()->getRequest()->getParam("simplegoogleshopping_categories")) : $x69 = $x151($this->getSimplegoogleshoppingCategories()); $x150(Mage::app()->getRequest()->getParam("category_filter")) ? $x6a = Mage::app()->getRequest()->getParam("category_filter") : $x6a = $this->getSimplegoogleshoppingCategoryFilter(); $x150(Mage::app()->getRequest()->getParam("category_type")) ? $x6b = Mage::app()->getRequest()->getParam("category_type") : $x6b = $this->getSimplegoogleshoppingCategoryType(); $x6c = Array(); $x6d = Array(); if ($x152($x69)) { foreach ($x69 as $x6e) { if ($x6e->checked) $x6c[] = $x6e->line; } foreach ($x69 as $x6e) { if ($x6e->mapping != "") $x6d[$x6e->line] = $x6e->mapping; } } if (count($x6c) < 1) { $x6c[] = '*'; } $x150(Mage::app()->getRequest()->getParam("simplegoogleshopping_type_ids")) ? $x6f = explode(',', Mage::app()->getRequest()->getParam("simplegoogleshopping_type_ids")) : $x6f = explode(',', $this->getSimplegoogleshoppingTypeIds()); $x150(Mage::app()->getRequest()->getParam("simplegoogleshopping_visibility")) ? $x70 = explode(',', Mage::app()->getRequest()->getParam("simplegoogleshopping_visibility")) : $x70 = explode(',', $this->getSimplegoogleshoppingVisibility()); $x150(Mage::app()->getRequest()->getParam("simplegoogleshopping_attributes")) ? $x71 = $x151(Mage::app()->getRequest()->getParam("simplegoogleshopping_attributes")) : $x71 = $x151($this->getSimplegoogleshoppingAttributes()); $x150(Mage::app()->getRequest()->getParam("simplegoogleshopping_attribute_sets")) ? $x72 = explode(',', Mage::app()->getRequest()->getParam("simplegoogleshopping_attribute_sets")) : $x72 = explode(',', $this->getSimplegoogleshoppingAttributeSets()); if ($x65[$x57['ac']] != $x57["md"]($x57["md"]($x65[$x57['ak']]) . $x57["md"]($x65[$x57['bu']]) . $x57["md"]($x57["ext"]) . $x57["md"]($x57["ver"]))) { $$x57["ext"] = "valid"; $$x57["th"]->$x57["dm"] = true; } else { $$x57["th"]->$x57["dm"] = false; $$x57["ext"] = "valid"; } $x73 = ''; $x74 = ''; header("Content-Type: text/html; charset=utf-8"); $x73 = ('<?xml version="1.0" encoding="utf-8" ?>' . "
"); $x73.=('<rss version="2.0" xmlns:g="http://base.google.com/ns/1.0">' . "
"); $x73.=('<channel>' . "
"); $x73.=('<title>' . $x67 . "</title>
"); $x73.=('<link>' . substr($x5f, 0, -1) . "</link>
"); $x73.=('<description>' . $x68 . "</description>
"); if (!isset($$x57["ext"]) || $$x57["th"]->$x57["dm"]) { $$x57["th"]->$x57["dm"] = true; return $$x57["th"]; } if ($this->_display) $x74 = $this->x169($x73); else { $x3a->streamWrite($this->x169($x73)); $this->x16a($x4f, $x53, "PROCESSING;100;"); Mage::log("
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> " . $this->x165() . " created and opened", null, $this->x165('.log')); } $x35 = '/{([a-zA-Z_0-9:]+)(\sparent|\sgrouped|\sconfigurable|\sbundle)?([^}|]*)(\s?\|\s?)?(([a-zA-Z_0-9:]+)(\sparent|\sgrouped|\sconfigurable|\sbundle)?([^}|]*))?(\s?\|\s?)?(([a-zA-Z_0-9:]+)(\sparent|\sgrouped|\sconfigurable|\sbundle)?([^}|]*))?(\s?\|\s?)?(([a-zA-Z_0-9:]+)(\sparent|\sgrouped|\sconfigurable|\sbundle)?([^}|]*))?}/'; $x149($x35, $x66, $x36); foreach ($x36[6] as $x37 => $x75) { if ($x75 != "") { $x36[0][] = $x36[0][$x37];
$x36[1][] = $x75; $x36[2][] = $x36[7][$x37]; $x36[3][] = $x36[8][$x37]; ; $x36[4][] = $x36[9][$x37]; ; } } foreach ($x36[11] as $x37 => $x75) { if ($x75 != "") { $x36[0][] = $x36[0][$x37]; $x36[1][] = $x75; $x36[2][] = $x36[7][$x37]; $x36[3][] = $x36[8][$x37]; ; $x36[4][] = $x36[9][$x37]; ; } } foreach ($x36[16] as $x37 => $x75) { if ($x75 != "") { $x36[0][] = $x36[0][$x37]; $x36[1][] = $x75; $x36[2][] = $x36[7][$x37]; $x36[3][] = $x36[8][$x37]; ; $x36[4][] = $x36[9][$x37]; ; } } $x36[0][] = "{categories,[1],[1],[1]}"; $x36[1][] = "categories"; $x36[2][] = ""; $x36[3][] = ",[1],[1],[1]"; $x76 = array(); $x77 = array(); foreach ($x36[1] as $x37 => $x75) { $x76[$x37]['methodName'] = "get" . $x147(' ', '', ucwords(trim($x75)) . '()'); $x76[$x37]['pattern'] = "{" . trim($x75) . "}"; $x76[$x37]['fullpattern'] = $x36[0][$x37]; $x76[$x37]['name'] = trim($x75); $x76[$x37]['reference'] = trim($x36[2][$x37]); if (empty($x76[$x37]['reference'])) $x76[$x37]['reference'] = 'self'; switch ($x76[$x37]['name']) { case 'url': $x153($x77, 'url_key'); break; case 'uri': $x153($x77, 'url_key'); break; case 'G:ID': $x153($x77, 'sku'); break; case 'G:TITLE': $x153($x77, 'name'); break; case 'G:DESCRIPTION': $x153($x77, 'short_description'); $x153($x77, 'description'); break; case 'G:IMAGE_LINK': $x153($x77, 'image'); $x153($x77, 'small_image'); $x153($x77, 'thumbnail'); break; case 'SC:IMAGES': $x153($x77, 'image'); $x153($x77, 'small_image'); $x153($x77, 'thumbnail'); break; case 'SC:DESCRIPTION': $x153($x77, 'description'); $x153($x77, 'short_description'); $x153($x77, 'manufacturer'); $x153($x77, 'name'); $x153($x77, 'sku'); break; case 'SC:EAN': $x153($x77, 'ean'); break; case 'SC:URL': $x153($x77, 'url_key'); $x153($x77, 'url'); break; default : $x153($x77, $x76[$x37]['name']); } $x76[$x37]["value"] = '$product->get' . $x76[$x37]['name'] . "()"; $x76[$x37]["getText"] = 'getAttributeText(\'' . trim($x75) . '\')'; $x78 = '/\[([^\]]+)\]/'; $x149($x78, $x36[3][$x37], $x79); $x76[$x37]["options"] = $x79[1]; } if ($this->_debug) { echo "----------------------------------------------<br>
------------ DEBUG MODE ----------------<br>
----------------------------------------------<br><br>"; echo "<br><br>------------ ATTRIBUTES ----------------<br>"; $x154($x76); } Mage::log("
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> Product template analyzed", null, $this->x165('.log')); $x7a = Mage::getModel('catalog/category')->getCollection() ->setStoreId($x58) ->addAttributeToSelect('name', 'store_id') ->addAttributeToSelect('is_active') ->addAttributeToSelect('include_in_menu'); $x7b = array(); foreach ($x7a as $x7c) { $x7b[$x7c->getId()]['name'] = $x7c->getName(); $x7b[$x7c->getId()]['path'] = $x7c->getPath(); $x7b[$x7c->getId()]['level'] = $x7c->getLevel(); if ($x155(Mage::getVersion(), '1.6.0', '<') || Mage::getStoreConfig("simplegoogleshopping/system/include_in_menu")) $x7b[$x7c->getId()]['include_in_menu'] = true; else $x7b[$x7c->getId()]['include_in_menu'] = $x7c->getIncludeInMenu(); } if ($this->_debug) { echo "<br><br>------------ CATEGORIES ----------------<br>"; $x154($x7b); } Mage::log("
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> Categories collected", null, $this->x165('.log')); $x7d = Mage::getSingleton('core/resource'); $x7e = $x7d->getConnection('core_read'); $x7f = $x7d->getTableName('eav_entity_type'); $x80 = $x7e->select()->from($x7f)->where('entity_type_code=\'catalog_product\''); $x81 = $x7e->fetchAll($x80); $x82 = $x81[0]['entity_type_id']; $x7d = Mage::getSingleton('core/resource'); $x7e = $x7d->getConnection('core_read'); $x83 = $x7d->getTableName('directory_currency_rate'); $x80 = $x7e->select()->from($x83)->where('currency_from=\'' . $x5c . '\''); $x40 = $x7e->fetchAll($x80); $x84 = array(); foreach ($x40 as $x3f) { $x84[$x3f['currency_to']] = $x3f['rate']; } $this->_currencies = $x84; if ($this->_debug) { echo "<br><br>------------ CURRENCIES ----------------<br>"; $x154($x84); } Mage::log("
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> Currencies rate collected", null, $this->x165('.log')); $x85 = Mage::getResourceModel('eav/entity_attribute_collection') ->setEntityTypeFilter($x82) ->addSetInfo() ->getData();
$x86 = array(); $x87 = array(); foreach ($x85 as $x37 => $x75) { if ($x156($x75['attribute_code'], $x77)) { $x153($x86, $x75['attribute_code']); $x87[$x75['attribute_code']] = $x75['frontend_input']; } } if (!$x156('special_price', $x86)) $x86[] = 'special_price'; if (!$x156('special_from_date', $x86)) $x86[] = 'special_from_date'; if (!$x156('special_to_date', $x86)) $x86[] = 'special_to_date'; if (!$x156('price_type', $x86)) $x86[] = 'price_type'; if (!$x156('price', $x86)) $x86[] = 'price'; $x86[] = 'tax_class_id'; foreach ($x71 as $x88) { if (!$x156($x88->code, $x86) && $x88->checked) if (!$x156($x88->code, array("is_in_stock", "qty", "entity_id", "created_at", "updated_at"))) $x86[] = $x88->code; } if ($this->_debug) { echo "<br><br>------------ ATTRIBUTES ----------------<br>"; $x154($x86); } Mage::log("
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> List of required attributes collected", null, $this->x165('.log')); $x7d = Mage::getSingleton('core/resource'); $x7e = $x7d->getConnection('core_read'); $x89 = $x7d->getTableName('eav_attribute_option_value'); $x80 = $x7e->select(); $x80->from($x89); $x80->where("store_id=" . $x58 . ' OR store_id=0'); $x80->order(array('option_id', 'store_id')); $x8a = $x7e->fetchAll($x80); foreach ($x8a as $x8b) { $x8c[$x8b['option_id']][$x8b['store_id']] = $x8b['value']; } if ($this->_debug) { echo "<br><br>------------ ATTRIBUTES LABEL ----------------<br>"; $x154($x8c); } Mage::log("
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> List of attribute labels collected", null, $this->x165('.log')); $x8d = $x7d->getTableName('tax_class'); $x8e = $x7d->getTableName('tax_calculation'); $x8f = $x7d->getTableName('tax_calculation_rate'); $x90 = $x7d->getTableName('directory_country_region'); $x91 = $x7d->getTableName('customer_group'); $x80 = $x7e->select(); $x80->from($x8d)->order(array('class_id', 'tax_calculation_rate_id')); $x80->joinleft(array('tc' => $x8e), 'tc.product_tax_class_id = ' . $x8d . '.class_id', 'tc.tax_calculation_rate_id'); $x80->joinleft(array('tcr' => $x8f), 'tcr.tax_calculation_rate_id = tc.tax_calculation_rate_id', array('tcr.rate', 'tax_country_id', 'tax_region_id')); $x80->joinleft(array('dcr' => $x90), 'dcr.region_id=tcr.tax_region_id', 'code'); $x80->joinInner(array('cg' => $x91), 'cg.tax_class_id=tc.customer_tax_class_id AND cg.customer_group_code="NOT LOGGED IN"'); $x92 = $x7e->fetchAll($x80); $x44 = array(); $x3c = ''; foreach ($x92 as $x93) { if ($x3c != $x93['class_id']) $x94 = 0; else { $x94++; } $x3c = $x93['class_id']; $x44[$x93['class_id']][$x94]['rate'] = $x93['rate']; $x44[$x93['class_id']][$x94]['code'] = $x93['code']; $x44[$x93['class_id']][$x94]['country'] = $x93['tax_country_id']; } $this->_rates = $x44; if ($this->_debug) { echo "<br><br>------------ TAX CLASS ----------------<br>"; $x154($x44); } Mage::log("
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> Tax rate collected", null, $this->x165('.log')); $x95 = $x7d->getTableName('review'); $x96 = $x7d->getTableName('review_store'); $x97 = $x7d->getTableName('rating_option_vote'); $x98 = $x7e->select()->distinct('review_id'); $x98->from(array("r" => $x95), array("COUNT(DISTINCT r.review_id) AS count", 'entity_pk_value')); $x98->joinleft(array('rs' => $x96), 'rs.review_id=r.review_id', 'rs.store_id'); $x98->joinleft(array('rov' => $x97), 'rov.review_id=r.review_id', 'AVG(rov.percent) AS score'); $x98->where("status_id=1 and entity_id=1"); $x98->group(array('r.entity_pk_value', 'rs.store_id')); $x99 = $x7e->select(); $x99->from(array("r" => $x95), array("COUNT(DISTINCT r.review_id) AS count", 'entity_pk_value', "(SELECT 0) AS store_id")); $x99->joinleft(array('rs' => $x96), 'rs.review_id=r.review_id', array()); $x99->joinleft(array('rov' => $x97), 'rov.review_id=r.review_id', 'AVG(rov.percent) AS score'); $x99->where("status_id=1 and entity_id=1"); $x99->group(array('r.entity_pk_value')); $x80 = $x7e->select() ->union(array($x98, $x99)); $x80->order(array('entity_pk_value', 'store_id')); $x9a = $x7e->fetchAll($x80); $x9b = array(); foreach ($x9a as $x9c) { $x9b[$x9c['entity_pk_value']][$x9c['store_id']]["count"] = $x9c["count"]; $x9b[$x9c['entity_pk_value']][$x9c['store_id']]['score'] = $x9c['score']; } Mage::log("
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> Reviews collected", null, $this->x165('.log')); $x7d = Mage::getSingleton('core/resource'); $x7e = $x7d->getConnection('core_read'); $x9d = $x7d->getTableName('catalog_product_entity_media_gallery'); $x9e = $x7d->getTableName('catalog_product_entity_media_gallery_value'); $x80 = $x7e->select(array("DISTINCT value")); $x80->from($x9d); $x80->joinleft(array('cpemgv' => $x9e), 'cpemgv.value_id = ' . $x9d . '.value_id', array('cpemgv.position', 'cpemgv.disabled')); $x80->where("value<>TRIM('') AND (store_id=" . $x58 . ' OR store_id=0)'); $x80->order(array('position', 'value_id')); $x80->group(array('value_id')); $x9f = $x7e->fetchAll($x80); foreach ($x9f as $xa0) { if ($xa0['disabled'] != 1 && $xa0['value'] != '') { if (!$x156($xa0['value'], $xa1[$xa0['entity_id']]['src'])) { $xa1[$xa0['entity_id']]['src'][] = $xa0['value']; $xa1[$xa0['entity_id']]['disabled'][] = $xa0['disabled']; } } } if ($this->_debug) { echo "<br><br>------------ IMAGES ----------------<br>"; $x154($xa1); } Mage::log("
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> Images collected", null, $this->x165('.log')); Mage::app()->setCurrentStore($x58); $xa2 = $x7d->getTableName("cataloginventory_stock_item"); $xa3 = $x7d->getTableName("core_url_rewrite"); $x83 = $x7d->getTableName('catalog_category_product'); $xa4 = $x7d->getTableName('catalog_category_product_index'); $xa5 = $x7d->getTableName('catalog_product_index_price'); $xa6 = $x7d->getTableName('catalog_product_super_link'); $xa7 = $x7d->getTableName('catalog_product_link'); $xa8 = $x7d->getTableName('catalog_product_bundle_selection'); ($x155(Mage::getVersion(), '1.6.0', '<')) ? $x79 = "options=''" : $x79 = "ISNULL(options)"; switch (Mage::getStoreConfig("simplegoogleshopping/system/urlrewrite")) { case 1 : $xa9 = "AND url.target_path NOT LIKE '%category%'"; $xaa = 'MAX';
break; default : $xa9 = "AND url.target_path LIKE '%category%'"; $xaa = 'GROUP_CONCAT'; break; break; } $xab = Mage::getModel('simplegoogleshopping/product_collection')->getCollection()->addStoreFilter($x58); $xab->addAttributeToFilter('status', 1); $xab->addAttributeToFilter('type_id', array("in" => "configurable")); $xab->addAttributeToFilter('visibility', array("nin" => 1)); $xab->addAttributeToSelect($x86, true); $xab->getSelect()->joinLeft($xa6 . ' AS cpsl', 'cpsl.parent_id=e.entity_id ', array('child_ids' => 'GROUP_CONCAT( DISTINCT cpsl.product_id)')); $xab->getSelect()->joinLeft($xa2 . ' AS stock', 'stock.product_id=e.entity_id', array('qty' => 'qty', 'is_in_stock' => 'is_in_stock', 'manage_stock' => 'manage_stock', 'use_config_manage_stock' => 'use_config_manage_stock', 'backorders' => 'backorders', 'use_config_backorders' => 'use_config_backorders')); $xab->getSelect()->joinLeft($xa3 . ' AS url', 'url.product_id=e.entity_id ' . $xa9 . ' AND is_system=1 AND ' . $x79 . ' AND url.store_id=' . $x58, array('request_path' => $xaa . '(DISTINCT request_path)')); $xab->getSelect()->joinLeft($x83 . ' AS categories', 'categories.product_id=e.entity_id'); $xab->getSelect()->joinLeft($xa4 . ' AS categories_index', 'categories_index.category_id=categories.category_id AND categories_index.product_id=categories.product_id AND categories_index.store_id=' . $x58, array('categories_ids' => 'GROUP_CONCAT( DISTINCT categories_index.category_id)')); $xab->getSelect()->group(array('cpsl.parent_id')); $xac = array(); foreach ($xab as $xad) { foreach (explode(",", $xad->getChildIds()) as $xae) { $xac[$xae] = $xad; $xaf[$xae]['categories_ids'] = $xad->getCategories_ids(); $xaf[$xae]['parent_id'] = $xad->getId(); $xaf[$xae]['parent_sku'] = $xad->getSku(); $xaf[$xae]['parent_request_path'] = $xad->getRequestPath(); } } $this->configurable = $xac; if ($this->_debug) { echo "<br><br>------------ CONFIGURABLES ----------------<br>"; echo $xab->getSelect() . '<br><br>'; $x154($xaf); } Mage::log("
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> Relations with configurable products detected", null, $this->x165('.log')); $xab = Mage::getModel('simplegoogleshopping/product_collection')->getCollection()->addStoreFilter($x58); $xab->addAttributeToFilter('status', 1); $xab->addAttributeToFilter('type_id', array("in" => "configurable")); $xab->addAttributeToFilter('visibility', array("nin" => 1)); $xab->getSelect()->joinLeft($xa6 . ' AS cpsl', 'cpsl.parent_id=e.entity_id '); $xab->getSelect()->joinLeft($xa2 . ' AS stock', 'stock.product_id=cpsl.product_id', array('qty' => 'SUM(stock.qty)')); $xab->getSelect()->group(array('cpsl.parent_id')); $xb0 = array(); foreach ($xab as $xb1) { $xb0[$xb1->getId()] = $xb1->getQty(); } $this->configurableQty = $xb0; if ($this->_debug) { echo "<br><br>------------ CONFIGURABLES QTY ----------------<br>"; echo $xab->getSelect() . '<br><br>'; $x154($xb0); } Mage::log("
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> Qty for configurable products calculated", null, $this->x165('.log')); $xa6 = $x7d->getTableName("catalog_product_super_link"); $xb2 = $x7d->getTableName("catalog_product_super_attribute"); $xb3 = $x7d->getTableName("catalog_product_entity_int"); $xb4 = $x7d->getTableName("catalog_product_super_attribute_pricing"); $xb5 = $x7e->select(); $xb5->from(array("cpsl" => $xa6), array("parent_id", "product_id")); $xb5->joinleft(array("cpsa" => $xb2), "cpsa.product_id = cpsl.parent_id", array("attribute_id")); $xb5->joinleft(array("cpei" => $xb3), "cpei.entity_id = cpsl.product_id AND cpei.attribute_id = cpsa.attribute_id", array("value" => "value")); $xb5->joinleft(array("cpsap" => $xb4), "cpsap.product_super_attribute_id = cpsa.product_super_attribute_id AND cpei.value = cpsap.value_index", array("pricing_value" => "pricing_value", "is_percent" => "is_percent")); $xb5->order(array("cpsl.parent_id", "cpsl.product_id")); $xb5->group(array("cpsl.parent_id", "cpsl.product_id", "cpsa.attribute_id")); $xb6 = $x7e->fetchAll($xb5); $xb7 = array(); foreach ($xb6 as $xb1) { $xb7[$xb1["parent_id"]][$xb1["product_id"]][$xb1['attribute_id']]['attribute_id'] = $xb1["attribute_id"]; $xb7[$xb1["parent_id"]][$xb1["product_id"]][$xb1['attribute_id']]['value'] = $xb1["value"]; $xb7[$xb1["parent_id"]][$xb1["product_id"]][$xb1['attribute_id']]['pricing_value'] = $xb1["pricing_value"]; $xb7[$xb1["parent_id"]][$xb1["product_id"]][$xb1['attribute_id']]['is_percent'] = $xb1["is_percent"]; } if ($this->_log) Mage::log("
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> Configurable prices collected", null, $this->x165('.log')); $this->configurablePrices = $xb7; if ($this->_debug) { echo "<br><br>------------ CONFIGURABLES PRICES ----------------<br>"; echo $xb5 . '<br><br>'; $x154($xb7); } $xab = Mage::getModel('simplegoogleshopping/product_collection')->getCollection()->addStoreFilter($x58); $xab->addAttributeToFilter('status', 1); $xab->addAttributeToFilter('type_id', array("in" => "grouped")); $xab->addAttributeToFilter('visibility', array("nin" => 1)); $xab->addAttributeToSelect($x86, true); $xab->getSelect()->joinLeft($xa7 . ' AS cpl', 'cpl.product_id=e.entity_id AND cpl.link_type_id=3', array('child_ids' => 'GROUP_CONCAT( DISTINCT cpl.linked_product_id)')); $xab->getSelect()->joinLeft($xa2 . ' AS stock', 'stock.product_id=e.entity_id', array('qty' => 'qty', 'is_in_stock' => 'is_in_stock', 'manage_stock' => 'manage_stock', 'use_config_manage_stock' => 'use_config_manage_stock', 'backorders' => 'backorders', 'use_config_backorders' => 'use_config_backorders')); $xab->getSelect()->joinLeft($xa3 . ' AS url', 'url.product_id=e.entity_id ' . $xa9 . ' AND is_system=1 AND ' . $x79 . ' AND url.store_id=' . $x58, array('request_path' => $xaa . '(DISTINCT request_path)')); $xab->getSelect()->joinLeft($x83 . ' AS categories', 'categories.product_id=e.entity_id'); $xab->getSelect()->joinLeft($xa4 . ' AS categories_index', 'categories_index.category_id=categories.category_id AND categories_index.product_id=categories.product_id AND categories_index.store_id=' . $x58, array('categories_ids' => 'GROUP_CONCAT( DISTINCT categories_index.category_id)')); $xab->getSelect()->group(array('cpl.product_id')); $xb8 = array(); foreach ($xab as $xad) { foreach (explode(",", $xad->getChildIds()) as $xae) { $xb8[$xae] = $xad; $xb9[$xae]['categories_ids'] = $xad->getCategories_ids(); $xb9[$xae]['parent_id'] = $xad->getId(); $xb9[$xae]['parent_sku'] = $xad->getSku(); $xb9[$xae]['parent_request_path'] = $xad->getRequestPath(); } } $this->grouped = $xb8; if ($this->_debug) { echo "<br><br>------------ GROUPED ----------------<br>"; echo $xab->getSelect() . '<br><br>'; $x154($xb9); } Mage::log("
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> Relations with grouped products detected", null, $this->x165('.log')); $xab = Mage::getModel('simplegoogleshopping/product_collection')->getCollection()->addStoreFilter($x58); $xab->addAttributeToFilter('status', 1); $xab->addAttributeToFilter('type_id', array("in" => "bundle")); $xab->addAttributeToFilter('visibility', array("nin" => 1)); $xab->addAttributeToSelect($x86, true); $xab->getSelect()->joinLeft($xa8 . ' AS cpbs', 'cpbs.parent_product_id=e.entity_id', array('child_ids' => 'GROUP_CONCAT( DISTINCT cpbs.product_id)')); $xab->getSelect()->joinLeft($xa2 . ' AS stock', 'stock.product_id=e.entity_id', array('qty' => 'qty', 'is_in_stock' => 'is_in_stock', 'manage_stock' => 'manage_stock', 'use_config_manage_stock' => 'use_config_manage_stock', 'backorders' => 'backorders', 'use_config_backorders' => 'use_config_backorders')); $xab->getSelect()->joinLeft($xa3 . ' AS url', 'url.product_id=e.entity_id ' . $xa9 . ' AND is_system=1 AND ' . $x79 . ' AND url.store_id=' . $x58, array('request_path' => $xaa . '(DISTINCT request_path)')); $xab->getSelect()->joinLeft($x83 . ' AS categories', 'categories.product_id=e.entity_id'); $xab->getSelect()->joinLeft($xa4 . ' AS categories_index', 'categories_index.category_id=categories.category_id AND categories_index.product_id=categories.product_id AND categories_index.store_id=' . $x58, array('categories_ids' => 'GROUP_CONCAT( DISTINCT categories_index.category_id)')); $xab->getSelect()->group(array('e.entity_id')); $xba = array(); foreach ($xab as $xad) { foreach (explode(",", $xad->getChildIds()) as $xae) { $xba[$xae] = $xad; $xbb[$xae]['parent_id'] = $xad->getId(); $xbb[$xae]['parent_sku'] = $xad->getSku();
$xbb[$xae]['parent_request_path'] = $xad->getRequestPath(); $xbb[$xae]['categories_ids'] = $xad->getCategories_ids(); } } $this->bundle = $xba; if ($this->_debug) { echo "<br><br>------------ BUNDLE ----------------<br>"; echo $xab->getSelect() . '<br><br>'; $x154($xbb); } Mage::log("
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> Relations with bundle products detected", null, $this->x165('.log')); $xbc = $x7d->getTableName("catalog_product_option"); $xbd = $x7d->getTableName("catalog_product_option_title"); $xbe = $x7d->getTableName("catalog_product_option_type_value"); $xbf = $x7d->getTableName("catalog_product_option_type_title"); $xc0 = $x7d->getTableName("catalog_product_option_type_price"); $xc1 = $x7e->select(); $xc1->from(array("cpo" => $xbc), array("product_id")); $xc1->joinleft(array("cpot" => $xbd), "cpot.option_id=cpo.option_id AND cpot.store_id=0", array("option" => "title", "option_id", "store_id")); $xc1->joinleft(array("cpotv" => $xbe), "cpotv.option_id = cpo.option_id", array("sku", "id" => "option_type_id")); $xc1->joinleft(array("cpott" => $xbf), "cpott.option_type_id=cpotv.option_type_id AND cpott.store_id=cpot.store_id", "title AS value"); $xc1->joinleft(array("cpotp" => $xc0), "cpotp.option_type_id=cpotv.option_type_id AND cpotp.store_id=cpot.store_id", array("price", "price_type")); $x80 = $xc1->order(array("product_id", "cpotv.sort_order ASC")); $x9a = $x7e->fetchAll($x80); $xc2 = array(); $xc3 = 0; foreach ($x9a as $xc4) { $xc2[$xc4["product_id"]][$xc4["option"]]["options"][] = array( "value" => $xc4["value"], "sku" => $xc4["sku"], "price" => $xc4["price"], "price_type" => $xc4["price_type"] ); $xc3++; } $this->customOptions = $xc2; if ($this->_debug) { echo "<br><br>------------ CUSTOM OPTIONS ----------------<br>"; echo $xc1 . '<br><br>'; $x154($xc2); } Mage::log("
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> Custom options collected", null, $this->x165('.log')); if (Mage::helper("core")->isModuleEnabled("Wyomind_Googlemerchantpromotions")) { $xc5 = Mage::getResourceModel('salesrule/rule_collection')->setOrder('sort_order', 'ASC')->addFieldToFilter("transferable_to_google_merchant", 1)->load(); Mage::log("
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> Promotions rules collected", null, $this->x165('.log')); } $xc6 = Mage::getModel('simplegoogleshopping/product_collection')->getCollection()->addStoreFilter($x58); if (Mage::getStoreConfig("simplegoogleshopping/system/disabled")) $xc6->addFieldToFilter("status", array('gteq' => 1)); else $xc6->addFieldToFilter("status", 1); $xc6->addAttributeToFilter("type_id", array("in" => $x6f)); $xc6->addAttributeToFilter("visibility", array("in" => $x70)); if ($x72[0] != '*') $xc6->addAttributeToFilter("attribute_set_id", array("in" => $x72)); $xc6->addAttributeToSelect($x86, true); $xc7 = array("eq" => "= '%s'", "neq" => "!= '%s'", "gteq" => ">= '%s'", "lteq" => "<= '%s'", "gt" => "> '%s'", "lt" => "< '%s'", "like" => "like '%s'", "nlike" => "not like '%s'", "null" => "is null", "notnull" => "is not null", "in" => "in (%s)", "nin" => "not in(%s)", ); $xc8 = ''; $x32 = 0; $xc9 = array(); foreach ($x71 as $x88) { if ($x88->checked) { if ($x88->condition == 'in' || $x88->condition == 'nin') { if ($x88->code == 'qty' || $x88->code == 'is_in_stock') { $xca = explode(',', $x88->value); $x88->value = "'" . implode($xca, "','") . "'"; } else { $x88->value = explode(',', $x88->value); } } switch ($x88->code) { case 'qty' : if ($x32 > 0) $xc8.=' ' . $x88->statement . ' '; $xc8.=" qty " . sprintf($xc7[$x88->condition], $x88->value); $x32++; break; case 'is_in_stock' : if ($x32 > 0) $xc8.=' ' . $x88->statement . ' '; $xc8.=" (IF("; $xc8.="(use_config_manage_stock=1 AND $x5d=0)"; $xc8.=" OR "; $xc8.='(use_config_manage_stock=0 AND manage_stock=0)'; $xc8.=" OR "; $xc8.="(use_config_manage_stock=1 AND $x5d=1 AND is_in_stock=1 )"; $xc8.=" OR "; $xc8.="(use_config_manage_stock=0 AND manage_stock=1 AND is_in_stock=1 )"; $xc8.=",'1','0')" . sprintf($xc7[$x88->condition], $x88->value) . ")"; $x32++; break; default : if ($x88->statement == "AND") { if (count($xc9)) $xc6->addFieldToFilter($xc9); $xc9 = array(); } if ($x88->condition == "in") { $xcb = true; $xcc = array(); foreach ($x88->value as $xcd) { if (!$x14d($xcd)) $xcb = true; } if ($xcb) { foreach ($x88->value as $xcd) { $xcc[] = array(array("finset" => $xcd)); } $xc9[] = array("attribute" => $x88->code, $xcc); } else $xc9[] = array("attribute" => $x88->code, $x88->condition => $x88->value); } else $xc9[] = array("attribute" => $x88->code, $x88->condition => $x88->value); break; } } }; if (count($xc9)) $xc6->addFieldToFilter($xc9); $xc6->getSelect()->joinLeft($xa2 . ' AS stock', 'stock.product_id=e.entity_id', array('qty' => 'qty', 'is_in_stock' => 'is_in_stock', 'manage_stock' => 'manage_stock', 'use_config_manage_stock' => 'use_config_manage_stock', 'backorders' => 'backorders', 'use_config_backorders' => 'use_config_backorders')); $xc6->getSelect()->joinLeft($xa3 . ' AS url', 'url.product_id=e.entity_id ' . $xa9 . ' AND is_system=1 AND ' . $x79 . ' AND url.store_id=' . $x58, array('request_path' => $xaa . '(DISTINCT request_path)')); if ($x6c[0] != '*') { $xcd = 0; $xce = null; foreach ($x6c as $x6e) { if ($xcd > 0) $xce.=','; $xce.=$x157(explode('/', $x6e)); $xcd++; } ($x6a) ? $xcf = "IN" : $xcf = "NOT IN"; $xc6->getSelect()->joinLeft($xa6 . ' AS cpsl', 'cpsl.product_id=e.entity_id ', array('parent_id' => 'parent_id')); switch ($x6b) { case 0: $xd0 = "categories.product_id=e.entity_id"; break; case 1 : $xd0 = "categories.product_id=e.entity_id OR categories.product_id=cpsl.parent_id"; break; case 2: $xd0 = "categories.product_id=cpsl.parent_id "; break; } if ($x155(Mage::getVersion(), '1.12.0', '<=')) { $xce = "AND categories_index.category_id " . $xcf . " (" . $xce . ")"; $xc6->getSelect()->joinLeft($x83 . ' AS categories', $xd0, array()); $xc6->getSelect()->joinInner($xa4 . ' AS categories_index', '((categories_index.category_id=categories.category_id AND categories_index.product_id=categories.product_id)) AND categories_index.store_id=' . $x58 . ' ' . $xce, array('categories_ids' => 'GROUP_CONCAT( DISTINCT categories_index.category_id)')); } else { $xce = "AND categories.category_id " . $xcf . " (" . $xce . ")"; $xc6->getSelect()->joinInner($x83 . ' AS categories', $xd0 .' '. $xce, array('categories_ids' => 'GROUP_CONCAT( DISTINCT categories.category_id)')); } } else { $xc6->getSelect()->joinLeft($x83 . ' AS categories', 'categories.product_id=e.entity_id'); $xc6->getSelect()->joinLeft($xa4 . ' AS categories_index', '((categories_index.category_id=categories.category_id AND categories_index.product_id=categories.product_id) ) AND categories_index.store_id=' . $x58, array('categories_ids' => 'GROUP_CONCAT(DISTINCT categories_index.category_id)')); } if ($x155(Mage::getVersion(), '1.4.0', '>=')) $xc6->getSelect()->joinLeft($xa5 . ' AS price_index', 'price_index.entity_id=e.entity_id AND customer_group_id=0 AND price_index.website_id=' . Mage::getModel('core/store')->load($x58)->getWebsiteId(), array('min_price' => 'min_price', 'max_price' => 'max_price', 'tier_price' => 'tier_price', 'final_price' => 'final_price')); if (!empty($xc8)) $xc6->getSelect()->where($xc8); $xc6->getSelect()->group("e.entity_type_id"); if ($this->_log) Mage::log("
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> Main sql request:
" . $xc6->getSelect(), null, $this->x165('.log')); if ($this->_debug) { echo "<br><br>------------ MAIN SQL REQUEST ----------------<br>";
echo $xc6->getSelect(); } $xd1 = 0; $xd2 = clone $xc6; $xd2->getSelect()->columns("COUNT(DISTINCT e.entity_id) As total"); $this->_counter = $xd2->getFirstItem()->getTotal(); $xd3 = ceil($this->_counter / $this->_sqlSize); $x73 = ''; $xd4 = 1; Mage::log("
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> Total items calculated ($this->_counter in $xd3 queries )", null, $this->x165('.log')); $xc6->getSelect()->group(array('e.entity_id'))->order('e.entity_id'); $xd5 = time(true); $xd6 = 0; while ($xd1 < $xd3) { $xab = clone $xc6; if ($this->_debug) { echo "<br><br>------------ SQL ----------------<br>"; print($xab->getSelect()); } $xab->getSelect()->limit($this->_sqlSize, ($this->_sqlSize * $xd1)); $xd1++; if ($this->_sqlSize * $xd1 > $this->_counter) $xd7 = $this->_counter; else $xd7 = $this->_sqlSize * $xd1; if ($this->_log) Mage::log("
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> Fetching products from " . ($this->_sqlSize * ($xd1 - 1) + 1) . " to " . $xd7, null, $this->x165('.log')); $xc3 = 1; foreach ($xab as $product) { if ($this->_debug) { echo "<br><br>------------ PRODUCT [ SKU -> " . $product->getSku() . " | ID -> " . $product->getId() . "]---------------<br>"; echo "categories : " . $product->getCategoriesIds() . ", Root id: " . $x63 . "<br>"; foreach (explode(',', $product->getCategoriesIds()) as $x37 => $x7c) { echo $x7c . "=>" . $x7b[$x7c]["path"] . "<br>"; } } $x48 = $x66; foreach ($x76 as $x37 => $xd8) { $x4a = ""; switch ($xd8['pattern']) { case '{G:ID}': $xd9 = $this->checkReference($xd8['reference'], $product); ($xd8['options'][0] != "id") ? $xda = $xd9->getSku() : $xda = $xd9->getId(); $x4a = "<g:id><![CDATA[" . $xda . "]]></g:id>"; break; case '{G:TITLE}': $xd9 = $this->checkReference($xd8['reference'], $product); $x39 = $xd9->getName(); if (strlen($x39) > 900) { $x39 = substr($x39, 0, 150, - 3); $xdb = strrpos($x39, " "); $x39 = substr($x39, 0, $xdb) . "..."; } $x4a = "<title><![CDATA[" . $x39 . "]]></title>"; break; case '{G:DESCRIPTION}': $xd9 = $this->checkReference($xd8['reference'], $product); ($xd8['options'][0] != "short") ? $xdc = $xd9->getDescription() : $xdc = $xd9->getShortDescription(); $x4a = "<description><![CDATA[" . $xdc . "]]></description>"; break; case '{G:PROMOTION_ID}': $x4a = ""; $xdd = clone $xc5; foreach ($xdd as $xde) { if ($xde->getIsActive()) { ; $xdf = unserialize($xde->getConditions_serialized()); $xdf = $xdf["conditions"]; $xe0 = $xde->getConditions(); $xe1 = $xe0->getAggregator() === 'all'; $xe2 = (bool) $xe0->getValue(); $xe3 = ($xe1) ? true : false; $xe3 = (!count($xe0->getConditions())) ? true : $xe3; $xe4 = 0; foreach ($xe0->getConditions() as $xe5) { $xe6 = array("salesrule/rule_condition_product_subselect", "salesrule/rule_condition_address"); if (!$x156($xe5->getType(), $xe6)) { $xe7 = $xe5->validate($product); if ($xe1 && $xe7 !== $xe2) { $xe3 = false; } elseif (!$xe1 && $xe7 === $xe2) { $xe3 = true; break; } } else { if ($xe5->getAttribute() == "base_subtotal") { } } $xe4++; } $xe8 = unserialize($xde->getActions_serialized()); $xe8 = $xe8["conditions"]; $xe9 = $xde->getActions(); $xe1 = $xe9->getAggregator() === 'all'; $xe2 = (bool) $xe9->getValue(); $xea = ($xe1) ? true : false; $xea = (!count($xe9->getConditions())) ? true : $xea; $xe4 = 0; foreach ($xe9->getConditions() as $x57) { $xe7 = $x57->validate($product); if ($xe1 && $xe7 !== $xe2) { $xea = false; } elseif (!$xe1 && $xe7 === $xe2) { $xea = true; break; } $xe4++; } if ($xea && $xe3) { $x4a = "<g:promotion_id><![CDATA[" . $xde->getData('rule_id') . "]]></g:promotion_id>"; break; } } } break; case "{load_options}": $x9a = 1; $xeb = array(); foreach ($xd8['options'] as $x37 => $xec) { if (isset($xc2[$product->getId()][$xec])) { $x9a = $x9a * count($xc2[$product->getId()][$xec]["options"]); $xeb[$x37] = 0; } } $x35 = array(); for ($x94 = 1; $x94 <= $x9a; $x94++) { $xed = $x48; foreach ($xd8['options'] as $x37 => $xec) { if (isset($xc2[$product->getId()][$xec])) { $xed = $x147("{" . $xec . "_label}", $xc2[$product->getId()][$xec]["options"][$xeb[$x37]]['value'], $xed); $xed = $x147("{" . $xec . "_sku}", $xc2[$product->getId()][$xec]["options"][$xeb[$x37]]['sku'], $xed); $xed = $x147("{" . $xec . "_price}", $xc2[$product->getId()][$xec]["options"][$xeb[$x37]]['price'], $xed); $xed = $x147("{" . $xec . "_type}", $xc2[$product->getId()][$xec]["options"][$xeb[$x37]]['price_type'], $xed); $xed = $x147("{" . $xec . "_id}", $xc2[$product->getId()][$xec]["options"][$xeb[$x37]]['id'], $xed); if ($x37 > 0 || count($xc2[$product->getId()]) == 1 || count($xd8['options']) < 2) $xeb[$x37] ++; if ($xeb[$x37] >= count($xc2[$product->getId()][$xec]["options"])) { $xeb[$x37] = 0; $xeb[$x37 - 1] ++; } } } $x35[] = $xed; } if (count($x35) > 0) { $x48 = implode("</item>
<item>", $x35); } break; case "{use_options}": foreach ($xd8['options'] as $x37 => $xec) { if (isset($xc2[$product->getId()][$xec])) { $xee = array(); $xef = array(); $xf0 = array(); $xf1 = array(); foreach ($xc2[$product->getId()][$xec]["options"] as $x4c) { $xee[] = $x4c['value']; $xef[] = $x4c['sku']; $xf0[] = $x4c['price'];
$xf1[] = $x4c['id']; } $x48 = $x147("{" . $xec . "_label}", implode(',', $xee), $x48); $x48 = $x147("{" . $xec . "_sku}", implode(',', $xef), $x48); $x48 = $x147("{" . $xec . "_price}", implode(',', $xf0), $x48); $x48 = $x147("{" . $xec . "_id}", implode(',', $xf1), $x48); } } break; case '{inc}' : $x4a = $xd4; break; case '{min_price}' : $xd9 = $this->checkReference($xd8['reference'], $product); $x3e = $xd9->getMinPrice(); (!isset($xd8['options'][1])) ? $x43 = false : $x43 = $xd8['options'][1]; if ($xd9->getTypeId() == "configurable") { if (isset($this->configurablePrices[$xd9->getId()][$product->getId()])) { $xf2 = 0; foreach ($this->configurablePrices[$xd9->getId()][$product->getId()] as $xf3) { if ($xf3["is_percent"]) { $xf2+=( $xf3["pricing_value"] / 100) * $x3e; } else $xf2+=$xf3["pricing_value"]; }; $x3e+=$xf2; } } $x4a = $this->x167($x3e, $x62, $xd9->getTaxClassId(), $x43); (!isset($xd8['options'][0])) ? $x3f = $x5c : $x3f = $xd8['options'][0]; $x4a = $this->x166($x4a, $x3f); $x4a = $x14c($x4a, 2, '.', ''); break; case '{max_price}' : $xd9 = $this->checkReference($xd8['reference'], $product); $x3e = $xd9->getMaxPrice(); (!isset($xd8['options'][1])) ? $x43 = false : $x43 = $xd8['options'][1]; if ($xd9->getTypeId() == "configurable") { if (isset($this->configurablePrices[$xd9->getId()][$product->getId()])) { $xf2 = 0; foreach ($this->configurablePrices[$xd9->getId()][$product->getId()] as $xf3) { if ($xf3["is_percent"]) { $xf2+=( $xf3["pricing_value"] / 100) * $x3e; } else $xf2+=$xf3["pricing_value"]; }; $x3e+=$xf2; } } $x4a = $this->x167($x3e, $x62, $xd9->getTaxClassId(), $x43); (!isset($xd8['options'][0])) ? $x3f = $x5c : $x3f = $xd8['options'][0]; $x4a = $this->x166($x4a, $x3f); $x4a = $x14c($x4a, 2, '.', ''); break; case '{normal_price}' : $xd9 = $this->checkReference($xd8['reference'], $product); if ($xd9->type_id == 'bundle') $x3e = $xd9->price; else { $x3e = $xd9->getPrice(); } if ($xd9->getTypeId() == "configurable") { if (isset($this->configurablePrices[$xd9->getId()][$product->getId()])) { $xf2 = 0; foreach ($this->configurablePrices[$xd9->getId()][$product->getId()] as $xf3) { if ($xf3["is_percent"]) { $xf2+=( $xf3["pricing_value"] / 100) * $x3e; } else $xf2+=$xf3["pricing_value"]; }; $x3e+=$xf2; } } (!isset($xd8['options'][1])) ? $x43 = false : $x43 = $xd8['options'][1]; $x4a = $this->x167($x3e, $x62, $xd9->getTaxClassId(), $x43); (!isset($xd8['options'][0])) ? $x3f = $x5c : $x3f = $xd8['options'][0]; $x4a = $this->x166($x4a, $x3f); $x4a = $x14c($x4a, 2, '.', ''); break; case '{price}' : $xd9 = $this->checkReference($xd8['reference'], $product); if ($xd9->getSpecialFromDate() && !$xd9->getSpecialToDate()) { if ($xd9->getSpecialFromDate() <= date("Y-m-d H:i:s")) { if ($xd9->type_id == "bundle") { if (($xd9->price_type || (!$xd9->price_type && $xd9->special_price < $xd9->price)) && $xd9->special_price > 0) { if ($xd9->price_type) $x3e = $x14c($xd9->price * $xd9->special_price / 100, 2, ".", ""); else $x3e = $xd9->special_price; } else { $x3e = $xd9->price; } } else ($xd9->getSpecial_price() && $xd9->getSpecial_price() < $xd9->getPrice()) ? $x3e = $xd9->getSpecialPrice() : $x3e = $xd9->getPrice(); } else { if ($xd9->type_id == "bundle") $x3e = $xd9->price; else { $x3e = $xd9->getPrice(); } } } elseif ($xd9->getSpecialFromDate() && $xd9->getSpecialToDate()) { if ($xd9->getSpecialFromDate() <= date("Y-m-d H:i:s") && date("Y-m-d H:i:s") < $xd9->getSpecialToDate()) { if ($xd9->type_id == "bundle") { if (($xd9->price_type || (!$xd9->price_type && $xd9->special_price < $xd9->price)) && $xd9->special_price > 0) { if ($xd9->price_type) $x3e = $x14c($xd9->price * $xd9->special_price / 100, 2, ".", ""); else { $x3e = $xd9->special_price; } } else { $x3e = $xd9->price; } } else { ($xd9->getSpecial_price() && $xd9->getSpecial_price() < $xd9->getPrice()) ? $x3e = $xd9->getSpecialPrice() : $x3e = $xd9->getPrice(); } } else { if ($xd9->type_id == "bundle") { $x3e = $xd9->price; } else { $x3e = $xd9->getPrice(); } } } else { if ($xd9->type_id == "bundle") { if (($xd9->price_type || (!$xd9->price_type && $xd9->special_price < $xd9->price)) && $xd9->special_price > 0) { if ($xd9->price_type) { $x3e = $x14c($xd9->price * $xd9->special_price / 100, 2, ".", ""); } else { $x3e = $xd9->special_price; } } else { $x3e = $xd9->price; } } else { ($xd9->getSpecial_price() && $xd9->getSpecial_price() < $xd9->getPrice()) ? $x3e = $xd9->getSpecialPrice() : $x3e = $xd9->getPrice(); } } if ($xd9->getTypeId() == "configurable") { if (isset($this->configurablePrices[$xd9->getId()][$product->getId()])) { $xf2 = 0; foreach ($this->configurablePrices[$xd9->getId()][$product->getId()] as $xf3) { if ($xf3["is_percent"]) { $xf2+=( $xf3["pricing_value"] / 100) * $x3e; } else $xf2+=$xf3["pricing_value"]; }; $x3e+=$xf2; } } (!isset($xd8['options'][1])) ? $x43 = false : $x43 = $xd8['options'][1]; $x4a = $this->x167($x3e, $x62, $xd9->getTaxClassId(), $x43); (!isset($xd8["options"][0])) ? $x3f = $x5c : $x3f = $xd8["options"][0]; $x4a = $this->x166($x4a, $x3f); $x4a = $x14c($x4a, 2, ".", ""); break; case "{is_special_price}" : $xd9 = $this->checkReference($xd8['reference'], $product); (!isset($xd8["options"][0])) ? $xe2 = 1 : $xe2 = $xd8["options"][0]; (!isset($xd8["options"][1])) ? $xf4 = 0 : $xf4 = $xd8["options"][1]; if ($xd9->getSpecialFromDate() && !$xd9->getSpecialToDate()) { if ($xd9->getSpecialFromDate() <= date("Y-m-d H:i:s")) { if ($xd9->type_id == "bundle") (($xd9->price_type || (!$xd9->price_type && $xd9->special_price < $xd9->price)) && $xd9->special_price > 0 ) ? $x4a = $xe2 : $x4a = $xf4; else { ($xd9->getSpecial_price() && $xd9->getSpecial_price() < $xd9->getPrice()) ? $x4a = $xe2 : $x4a = $xf4; } } else { if ($xd9->type_id == "bundle") { $x4a = $xf4; } else { $x4a = $xf4; } } } elseif ($xd9->getSpecialFromDate() && $xd9->getSpecialToDate()) { if ($xd9->getSpecialFromDate() <= date("Y-m-d H:i:s") && date("Y-m-d H:i:s") < $xd9->getSpecialToDate()) { if ($xd9->type_id == "bundle") { (($xd9->price_type || (!$xd9->price_type && $xd9->special_price < $xd9->price)) && $xd9->special_price > 0 ) ? $x4a = $xe2 : $x4a = $xf4; } else { ($xd9->getSpecial_price() && $xd9->getSpecial_price() < $xd9->getPrice()) ? $x4a = $xe2 : $x4a = $xf4; } } else { if ($xd9->type_id == "bundle") { $x4a = $xf4; } else { $x4a = $xf4; } } } else { if ($xd9->type_id == "bundle") { (($xd9->price_type || (!$xd9->price_type && $xd9->special_price < $xd9->price)) && $xd9->special_price > 0 ) ? $x4a = $xe2 : $x4a = $xf4; } else { ($xd9->getSpecial_price() && $xd9->getSpecial_price() < $xd9->getPrice()) ? $x4a = $xe2 : $x4a = $xf4; } } break; case "{special_price}" : $xd9 = $this->checkReference($xd8['reference'], $product); $x3e = null; if ($xd9->getSpecialFromDate() && !$xd9->getSpecialToDate()) { if ($xd9->getSpecialFromDate() <= date("Y-m-d H:i:s")) { if ($xd9->type_id == 'bundle') { if ($xd9->price_type) $x3e = $x14c($xd9->price * $xd9->special_price / 100, 2, ".", ""); else { $x3e = $xd9->special_price; } } else { $x3e = $xd9->getSpecial_price(); } } } elseif ($xd9->getSpecialFromDate() && $xd9->getSpecialToDate()) { if ($xd9->getSpecialFromDate() <= date("Y-m-d H:i:s") && date("Y-m-d H:i:s") < $xd9->getSpecialToDate()) { if ($xd9->type_id == 'bundle') { if ($xd9->price_type) $x3e = $x14c($xd9->price * $xd9->special_price / 100, 2, ".", ""); else { $x3e = $xd9->special_price; } } else { $x3e = $xd9->getSpecial_price(); } } } else { if ($xd9->type_id == 'bundle') { if ($xd9->price_type) $x3e = $x14c($xd9->price * $xd9->special_price / 100, 2, ".", ""); else { $x3e = $xd9->special_price;
} } else { $x3e = $xd9->getSpecial_price(); } } (!isset($xd8['options'][1])) ? $x43 = false : $x43 = $xd8['options'][1]; if ($x3e > 0) { if ($xd9->getTypeId() == "configurable") { if (isset($this->configurablePrices[$xd9->getId()][$product->getId()])) { $xf2 = 0; foreach ($this->configurablePrices[$xd9->getId()][$product->getId()] as $xf3) { if ($xf3["is_percent"]) { $xf2+=( $xf3["pricing_value"] / 100) * $x3e; } else $xf2+=$xf3["pricing_value"]; }; $x3e+=$xf2; } } $x4a = $this->x167($x3e, $x62, $xd9->getTaxClassId(), $x43); (!isset($xd8['options'][0])) ? $x3f = $x5c : $x3f = $xd8['options'][0]; $x4a = $this->x166($x4a, $x3f); $x4a = $x14c($x4a, 2, '.', ''); ; } else { $x4a = ""; } break; case '{price_rules}' : $xd9 = $this->checkReference($xd8['reference'], $product); $x58 = $this->getStoreId(); $xf5 = Mage::getResourceModel('catalogrule/rule'); $xf6 = Mage::app()->getLocale()->storeTimeStamp($x58); $xf7 = Mage::app()->getStore($x58); $xf8 = $xf7->getWebsiteId(); $xf9 = Mage::getSingleton('customer/session')->getCustomerGroupId(); $xfa = $xf5->getRulePrice($xf6, $xf8, $xf9, $xd9->getId()); if ($xfa !== false) $xfb = sprintf('%.2f', round($xfa, 2)); else $xfb = $xd9->getPrice(); if ($xd9->getSpecialFromDate() && !$xd9->getSpecialToDate()) { if ($xd9->getSpecialFromDate() <= date("Y-m-d H:i:s")) { if ($xd9->type_id == "bundle") { if (($xd9->price_type || (!$xd9->price_type && $xd9->special_price < $xd9->price)) && $xd9->special_price > 0) { if ($xd9->price_type) $x3e = $x14c($xd9->price * $xd9->special_price / 100, 2, ".", ""); else { $x3e = $xd9->special_price; } } else { $x3e = $xd9->price; } } else { ($xd9->getSpecial_price() && $xd9->getSpecial_price() < $xd9->getPrice()) ? $x3e = $xd9->getSpecialPrice() : $x3e = $xfb; } } else { if ($xd9->type_id == "bundle") $x3e = $xd9->price; else { $x3e = $xfb; } } } elseif ($xd9->getSpecialFromDate() && $xd9->getSpecialToDate()) { if ($xd9->getSpecialFromDate() <= date("Y-m-d H:i:s") && date("Y-m-d H:i:s") < $xd9->getSpecialToDate()) { if ($xd9->type_id == "bundle") { if (($xd9->price_type || (!$xd9->price_type && $xd9->special_price < $xd9->price)) && $xd9->special_price > 0) { if ($xd9->price_type) $x3e = $x14c($xd9->price * $xd9->special_price / 100, 2, ".", ""); else { $x3e = $xd9->special_price; } } else { $x3e = $xd9->price; } } else { ($xd9->getSpecial_price() && $xd9->getSpecial_price() < $xd9->getPrice()) ? $x3e = $xd9->getSpecialPrice() : $x3e = $xfb; } } else { if ($xd9->type_id == "bundle") $x3e = $xd9->price; else { $x3e = $xfb; } } } else { if ($xd9->type_id == "bundle") { if (($xd9->price_type || (!$xd9->price_type && $xd9->special_price < $xd9->price)) && $xd9->special_price > 0) { if ($xd9->price_type) $x3e = $x14c($xd9->price * $xd9->special_price / 100, 2, ".", ""); else { $x3e = $xd9->special_price; } } else { $x3e = $xd9->price; } } else { ($xd9->getSpecial_price() && $xd9->getSpecial_price() < $xd9->getPrice()) ? $x3e = $xd9->getSpecialPrice() : $x3e = $xfb; } } if ($xfb !== FALSE) { if ($xfb < $x3e) $x4a = $xfb; else $x4a = $x3e; } else $x4a = $x3e; if ($xd9->getTypeId() == "configurable") { if (isset($this->configurablePrices[$xd9->getId()][$product->getId()])) { $xf2 = 0; foreach ($this->configurablePrices[$xd9->getId()][$product->getId()] as $xf3) { if ($xf3["is_percent"]) { $xf2+=( $xf3["pricing_value"] / 100) * $x3e; } else $xf2+=$xf3["pricing_value"]; }; $x3e+=$xf2; } } (!isset($xd8['options'][1])) ? $x43 = false : $x43 = $xd8['options'][1]; $x4a = $this->x167($x3e, $x62, $xd9->getTaxClassId(), $x43); (!isset($xd8["options"][0])) ? $x3f = $x5c : $x3f = $xd8["options"][0]; $x4a = $this->x166($x4a, $x3f); $x4a = $x14c($x4a, 2, ".", ""); break; case '{G:PRICE}' : $xd9 = $this->checkReference($xd8['reference'], $product); if ($xd9->type_id == 'bundle') $x3e = $xd9->price; else { $x3e = $xd9->getPrice(); } if ($xd9->getTypeId() == "configurable") { if (isset($this->configurablePrices[$xd9->getId()][$product->getId()])) { $xf2 = 0; foreach ($this->configurablePrices[$xd9->getId()][$product->getId()] as $xf3) { if ($xf3["is_percent"]) { $xf2+=( $xf3["pricing_value"] / 100) * $x3e; } else $xf2+=$xf3["pricing_value"]; }; $x3e+=$xf2; } } (!isset($xd8['options'][1])) ? $x43 = false : $x43 = $xd8['options'][1]; $x4a = $this->x167($x3e, $x62, $xd9->getTaxClassId(), $x43); (!isset($xd8['options'][0])) ? $x3f = $x5c : $x3f = $xd8['options'][0]; $x4a = $this->x166($x4a, $x3f); $x4a = $x14c($x4a, 2, '.', ''); $x4a = "<g:price><![CDATA[" . $x4a . " " . $x3f . "]]></g:price>"; break; case "{G:SALE_PRICE}" : $xd9 = $this->checkReference($xd8['reference'], $product); $x58 = $this->getStoreId(); $xf5 = Mage::getResourceModel('catalogrule/rule'); $xf6 = Mage::app()->getLocale()->storeTimeStamp($x58); $xf7 = Mage::app()->getStore($x58); $xf8 = $xf7->getWebsiteId(); $xf9 = Mage::getSingleton('customer/session')->getCustomerGroupId(); $xfa = $xf5->getRulePrice($xf6, $xf8, $xf9, $xd9->getId()); if ($xfa !== false) $xfb = sprintf('%.2f', round($xfa, 2)); $xfc = Mage::getSingleton('core/date')->getGmtOffset("hours"); if ($xfc > 0) { $xfd = "+"; $xfe = $x158(abs(floor($xfc)), 2, 0, STR_PAD_LEFT) . '' . $x158((abs($xfc) - floor(abs($xfc))) * 60, 2, 0, STR_PAD_LEFT); } else { $xfd = "-"; $xfe = $x158(abs(floor($xfc)), 2, 0, STR_PAD_LEFT) . '' . $x158((abs($xfc) - floor(abs($xfc))) * 60, 2, 0, STR_PAD_LEFT); } $xff = substr($x147(' ', 'T', $xd9->getSpecialFromDate()), 0, -3); $x100 = substr($x147(' ', 'T', $xd9->getSpecialToDate()), 0, -3); if ($xd9->type_id == 'bundle' && $xd9->special_price) { if ($xd9->price_type) { $x3e = $x14c($xd9->price * $xd9->special_price / 100, 2, ".", ""); } else { $x3e = $xd9->special_price; } } else { $x3e = $xd9->getSpecial_price(); } (!isset($xd8['options'][1])) ? $x43 = false : $x43 = $xd8['options'][1]; if ($xfb < $x3e && $xfa !== false) $x3e = $xfb; if ($x3e > 0) { if ($xd9->getTypeId() == "configurable") { if (isset($this->configurablePrices[$xd9->getId()][$product->getId()])) { $xf2 = 0; foreach ($this->configurablePrices[$xd9->getId()][$product->getId()] as $xf3) { if ($xf3["is_percent"]) { $xf2+=( $xf3["pricing_value"] / 100) * $x3e; } else $xf2+=$xf3["pricing_value"]; }; $x3e+=$xf2; } } $x3e = $this->x167($x3e, $x62, $xd9->getTaxClassId(), $x43); (!isset($xd8['options'][0])) ? $x3f = $x5c : $x3f = $xd8['options'][0]; $x3e = $this->x166($x3e, $x3f); $x3e = $x14c($x3e, 2, '.', ''); ;
} if ($x3e > 0) { $x4a = "<g:sale_price><![CDATA[" . $x3e . " " . $x3f . "]]></g:sale_price>
"; } if ($x3e > 0 && $x100) { $x4a.="<g:sale_price_effective_date><![CDATA[" . $xff . $xfd . $xfe . "/" . $x100 . $xfd . $xfe . "]]></g:sale_price_effective_date>
"; } break; case "{image}" : $xd9 = $this->checkReference($xd8['reference'], $product); $x101 = $xd9->getImage(); if (!isset($xd8['options'][0]) || $xd8['options'][0] == 0) { if ($xd9->getImage() && $xd9->getImage() != 'no_selection') { $x102 = 'catalog/product/' . $xd9->getImage(); $x4a = $x61 . $x147('//', '/', $x102); } else { $x4a = $x61 . '/catalog/product/placeholder/' . $x5b; } } elseif (isset($xa1[$xd9->getId()]['src'][$xd8['options'][0] - 1]) && $xd8['options'][0] > 0) { if ($xa1[$xd9->getId()]['src'][$xd8['options'][0] - 1] != $x101) { $x102 = 'catalog/product/' . $xa1[$xd9->getId()]['src'][$xd8['options'][0] - 1]; $x4a = $x61 . $x147('//', '/', $x102); } } break; case "{G:IMAGE_LINK}" : $xd9 = $this->checkReference($xd8['reference'], $product); $x101 = $xd9->getImage(); $x103 = array($xd9->getSmall_image(), $xd9->getThumbnail()); $x104 = ''; $xeb = 0; if ($xd9->getImage() && $xd9->getImage() != 'no_selection') { $x102 = 'catalog/product/' . $xd9->getImage(); $x4a = $x61 . $x147('//', '/', $x102); $x104.="<g:image_link><![CDATA[" . $x4a . "]]></g:image_link>
"; $xeb++; } $xe4 = 0; while (isset($xa1[$xd9->getId()]['src'][$xe4]) && $xeb < 10) { if ($xa1[$xd9->getId()]['src'][$xe4] != $x101) { if ($x156($xa1[$xd9->getId()]['src'][$xe4], $x103) || $xa1[$xd9->getId()]['disabled'][$xe4] != 1) { $x102 = 'catalog/product/' . $xa1[$xd9->getId()]['src'][$xe4]; $x4a = $x61 . $x147('//', '/', $x102); $x104.="<g:additional_image_link><![CDATA[" . $x4a . "]]></g:additional_image_link>
"; $xeb++; } } $xe4++; } $x4a = $x104; break; case "{G:LINK}" : $xd9 = $this->checkReference($xd8['reference'], $product); if ($xd9->getRequest_path()) { if (Mage::getStoreConfig("simplegoogleshopping/system/urlrewrite") == 2) { $x105 = explode(",", $xd9->getRequest_path()); usort($x105, array('Wyomind_Simplegoogleshopping_Model_Simplegoogleshopping', 'x161')); $x4a = $x60 . $x157($x105); } elseif (Mage::getStoreConfig("simplegoogleshopping/system/urlrewrite") == 3) { $x105 = explode(",", $xd9->getRequest_path()); usort($x105, array('Wyomind_Simplegoogleshopping_Model_Simplegoogleshopping', 'x161')); $x4a = $x60 . $x159($x105); } else $x4a = $x60 . $xd9->getRequest_path(); } else { $x4a = $xd9->getProductUrl(); } $x4a = "<link><![CDATA[" . $x4a . "]]></link>"; break; case "{url}" : $xd9 = $this->checkReference($xd8['reference'], $product); if ($xd9->getRequest_path()) { if (Mage::getStoreConfig("simplegoogleshopping/system/urlrewrite") == 2) { $x105 = explode(",", $xd9->getRequest_path()); usort($x105, array('Wyomind_Simplegoogleshopping_Model_Simplegoogleshopping', 'x161')); $x4a = $x60 . $x157($x105); } elseif (Mage::getStoreConfig("simplegoogleshopping/system/urlrewrite") == 3) { $x105 = explode(",", $xd9->getRequest_path()); usort($x105, array('Wyomind_Simplegoogleshopping_Model_Simplegoogleshopping', 'x161')); $x4a = $x60 . $x159($x105); } else $x4a = $x60 . $xd9->getRequest_path(); } else { $x4a = $xd9->getProductUrl(); } break; case "{host}" : $x4a = $x60; break; case "{uri}" : $xd9 = $this->checkReference($xd8['reference'], $product); if ($xd9->getRequest_path()) { if (Mage::getStoreConfig("simplegoogleshopping/system/urlrewrite") == 2) { $x105 = explode(",", $xd9->getRequest_path()); usort($x105, array('Wyomind_Simplegoogleshopping_Model_Simplegoogleshopping', 'x161')); $x4a = $x157($x105); } elseif (Mage::getStoreConfig("simplegoogleshopping/system/urlrewrite") == 3) { $x105 = explode(",", $xd9->getRequest_path()); usort($x105, array('Wyomind_Simplegoogleshopping_Model_Simplegoogleshopping', 'x161')); $x4a = $x159($x105); } else $x4a = $xd9->getRequest_path(); } else { $x4a = $x147($x60, '', $xd9->getProductUrl()); } break; case '{G:AVAILABILITY}' : $xd9 = $this->checkReference($xd8['reference'], $product); (!isset($xd8['options'][0])) ? $x106 = 'in stock' : $x106 = $xd8['options'][0]; (!isset($xd8['options'][1])) ? $x107 = "out of stock" : $x107 = $xd8['options'][1]; (!isset($xd8['options'][2])) ? $x108 = "preorder" : $x108 = $xd8['options'][2]; if (($xd9->getManageStock() && !$xd9->getUseConfigManageStock() && !$x5d) || ($xd9->getUseConfigManageStock() && $x5d ) || ($xd9->getManageStock() && !$xd9->getUseConfigManageStock())) { if ($xd9->getIsInStock() > 0) { if ($product->type_id == "configurable") $x109 = $xb0[$product->getId()]; else $x109 = $xd9->getQty(); if ($x109 > 0) { $x4a = $x106; } else { if ($xd9->getBackorders() || ($xd9->getUseConfigBackorders() && $x5e)) { $x4a = $x108; } else { $x4a = $x107; } } } else $x4a = $x107; } else { $x4a = $x106; } $x4a = "<g:availability><![CDATA[" . $x4a . "]]></g:availability>"; break; case '{is_in_stock}' : $xd9 = $this->checkReference($xd8['reference'], $product); (!isset($xd8['options'][0])) ? $x106 = 'in stock' : $x106 = $xd8['options'][0]; (!isset($xd8['options'][1])) ? $x107 = "out of stock" : $x107 = $xd8['options'][1]; (!isset($xd8['options'][2])) ? $x108 = "preorder" : $x108 = $xd8['options'][2]; if (($xd9->getManageStock() && !$xd9->getUseConfigManageStock() && !$x5d) || ($xd9->getUseConfigManageStock() && $x5d ) || ($xd9->getManageStock() && !$xd9->getUseConfigManageStock())) { if ($xd9->getIsInStock() > 0) { if ($product->type_id == "configurable") $x109 = $xb0[$product->getId()]; else $x109 = $xd9->getQty(); if ($x109 > 0) { $x4a = $x106; } else { if ($xd9->getBackorders() || ($xd9->getUseConfigBackorders() && $x5e)) { $x4a = $x108; } else { $x4a = $x107; } } } else $x4a = $x107; } else { $x4a = $x106; } break; case '{stock_status}' : $xd9 = $this->checkReference($xd8['reference'], $product); ($xd9->getIs_in_stock() > 0) ? $x4a = 'in stock' : $x4a = 'out of stock'; break; case '{qty}' : $xd9 = $this->checkReference($xd8['reference'], $product); (!isset($xd8['options'][0])) ? $x10a = 0 : $x10a = $xd8['options'][0]; if ($product->type_id == "configurable") { $x4a = $xb0[$product->getId()]; $x4a = $x14c($x4a, $x10a, '.', ''); } else if ($xd8['reference'] == "configurable") { $x4a = $x14c($xb0[$xd9->getId()], $x10a, '.', ''); } else { $x4a = $x14c($xd9->getQty(), $x10a, '.', ''); } break; case "{categories_v1}" : $xd9 = $this->checkReference($xd8['reference'], $product); (!isset($xd8['options'][0]) || !$xd8['options'][0] || $xd8['options'][0] == 'INF') ? $x10b = INF : $x10b = $xd8['options'][0]; (!isset($xd8['options'][1])) ? $x10c = 1 : $x10c = $xd8['options'][1]; (!isset($xd8['options'][2]) || !$xd8['options'][2] || $xd8['options'][2] == 'INF') ? $x10d = INF : $x10d = $xd8['options'][2];
$x10e = 0; $x4a = ''; $x10f = ''; foreach (explode(',', $xd9->getCategoriesIds()) as $x37 => $x7c) { ($x6a) ? $x110 = $x156($x7b[$x7c]["path"], $x6c) : $x110 = !$x156($x7b[$x7c]["path"], $x6c); if (isset($x7b[$x7c]) && $x10e < $x10b && ($x110 || $x6c[0] == "*")) { $x111 = 0; $x112 = explode('/', $x7b[$x7c]["path"]); if ($x156($x63, $x112)) { $x113 = ""; if ($x10e > 0) $x10f = ","; foreach ($x112 as $x114) { if (isset($x7b[$x114])) { if ($x7b[$x114]['level'] > $x10c && $x111 < $x10d) { if ($x111 > 0) $x113.='>'; $x113.=($x7b[$x114]['name']); $x111++; } } } $x115 = ""; if (!empty($x113)) { $x4a.=$x10f . $x113 . $x115; $x10e++; } } } }; break; case "{categories}" : $x116 = null; $x10b = INF; $x10c = 1; $x117 = INF; $x118 = ', '; $x119 = " > "; if (count($xd8['options']) == 1) { (!isset($xd8['options'][0])) ? $x116 = "last" : $x116 = $xd8['options'][0]; $x10b = 1; } elseif (count($xd8['options']) == 2) { (!isset($xd8['options'][0])) ? $x118 = ', ' : $x118 = $xd8['options'][0]; (!isset($xd8['options'][1])) ? $x119 = " > " : $x119 = $xd8['options'][1]; } elseif (count($xd8['options']) > 2) { (!isset($xd8['options'][0]) || !$xd8['options'][0] || $xd8['options'][0] == 'INF') ? $x10b = INF : $x10b = $xd8['options'][0]; (!isset($xd8['options'][1])) ? $x10c = 1 : $x10c = $xd8['options'][1]; (!isset($xd8['options'][2]) || !$xd8['options'][2] || $xd8['options'][2] == 'INF') ? $x117 = INF : $x117 = $xd8['options'][2]; (!isset($xd8['options'][3])) ? $x118 = ', ' : $x118 = $xd8['options'][3]; (!isset($xd8['options'][4])) ? $x119 = " > " : $x119 = $xd8['options'][4]; } $xd9 = $this->checkReference($xd8['reference'], $product); $x102 = 0; $x11a = array(); foreach (explode(',', $xd9->getCategoriesIds()) as $x37 => $x7c) { ($x6a) ? $x110 = $x156(@$x7b[$x7c]["path"], $x6c) : $x110 = !$x156(@$x7b[$x7c]["path"], $x6c); if (isset($x7b[$x7c]) && ($x110 || $x6c[0] == "*")) { $x102++; $x11a[$x102] = array(); $x112 = explode('/', $x7b[$x7c]["path"]); if ($x156($x63, $x112)) { foreach ($x112 as $x114) { if (isset($x7b[$x114]) && $x7b[$x114]['name'] != null) { $x11a[$x102][] = ($x7b[$x114]['name']); } } } } } $x11b = array(); usort($x11a, array('Wyomind_Simplegoogleshopping_Model_Simplegoogleshopping', 'x161Array')); if ($x116 == "last") $x11a = $x15a($x11a); $xd9->setCategoriesArray($x11a); $x11c = 0; foreach ($x11a as $x37 => $x111) { if ($x11c < $x10b) { foreach ($x111 as $x11d => $x11e) { if ($x11d >= $x10c && $x11d <= $x117) { if (!isset($x11b[$x11c])) $x11b[$x11c] = array(); $x11b[$x11c][] .= $x11e; } } if (count($x11b[$x11c])) $x11c++; } }; $x4a = null; foreach ($x15b($x11b) as $x37 => $x11f) { if ($x37 > 0) $x4a.=$x118; $x4a.=implode($x119, $x11f); } break; case "{G:PRODUCT_TYPE_v1}" : $xd9 = $this->checkReference($xd8['reference'], $product); (!isset($xd8['options'][0]) || !$xd8['options'][0] || $xd8['options'][0] == 'INF') ? $x10b = INF : $x10b = $xd8['options'][0]; (!isset($xd8['options'][1])) ? $x10c = 1 : $x10c = $xd8['options'][1]; (!isset($xd8['options'][2]) || !$xd8['options'][2] || $xd8['options'][2] == 'INF') ? $x10d = INF : $x10d = $xd8['options'][2]; $x10e = 0; $x4a = ''; foreach (explode(',', $xd9->getCategoriesIds()) as $x37 => $x7c) { ($x6a) ? $x110 = $x156($x7b[$x7c]["path"], $x6c) : $x110 = !$x156($x7b[$x7c]["path"], $x6c); if (@$x7b[$x7c]["include_in_menu"] && isset($x7b[$x7c]) && $x10e < $x10b && ($x110 || $x6c[0] == "*")) { $x111 = 0; $x112 = explode('/', $x7b[$x7c]["path"]); if ($x156($x63, $x112)) { $x113 = ''; $x10f = '<g:product_type><![CDATA['; foreach ($x112 as $x114) { if (isset($x7b[$x114])) { if ($x7b[$x114]['level'] > $x10c && $x111 < $x10d) { if ($x111 > 0) $x113.=' > '; $x113.=($x7b[$x114]['name']); $x111++; } } } $x115 = "]]></g:product_type>
"; if (!empty($x113)) { $x4a.=$x10f . $x113 . $x115; $x10e++; } } } }; break; case "{G:PRODUCT_TYPE}" : $x118 = "]]></g:product_type>
<g:product_type><![CDATA["; $x119 = " > "; (!isset($xd8['options'][0]) || !$xd8['options'][0] || $xd8['options'][0] == 'INF') ? $x10b = INF : $x10b = $xd8['options'][0]; (!isset($xd8['options'][1])) ? $x10c = 1 : $x10c = $xd8['options'][1]; (!isset($xd8['options'][2]) || !$xd8['options'][2] || $xd8['options'][2] == 'INF') ? $x117 = INF : $x117 = $xd8['options'][2]; $xd9 = $this->checkReference($xd8['reference'], $product); $x102 = 0; $x11a = array(); foreach (explode(',', $xd9->getCategoriesIds()) as $x37 => $x7c) { ($x6a) ? $x110 = $x156(@$x7b[$x7c]["path"], $x6c) : $x110 = !$x156(@$x7b[$x7c]["path"], $x6c); if (isset($x7b[$x7c]) && ($x110 || $x6c[0] == "*")) { $x102++; $x11a[$x102] = array(); $x112 = explode('/', $x7b[$x7c]["path"]); if ($x156($x63, $x112)) { foreach ($x112 as $x114) { if (isset($x7b[$x114]) && $x7b[$x114]['name'] != null) { $x11a[$x102][] = ($x7b[$x114]['name']); } } } } } $x11b = array(); usort($x11a, array('Wyomind_Simplegoogleshopping_Model_Simplegoogleshopping', 'x161Array')); foreach ($x11a as $x37 => $x111) { if ($x37 < $x10b) foreach ($x111 as $x11d => $x11e) { if ($x11d > $x10c && $x11d <= $x117) { if (!isset($x11b[$x37])) $x11b[$x37] = array(); $x11b[$x37][] .= $x11e; } } }; $x4a = null; foreach ($x15b($x11b) as $x37 => $x11f) { if ($x37 > 0) $x4a.=$x118; $x4a.=implode($x119, $x11f); } if (($x11b)) $x4a = "<g:product_type><![CDATA[" . $x4a . "]]></g:product_type>
"; break; case "{G:GOOGLE_PRODUCT_CATEGORY}" : $x120 = array(); (!isset($xd8['options'][0])) ? $x116 = "longest" : $x116 = $xd8['options'][0]; $xd9 = $this->checkReference($xd8['reference'], $product); foreach (explode(',', $xd9->getCategoriesIds()) as $x37 => $x7c) { if (isset($x7b[$x7c]["path"]) && isset($x6d[$x7b[$x7c]["path"]])) { $x120[] = $x6d[$x7b[$x7c]["path"]]; } } usort($x120, array('Wyomind_Simplegoogleshopping_Model_Simplegoogleshopping', 'x161')); if ($x116 == "shortest") $x120 = $x15a($x120);
$x121 = $x159($x120); if ($x121 != "") $x4a = "<g:google_product_category><![CDATA[" . $x121 . "]]></g:google_product_category>
"; break; case "{category_mapping}" : (isset($xd8["options"][0])) ? $x122 = $xd8["options"][0] : $x122 = 0; $x4a = ""; $xd9 = $this->checkReference($xd8['reference'], $product); $x123 = 0; foreach (explode(',', $xd9->getCategoriesIds()) as $x37 => $x7c) { if (isset($x6d[$x7b[$x7c]["path"]])) { if ($x123 == $x122) { $x4a.=$x6d[$x7b[$x7c]["path"]]; break; } $x123++; } } break; case "{review_count}": $xd9 = $this->checkReference($xd8['reference'], $product); $x4a = ""; (isset($xd8["options"][0]) && $xd8["options"][0] == "*" ) ? $x124 = 0 : $x124 = $x58; if (isset($x9b[$xd9->getId()][$x124]["count"])) { $x125 = $x9b[$xd9->getId()][$x124]["count"]; if (isset($x125)) { $x4a.=$x125; } } break; case "{review_average}": $xd9 = $this->checkReference($xd8['reference'], $product); $x4a = ""; (isset($xd8["options"][0]) && $xd8["options"][0] == "*" ) ? $x124 = 0 : $x124 = $x58; (!isset($xd8["options"][1]) || !$xd8["options"][1]) ? $x126 = 5 : $x126 = $xd8["options"][1]; if (isset($x9b[$xd9->getId()][$x124]["score"])) { $x127 = $x14c($x9b[$xd9->getId()][$x124]["score"] * $x126 / 100, 2, ".", ""); if (isset($x127)) { $x4a.=$x127; } } break; case "{G:PRODUCT_REVIEW}" : $xd9 = $this->checkReference($xd8['reference'], $product); (isset($xd8["options"][0]) && $xd8["options"][0] == "*" ) ? $x124 = 0 : $x124 = $x58; (!isset($xd8["options"][1]) || !$xd8["options"][1]) ? $x126 = 5 : $x126 = $xd8["options"][1]; $x4a = ""; if (isset($x9b[$xd9->getId()][$x124]["count"])) { $x125 = $x9b[$xd9->getId()][$x124]["count"]; $x127 = $x14c($x9b[$xd9->getId()][$x124]["score"] * $x126 / 100, 2, ".", ""); } if (isset($x127) && $x127 > 0) { $x4a.="<g:product_review_average><![CDATA[" . $x127 . "]]></g:product_review_average>
"; } if (isset($x125) && $x125 > 0) { $x4a.="<g:product_review_count><![CDATA[" . $x125 . "]]></g:product_review_count>
"; } unset($x127); unset($x125); break; case "{G:ITEM_GROUP_ID}" : if (isset($this->configurable[$product->getId()])) { $xd9 = $this->checkReference('configurable', $product); $x4a = "<g:item_group_id><![CDATA[" . $xd9->getSku() . "]]></g:item_group_id>"; } break; case "{SC:EAN}" : ($x14d($xd8['options'][0]) && $xd8['options'][0] > 0) ? $x128 = $xd8['options'][0] : $x128 = 0; $xd9 = $this->checkReference($xd8['reference'], $product); $x4a = explode(',', $xd9->getEan()); $x4a = "<g:ean><![CDATA[" . $x4a[$x128] . "]]></g:ean>"; break; case "{SC:IMAGES}" : $xd9 = $this->checkReference($xd8['reference'], $product); $x101 = $xd9->getSmall_image(); $x103 = array($xd9->getImage(), $xd9->getThumbnail()); $x104 = ''; $xeb = 0; if ($xd9->getSmall_image() && $xd9->getSmall_image() != 'no_selection') { $x102 = $xd9->getSmall_image(); $x4a = $x102; $x104.="<g:image_link><![CDATA[" . $x4a . "]]></g:image_link>
"; $xeb++; } $xe4 = 0; while (isset($xa1[$xd9->getId()]['src'][$xe4]) && $xeb < 10) { if ($xa1[$xd9->getId()]['src'][$xe4] != $x101) { if ($x156($xa1[$xd9->getId()]['src'][$xe4], $x103) || $xa1[$xd9->getId()]['disabled'][$xe4] != 1) { $x102 = $xa1[$xd9->getId()]['src'][$xe4]; $x4a = $x102; $x104.="<g:additional_image_link><![CDATA[" . $x4a . "]]></g:additional_image_link>
"; $xeb++; } } $xe4++; } $x4a = $x104; break; case "{SC:DESCRIPTION}" : $xd9 = $this->checkReference($xd8['reference'], $product); $x51 = $xd9->getDescription() . $xd9->getShortDescription(); $x129 = "|<iframe(.*)</iframe>|U"; $x14a($x129, $x51, $x12a); if ($x12a) { $x51 = $xd9->getAttributeText('manufacturer') . " " . $xd9->getName() . " - Part number: " . $xd9->getSku() . " - Category : {categories,[1],[1],[1]}"; } else { if ($x156("strip_tags", $xd8['options'])) { $x51 = $x15c('!\<br /\>!isU', " ", $x51); $x51 = $x15c('!\<br/\>!isU', " ", $x51); $x51 = $x15c('!\<br>!isU', " ", $x51); $x51 = $x15d($x51); } if ($x156("html_entity_decode", $xd8['options'])) { $x51 = $x15e($x51, ENT_QUOTES, 'UTF-8'); } if ($x156("htmlentities", $xd8['options'])) { $x51 = htmlspecialchars(($x51)); } if (strlen($x51) > 900) { $x51 = substr($x51, 0, 900 - 3); $xdb = strrpos($x51, " "); $x51 = substr($x51, 0, $xdb) . '...'; } } if ($x51 == null) $x51 = $xd9->getAttributeText('manufacturer') . " " . $xd9->getName() . " - Part number: " . $xd9->getSku() . " - Category : {categories,[1],[1],[1]}"; $x51 = $x15c('/' . '[-]' . '|[-][-]+' . '|([]|[-])[-]*' . '|[-]((?![-])|[-]{2,})' . '|[-](([-](?![-]))|' . '(?![-]{2})|[-]{3,})' . '/S', ' ', $x51); $x51 = $x147('', '', $x51); $x4a = "<description><![CDATA[" . $x51 . "]]></description>"; break; case "{SC:URL}" : (isset($xd8['options'][0])) ? $x12b = $xd8['options'][0] : $x12b = ""; (isset($xd8['options'][1])) ? $x12c = $xd8['options'][1] : $x12c = ""; $xd9 = $this->checkReference($xd8['reference'], $product); if ($xd9->getRequest_path()) { $x4a = "<link><![CDATA[" . $x60 . $x12c . $xd9->getRequest_path() . $x12b . "]]></link>"; } else { $x4a = "<link><![CDATA[" . $xd9->getProductUrl() . "]]></link>"; } break; case "{SC:CONDITION}" : $xd9 = $this->checkReference($xd8['reference'], $product); (stristr($xd9->getName(), "refurbished")) ? $xc7 = 'refurbished' : $xc7 = 'new'; $x4a = "<g:condition><![CDATA[" . $xc7 . "]]></g:condition>"; break; case "{sc:condition}" : $xd9 = $this->checkReference($xd8['reference'], $product); (stristr($xd9->getName(), "refurbished")) ? $xc7 = 'refurbished' : $xc7 = 'new'; $x4a = $xc7; break; default : $xd9 = $this->checkReference($xd8['reference'], $product); if ($x156($xd8['name'], $x86)) { if ($x156($x87[$xd8['name']], array('select', 'multiselect'))) { eval('$x12e =($xd9->' . $xd8['methodName'] . ");"); $x12d = explode(',', $x12e); if (count($x12d) > 1) { $x4a = array(); foreach ($x12d as $xcd) { if (isset($x8c[$xcd][$x58])) $x4a[] = $x8c[$xcd][$x58]; else { if (isset($x8c[$xcd][0])) $x4a[] = $x8c[$xcd][0]; } } } else { if (isset($x8c[$x12d[0]][$x58])) { $x4a = $x8c[$x12d[0]][$x58];
} else { if (isset($x8c[$x12d[0]][0])) $x4a = $x8c[$x12d[0]][0]; } } } else { eval('$x4a =($xd9->' . $xd8['methodName'] . ");"); } } if ($x156(@$x84[$xd8['name']], $x84)) { $x4a = $x84[$xd8['name']]; } $x4a = $x15c('/' . '[-]' . '|[-][-]+' . '|([]|[-])[-]*' . '|[-]((?![-])|[-]{2,})' . '|[-](([-](?![-]))|' . '(?![-]{2})|[-]{3,})' . '/S', ' ', $x4a); $x4a = $x147('', '', $x4a); $x12f = 0; if (count($xd8['options']) > 0) { while (isset($xd8['options'][$x12f])) { switch ($xd8['options'][$x12f]) { case "substr" : if (isset($xd8['options'][$x12f + 1]) && strlen($x4a) > $xd8['options'][$x12f + 1]) { $x4a = substr($x4a, 0, $xd8['options'][$x12f + 1] - 3); $xdb = strrpos($x4a, " "); $x4a = substr($x4a, 0, $xdb) . $xd8['options'][$x12f + 2]; } $x12f++; $x12f++; break; case "htmlentities" : $x4a = htmlspecialchars(($x4a)); break; case "strip_tags" : $x130 = " "; $x4a = $x15c('!\<br /\>!isU', $x130, $x4a); $x4a = $x15c('!\<br/\>!isU', $x130, $x4a); $x4a = $x15c('!\<br>!isU', $x130, $x4a); $x4a = $x15d($x4a); break; case "implode" : $x4a = ($x152($x4a)) ? implode($xd8['options'][$x12f + 1], $x4a) : $x4a; $x12f++; break; case "float" : $x4a = $x14c($x4a, $xd8['options'][$x12f + 1], '.', ''); $x12f++; break; case "html_entity_decode" : $x4a = $x15e($x4a, ENT_QUOTES, 'UTF-8'); break; case "inline": $x4a = $x15c('/(
|
|
|
| )/s', '', $x4a); break; case "strtolower": $x4a = $x15f($x4a, "UTF8"); break; case "strtoupper": $x4a = $x160($x4a, "UTF8"); break; case "cleaner": $x4a = $x15c('/' . '[-]' . '|[-][-]+' . '|([]|[-])[-]*' . '|[-]((?![-])|[-]{2,})' . '|[-](([-](?![-]))|' . '(?![-]{2})|[-]{3,})' . '/S', ' ', $x4a); $x4a = $x147('', '', $x4a); break; default : if (stristr($xd8['options'][$x12f], "%s")) { $xec = $x147("%s", '$x4a', $xd8['options'][$x12f]); eval('$x4a=' . $xec . '; '); } else eval('$x4a=' . $xd8['options'][$x12f] . '($x4a); '); break; } $x12f++; } } break; } $x4a = $x147(array("<", ">", '"', '\'), array("__LOWERTHAN__", "__HIGHERTHAN__", "__QUOTES__", "__BACKSLASH__"), $x4a); if ($x152($x4a)) $x4a = implode(",", $x4a); if ($x4a != "") $x48 = $x147($xd8['fullpattern'], $x4a, $x48); } foreach ($x76 as $x131) { $x48 = $x147($x131['fullpattern'], "", $x48); } $x48 = $this->x163($x48, $product); $x48 = $this->x169($x48); $x48 = $this->x168($x48); $x48 = $x147(array("__LOWERTHAN__", "__HIGHERTHAN__", "__QUOTES__", "__BACKSLASH__"), array("<", ">", '"', '\'), $x48); if (!empty($x48)) { $x73.=("<item>" ); $x73.="
" . $x48 . "
"; $x73.=("</item>" . "
"); $xc3++; $this->_inc = $xd4; $xd4++; } $x132 = array(); try { $xd9 = new SimpleXMLElement("<item>" . $x147(array("<g:", "</g:"), array("<g_", "</g_"), $x48) . "</item>"); } catch (Exception $x133) { $this->x16a($x4f, $x53, "FAILLED;0"); Mage::throwException($x133->getMessage() . " " . Mage::helper('simplegoogleshopping')->__("Please check the template syntax.")); } $x134 = array(); foreach ($requirements as $x135) { if ($x152($x135['depends'])) { $x136 = false; foreach ($x135['depends'] as $x137 => $xc7) { foreach ($xc7 as $x138 => $x4a) { $x139 = $this->x16b($requirements, $x137); switch ($x138) { case "eq": if ($xd9->$x139['tag'] == $x4a) { $x136 = true; } else $x136 = false; break; case "neq": if ($xd9->$x139['tag'] != $x4a) { $x136 = true; } else $x136 = false; break; case "like": if (stristr($xd9->$x139['tag'], $x4a)) { $x136 = true; } else $x136 = false; break; } } } } else { $x136 = true; } if ($x136 == true && !$x156($x135['label'], $x134)) { $x134[] = $x135['label']; if ($x135['required'] && (empty($xd9->$x135['tag']))) { $this->x16c($x135['label'], 'required', $xd9->{"g_id"}); } elseif ($x135['recommended'] && (empty($xd9->$x135['tag']))) { $this->x16c($x135['label'], 'recommended', $xd9->{"g_id"}, null); } elseif ((int) $x135['occurrence'] < (count($xd9->$x135['tag']))) { $this->x16c($x135['label'], 'toomany', $xd9->{"id"}); } else { if (isset($x135['length']) && strlen($xd9->$x135['tag']) > $x135['length']) { $this->x16c($x135['label'], 'toolong', $xd9->{"g_id"}, $x135['length']); } if (isset($x135['type']) && $x135['type'] == "RegExp" && !empty($xd9->$x135['tag']) && !$x14a("/^" . $x135['regexp'] . "$/i", $xd9->$x135['tag'])) { $this->x16c($x135['label'], 'invalid', $xd9->{"g_id"}, $x135['say']); } elseif (isset($x135['type']) && ($x135['type'] == "GoogleProductCategory" || $x135['type'] == "Text")) { } elseif (isset($x135['type']) && !empty($xd9->$x135['tag']) && $x135['type'] != "RegExp") { switch ($x135['type']) { case "Boolean": $x13a = "/^true|false$/i"; break; case "Alphanumeric": $x13a = "/^[\wc73\-]+$/"; break; break; case "Url": $x13a = "/^http(s)?:\/\/.+$/"; break; case "Price": $x13a = '/^([0-9]+\.[0-9]{2})\s?[A-Z]{3}$/'; break; } if (!$x14a($x13a, $xd9->$x135['tag'], $x13b)) { $this->x16c($x135['label'], 'invalid', $xd9->{"g_id"}, $x135['type']); } elseif ($x135['type'] == "Price" && (float) $x13b[1] < 0.01) { $this->x16c($x135['label'], 'invalid', $xd9->{"g_id"}, $x135['type']); } } } } } if ($this->_display) { $x74.=$x73; $x73 = ''; } else { if ($xc3 % Mage::getStoreConfig("simplegoogleshopping/system/buffer") == 0) { $x3a->streamWrite($x73); unset($x73); $x73 = ''; Mage::log("
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>" . $xd4 . "/" . $this->_counter . " items added", null, $this->x165('.log')); $x13c = time(true);
$x13d = ((int) $x13c - (int) $xd5); $this->_time += $x13d; $this->x16a($x4f, $x53, "PROCESSING; $xd4; " . $this->_counter . ";" . $x13d); $xd5 = time(true); } } if ($this->_limit && $xd4 > $this->_limit) { break 2; } } } $x73.=('</channel>' . "
"); $x73.=('</rss>'); if (!$this->_display) { $x3a->streamWrite($x73); $this->x16a($x4f, $x53, "SUCCEED;0;0; 0"); } Mage::log("
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> " . ($xd4 - 1) . "/" . $this->_counter . " items added", null, $this->x165('.log')); unset($xab); $x74.=$x73; if ($this->_display && !$this->_debug) { return $x74; } elseif ($this->_debug) { echo "<br><br>------------ XML OUTPUT ----------------<br>"; $x51 = "<pre>" . htmlentities($x74) . "</pre>"; return $x51; } else { $x3a->streamClose(); $x3a->mv($this->x165(), $this->x165(false)); $x3a->rm($this->x165()); $this->setSimplegoogleshopping_time(Mage::getSingleton('core/date')->gmtDate('Y-m-d H:i:s')); $this->_errorReport['stats'] = array(( $xd4 - 1), $this->_time); $this->setSimplegoogleshopping_report(serialize($this->_errorReport)); $this->save(); Mage::log("
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> Temp file closed and moved to " . $this->x165(false), null, $this->x165('.log')); } Mage::app()->setCurrentStore(0); return $this; } public function x16b($requirements, $x137) { $x147="str_replace"; $x148="utf8_encode"; $x149="preg_match_all"; $x14a="preg_match"; $x14b="is_null"; $x14c="number_format"; $x14d="is_numeric"; $x14e="preg_split"; $x14f="utf8_decode"; $x150="is_string"; $x151="json_decode"; $x152="is_array"; $x153="array_push"; $x154="print_r"; $x155="version_compare"; $x156="in_array"; $x157="array_pop"; $x158="str_pad"; $x159="array_shift"; $x15a="array_reverse"; $x15b="array_values"; $x15c="preg_replace"; $x15d="strip_tags"; $x15e="html_entity_decode"; $x15f="mb_strtolower"; $x160="mb_strtoupper"; foreach ($requirements as $x9a) { if ($x9a["label"] == $x137) { return $x9a; } } } public function x16c($x13e, $x116, $x13f, $x140 = null) { $x147="str_replace"; $x148="utf8_encode"; $x149="preg_match_all"; $x14a="preg_match"; $x14b="is_null"; $x14c="number_format"; $x14d="is_numeric"; $x14e="preg_split"; $x14f="utf8_decode"; $x150="is_string"; $x151="json_decode"; $x152="is_array"; $x153="array_push"; $x154="print_r"; $x155="version_compare"; $x156="in_array"; $x157="array_pop"; $x158="str_pad"; $x159="array_shift"; $x15a="array_reverse"; $x15b="array_values"; $x15c="preg_replace"; $x15d="strip_tags"; $x15e="html_entity_decode"; $x15f="mb_strtolower"; $x160="mb_strtoupper"; $x141 = Mage::helper('simplegoogleshopping')->__("Missing required attribute"); $x142 = Mage::helper('simplegoogleshopping')->__("Missing recommended attribute"); $x143 = Mage::helper('simplegoogleshopping')->__("Too many attribute "); $x144 = Mage::helper('simplegoogleshopping')->__("Attribute value too long"); $x145 = Mage::helper('simplegoogleshopping')->__("Invalid attribute value"); if ($x116 == 'required') $x146 = $x141 . " : " . $x13e; if ($x116 == 'recommended') $x146 = $x142 . " : " . $x13e; if ($x116 == 'toomany') $x146 = $x143 . " : " . $x13e; if ($x116 == 'toolong') $x146 = $x144 . " : " . $x13e . " (" . $x140 . " " . Mage::helper("simplegoogleshopping")->__("symbols maximum") . ")"; if ($x116 == 'invalid') $x146 = $x145 . " : " . $x13e . " (" . $x140 . " " . Mage::helper("simplegoogleshopping")->__("expected") . ")"; $this->_flagErrorReport[$x116 . "_" . $x13e][] = (string) $x13f; if (count($this->_flagErrorReport[$x116 . "_" . $x13e]) > 1 && count($this->_flagErrorReport[$x116 . "_" . $x13e]) <= Mage::getStoreConfig("simplegoogleshopping/system/preview")) { $this->_errorReport[$x116][$x13e]["count"] ++; if ($x13f != "") $this->_errorReport[$x116][$x13e]["skus"].=', ' . (string) $x13f; } elseif (count($this->_flagErrorReport[$x116 . "_" . $x13e]) > Mage::getStoreConfig("simplegoogleshopping/system/preview")) { $this->_errorReport[$x116][$x13e]["count"] ++; } else { $this->_errorReport[$x116][$x13e] = array( "message" => $x146, "count" => 1, ); if ($x13f != "") $this->_errorReport[$x116][$x13e]["skus"].= (string) $x13f; } } } ;
Did this file decode correctly?
Original Code
<?php error_reporting(E_ERROR);
class Wyomind_Simplegoogleshopping_Model_Simplegoogleshopping extends Mage_Core_Model_Abstract { public $x30 = 0; public $x31 = 0; protected $_filePath; public $_limit = false; public $_display = false; public $_rates = false; public $_sqlSize = 1500; public $_errorReport = array(); public $_flagErrorReport = array(); public function x161($x32, $x33) { $x147="s\x74r\137r\145\160l\x61\x63e"; $x148="\165\x74f\70\x5fe\x6eco\x64\x65"; $x149="\x70re\147_\x6d\x61\164ch\137a\154l"; $x14a="pr\x65g_\x6d\141\164\143\x68"; $x14b="i\x73\137\156u\154l"; $x14c="n\165m\142\x65\x72\137\146o\x72mat"; $x14d="is\137\x6e\165\155\x65r\x69\143"; $x14e="\x70re\147\137s\x70\x6cit"; $x14f="\x75\x74f\70\x5f\144\145\x63o\144\x65"; $x150="\151\163_\x73\164\162in\147"; $x151="j\163o\156\x5f\144e\x63\157\x64e"; $x152="\151\163_\141r\162ay"; $x153="\x61\162\x72ay_\x70\x75\163h"; $x154="\x70ri\156\164\x5fr"; $x155="v\x65r\163\151\157n\x5f\x63\x6fmp\x61r\x65"; $x156="\151n_\141rra\x79"; $x157="\141rr\141\x79\137\160o\160"; $x158="s\164r\137\x70a\144"; $x159="\141\x72\162\x61\x79\x5f\x73hi\x66\x74"; $x15a="\141rra\171_rev\x65\162s\145"; $x15b="\141\162\162\x61\171\x5fv\x61\x6c\x75\x65\163"; $x15c="\x70\162\145\x67\137\162e\x70\154\141c\x65"; $x15d="\163t\x72\151\x70\x5f\x74a\147s"; $x15e="h\x74m\154\x5f\x65\156\164ity\x5f\x64\x65co\144\x65"; $x15f="\155\x62\137s\x74r\164\x6fl\157w\145\x72"; $x160="m\142\x5f\x73t\162t\x6f\x75pp\x65r"; if (strlen($x32) == strlen($x33)) { return 0; } return (strlen($x32) < strlen($x33)) ? 1 : -1; } public function x161Array($x32, $x33) { $x147="\x73t\162\137\x72\x65place"; $x148="\x75\x74\146\70_\x65\x6e\x63o\144\145"; $x149="\x70\x72eg\137\x6da\x74\x63\150\x5f\x61\x6cl"; $x14a="\160\x72e\147\x5f\155\141\164c\x68"; $x14b="\151s\x5f\156\165\154\x6c"; $x14c="num\142\x65r\137\146\x6frm\141\x74"; $x14d="\151\x73\137\x6eu\155e\x72\x69\143"; $x14e="\x70\162\145\x67\x5fsp\x6c\151t"; $x14f="\x75\x74\x66\70\x5f\144\145\143\157\x64\x65"; $x150="is\137\x73\x74\x72in\147"; $x151="j\163\157\156_decod\145"; $x152="i\x73\137a\162\x72\x61y"; $x153="a\162\x72\141\171\137p\165s\150"; $x154="\x70\x72\x69\156t_\162"; $x155="v\145\x72\163\151\157\x6e\137\x63\x6f\x6d\160\141\x72\x65"; $x156="i\x6e_\141\162\162a\171"; $x157="a\x72\162\x61\171\137\x70o\x70"; $x158="\163tr_\160\x61\144"; $x159="\141\x72ra\171_\x73\150ift"; $x15a="\141\x72ra\x79_\x72\145\x76e\162\x73e"; $x15b="a\x72ra\171_\166\x61\x6c\x75es"; $x15c="pr\145g_\x72\x65pla\x63e"; $x15d="\x73\164\x72i\x70\x5fta\147\163"; $x15e="h\x74\155\x6c\x5f\145\156\x74\151\164y_\x64\145\x63\x6f\144\x65"; $x15f="\x6db_\x73\x74r\x74\157\x6c\x6f\x77\145\162"; $x160="\x6db\x5f\163trto\x75\x70pe\x72"; $x147="s\x74r\137r\145\160l\x61\x63e"; $x148="\165\x74f\70\x5fe\x6eco\x64\x65"; $x149="\x70re\147_\x6d\x61\164ch\137a\154l"; $x14a="pr\x65g_\x6d\141\164\143\x68"; $x14b="i\x73\137\156u\154l"; $x14c="n\165m\142\x65\x72\137\146o\x72mat"; $x14d="is\137\x6e\165\155\x65r\x69\143"; $x14e="\x70re\147\137s\x70\x6cit"; $x14f="\x75\x74f\70\x5f\144\145\x63o\144\x65"; $x150="\151\163_\x73\164\162in\147"; $x151="j\163o\156\x5f\144e\x63\157\x64e"; $x152="\151\163_\141r\162ay"; $x153="\x61\162\x72ay_\x70\x75\163h"; $x154="\x70ri\156\164\x5fr"; $x155="v\x65r\163\151\157n\x5f\x63\x6fmp\x61r\x65"; $x156="\151n_\141rra\x79"; $x157="\141rr\141\x79\137\160o\160"; $x158="s\164r\137\x70a\144"; $x159="\141\x72\162\x61\x79\x5f\x73hi\x66\x74"; $x15a="\141rra\171_rev\x65\162s\145"; $x15b="\141\162\162\x61\171\x5fv\x61\x6c\x75\x65\163"; $x15c="\x70\162\145\x67\137\162e\x70\154\141c\x65"; $x15d="\163t\x72\151\x70\x5f\x74a\147s"; $x15e="h\x74m\154\x5f\x65\156\164ity\x5f\x64\x65co\144\x65"; $x15f="\155\x62\137s\x74r\164\x6fl\157w\145\x72"; $x160="m\142\x5f\x73t\162t\x6f\x75pp\x65r"; if (strlen(implode('', $x32)) == strlen(implode('', $x33))) { return 0; } return (strlen(implode('', $x32)) < strlen(implode('', $x33))) ? -1 : 1; } public function x163($myPattern, $product, $x34 = true) { $x147="\x73\x74\162_\x72\145\160l\141c\145"; $x148="u\x74\146\70_\145\x6e\143\157d\145"; $x149="\x70r\145g\137m\x61\164c\150_al\154"; $x14a="p\x72\x65\147_m\x61\164\x63\150"; $x14b="\x69\163\137n\x75\x6c\154"; $x14c="\x6eum\x62\145\162\137f\157rm\x61\164"; $x14d="\x69s\137\x6e\165\155\x65\162i\143"; $x14e="p\x72e\147\x5f\x73p\154\151\164"; $x14f="\165\164\x66\70\x5fd\x65\143od\145";
$x150="\x69\x73\137s\164r\x69n\147"; $x151="\x6a\x73\157\156\x5fd\145\x63\157\x64\145"; $x152="\x69\163\x5f\141\162\x72ay"; $x153="a\162\162\x61y\x5fp\165s\x68"; $x154="\x70\162\151\x6et_\x72"; $x155="v\145\162\x73\151\x6f\156_\x63o\155\x70\141\162\x65"; $x156="\x69n\x5f\x61r\x72\141y"; $x157="\141\162\162ay\x5fp\x6fp"; $x158="\163\164\x72_\160\141d"; $x159="\141\162\x72a\x79\137\x73\150\151\146\164"; $x15a="\141\162\x72\x61\x79\137\162\x65\166e\x72\163e"; $x15b="\141rr\x61\x79\137\x76al\x75e\x73"; $x15c="p\x72\145\x67\137\x72\145\x70\x6ca\x63e"; $x15d="\163\x74\x72\x69\160_ta\147s"; $x15e="\x68t\x6d\x6c_e\156t\x69\x74y\137\x64\145co\144\x65"; $x15f="\155b\x5fs\x74\162\x74\157\x6c\x6f\x77er"; $x160="\x6d\142_\163\164\162t\x6fup\x70\145\x72"; $myPattern = $x147('<?', $x148('__PHP__'), $myPattern); $myPattern = $x147('?>', $x148('/__PHP__'), $myPattern); $x35 = $x148('#(__PHP__)(.*?)/\1#s'); $x149($x35, $myPattern, $x36); if (isset($x36[1])) { foreach ($x36[0] as $x37 => $x38) { if ($x34 == 1) { if (@eval($x36[2][$x37] . '; ')) $myPattern = $x147($x38, eval($x36[2][$x37] . '; '), $myPattern); else $myPattern = $x147($x38, '', $myPattern); } else { if (@eval($this->unescapeStr($x36[2][$x37] . '; '))) $myPattern = $x147($x38, $this->escapeStr(eval($this->unescapeStr($x36[2][$x37]) . '; ')), $myPattern); else $myPattern = $x147($x38, '', $myPattern); } } } return $myPattern; } protected function x164($x39) { $x147="\163\x74r\x5f\162\145p\154\x61ce"; $x148="\165\x74f\70\137\145\156\x63\157\x64e"; $x149="\x70\162\145g_\155a\x74ch_all"; $x14a="\x70\x72\145g\137\155\141\x74\143\x68"; $x14b="\151s_n\165ll"; $x14c="\156\165\155\142\x65r\x5f\146\157\x72\x6d\141\x74"; $x14d="i\163\x5f\156\165meri\143"; $x14e="p\162\145g\x5f\x73\160l\151t"; $x14f="\x75\x74\x66\70\x5f\144\145\143\157\144e"; $x150="\151\163\137s\x74r\151\x6e\147"; $x151="\152s\157n\x5f\x64\x65\x63ode"; $x152="\151\x73\x5f\141\x72\162\x61y"; $x153="ar\162\141\171\x5f\x70\165sh"; $x154="p\162\x69\156t\x5fr"; $x155="\x76\x65rs\x69o\156\x5fc\x6f\155\160\x61\162\x65"; $x156="in_\x61rray"; $x157="\141\162\x72ay_p\157\x70"; $x158="s\164\x72_\160\141\x64"; $x159="\141\162ra\171\x5f\x73\150\x69f\164"; $x15a="\x61\162\x72a\x79_r\x65\166er\x73e"; $x15b="arr\141\x79\137v\141l\165\145\163"; $x15c="p\162eg\x5f\162epl\141\x63\145"; $x15d="\163\x74\x72\x69p\x5f\x74ag\x73"; $x15e="\150\x74m\x6c\137\145nti\164\171\137\144\145\x63\157\144e"; $x15f="\x6d\142\x5f\163\164\x72t\157\154\x6f\167\145\162"; $x160="m\142\x5fs\x74\162\164\x6f\165\x70\160\x65\162"; return $this->getCollection()->addFieldToFilter("\x73i\x6d\160\154\145\147\x6f\x6fgl\x65s\150op\160in\x67\137\146i\x6c\x65\x6eam\x65", array("e\x71" => $x39))->count(); } protected function _construct() { $x147="\x73\x74r\137r\x65\x70\x6c\141c\x65"; $x148="\165\164f\70\137e\x6ec\157de"; $x149="\x70\x72\145g\x5fm\x61tc\150\x5fa\154l"; $x14a="p\162eg\x5f\155\x61\164ch"; $x14b="i\163\x5fnu\x6c\154"; $x14c="\x6e\x75m\x62\145\162\x5f\146\157r\155\141\164"; $x14d="\x69\x73\x5f\x6eu\x6d\145\x72i\143"; $x14e="\x70re\x67\137s\160\x6c\x69t"; $x14f="u\x74\x66\70\137\144e\x63\x6f\144\145"; $x150="\151\163\137\163\164\162i\x6eg"; $x151="\152\163o\x6e\137d\145\143\157d\145"; $x152="\x69\163_\141\x72\x72\x61\x79"; $x153="\x61\162\162a\x79\x5f\x70ush"; $x154="p\162\151\156\x74\137r"; $x155="\x76\x65\x72sion\137\143\x6f\155p\141r\x65"; $x156="\x69\156_\x61r\x72a\171"; $x157="ar\x72\x61\x79\137p\x6fp"; $x158="s\164\162_\x70\x61\x64"; $x159="a\162r\141\x79\137\163\x68\x69\x66\x74"; $x15a="a\x72\x72\141\x79\x5f\162\145\166\x65\162\163e"; $x15b="\x61r\162\x61\x79\137\166a\x6c\x75\x65\x73"; $x15c="pr\145g\x5fr\145\160la\143\x65"; $x15d="\163\x74\162\151\160\x5f\164a\x67s"; $x15e="h\x74\155\x6c_\145\156\x74i\x74\x79\x5fd\x65c\157\144e"; $x15f="\155\x62\x5fs\x74\162\164\157\154o\167e\162"; $x160="\155b_st\162\x74\x6f\165\160\x70e\162"; $this->_sqlSize = Mage::getStoreConfig("\x73\151\155p\x6c\x65\x67\x6f\x6f\x67\x6c\x65sho\160\x70i\x6e\147\57\163\x79\163t\145\x6d\57\163qls\151\172e"); $this->_init('simplegoogleshopping/simplegoogleshopping'); } protected function _beforeSave() { $x147="\x73tr\137\162\145\160\154\x61c\x65"; $x148="\165\164f\70\x5fe\156c\x6f\144\145"; $x149="\x70\x72\x65\x67\137\155a\164\x63\x68_a\x6c\x6c"; $x14a="\160\162e\x67_\155\141\x74c\x68"; $x14b="\151s_\x6e\x75\x6cl"; $x14c="\x6e\165m\x62e\162\x5f\146\157\x72\x6d\141\164"; $x14d="\x69\x73_\x6e\x75\155e\162i\143"; $x14e="p\x72\145\147\137\163\160\x6c\151\x74"; $x14f="\x75tf\70\137d\145\x63\x6f\144e"; $x150="\151s_\x73tri\156\147"; $x151="\152\x73\x6fn_d\x65\x63\157\144\145"; $x152="\151s\137\141\162\x72a\171"; $x153="\x61\x72\x72a\x79\x5f\x70u\x73h"; $x154="\160\162\151nt\137\162"; $x155="\166er\x73\151\157\156\x5fc\x6f\155\x70a\x72\145";
$x156="\x69\156\x5f\x61\162\x72\x61\171"; $x157="\x61r\x72\141y_\x70\x6f\160"; $x158="st\162\x5f\x70\x61\144"; $x159="\x61\x72\x72\x61\x79\x5f\163\x68i\146\164"; $x15a="\141r\162\x61y\137\x72\145\x76\x65\162\163e"; $x15b="\141\162\x72\141y\137va\154\x75e\163"; $x15c="\x70\162e\x67_\x72\145\160l\141\143\145"; $x15d="st\162i\160_\164a\147s"; $x15e="\150\x74\155\x6c\x5f\x65\x6eti\164\171\137d\x65c\x6fde"; $x15f="m\142\x5f\163\x74r\164ol\x6f\167\x65\x72"; $x160="m\142\137\x73\164\162\164\157\x75\x70per"; $x3a = new Varien_Io_File(); $x3b = $x3a->getCleanPath(Mage::getBaseDir() . '/' . $this->getSimplegoogleshoppingPath()); if (!$x3a->fileExists($x3b, false)) { Mage::throwException(Mage::helper('simplegoogleshopping')->__('Please create the specified folder %s before saving the googleshopping.', Mage::helper('core')->htmlEscape($this->getSimplegoogleshoppingPath()))); } if (!$x3a->isWriteable($x3b)) { Mage::throwException(Mage::helper('simplegoogleshopping')->__('Please make sure that %s is writable by web-server.', $this->getSimplegoogleshoppingPath())); } if (!$x14a('#^[a-zA-Z0-9_\-\.]+$#', $this->x165())) { Mage::throwException(Mage::helper('simplegoogleshopping')->__('Please use only letters (a-z or A-Z), numbers (0-9) or underscore (_) in the filename. No spaces or other characters are allowed.')); } if (!$x14a('#\.xml$#', $this->getSimplegoogleshoppingFilename())) { $this->setSimplegoogleshoppingFilename($this->getSimplegoogleshoppingFilename() . '.xml'); } if (!$this->getSimplegoogleshoppingId() && $this->x164($this->x165())) { Mage::throwException(Mage::helper('simplegoogleshopping')->__('This data feed name is already used. Please specify a new one.')); } $this->setSimplegoogleshoppingPath(rtrim($x147($x147('\\', '/', Mage::getBaseDir()), '', $x3b), '/') . '/'); return parent::_beforeSave(); } protected function getPath() { $x147="\x73t\x72_\162\x65\x70l\141\143e"; $x148="\x75\x74\146\70\x5fen\143\157\x64\x65"; $x149="p\162\145\x67\x5fm\x61tc\x68_\141\x6cl"; $x14a="p\x72\x65g_\155\141\x74c\x68"; $x14b="\151s_n\x75\x6cl"; $x14c="nu\155\x62e\162\137\146\x6f\162\x6d\141t"; $x14d="\x69\163_\x6e\x75meri\143"; $x14e="p\x72\x65\147_\163\160l\151\164"; $x14f="\x75\164\x66\70\137\x64ec\157d\x65"; $x150="\x69\x73\137\x73\x74rin\147"; $x151="j\163\x6fn_de\x63\157\144e"; $x152="is\137\x61\162\162a\x79"; $x153="ar\x72\x61y_\x70us\x68"; $x154="p\x72i\x6e\164\137r"; $x155="\166\145\x72\x73io\x6e_\x63\x6f\x6d\160a\162\145"; $x156="\151n\137\141rr\x61\171"; $x157="a\x72r\141\x79\x5f\x70op"; $x158="\163\x74r\137pa\x64"; $x159="\x61\x72\162ay\x5f\x73\150if\x74"; $x15a="\141\162\162\x61\x79\137re\166er\163e"; $x15b="\x61\162\162\141\171\137va\154\165\145\163"; $x15c="\160r\x65\147_\x72e\x70\154a\143e"; $x15d="s\x74\162ip\x5f\164a\147\x73"; $x15e="\150\x74m\154_\x65n\164i\x74\171\x5f\144\x65\x63\157\144e"; $x15f="\155b_\x73t\162to\154\157we\162"; $x160="\x6d\x62\x5fs\x74\162\164o\165p\x70\145\x72"; if ($x14b($this->_filePath)) { $this->_filePath = $x147('//', '/', Mage::getBaseDir() . $this->getSimplegoogleshoppingPath()); } return $this->_filePath; } protected function x165($x3c = '.temp') { $x147="\x73tr_\162\145\160\154\141\143e"; $x148="\165\x74\x66\70_e\x6e\143\x6f\144\145"; $x149="p\162\x65\x67\x5f\155\x61\164c\x68_a\x6c\154"; $x14a="\160\162eg\x5f\x6dat\143h"; $x14b="i\x73\x5f\x6e\165\154l"; $x14c="\156\x75mb\145\x72_f\x6f\x72\155\x61\x74"; $x14d="i\163_n\165m\x65\x72i\143"; $x14e="\x70\162e\x67\137\x73p\x6c\151\x74"; $x14f="\x75\x74\146\70\x5fd\x65\143o\144\145"; $x150="\x69\163\x5fs\x74\162i\x6e\147"; $x151="js\157\x6e\137d\145cod\145"; $x152="is_\x61\x72r\141y"; $x153="a\x72\x72a\171\x5fpush"; $x154="\x70\x72\151nt\137\162"; $x155="v\x65\162\163io\156_\143\157\x6d\x70\x61re"; $x156="\x69\x6e_a\162\162\141\x79"; $x157="\x61r\x72\141y\x5fp\x6fp"; $x158="\x73t\162\x5f\160ad"; $x159="a\162r\x61\171\137\x73\150\151f\164"; $x15a="a\x72r\x61\171_\x72e\166\x65rs\x65"; $x15b="a\162\162ay\137val\165\x65\163"; $x15c="\x70\x72\x65g_\162e\x70\x6ca\143e"; $x15d="\x73\164\162\151\x70\x5f\164a\147\x73"; $x15e="h\164\155\154\137\x65n\164i\x74y_de\x63\157d\145"; $x15f="\x6d\142\x5f\163trtol\x6fw\145\x72"; $x160="\155b\137\x73\x74rto\165\x70\160\x65r"; $x3d = $this->getSimplegoogleshoppingFilename() . $x3c; return $x3d; } public function getPreparedFilename() { $x147="\x73\164\162\x5fre\160\x6c\x61\143e"; $x148="u\164\146\70\x5f\x65n\x63ode"; $x149="p\x72eg_\155\x61\x74ch\137\x61\154\154"; $x14a="p\x72\x65g\137\155\141\x74c\x68"; $x14b="\151\x73\x5f\156\x75l\154"; $x14c="\x6eu\x6d\x62e\162\x5f\x66\x6f\x72\155\141\164"; $x14d="\x69\x73_\156\x75\x6der\151c"; $x14e="pr\x65\x67\137\163p\x6c\151t"; $x14f="\x75\164\146\70_\144\145\x63\157\x64\145"; $x150="\x69\x73_str\x69\156\147"; $x151="j\163\157n_\144\145\x63\x6f\144\145"; $x152="\x69\163\x5f\141\162\162\x61y"; $x153="\x61\x72\x72\141\171_\x70\x75s\150"; $x154="p\x72\x69\156\164\x5f\162"; $x155="v\145\162\x73i\x6f\x6e\137\x63ompar\x65"; $x156="\x69n\137arr\x61\171"; $x157="\x61rr\141\171\x5f\160o\x70"; $x158="s\164\x72\137\160\141\x64"; $x159="a\x72r\141\x79\137s\x68\151\x66\x74"; $x15a="\141r\x72ay\x5fr\145ver\163e"; $x15b="\141r\x72\x61\171\137\x76\x61l\x75es"; $x15c="p\162\x65\147_\162e\160\154a\143e"; $x15d="\163t\162\151p_\164\141g\163"; $x15e="\150\164\x6dl\137\x65\x6e\164i\x74\x79\x5f\144e\143\157\x64\x65";
$x15f="\155b_s\164\x72\164\x6f\x6co\167e\162"; $x160="\x6d\x62_\x73tr\x74\x6fu\x70\x70er"; return $this->getPath() . $this->x165(); } public function x166($x3e, $x3f) { $x147="\x73\164\162\x5f\162ep\x6c\141\143\x65"; $x148="ut\x66\70_\145\x6e\x63o\144e"; $x149="p\x72\145\x67\137\x6d\141t\x63\x68_\141\154\x6c"; $x14a="p\x72\x65\x67_m\x61tc\150"; $x14b="\151\x73\137\156\x75\x6c\154"; $x14c="n\x75m\x62e\x72\137f\x6frma\164"; $x14d="\x69s_\x6eu\155\x65\x72\151c"; $x14e="\160r\x65\x67\137\x73\x70li\164"; $x14f="ut\146\70\x5f\144\x65\x63\x6f\x64\x65"; $x150="\151\x73_\x73\164\162i\156\147"; $x151="\x6a\x73\x6f\x6e\137\x64\145\143\157\144\145"; $x152="i\x73\137\141\x72ra\171"; $x153="ar\162\141\x79\137p\165s\150"; $x154="\x70\162\151\156\164\137r"; $x155="v\x65\x72\x73\151o\x6e\137\x63\157mp\141\162e"; $x156="\x69\x6e\137\x61\162\x72a\171"; $x157="\141r\x72\x61\x79\137po\160"; $x158="s\x74r\x5fpad"; $x159="a\162ray\x5fs\x68\x69\146\164"; $x15a="\141\162\x72\x61\x79\x5f\x72\x65\x76e\x72\x73\x65"; $x15b="\x61\x72r\x61\x79_\x76a\x6c\x75e\x73"; $x15c="\x70r\x65\x67\x5fre\160l\x61\143e"; $x15d="\x73t\x72i\x70\x5ft\x61\147s"; $x15e="\150\164\155l\137en\164it\x79\x5f\x64\x65c\x6f\144e"; $x15f="\x6d\x62_\x73\x74rt\x6f\x6co\x77er"; $x160="\155\142\x5f\x73t\x72t\x6fup\x70\x65\x72"; $x40 = $this->_currencies; if (isset($x40[$x3f])) return $x3e * $x40[$x3f]; else { return $x3e; } } public function x167($x3e, $x41, $x42, $x43 = false) { $x147="\163\x74\x72_r\x65p\154\141\x63\145"; $x148="\165\x74f\70\137\x65\156\x63od\x65"; $x149="\x70r\145\x67\x5f\x6da\164\143h_\141\x6cl"; $x14a="\160\x72e\x67_m\141\x74c\x68"; $x14b="\151\x73_n\x75ll"; $x14c="\x6eu\155\x62er\x5f\146\x6fr\x6dat"; $x14d="\x69\x73\x5fn\165m\145r\x69\143"; $x14e="\x70r\145\x67\137sp\154i\164"; $x14f="u\x74\146\70\137\x64ec\x6f\x64\145"; $x150="\x69\x73_\163\x74\x72\x69\156\x67"; $x151="\152s\157\x6e\137\144e\x63\157\x64\x65"; $x152="i\x73\x5f\141\162\162\141\x79"; $x153="\141\162r\141y\137pus\x68"; $x154="\160ri\156\x74\x5fr"; $x155="ve\x72\x73\x69\157n\x5f\143\157\155par\145"; $x156="\151\156\x5f\141\x72\x72\141y"; $x157="\141rr\x61\171_\x70\157\160"; $x158="\x73\164\162\x5fp\141\x64"; $x159="\141\x72r\141y\137s\x68i\x66\164"; $x15a="\x61\x72\x72ay_\162e\166\145\x72s\x65"; $x15b="\x61\x72\162\141\x79\x5f\166a\x6c\x75\x65\x73"; $x15c="p\x72\x65g\137re\160l\141\x63e"; $x15d="\x73\x74\x72\151\160_\164a\x67\x73"; $x15e="\x68\164\155l\137\145\x6e\164\151ty_\144\x65c\x6fde"; $x15f="m\x62_\x73\164r\164ol\x6f\167\x65\x72"; $x160="\155b\137\163\x74\x72\164ou\x70pe\162"; $x44 = $this->_rates; $x3e = $x14c($x3e, 2, '.', ''); if ($x43 === false) { if (!$x41 && isset($x44[$x42])) { if (count($x44[$x42]) > 1) { return $x3e; } else { return $x3e * ($x44[$x42][0]['rate'] / 100 + 1); } } else { return $x3e; } } elseif ($x43 === "\60") { if ($x41 && isset($x44[$x42])) { if (count($x44[$x42]) > 1) { return $x3e; } else { return 100 * $x3e / (100 + ($x44[$x42][0]['rate'])); } } else { return $x3e; } } else { if ($x14d($x43)) { if ($x42 != 0) { return $x3e * ($x43 / 100 + 1); } elseif ($x42 == 0) { return $x3e; } } else { $x43 = explode('/', $x43); $x45 = 0; $x46 = false; if (substr($x43[0], 0, 1) == "\55") { $x43[0] = substr($x43[0], 1); $x46 = true; } if ($x44[$x42]) { foreach ($x44[$x42] as $x47) { if ($x47['country'] == $x43[0]) { if (!isset($x43[1]) || $x47['code'] == $x43[1]) { $x45 = $x47['rate']; break; } } } if (!$x46) return $x3e * ($x45 / 100 + 1); else { return 100 * $x3e / (100 + ($x45)); } } else { return $x3e; } } } } public function x168($x48, $x49 = true) { $x147="\x73\164r_\162e\x70\x6ca\143\x65"; $x148="\165\x74\x66\70\137e\156c\157\x64\x65"; $x149="p\162\145\x67\137\x6d\x61\x74\x63h\x5f\141l\x6c"; $x14a="pr\x65\x67_\155\x61\x74c\x68"; $x14b="i\163\137\156\x75ll"; $x14c="n\165\x6dbe\162\x5f\x66\157\x72\155\x61t"; $x14d="\151\x73_\156\x75\155\x65\x72i\x63"; $x14e="\160\162e\x67\x5fspl\151\x74"; $x14f="\x75\164\x66\70_d\x65\143od\145"; $x150="i\x73_\163tri\x6e\x67"; $x151="\152\x73\157\x6e_\144\x65\143\157d\x65"; $x152="\151\x73_ar\162\x61\171"; $x153="\x61rra\x79\137\x70u\163\x68"; $x154="p\162i\x6et_\x72"; $x155="\166ersio\156\x5fc\x6f\x6d\x70\x61\162\145"; $x156="\x69\156\x5f\x61r\162\x61\171"; $x157="a\x72r\141\x79_\x70\x6f\x70"; $x158="\x73tr\x5fp\x61\144"; $x159="\141\x72\162a\171_\x73h\x69\146t"; $x15a="\x61r\x72\141\171\x5f\162e\166\x65\x72s\x65"; $x15b="\141\162ra\171_\x76\x61\x6c\165es"; $x15c="\160r\145g\x5f\162\x65\x70l\141\143e";
$x15d="\x73\164\162\x69p\x5f\x74\141g\x73"; $x15e="\x68\x74\x6d\x6c\x5f\145nt\x69\x74y_d\x65\x63o\x64e"; $x15f="\155b_\163\164\162t\x6f\154\x6fw\x65\x72"; $x160="m\142\137s\164rt\157up\160\145r"; $x35 = '/(<[^>^\/]+>)([^<]*)(<\/[^>]+>)/s'; $x149($x35, $x48, $x36); foreach ($x36[1] as $x37 => $x4a) { $x4b = trim($x36[2][$x37]); if (empty($x4b) && !$x14d($x4b)) $x48 = $x147($x36[0][$x37], '', $x48); else { if ($x49) $x48 = $x147($x36[0][$x37], ($x36[1][$x37]) . '<![CDATA[' . $x4b . ']]>' . ($x36[3][$x37]), $x48); else $x48 = $x147($x36[0][$x37], ($x36[1][$x37]) . $x4b . ($x36[3][$x37]), $x48); } } $x32 = $x14e("/\x0a/\163", $x48); $x4c = ''; foreach ($x32 as $x4d) { (strlen(trim($x4d)) > 0) ? $x4c.=$x4d . "\x0a" : false; } $x48 = $x4c; return $x48; } public function x169($x48) { $x147="\163tr\137r\x65\160lac\x65"; $x148="u\x74\146\70_en\x63\157\x64\145"; $x149="\160r\x65\x67\137\x6d\x61tc\x68\x5fall"; $x14a="\160\x72\x65\147\x5f\x6dat\x63\150"; $x14b="\151s\x5f\156\165\154\x6c"; $x14c="\x6e\165\x6d\142e\x72_\146\x6frmat"; $x14d="\151\163_nume\162i\x63"; $x14e="p\x72\x65\x67_s\160li\x74"; $x14f="\x75\164f\70\137\x64\145\143\x6f\x64\x65"; $x150="is_\163tr\151n\147"; $x151="\x6as\157\156_\144\x65\143\x6f\x64\145"; $x152="\x69\x73\x5fa\162\162\141\x79"; $x153="\141\162\162\x61\171\x5fp\x75s\150"; $x154="p\x72\151n\164\x5f\162"; $x155="\x76\145\x72\163\151o\156_c\157\155\x70a\162e"; $x156="\151n\x5farr\x61y"; $x157="\141\x72\x72\x61y_\x70\157p"; $x158="\163\164\x72\x5f\160ad"; $x159="\x61\162\x72\141\171\137\x73h\151\x66t"; $x15a="\141\x72\x72\x61\171\x5f\x72\145\x76\x65r\163e"; $x15b="\141r\x72\141\x79\x5f\x76\141\154\165\x65s"; $x15c="\x70\x72e\147\137rep\x6c\x61\x63\145"; $x15d="\163t\162\151p_\164\x61g\163"; $x15e="\150\x74\155l\137\x65\x6et\x69\x74y\x5f\144\145\x63\157\x64\x65"; $x15f="\155\142\137s\164\x72\x74\x6fl\157\x77\145\x72"; $x160="mb_\163\x74rt\x6fup\x70\x65\162"; if ($this->_display) return ($x48); else { if ($this->_chartset == 'ISO') return $x14f($x48); else { return ($x48); } } } public function checkReference($x4e, $product) { $x147="\163\x74r\137\162\145\x70\x6c\x61\143\x65"; $x148="\165\164\x66\70\x5fe\156\x63o\144e"; $x149="\x70re\x67_m\x61tc\150\x5f\x61\154l"; $x14a="\160re\147\x5f\155\141tch"; $x14b="is\137\x6e\165l\x6c"; $x14c="n\165\x6db\x65r_fo\162ma\x74"; $x14d="i\x73\x5f\156\165\x6de\x72\x69c"; $x14e="p\x72e\x67\x5f\163p\154\x69\164"; $x14f="\165\x74\146\70\137\x64\x65\x63\157\x64e"; $x150="is_s\164\162\x69\156g"; $x151="\x6a\163o\156\x5f\x64eco\x64e"; $x152="\151s\x5fa\x72\x72a\x79"; $x153="a\x72\x72\141\x79\x5f\160\165\163\150"; $x154="\x70\x72i\156\x74\x5fr"; $x155="\x76e\162\x73\x69\157\156_c\x6f\x6dp\x61\162e"; $x156="\x69\156\137\x61\162ra\x79"; $x157="\141r\x72\x61\171\137\160\157\160"; $x158="\x73\x74\162\137pa\x64"; $x159="\141r\162\141y_\163\x68\x69f\x74"; $x15a="ar\x72a\171_\x72e\166\145\x72\x73e"; $x15b="\141\x72\x72ay_\x76\141l\165es"; $x15c="\x70\x72e\147\x5f\x72\x65\x70\x6c\x61\143\x65"; $x15d="\x73\x74\162i\x70\137tags"; $x15e="\150tm\154\x5fe\x6et\151\x74\x79\x5fd\145\x63\x6f\144\x65"; $x15f="\x6d\x62\x5f\163\x74r\x74\157\154o\x77\x65r"; $x160="mb_\163t\162\164oup\x70e\162"; if (($x4e == "\x70\x61rent" || $x4e == "\143\x6f\156\146\151g\x75r\x61b\x6c\145") && isset($this->configurable[$product->getId()])) return $this->configurable[$product->getId()]; elseif (($x4e == "\x70\x61rent" || $x4e == "g\162\157\165\160\145\x64") && isset($this->grouped[$product->getId()])) return $this->grouped[$product->getId()]; elseif (($x4e == "\x70\x61rent" || $x4e == "b\x75\x6e\144le") && isset($this->bundle[$product->getId()])) return $this->bundle[$product->getId()]; else { return $product; } } public function x16a($x4f, $x50, $x51) { $x147="s\x74r\x5f\x72e\160\154\141\143\x65"; $x148="\165\x74\146\70\137\x65n\143\x6f\144\x65"; $x149="\160\162\145\x67\x5f\x6da\164\x63\150\x5f\x61\x6c\154"; $x14a="\160\x72e\x67\137\155\x61\x74\143h"; $x14b="is\137\x6eu\x6c\x6c"; $x14c="\x6e\165m\142e\x72\137\x66\x6fr\155\141\x74"; $x14d="i\x73\137n\x75\x6d\x65\162\x69\143"; $x14e="\x70r\x65g_sp\x6c\x69\x74"; $x14f="u\164\x66\70_d\x65\x63ode"; $x150="\x69\163_\163\x74\x72\151\156\147"; $x151="json_\144ec\x6fde"; $x152="\151\163\137\141\162\162a\171"; $x153="\141\162\162\141\x79\x5f\x70\165\x73h"; $x154="prin\164\137\162"; $x155="v\x65\162\x73i\157\156\137\x63\x6f\x6d\160a\162\x65"; $x156="\151n_a\x72r\x61\171"; $x157="a\x72\x72ay\137\x70\157\160"; $x158="\163t\162\137\160\x61\x64"; $x159="\141\x72\x72a\x79_\x73\150if\x74"; $x15a="ar\162\141y\137\162\145\166\x65rse"; $x15b="\x61r\162\141\x79\137\166\141lu\145s"; $x15c="\160\162\145\x67\x5fr\x65p\x6c\141\143e"; $x15d="\x73\x74\162\x69p\x5f\x74ag\163"; $x15e="\150\x74m\x6c\137\145n\x74\151\164\171\x5f\144ec\157d\x65"; $x15f="\x6d\142\x5f\x73\164\162\x74\x6fl\157\x77er"; $x160="mb\137s\164\x72t\157u\160per";
$x4f->streamOpen($x50); $x4f->streamWrite($x51); } public function generateXml() { $x147="st\162\137\x72\145p\x6c\141\x63e"; $x148="u\164\146\70\x5f\145\x6e\x63\157\x64e"; $x149="\x70\162\x65\x67_matc\150\137a\x6c\x6c"; $x14a="pre\x67\137\x6d\x61\x74\143\150"; $x14b="\151\x73_\156\165\x6c\x6c"; $x14c="n\165\x6d\x62\145\x72_\x66\x6f\162mat"; $x14d="is\137nume\x72\x69\143"; $x14e="pre\147\137\x73\160l\x69\x74"; $x14f="\x75\164\146\70\x5f\x64e\143o\144\x65"; $x150="\151\163_\x73\x74r\x69ng"; $x151="\152\163\157\x6e\x5f\x64e\143o\144\145"; $x152="\x69\163_\141r\x72\141\x79"; $x153="\x61r\162\141\171\137p\165\x73h"; $x154="\160\x72\x69nt\137r"; $x155="\x76\x65\162s\151on\x5fc\157\x6d\x70a\162\x65"; $x156="in_\x61\x72\162\141\171"; $x157="\141\x72r\141y\137po\160"; $x158="\x73\x74\162_\x70\x61d"; $x159="\x61r\x72\x61\171\137\163\x68\151\x66\164"; $x15a="\141r\x72\x61\x79\x5fr\145\x76\x65\162\x73\145"; $x15b="a\162r\141\171\x5f\166\141l\165e\163"; $x15c="p\x72e\x67\137\x72e\x70\154a\x63\145"; $x15d="\163t\162i\160_\164\x61\x67\163"; $x15e="\150\164m\x6c\x5fe\156t\x69\164\x79\x5fd\145\143\157de"; $x15f="\155\x62\137\x73\x74rt\157l\157wer"; $x160="\155\x62\137\163\164\x72\x74\157\165\160\160\145\x72"; Mage::log("\x0a\76\76\x3e\x3e>\76>>>\x3e\76>\x3e\x3e\76\76>\x3e\76\x3e\76\76>>\x3e\76\x3e\x3e>>>\x3e\x3e\x3e\76>\76\76\76\76>\x3e\76>\x3e>\40--\x2d\x2d\55\55-\55\55\55\55-\55\x2d-\40\123T\x41\122\x54\40PR\x4f\x43\x45\x53\123\x20\106\117\x52\40" . strtoupper($this->x165(false)) . "-\55\x2d\55--\x2d\55\55\55-\x2d\x2d\x2d-\55\55", null, $this->x165('.log')); ini_set('memory_limit', Mage::getStoreConfig("s\x69\155p\x6ceg\157\x6fg\x6c\145s\150\x6f\160\160i\156\147\x2f\x73y\163tem\x2f\155\x65\155\157\x72\x79\x5f\154i\x6di\x74") . 'M'); $this->_debug = (isset($_GET['debug'])) ? true : false; include(Mage::getBaseDir() . "/lib\57\x57\171\x6fm\x69\156\x64\x2f\x47\157\x6f\x67\154\x65\57\122\145\x71\165i\162\x65m\145nt\x73.p\x68\160"); $x3a = new Varien_Io_File(); $x4f = new Varien_Io_File(); $x52 = Mage::getBaseDir() . DS . 'var' . DS . 'tmp' . DS; $x53 = $x52 . "sg\163_" . $this->getSimplegoogleshoppingId() . ".\x66la\147"; $x3a->setAllowCreateFolders(true); if (!$this->_display) { $x3a->open(array('path' => $this->getPath())); if ($x3a->fileExists($this->x165()) && !$x3a->isWriteable($this->x165())) { Mage::throwException(Mage::helper('simplegoogleshopping')->__('File "\x25\x73" cannot be saved. Please, make sure the directory "\x25\x73" is writeable by web server.', $this->x165(), $this->getPath())); } $x3a->streamOpen($this->x165()); $x4f->open(array('path' => $x52)); if ($x4f->fileExists($x53, false)) { $x4f->streamOpen($x53, 'r'); $x4d = $x4f->streamReadCsv("\73"); $x54 = $x4f->streamStat(); if ($x4d[0] == "P\122O\x43\x45\x53S\x49N\107") { $x55 = $x54["\155t\151me"]; $x56 = $x4d[3]; if (!(Mage::getSingleton('core/date')->gmtTimestamp() > $x55 + ($x56 * 10) || Mage::getSingleton('core/date')->gmtTimestamp() > $x55 + ($x56 * 2))) { Mage::throwException(Mage::helper('simplegoogleshopping')->__('File "\x25\x73" is already processing. Please wait the end of the process.', $this->x165(), $this->getPath())); } } } else { $x4f->streamOpen($x53); } } $x57 = array("\x61\x63" => "a\x63\164\x69v\x61\164\151on\x5fc\x6fde", "\141\153" => "a\143t\151va\x74\151\157\156\x5f\153e\171", "\x62u" => "\x62\x61\163\x65_\x75\x72\154", "\155d" => "\155\x64\65", "t\x68" => "th\151\163", "\144\x6d" => "\x5f\144\145m\x6f", "e\x78t" => "\163\x67\163", "\166\145\x72" => "\71\56\x30\x2e\61"); $x150(Mage::app()->getRequest()->getParam("\163\164\157\162\x65_\151d")) ? $x58 = Mage::app()->getRequest()->getParam("\163\164\157\162\x65_\151d") : $x58 = $this->getStoreId(); $x59 = Mage::getSingleton('core/date')->gmtDate('Y-m-d'); $x5a = Mage::getDesign()->getSkinUrl(); $x5b = Mage::getStoreConfig("\x63\x61\164a\154\x6f\x67/pl\141c\x65\150\x6fl\x64e\162\x2f\151m\x61\x67\145\137\x70\x6c\x61\143\145\x68ol\x64\145r", $x58); $x5c = Mage::getStoreConfig("\x63\165r\x72en\x63\x79/\x6f\160\164\151o\x6e\163/\x62a\163\x65", $x58); $x5d = Mage::getStoreConfig("c\141t\141lo\x67i\x6e\x76\x65\156t\x6f\x72\171\x2f\151\164\145m\x5fo\160\x74\151\157\x6e\163/\155\x61\156\141g\x65\x5fst\x6f\x63k", $x58); $x5e = Mage::getStoreConfig("\143a\x74a\154\157\x67in\x76\x65nt\x6f\x72\171\57\151\x74\x65m_\157\160t\151\157n\163\57b\x61\143k\x6fr\x64\145rs", $x58); $x5f = Mage::app()->getStore($x58)->getBaseUrl(Mage_Core_Model_Store::URL_TYPE_WEB, false); $x60 = Mage::getModel('core/store')->load($x58)->getBaseUrl(); $x61 = Mage::app()->getStore($x58)->getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA, false); $x62 = Mage::getStoreConfig(Mage_Tax_Model_Config::CONFIG_XML_PATH_PRICE_INCLUDES_TAX, $x58); $x63 = Mage::app()->getStore($x58)->getRootCategoryId(); $x64 = Mage::app()->getStore()->getStoreId(); $x65 = array( "a\143t\151va\x74\151\157\156\x5f\153e\171" => Mage::getStoreConfig("\163i\x6dple\147\157\x6fg\154\x65\163\150\157\160\160i\156\x67\57\154i\x63e\x6e\163\145\x2f\x61\x63t\x69\166at\151\x6f\156\137\x6be\171"), "a\x63\164\x69v\x61\164\151on\x5fc\x6fde" => Mage::getStoreConfig("\x73\151\155\160\154\145\x67\157\157g\154e\x73\150\157p\160in\147/\154\x69ce\x6es\145\x2f\x61c\164i\x76\x61\x74i\x6f\156\x5fc\x6f\x64\x65"), "\x62\x61\163\x65_\x75\x72\154" => Mage::getStoreConfig("\x77eb\x2fs\145c\x75r\145\57\142\141\163\145\137\165r\154"), ); $x150(Mage::app()->getRequest()->getParam("\163\x69\155pl\x65\147o\157\x67\154\145\x73\150\157\x70\160\x69n\147_\x78m\x6ci\x74\145\x6dp\141t\164\145\162\x6e")) ? $x66 = Mage::app()->getRequest()->getParam("\163\x69\155pl\x65\147o\157\x67\154\145\x73\150\157\x70\160\x69n\147_\x78m\x6ci\x74\145\x6dp\141t\164\145\162\x6e") : $x66 = $this->getSimplegoogleshoppingXmlitempattern(); $x150(Mage::app()->getRequest()->getParam("\x73\x69\x6d\x70\x6ce\147\157og\154\x65sh\157\x70\x70\x69ng\x5f\x74\151\x74\x6c\145")) ? $x67 = Mage::app()->getRequest()->getParam("\x73\x69\x6d\x70\x6ce\147\157og\154\x65sh\157\x70\x70\x69ng\x5f\x74\151\x74\x6c\145") : $x67 = $this->getSimplegoogleshoppingTitle(); $x150(Mage::app()->getRequest()->getParam("s\x69\155pl\145g\x6fo\147\154\x65\163\x68\x6f\x70p\x69\x6e\147_d\x65\163c\162\x69\x70\x74i\157n")) ? $x68 = Mage::app()->getRequest()->getParam("s\x69\155pl\145g\x6fo\147\154\x65\163\x68\x6f\x70p\x69\x6e\147_d\x65\163c\162\x69\x70\x74i\157n") : $x68 = $this->getSimplegoogleshoppingDescription(); $x150(Mage::app()->getRequest()->getParam("s\151\155\160le\x67o\157g\154\145\163h\x6f\160\160\151\x6e\x67\x5f\x63\141\x74\145g\x6fri\x65\163")) ? $x69 = $x151(Mage::app()->getRequest()->getParam("s\151\155\160le\x67o\157g\154\145\163h\x6f\160\160\151\x6e\x67\x5f\x63\141\x74\145g\x6fri\x65\163")) : $x69 = $x151($this->getSimplegoogleshoppingCategories()); $x150(Mage::app()->getRequest()->getParam("\x63\x61t\145g\157r\x79\137\x66ilt\145\162")) ? $x6a = Mage::app()->getRequest()->getParam("\x63\x61t\145g\157r\x79\137\x66ilt\145\162") : $x6a = $this->getSimplegoogleshoppingCategoryFilter(); $x150(Mage::app()->getRequest()->getParam("\x63\141\164\x65\x67\x6fr\x79\137\164\x79\x70\145")) ? $x6b = Mage::app()->getRequest()->getParam("\x63\141\164\x65\x67\x6fr\x79\137\164\x79\x70\145") : $x6b = $this->getSimplegoogleshoppingCategoryType(); $x6c = Array(); $x6d = Array(); if ($x152($x69)) { foreach ($x69 as $x6e) { if ($x6e->checked) $x6c[] = $x6e->line; } foreach ($x69 as $x6e) { if ($x6e->mapping != "") $x6d[$x6e->line] = $x6e->mapping; } } if (count($x6c) < 1) { $x6c[] = '*'; } $x150(Mage::app()->getRequest()->getParam("s\151\155\x70\154\145g\x6fog\154\145sh\x6f\x70\x70\151\x6eg\x5f\x74\x79\x70\145\x5f\x69\x64\x73")) ? $x6f = explode(',', Mage::app()->getRequest()->getParam("s\151\155\x70\154\145g\x6fog\154\145sh\x6f\x70\x70\151\x6eg\x5f\x74\x79\x70\145\x5f\x69\x64\x73")) : $x6f = explode(',', $this->getSimplegoogleshoppingTypeIds()); $x150(Mage::app()->getRequest()->getParam("\x73\151m\160\154\x65\x67o\x6f\147l\145sh\x6fpp\151n\x67_\x76\151s\151b\151\x6cit\x79")) ? $x70 = explode(',', Mage::app()->getRequest()->getParam("\x73\151m\160\154\x65\x67o\x6f\147l\145sh\x6fpp\151n\x67_\x76\151s\151b\151\x6cit\x79")) : $x70 = explode(',', $this->getSimplegoogleshoppingVisibility()); $x150(Mage::app()->getRequest()->getParam("\x73\x69\155\160\x6cego\157g\x6c\145s\150\157\160\160ing\x5f\x61\x74\164\x72\151\142\x75t\x65s")) ? $x71 = $x151(Mage::app()->getRequest()->getParam("\x73\x69\155\160\x6cego\157g\x6c\145s\150\157\160\160ing\x5f\x61\x74\164\x72\151\142\x75t\x65s")) : $x71 = $x151($this->getSimplegoogleshoppingAttributes()); $x150(Mage::app()->getRequest()->getParam("\163i\155p\x6ceg\x6f\x6fg\154e\163\150\x6fpp\x69\x6e\x67_\x61\164t\162\151\x62\x75\x74e\137s\145\x74\163")) ? $x72 = explode(',', Mage::app()->getRequest()->getParam("\163i\155p\x6ceg\x6f\x6fg\154e\163\150\x6fpp\x69\x6e\x67_\x61\164t\162\151\x62\x75\x74e\137s\145\x74\163")) : $x72 = explode(',', $this->getSimplegoogleshoppingAttributeSets()); if ($x65[$x57['ac']] != $x57["\155d"]($x57["\155d"]($x65[$x57['ak']]) . $x57["\155d"]($x65[$x57['bu']]) . $x57["\155d"]($x57["e\x78t"]) . $x57["\155d"]($x57["\166\145\x72"]))) { $$x57["e\x78t"] = "\x76a\154i\x64"; $$x57["t\x68"]->$x57["\144\x6d"] = true; } else { $$x57["t\x68"]->$x57["\144\x6d"] = false; $$x57["e\x78t"] = "\x76a\154i\x64"; } $x73 = ''; $x74 = ''; header("\x43\x6f\156t\145\156\164-Ty\x70\145\72 t\x65xt\57\150\x74\x6d\x6c\73 cha\x72\163\145\x74=\x75t\x66-\70"); $x73 = ('<?xml version="1.0" encoding="utf-8" ?>' . "\x0a"); $x73.=('<rss version="2.0" xmlns:g="http://base.google.com/ns/1.0">' . "\x0a"); $x73.=('<channel>' . "\x0a"); $x73.=('<title>' . $x67 . "\x3c/\164\x69tl\145>\x0a"); $x73.=('<link>' . substr($x5f, 0, -1) . "</li\x6e\153>\x0a"); $x73.=('<description>' . $x68 . "\74\57\x64\145\163c\x72\151\x70\164\151\x6fn\76\x0a"); if (!isset($$x57["e\x78t"]) || $$x57["t\x68"]->$x57["\144\x6d"]) { $$x57["t\x68"]->$x57["\144\x6d"] = true; return $$x57["t\x68"]; } if ($this->_display) $x74 = $this->x169($x73); else { $x3a->streamWrite($this->x169($x73)); $this->x16a($x4f, $x53, "\120\122\x4f\x43\x45S\x53\111\x4eG\730\x3b\61\x30\x30\x3b\630"); Mage::log("\x0a>\76\76\76\x3e\76\x3e\x3e\76>\x3e\x3e\x3e>>>\x3e>>\x3e\x3e\x3e\x3e\x3e>>\x3e>\x3e\76>\x3e>\76\76\x3e>>\76\76>>>>\76\76\40" . $this->x165() . " \x63\x72e\x61\164\x65\x64\x20\x61\156\x64\40\x6fp\145\x6e\x65d", null, $this->x165('.log')); } $x35 = '/{([a-zA-Z_0-9:]+)(\sparent|\sgrouped|\sconfigurable|\sbundle)?([^}|]*)(\s?\|\s?)?(([a-zA-Z_0-9:]+)(\sparent|\sgrouped|\sconfigurable|\sbundle)?([^}|]*))?(\s?\|\s?)?(([a-zA-Z_0-9:]+)(\sparent|\sgrouped|\sconfigurable|\sbundle)?([^}|]*))?(\s?\|\s?)?(([a-zA-Z_0-9:]+)(\sparent|\sgrouped|\sconfigurable|\sbundle)?([^}|]*))?}/'; $x149($x35, $x66, $x36); foreach ($x36[6] as $x37 => $x75) { if ($x75 != "") { $x36[0][] = $x36[0][$x37];
$x36[1][] = $x75; $x36[2][] = $x36[7][$x37]; $x36[3][] = $x36[8][$x37]; ; $x36[4][] = $x36[9][$x37]; ; } } foreach ($x36[11] as $x37 => $x75) { if ($x75 != "") { $x36[0][] = $x36[0][$x37]; $x36[1][] = $x75; $x36[2][] = $x36[7][$x37]; $x36[3][] = $x36[8][$x37]; ; $x36[4][] = $x36[9][$x37]; ; } } foreach ($x36[16] as $x37 => $x75) { if ($x75 != "") { $x36[0][] = $x36[0][$x37]; $x36[1][] = $x75; $x36[2][] = $x36[7][$x37]; $x36[3][] = $x36[8][$x37]; ; $x36[4][] = $x36[9][$x37]; ; } } $x36[0][] = "\173\x63at\145\147\157\x72\x69\x65s,[\61],[\61\x5d\54[\61\x5d}"; $x36[1][] = "cat\x65g\157\162ie\163"; $x36[2][] = ""; $x36[3][] = "\x2c\x5b\61\x5d\x2c[\61],\x5b\61\x5d"; $x76 = array(); $x77 = array(); foreach ($x36[1] as $x37 => $x75) { $x76[$x37]['methodName'] = "get" . $x147(' ', '', ucwords(trim($x75)) . '()'); $x76[$x37]['pattern'] = "\173" . trim($x75) . "\175"; $x76[$x37]['fullpattern'] = $x36[0][$x37]; $x76[$x37]['name'] = trim($x75); $x76[$x37]['reference'] = trim($x36[2][$x37]); if (empty($x76[$x37]['reference'])) $x76[$x37]['reference'] = 'self'; switch ($x76[$x37]['name']) { case 'url': $x153($x77, 'url_key'); break; case 'uri': $x153($x77, 'url_key'); break; case 'G:ID': $x153($x77, 'sku'); break; case 'G:TITLE': $x153($x77, 'name'); break; case 'G:DESCRIPTION': $x153($x77, 'short_description'); $x153($x77, 'description'); break; case 'G:IMAGE_LINK': $x153($x77, 'image'); $x153($x77, 'small_image'); $x153($x77, 'thumbnail'); break; case 'SC:IMAGES': $x153($x77, 'image'); $x153($x77, 'small_image'); $x153($x77, 'thumbnail'); break; case 'SC:DESCRIPTION': $x153($x77, 'description'); $x153($x77, 'short_description'); $x153($x77, 'manufacturer'); $x153($x77, 'name'); $x153($x77, 'sku'); break; case 'SC:EAN': $x153($x77, 'ean'); break; case 'SC:URL': $x153($x77, 'url_key'); $x153($x77, 'url'); break; default : $x153($x77, $x76[$x37]['name']); } $x76[$x37]["v\141\154\x75\x65"] = '$product->get' . $x76[$x37]['name'] . "()"; $x76[$x37]["g\145t\x54\145\170\164"] = 'getAttributeText(\'' . trim($x75) . '\')'; $x78 = '/\[([^\]]+)\]/'; $x149($x78, $x36[3][$x37], $x79); $x76[$x37]["\x6f\x70\x74\151\157\156s"] = $x79[1]; } if ($this->_debug) { echo "\x2d\x2d\55\x2d\x2d\55-\x2d\x2d\55-\55\x2d\x2d--\x2d\55\55-\55-\x2d\x2d\x2d\55\x2d--\55\55\x2d--\x2d\x2d\x2d\x2d\x2d\55\55\x2d--\x2d\55<\x62\x72\x3e\x0d \x20\40\x20\x20\x20\40 \x20\x20\40\x20 \40\40 \40\x20\x20\x2d\x2d\x2d\x2d\x2d--\55---- \x44E\x42\x55\107 \x4d\117\104\105\x20--\x2d\55\55\x2d\55\55\55\55\55\55\x2d\55\x2d\x2d\x3cb\x72\x3e\x0d\x0a\x20\x20\40\x20\40 \40 \x20\x20 \40\40\x20 \x20 \x20 \55-\x2d--\55\x2d-\55\x2d--\x2d\x2d\x2d\x2d\55\x2d\55\55\x2d-\x2d-\55\55\55\55\x2d\55\x2d\55\x2d\x2d\55\x2d-\55-\x2d\55\55--\55\x2d\x3c\x62\x72>\74\142\162>"; echo "\x3cb\x72\76\74\x62r\76-\x2d-\55\x2d\55---\55\55-\x20\x41T\x54\x52I\x42U\124\105S\40\55-\x2d-\x2d-\55\x2d\x2d\55\55\x2d-\x2d\x2d-<b\162>"; $x154($x76); } Mage::log("\x0a>\x3e\x3e\x3e\x3e\x3e\x3e\76>>\x3e\x3e>\x3e>>\x3e\76>\x3e>\x3e\76>\76>\76\x3e\76\x3e\x3e\76\x3e\76>\76\76>\x3e\76>\x3e\76\76\x3e\76\x20\x50r\x6f\144u\143t\40te\x6d\x70\x6c\x61\164e\40a\156a\154\171ze\x64", null, $this->x165('.log')); $x7a = Mage::getModel('catalog/category')->getCollection() ->setStoreId($x58) ->addAttributeToSelect('name', 'store_id') ->addAttributeToSelect('is_active') ->addAttributeToSelect('include_in_menu'); $x7b = array(); foreach ($x7a as $x7c) { $x7b[$x7c->getId()]['name'] = $x7c->getName(); $x7b[$x7c->getId()]['path'] = $x7c->getPath(); $x7b[$x7c->getId()]['level'] = $x7c->getLevel(); if ($x155(Mage::getVersion(), '1.6.0', '<') || Mage::getStoreConfig("\x73\151\155\x70le\147oog\154\x65s\x68\x6f\160\x70\151n\x67/s\171\163\x74\145\x6d/\151nc\154\x75\144\145\x5f\x69\x6e\x5f\x6den\x75")) $x7b[$x7c->getId()]['include_in_menu'] = true; else $x7b[$x7c->getId()]['include_in_menu'] = $x7c->getIncludeInMenu(); } if ($this->_debug) { echo "<b\162\76\x3cb\162\x3e\55\x2d-\x2d\55\x2d\x2d\x2d\55--\x2d\x20\x43\101\124\105\107O\122\111\105S\40\55\x2d-\55-\55-\x2d\55-\55-\x2d\55--\74\142r>"; $x154($x7b); } Mage::log("\x0a>\76\x3e\76>\x3e>\76\76\76\x3e\x3e\76>>\76\x3e>>>\76\x3e\76\76\76\x3e\76>>\x3e>>\76>\x3e\76>\x3e>\76\76>>\x3e>\76\40\x43\141\x74eg\157\162\151es c\157\x6cl\145\143\164e\x64", null, $this->x165('.log')); $x7d = Mage::getSingleton('core/resource'); $x7e = $x7d->getConnection('core_read'); $x7f = $x7d->getTableName('eav_entity_type'); $x80 = $x7e->select()->from($x7f)->where('entity_type_code=\'catalog_product\''); $x81 = $x7e->fetchAll($x80); $x82 = $x81[0]['entity_type_id']; $x7d = Mage::getSingleton('core/resource'); $x7e = $x7d->getConnection('core_read'); $x83 = $x7d->getTableName('directory_currency_rate'); $x80 = $x7e->select()->from($x83)->where('currency_from=\'' . $x5c . '\''); $x40 = $x7e->fetchAll($x80); $x84 = array(); foreach ($x40 as $x3f) { $x84[$x3f['currency_to']] = $x3f['rate']; } $this->_currencies = $x84; if ($this->_debug) { echo "\74b\x72\x3e\x3c\x62r\76-\55-\x2d-\x2d\x2d--\55\55-\x20\103URR\105\116\x43I\x45\123\40-\55-\x2d\55-\55\55\x2d\55\55\x2d--\x2d\55\x3cb\x72\76"; $x154($x84); } Mage::log("\x0a\76>\76\x3e\x3e>\76\x3e>>\76\76\x3e\76\76\76\x3e\x3e>\x3e\76\76\76\x3e\x3e>\76\76\76>>\x3e\76\x3e\x3e\76>\76\76\76\x3e\x3e\x3e\x3e\76> \103u\162r\x65\x6e\143\151\x65\163\x20r\x61te\x20\x63o\x6cle\143\164\145d", null, $this->x165('.log')); $x85 = Mage::getResourceModel('eav/entity_attribute_collection') ->setEntityTypeFilter($x82) ->addSetInfo() ->getData();
$x86 = array(); $x87 = array(); foreach ($x85 as $x37 => $x75) { if ($x156($x75['attribute_code'], $x77)) { $x153($x86, $x75['attribute_code']); $x87[$x75['attribute_code']] = $x75['frontend_input']; } } if (!$x156('special_price', $x86)) $x86[] = 'special_price'; if (!$x156('special_from_date', $x86)) $x86[] = 'special_from_date'; if (!$x156('special_to_date', $x86)) $x86[] = 'special_to_date'; if (!$x156('price_type', $x86)) $x86[] = 'price_type'; if (!$x156('price', $x86)) $x86[] = 'price'; $x86[] = 'tax_class_id'; foreach ($x71 as $x88) { if (!$x156($x88->code, $x86) && $x88->checked) if (!$x156($x88->code, array("is\x5f\x69\156_s\x74\157c\153", "\161\164y", "ent\151t\171\x5fid", "\x63r\145\x61\164\x65\144\x5fa\x74", "\x75\x70d\x61\x74e\144_\x61t"))) $x86[] = $x88->code; } if ($this->_debug) { echo "\x3cb\x72\76\74\x62r\76-\x2d-\55\x2d\55---\55\55-\x20\x41T\x54\x52I\x42U\124\105S\40\55-\x2d-\x2d-\55\x2d\x2d\55\55\x2d-\x2d\x2d-<b\162>"; $x154($x86); } Mage::log("\x0a\76\76\x3e\x3e>\76>>\x3e>\76>\76\76>\76>\x3e\x3e\x3e>\76>>>>>\76>>\x3e\x3e\x3e\x3e\x3e>\76\x3e>>\x3e\76>\76>\76\x20L\151\x73\x74\x20o\x66\x20\162eq\x75\151r\x65d\x20\x61\x74tr\151bu\164\145\163 \143o\x6c\154\145\x63\164ed", null, $this->x165('.log')); $x7d = Mage::getSingleton('core/resource'); $x7e = $x7d->getConnection('core_read'); $x89 = $x7d->getTableName('eav_attribute_option_value'); $x80 = $x7e->select(); $x80->from($x89); $x80->where("st\157\162\145\137\x69\x64=" . $x58 . ' OR store_id=0'); $x80->order(array('option_id', 'store_id')); $x8a = $x7e->fetchAll($x80); foreach ($x8a as $x8b) { $x8c[$x8b['option_id']][$x8b['store_id']] = $x8b['value']; } if ($this->_debug) { echo "<\x62\x72>\x3cb\x72\x3e\55-\55\x2d-\x2d--\55\x2d\x2d\x2d \x41T\124\122\111\x42\x55\124\x45S\40\114A\102EL\40-\55\55\55\55\x2d\55\x2d-\x2d\55\x2d\x2d\55\x2d\x2d\x3cb\162\x3e"; $x154($x8c); } Mage::log("\x0a>>\76>\x3e>>\76>\76\x3e\76\x3e>>\76>\76>>>\76>\x3e>\x3e\x3e>>\76\x3e>\76\76\76>\76\x3e\76\x3e>>>>\76>\40\114\151\163\x74\x20o\x66\x20\141\x74\x74\162ib\165t\145\x20\x6c\141b\145l\x73\40\143\x6f\154\x6cec\164\x65\x64", null, $this->x165('.log')); $x8d = $x7d->getTableName('tax_class'); $x8e = $x7d->getTableName('tax_calculation'); $x8f = $x7d->getTableName('tax_calculation_rate'); $x90 = $x7d->getTableName('directory_country_region'); $x91 = $x7d->getTableName('customer_group'); $x80 = $x7e->select(); $x80->from($x8d)->order(array('class_id', 'tax_calculation_rate_id')); $x80->joinleft(array('tc' => $x8e), 'tc.product_tax_class_id = ' . $x8d . '.class_id', 'tc.tax_calculation_rate_id'); $x80->joinleft(array('tcr' => $x8f), 'tcr.tax_calculation_rate_id = tc.tax_calculation_rate_id', array('tcr.rate', 'tax_country_id', 'tax_region_id')); $x80->joinleft(array('dcr' => $x90), 'dcr.region_id=tcr.tax_region_id', 'code'); $x80->joinInner(array('cg' => $x91), 'cg.tax_class_id=tc.customer_tax_class_id AND cg.customer_group_code="NOT LOGGED IN"'); $x92 = $x7e->fetchAll($x80); $x44 = array(); $x3c = ''; foreach ($x92 as $x93) { if ($x3c != $x93['class_id']) $x94 = 0; else { $x94++; } $x3c = $x93['class_id']; $x44[$x93['class_id']][$x94]['rate'] = $x93['rate']; $x44[$x93['class_id']][$x94]['code'] = $x93['code']; $x44[$x93['class_id']][$x94]['country'] = $x93['tax_country_id']; } $this->_rates = $x44; if ($this->_debug) { echo "<\142\x72>\74\142r>\x2d---\55\x2d\x2d-\55-\55\55\x20T\x41\x58\x20\x43\x4c\x41\123\123\40\x2d-\55\x2d\55\x2d\x2d\x2d\x2d\x2d--\55\x2d-\55<br\x3e"; $x154($x44); } Mage::log("\x0a\x3e\76\x3e\x3e>\76\76\x3e\x3e>\76\76>\x3e\76\x3e\x3e\76\76\x3e\76\76\x3e\x3e>\x3e\76\76>\76>>\x3e\x3e\x3e>\76>\x3e\76>\76>\76>\76 Ta\170\x20\162a\x74\145\40\x63\x6f\x6c\x6c\145c\x74e\x64", null, $this->x165('.log')); $x95 = $x7d->getTableName('review'); $x96 = $x7d->getTableName('review_store'); $x97 = $x7d->getTableName('rating_option_vote'); $x98 = $x7e->select()->distinct('review_id'); $x98->from(array("\162" => $x95), array("CO\x55N\x54(\104\x49\123\x54I\116C\124 \x72\x2e\162\x65\166\x69\145w\137i\144\x29 \x41\123\40c\x6f\165n\164", 'entity_pk_value')); $x98->joinleft(array('rs' => $x96), 'rs.review_id=r.review_id', 'rs.store_id'); $x98->joinleft(array('rov' => $x97), 'rov.review_id=r.review_id', 'AVG(rov.percent) AS score'); $x98->where("\163\x74a\x74\x75\163\137\x69\x64\x3d\61\40\x61n\144 \x65\x6e\164\151ty_i\x64\x3d\61"); $x98->group(array('r.entity_pk_value', 'rs.store_id')); $x99 = $x7e->select(); $x99->from(array("\162" => $x95), array("CO\x55N\x54(\104\x49\123\x54I\116C\124 \x72\x2e\162\x65\166\x69\145w\137i\144\x29 \x41\123\40c\x6f\165n\164", 'entity_pk_value', "\x28S\105\114\x45\x43\124 \x30\x29 A\123\40\40s\x74\157re\137\151\144")); $x99->joinleft(array('rs' => $x96), 'rs.review_id=r.review_id', array()); $x99->joinleft(array('rov' => $x97), 'rov.review_id=r.review_id', 'AVG(rov.percent) AS score'); $x99->where("\163\x74a\x74\x75\163\137\x69\x64\x3d\61\40\x61n\144 \x65\x6e\164\151ty_i\x64\x3d\61"); $x99->group(array('r.entity_pk_value')); $x80 = $x7e->select() ->union(array($x98, $x99)); $x80->order(array('entity_pk_value', 'store_id')); $x9a = $x7e->fetchAll($x80); $x9b = array(); foreach ($x9a as $x9c) { $x9b[$x9c['entity_pk_value']][$x9c['store_id']]["\143\157\x75\x6et"] = $x9c["\143\157\x75\x6et"]; $x9b[$x9c['entity_pk_value']][$x9c['store_id']]['score'] = $x9c['score']; } Mage::log("\x0a>\x3e\76\76\76\x3e\76\x3e\x3e\76>\x3e>\x3e>>\x3e>>\76\x3e\x3e>\x3e\x3e>>>>\x3e\76>\76>\x3e>>\76\x3e>>>>\76>>\40R\145\x76\151\145\x77\163 \143\x6fl\x6c\x65c\164e\x64", null, $this->x165('.log')); $x7d = Mage::getSingleton('core/resource'); $x7e = $x7d->getConnection('core_read'); $x9d = $x7d->getTableName('catalog_product_entity_media_gallery'); $x9e = $x7d->getTableName('catalog_product_entity_media_gallery_value'); $x80 = $x7e->select(array("\104I\x53\x54\111\x4e\x43\x54 \x76alu\145")); $x80->from($x9d); $x80->joinleft(array('cpemgv' => $x9e), 'cpemgv.value_id = ' . $x9d . '.value_id', array('cpemgv.position', 'cpemgv.disabled')); $x80->where("v\x61l\x75e<>T\122\x49\115\50\x27\47\x29\x20A\116\x44 (\163\x74ore\x5fid=" . $x58 . ' OR store_id=0)'); $x80->order(array('position', 'value_id')); $x80->group(array('value_id')); $x9f = $x7e->fetchAll($x80); foreach ($x9f as $xa0) { if ($xa0['disabled'] != 1 && $xa0['value'] != '') { if (!$x156($xa0['value'], $xa1[$xa0['entity_id']]['src'])) { $xa1[$xa0['entity_id']]['src'][] = $xa0['value']; $xa1[$xa0['entity_id']]['disabled'][] = $xa0['disabled']; } } } if ($this->_debug) { echo "\x3c\142\x72><\x62r\76-\x2d\55\55---\x2d\x2d\55\55\x2d\40\111M\101\107\105\123\40\55\x2d\55\55\55-\55\x2d-\55--\55\x2d\x2d\55\x3cb\162\x3e"; $x154($xa1); } Mage::log("\x0a\76\x3e\76>\76\x3e\76\x3e>>\76\x3e>\x3e>\76>\76>\76>\76\x3e\76>\x3e>\x3e\x3e\76\76>\76>\76\x3e\x3e\x3e\x3e\x3e>>\76>>\x3e\40\111m\x61\x67es\40\x63\157l\x6cect\x65d", null, $this->x165('.log')); Mage::app()->setCurrentStore($x58); $xa2 = $x7d->getTableName("\143a\x74\141\x6c\157g\x69\156\166\145\x6e\164or\x79\137\x73\x74\157c\153\137\151\164e\x6d"); $xa3 = $x7d->getTableName("\143\157\162\x65_\x75\162\154\137r\x65\167\x72i\x74\145"); $x83 = $x7d->getTableName('catalog_category_product'); $xa4 = $x7d->getTableName('catalog_category_product_index'); $xa5 = $x7d->getTableName('catalog_product_index_price'); $xa6 = $x7d->getTableName('catalog_product_super_link'); $xa7 = $x7d->getTableName('catalog_product_link'); $xa8 = $x7d->getTableName('catalog_product_bundle_selection'); ($x155(Mage::getVersion(), '1.6.0', '<')) ? $x79 = "\x6f\x70\x74\151o\156\163\x3d\47\x27" : $x79 = "\111S\116\125\x4cL(\157p\164i\157n\x73\x29"; switch (Mage::getStoreConfig("\x73i\x6d\x70\x6ce\147\x6f\x6fgl\145\x73ho\160\160i\x6eg/\x73\171\163\x74\x65\155\57\x75r\154\162\145w\162\151\164e")) { case 1 : $xa9 = "A\116\104\40\x75r\154.\164a\162\147\145\164\137\x70\x61\164\x68\40N\117\x54\40LI\x4b\x45\40'%\x63\x61\164\145\147\x6fr\x79\45'"; $xaa = 'MAX';
break; default : $xa9 = "A\x4e\x44\40\165\162\154\x2e\164ar\x67\x65\x74_p\141t\x68\x20L\x49\x4b\x45 '\45ca\x74\145g\x6fr\x79%\x27"; $xaa = 'GROUP_CONCAT'; break; break; } $xab = Mage::getModel('simplegoogleshopping/product_collection')->getCollection()->addStoreFilter($x58); $xab->addAttributeToFilter('status', 1); $xab->addAttributeToFilter('type_id', array("\151n" => "\143\x6f\156\146\151g\x75r\x61b\x6c\145")); $xab->addAttributeToFilter('visibility', array("\156in" => 1)); $xab->addAttributeToSelect($x86, true); $xab->getSelect()->joinLeft($xa6 . ' AS cpsl', 'cpsl.parent_id=e.entity_id ', array('child_ids' => 'GROUP_CONCAT( DISTINCT cpsl.product_id)')); $xab->getSelect()->joinLeft($xa2 . ' AS stock', 'stock.product_id=e.entity_id', array('qty' => 'qty', 'is_in_stock' => 'is_in_stock', 'manage_stock' => 'manage_stock', 'use_config_manage_stock' => 'use_config_manage_stock', 'backorders' => 'backorders', 'use_config_backorders' => 'use_config_backorders')); $xab->getSelect()->joinLeft($xa3 . ' AS url', 'url.product_id=e.entity_id ' . $xa9 . ' AND is_system=1 AND ' . $x79 . ' AND url.store_id=' . $x58, array('request_path' => $xaa . '(DISTINCT request_path)')); $xab->getSelect()->joinLeft($x83 . ' AS categories', 'categories.product_id=e.entity_id'); $xab->getSelect()->joinLeft($xa4 . ' AS categories_index', 'categories_index.category_id=categories.category_id AND categories_index.product_id=categories.product_id AND categories_index.store_id=' . $x58, array('categories_ids' => 'GROUP_CONCAT( DISTINCT categories_index.category_id)')); $xab->getSelect()->group(array('cpsl.parent_id')); $xac = array(); foreach ($xab as $xad) { foreach (explode("\x2c", $xad->getChildIds()) as $xae) { $xac[$xae] = $xad; $xaf[$xae]['categories_ids'] = $xad->getCategories_ids(); $xaf[$xae]['parent_id'] = $xad->getId(); $xaf[$xae]['parent_sku'] = $xad->getSku(); $xaf[$xae]['parent_request_path'] = $xad->getRequestPath(); } } $this->configurable = $xac; if ($this->_debug) { echo "<\142\162\76\74b\x72\x3e-\x2d\x2d-\55\55-\x2d\x2d\55\x2d\55\40CON\106\111\107\x55\x52\x41\x42\x4c\105\123\40-\55-\x2d\55-\x2d\x2d\x2d--\55-\x2d-\55<b\x72>"; echo $xab->getSelect() . '<br><br>'; $x154($xaf); } Mage::log("\x0a\76>\x3e\76>\x3e>\x3e>\76\76>>\76>\x3e\76\x3e\76>>\x3e\76\76\76\x3e>\76>\x3e\x3e\x3e>\x3e>>\76>>\x3e\x3e\76\x3e>>>\x20\122e\154\x61ti\157\x6e\163 \x77it\x68 c\x6f\x6efi\147\165rab\x6ce \x70rod\165\143t\x73\40\144\145t\x65cte\x64", null, $this->x165('.log')); $xab = Mage::getModel('simplegoogleshopping/product_collection')->getCollection()->addStoreFilter($x58); $xab->addAttributeToFilter('status', 1); $xab->addAttributeToFilter('type_id', array("\151n" => "\143\x6f\156\146\151g\x75r\x61b\x6c\145")); $xab->addAttributeToFilter('visibility', array("\156in" => 1)); $xab->getSelect()->joinLeft($xa6 . ' AS cpsl', 'cpsl.parent_id=e.entity_id '); $xab->getSelect()->joinLeft($xa2 . ' AS stock', 'stock.product_id=cpsl.product_id', array('qty' => 'SUM(stock.qty)')); $xab->getSelect()->group(array('cpsl.parent_id')); $xb0 = array(); foreach ($xab as $xb1) { $xb0[$xb1->getId()] = $xb1->getQty(); } $this->configurableQty = $xb0; if ($this->_debug) { echo "\x3c\142\162>\74b\162\x3e---\55--\55-\x2d\x2d\55\x2d \x43\x4fN\x46\111G\x55R\101\x42L\x45S \121T\x59 \55\x2d-\x2d------\55\x2d-\55\55\55<b\162\x3e"; echo $xab->getSelect() . '<br><br>'; $x154($xb0); } Mage::log("\x0a\76\x3e\x3e\x3e\x3e\x3e\x3e>>\76>\76\76\76>\76\x3e\76\x3e>\76\76\x3e\x3e\x3e\76\76>\x3e\x3e>>\76\x3e\x3e\76\x3e\x3e\76\x3e\76\x3e\76>\76\x3e\40\121ty\40\x66\157\162\x20\143\x6fn\x66\151g\x75\x72\141\142\x6c\x65 \x70\162o\144u\143\164\x73 \x63a\154c\165\154\x61\x74\145\144", null, $this->x165('.log')); $xa6 = $x7d->getTableName("\x63\x61t\141\x6c\x6fg\137\160r\157\x64\x75\x63\x74\137s\165\x70\x65\x72\x5f\x6c\151nk"); $xb2 = $x7d->getTableName("c\x61t\x61\154\x6f\147\137p\162\157\144\x75\x63\164_\x73\165p\x65\x72_\141\164\x74ri\x62\x75te"); $xb3 = $x7d->getTableName("cat\x61\154\x6f\147_\x70\x72\157d\x75\143\x74\x5f\145nti\x74\171\137\151n\x74"); $xb4 = $x7d->getTableName("\x63a\x74al\x6fg_\160\x72\x6fd\x75\x63\x74\137s\165p\x65\162\137a\164\164r\x69b\165t\x65_p\x72\151\143\151\156\147"); $xb5 = $x7e->select(); $xb5->from(array("c\160\163l" => $xa6), array("p\141\x72\x65\x6e\164\x5f\x69\x64", "p\x72\157\x64\x75\143\x74\137\x69\x64")); $xb5->joinleft(array("\x63p\163a" => $xb2), "\143p\x73a.p\162\157\144u\143t\x5f\x69\x64\40\x3d c\160\x73l\x2e\x70\x61\x72\x65\156\x74\137\x69\144", array("\141\164\164\x72\x69bute\137\151\x64")); $xb5->joinleft(array("cp\145i" => $xb3), "\143\160\145\151\x2e\145n\x74\151t\171_\151d\x20\x3d\x20\143\160\163\154\x2e\x70\x72od\x75\143\164_\151d\x20A\116\104\x20\x63pe\x69\56\141t\x74ri\x62\165\x74\145_\151d\x20\75\40\143p\x73\141\x2ea\164\x74\162i\142u\164\145\x5fi\x64", array("v\141\154\x75\x65" => "v\141\154\x75\x65")); $xb5->joinleft(array("c\160\x73\141p" => $xb4), "c\160\x73\x61\160.\x70rodu\143\x74_\x73\x75\160\145r\x5fa\x74\164r\151b\165t\x65\x5fid\40=\x20c\160\163a\56\x70\162o\x64\x75c\164_\163\x75\x70\x65\162\137\x61\x74\164ri\142ut\x65\x5f\151\144\x20\x41ND\40\x63\160\x65\151\56\x76a\154\165\x65\40= cps\x61\160.\166\x61\154u\145_\151\156\x64\145\170", array("p\162ic\x69\x6e\x67_\166a\x6c\x75e" => "p\162ic\x69\x6e\x67_\166a\x6c\x75e", "i\163_\x70e\162c\145\156t" => "i\163_\x70e\162c\145\156t")); $xb5->order(array("\x63p\x73\x6c\x2ep\141r\145\156\164\x5fi\144", "\143\160s\x6c\x2e\160ro\x64\165\x63\x74_\151\144")); $xb5->group(array("\x63p\x73\x6c\x2ep\141r\145\156\164\x5fi\144", "\143\160s\x6c\x2e\160ro\x64\165\x63\x74_\151\144", "c\160\163\141.at\164\x72ib\165\x74\145\x5fi\x64")); $xb6 = $x7e->fetchAll($xb5); $xb7 = array(); foreach ($xb6 as $xb1) { $xb7[$xb1["p\141\x72\x65\x6e\164\x5f\x69\x64"]][$xb1["p\x72\157\x64\x75\143\x74\137\x69\x64"]][$xb1['attribute_id']]['attribute_id'] = $xb1["\141\164\164\x72\x69bute\137\151\x64"]; $xb7[$xb1["p\141\x72\x65\x6e\164\x5f\x69\x64"]][$xb1["p\x72\157\x64\x75\143\x74\137\x69\x64"]][$xb1['attribute_id']]['value'] = $xb1["v\141\154\x75\x65"]; $xb7[$xb1["p\141\x72\x65\x6e\164\x5f\x69\x64"]][$xb1["p\x72\157\x64\x75\143\x74\137\x69\x64"]][$xb1['attribute_id']]['pricing_value'] = $xb1["p\162ic\x69\x6e\x67_\166a\x6c\x75e"]; $xb7[$xb1["p\141\x72\x65\x6e\164\x5f\x69\x64"]][$xb1["p\x72\157\x64\x75\143\x74\137\x69\x64"]][$xb1['attribute_id']]['is_percent'] = $xb1["i\163_\x70e\162c\145\156t"]; } if ($this->_log) Mage::log("\x0a\76\76>\76\76\76>>\x3e\76\76\76>>\x3e\x3e\x3e\76\76\x3e>\x3e\76\x3e\x3e\76\x3e\76>>\x3e\x3e\76\x3e>>>\76>>>\76\x3e>\x3e\76 \x20C\x6f\156f\151gu\162\x61\x62\x6c\x65\x20\160\162\151c\x65\163\40\143\157\154\x6ce\143\x74e\x64", null, $this->x165('.log')); $this->configurablePrices = $xb7; if ($this->_debug) { echo "<b\x72>\x3cb\162\x3e-\x2d\x2d\x2d\55\55\x2d--\55\55-\x20\x43\x4f\116\106\111\x47\x55RA\102\114E\123\40\x50\122I\x43\105S\40\55\x2d-\55\x2d\55\x2d-\x2d\x2d-\55\55\55\x2d-\74br>"; echo $xb5 . '<br><br>'; $x154($xb7); } $xab = Mage::getModel('simplegoogleshopping/product_collection')->getCollection()->addStoreFilter($x58); $xab->addAttributeToFilter('status', 1); $xab->addAttributeToFilter('type_id', array("\151n" => "g\162\157\165\160\145\x64")); $xab->addAttributeToFilter('visibility', array("\156in" => 1)); $xab->addAttributeToSelect($x86, true); $xab->getSelect()->joinLeft($xa7 . ' AS cpl', 'cpl.product_id=e.entity_id AND cpl.link_type_id=3', array('child_ids' => 'GROUP_CONCAT( DISTINCT cpl.linked_product_id)')); $xab->getSelect()->joinLeft($xa2 . ' AS stock', 'stock.product_id=e.entity_id', array('qty' => 'qty', 'is_in_stock' => 'is_in_stock', 'manage_stock' => 'manage_stock', 'use_config_manage_stock' => 'use_config_manage_stock', 'backorders' => 'backorders', 'use_config_backorders' => 'use_config_backorders')); $xab->getSelect()->joinLeft($xa3 . ' AS url', 'url.product_id=e.entity_id ' . $xa9 . ' AND is_system=1 AND ' . $x79 . ' AND url.store_id=' . $x58, array('request_path' => $xaa . '(DISTINCT request_path)')); $xab->getSelect()->joinLeft($x83 . ' AS categories', 'categories.product_id=e.entity_id'); $xab->getSelect()->joinLeft($xa4 . ' AS categories_index', 'categories_index.category_id=categories.category_id AND categories_index.product_id=categories.product_id AND categories_index.store_id=' . $x58, array('categories_ids' => 'GROUP_CONCAT( DISTINCT categories_index.category_id)')); $xab->getSelect()->group(array('cpl.product_id')); $xb8 = array(); foreach ($xab as $xad) { foreach (explode("\x2c", $xad->getChildIds()) as $xae) { $xb8[$xae] = $xad; $xb9[$xae]['categories_ids'] = $xad->getCategories_ids(); $xb9[$xae]['parent_id'] = $xad->getId(); $xb9[$xae]['parent_sku'] = $xad->getSku(); $xb9[$xae]['parent_request_path'] = $xad->getRequestPath(); } } $this->grouped = $xb8; if ($this->_debug) { echo "\x3cb\x72\76<br\x3e-\55\55\x2d-\55--\x2d\55\x2d\55\x20G\x52\x4f\125\x50\105D\40--\55\55-\x2d\x2d\55\x2d\x2d\55--\55\55\x2d\x3c\142\162>"; echo $xab->getSelect() . '<br><br>'; $x154($xb9); } Mage::log("\x0a\76>>\76\x3e\x3e\x3e\x3e>\x3e\76\76>\x3e>\76\x3e\x3e\x3e\x3e\76\76>\76\x3e\76>\76\x3e\x3e\76>>\76\x3e\x3e\76\x3e\x3e\x3e\x3e>>\x3e>\76 Rel\x61\x74\151\x6f\156s \167\x69t\150 \147\162\x6fu\160\145\x64 p\162\157\144\165\143\x74\x73\40d\x65t\x65ct\145\144", null, $this->x165('.log')); $xab = Mage::getModel('simplegoogleshopping/product_collection')->getCollection()->addStoreFilter($x58); $xab->addAttributeToFilter('status', 1); $xab->addAttributeToFilter('type_id', array("\151n" => "b\x75\x6e\144le")); $xab->addAttributeToFilter('visibility', array("\156in" => 1)); $xab->addAttributeToSelect($x86, true); $xab->getSelect()->joinLeft($xa8 . ' AS cpbs', 'cpbs.parent_product_id=e.entity_id', array('child_ids' => 'GROUP_CONCAT( DISTINCT cpbs.product_id)')); $xab->getSelect()->joinLeft($xa2 . ' AS stock', 'stock.product_id=e.entity_id', array('qty' => 'qty', 'is_in_stock' => 'is_in_stock', 'manage_stock' => 'manage_stock', 'use_config_manage_stock' => 'use_config_manage_stock', 'backorders' => 'backorders', 'use_config_backorders' => 'use_config_backorders')); $xab->getSelect()->joinLeft($xa3 . ' AS url', 'url.product_id=e.entity_id ' . $xa9 . ' AND is_system=1 AND ' . $x79 . ' AND url.store_id=' . $x58, array('request_path' => $xaa . '(DISTINCT request_path)')); $xab->getSelect()->joinLeft($x83 . ' AS categories', 'categories.product_id=e.entity_id'); $xab->getSelect()->joinLeft($xa4 . ' AS categories_index', 'categories_index.category_id=categories.category_id AND categories_index.product_id=categories.product_id AND categories_index.store_id=' . $x58, array('categories_ids' => 'GROUP_CONCAT( DISTINCT categories_index.category_id)')); $xab->getSelect()->group(array('e.entity_id')); $xba = array(); foreach ($xab as $xad) { foreach (explode("\x2c", $xad->getChildIds()) as $xae) { $xba[$xae] = $xad; $xbb[$xae]['parent_id'] = $xad->getId(); $xbb[$xae]['parent_sku'] = $xad->getSku();
$xbb[$xae]['parent_request_path'] = $xad->getRequestPath(); $xbb[$xae]['categories_ids'] = $xad->getCategories_ids(); } } $this->bundle = $xba; if ($this->_debug) { echo "\x3c\x62r\76<\x62r\76\x2d\x2d--\x2d\55--\55\55\55\x2d\40\x42U\x4eD\x4cE\x20\x2d\55\x2d\x2d--\55\55-\55\x2d----\x2d\74\142r\x3e"; echo $xab->getSelect() . '<br><br>'; $x154($xbb); } Mage::log("\x0a\x3e\76\76>\76\x3e>\x3e\x3e>\76\76\x3e\76\76>\76\x3e\76\x3e\76\76\x3e\76\76\x3e\76\x3e\76\76\x3e>>\76\76\76>\x3e>\x3e>\x3e\76\x3e>\x3e \x52\x65\154\141tio\x6e\163 \167i\164h \x62\165\156d\x6c\145 p\162od\x75ct\x73 \x64\x65\x74\145\x63\x74\145\x64", null, $this->x165('.log')); $xbc = $x7d->getTableName("c\x61t\141\154\157\147_\x70r\157\x64\165\143t\x5f\157p\x74\x69o\156"); $xbd = $x7d->getTableName("\x63at\141\154o\147_\x70\162odu\143\x74\x5f\x6f\160\x74\151\157\156\x5f\164i\164\x6ce"); $xbe = $x7d->getTableName("c\x61\164al\x6f\x67\x5f\x70r\x6f\x64\x75ct_\x6f\x70\x74\151\157\156_t\x79\x70\145_\166\141\154\x75e"); $xbf = $x7d->getTableName("\x63\x61\164\x61\x6co\147_p\162\x6f\144\165\x63t_\x6f\x70\x74\151\x6f\x6e\137\164\171\x70e\x5ft\x69t\x6c\x65"); $xc0 = $x7d->getTableName("\143\141\x74\x61l\x6fg\137\x70\162o\x64\165\143\164_o\x70\x74\x69\157\156\137t\171pe\137pr\151\x63\x65"); $xc1 = $x7e->select(); $xc1->from(array("c\x70\x6f" => $xbc), array("p\x72\157\x64\x75\143\x74\137\x69\x64")); $xc1->joinleft(array("\x63po\164" => $xbd), "c\160o\164\56\x6f\160\164i\x6f\x6e\x5f\x69\144=\143\160o\56\x6fp\164\151\x6fn\137\x69d\40A\x4e\104\40\x63\x70o\164\56\x73\x74\157\162\145_\x69\144\x3d0", array("\x6fpt\x69\x6f\156" => "\164i\x74\154e", "\157\160\x74\x69\x6f\x6e\x5fid", "\163\164\157\162\x65_\151d")); $xc1->joinleft(array("\x63\x70o\164v" => $xbe), "c\160\x6f\x74\x76.\x6fpti\157n\x5f\151\x64\x20\75 c\160\x6f\x2e\x6f\160\164\x69o\156_\x69\144", array("sk\165", "\x69d" => "\157\x70\164\151on\x5f\x74\x79\160\x65\137\x69\x64")); $xc1->joinleft(array("\x63\x70\157\164t" => $xbf), "cpo\164t.o\160\164\151\x6f\x6e\x5f\x74y\160\x65_i\x64\x3d\x63\160o\164v.\157\160\x74\151\157\x6e\x5fty\x70e\x5f\151\x64\40A\116D c\x70\157\164\x74\56\163t\x6fre\x5f\151\x64\75\x63\160\157\164\56\x73\164\x6f\162\x65\137i\x64", "t\151\x74l\145 \x41S\40valu\145"); $xc1->joinleft(array("c\x70o\164\160" => $xc0), "\143p\x6ft\x70.\x6f\160\x74\151\157\x6e\137t\171\x70\145\x5f\151\x64\75\x63p\x6f\x74\166\x2e\x6f\160\164io\156_t\171\160\x65\x5fid\40\x41\x4e\x44\40\143\160\157tp\x2e\x73t\157\x72\145\137\151d\x3d\143p\157\x74\56\x73t\157\x72\145\137\151\144", array("\160r\x69\x63\145", "pr\x69c\x65\x5f\x74\x79\160e")); $x80 = $xc1->order(array("p\x72\157\x64\x75\143\x74\137\x69\x64", "\x63po\164\166\56\x73\x6f\162\x74_\x6f\x72\x64\x65\x72\x20\101\123\103")); $x9a = $x7e->fetchAll($x80); $xc2 = array(); $xc3 = 0; foreach ($x9a as $xc4) { $xc2[$xc4["p\x72\157\x64\x75\143\x74\137\x69\x64"]][$xc4["\x6fpt\x69\x6f\156"]]["\x6f\x70\x74\151\157\156s"][] = array( "v\141\154\x75\x65" => $xc4["v\141\154\x75\x65"], "sk\165" => $xc4["sk\165"], "\160r\x69\x63\145" => $xc4["\160r\x69\x63\145"], "pr\x69c\x65\x5f\x74\x79\160e" => $xc4["pr\x69c\x65\x5f\x74\x79\160e"] ); $xc3++; } $this->customOptions = $xc2; if ($this->_debug) { echo "<\x62r>\x3c\142\x72\76\55-\55\55-\x2d-\55\55\x2d--\40\103\x55\123T\117M\x20\117\x50T\111\117N\123\40\55\55\x2d-\55-\55\x2d\x2d\x2d-\55\55-\x2d\x2d\74\142\162\76"; echo $xc1 . '<br><br>'; $x154($xc2); } Mage::log("\x0a>\76\76\76>\76>\x3e\76\76>>\x3e>\76\76>>>>\x3e\76\x3e>\76\76>>>\76\x3e>>>\x3e>\76\x3e>>\76>\76\76\76\x3e \x43\x75st\157\155\x20\x6fp\164io\156\163\x20\143\x6fl\154\x65\143te\x64", null, $this->x165('.log')); if (Mage::helper("\x63\157re")->isModuleEnabled("\x57\x79o\155\x69\156\144\137G\157og\x6c\145\155erc\x68\x61\156t\x70\x72\157\x6d\157ti\x6fn\x73")) { $xc5 = Mage::getResourceModel('salesrule/rule_collection')->setOrder('sort_order', 'ASC')->addFieldToFilter("\164\162\141\156\x73\x66\x65\x72able\137\164o\137\x67oogle_\155\x65\162\x63\x68an\x74", 1)->load(); Mage::log("\x0a\x3e\76>\76\76\x3e>\76>\76\76\76>\x3e\76\76\76\76\x3e\x3e\x3e\x3e\x3e\76\76\76>\76\76\76>\76>>\x3e\76>>\x3e\76\76\76\x3e\76>\76 \x50ro\155\x6fti\157\x6e\x73\x20rul\145\x73 \143\x6f\x6c\x6c\x65\143t\145\x64", null, $this->x165('.log')); } $xc6 = Mage::getModel('simplegoogleshopping/product_collection')->getCollection()->addStoreFilter($x58); if (Mage::getStoreConfig("sim\160\154e\147\x6f\157\147\x6c\x65s\150\157\x70\160\x69ng\x2fs\171\163\x74\145\155\57\x64i\163\x61\142\154\145\x64")) $xc6->addFieldToFilter("\163t\141t\x75s", array('gteq' => 1)); else $xc6->addFieldToFilter("\163t\141t\x75s", 1); $xc6->addAttributeToFilter("\164\x79\160\145\x5fi\x64", array("\151n" => $x6f)); $xc6->addAttributeToFilter("\166is\151\x62il\151\164\x79", array("\151n" => $x70)); if ($x72[0] != '*') $xc6->addAttributeToFilter("\141tt\x72\151\x62\165t\145\x5f\x73e\164_i\144", array("\151n" => $x72)); $xc6->addAttributeToSelect($x86, true); $xc7 = array("e\x71" => "= '\x25s'", "\156\145q" => "\41=\40\47%\163'", "g\x74e\161" => "\x3e=\x20'%\x73\x27", "\154\x74\x65q" => "<\x3d\40'%\x73\47", "\x67\x74" => "\x3e\x20\47\45\x73'", "\154t" => "<\x20\47\x25\x73\47", "lik\x65" => "\154i\153\145 \47%s\47", "\x6e\x6c\151\x6b\145" => "n\157t \154\151k\145\40\x27\45s'", "\156\165l\154" => "\x69\163 \156\165\x6c\154", "\x6e\157\164\156\x75ll" => "\x69\x73 no\x74 \x6e\165\x6cl", "\151n" => "\x69n\40(%\x73\51", "\156in" => "no\164\40\x69n\x28%s\51", ); $xc8 = ''; $x32 = 0; $xc9 = array(); foreach ($x71 as $x88) { if ($x88->checked) { if ($x88->condition == 'in' || $x88->condition == 'nin') { if ($x88->code == 'qty' || $x88->code == 'is_in_stock') { $xca = explode(',', $x88->value); $x88->value = "\47" . implode($xca, "'\54'") . "\47"; } else { $x88->value = explode(',', $x88->value); } } switch ($x88->code) { case 'qty' : if ($x32 > 0) $xc8.=' ' . $x88->statement . ' '; $xc8.="\40\x71\164\171\40" . sprintf($xc7[$x88->condition], $x88->value); $x32++; break; case 'is_in_stock' : if ($x32 > 0) $xc8.=' ' . $x88->statement . ' '; $xc8.="\40(\111\x46\50"; $xc8.="(use_config_manage_stock=1 AND $x5d=0)"; $xc8.="\40\117\x52 "; $xc8.='(use_config_manage_stock=0 AND manage_stock=0)'; $xc8.="\40\117\x52 "; $xc8.="(use_config_manage_stock=1 AND $x5d=1 AND is_in_stock=1 )"; $xc8.="\40\117\x52 "; $xc8.="\x28use\137c\x6f\x6e\x66i\147_\155a\x6e\x61\147\145\137st\157\143k\75\x30 A\116D\x20m\141\x6e\141ge_\x73\x74\157\143k\x3d\61\40\x41\x4eD i\163\137\151\x6e\137s\164\x6fck=\61\x20\51"; $xc8.="\54\x27\61\x27\54\x270\47\x29" . sprintf($xc7[$x88->condition], $x88->value) . "\51"; $x32++; break; default : if ($x88->statement == "A\x4e\104") { if (count($xc9)) $xc6->addFieldToFilter($xc9); $xc9 = array(); } if ($x88->condition == "\151n") { $xcb = true; $xcc = array(); foreach ($x88->value as $xcd) { if (!$x14d($xcd)) $xcb = true; } if ($xcb) { foreach ($x88->value as $xcd) { $xcc[] = array(array("\146\x69n\163\145\164" => $xcd)); } $xc9[] = array("at\x74r\x69\142\165t\145" => $x88->code, $xcc); } else $xc9[] = array("at\x74r\x69\142\165t\145" => $x88->code, $x88->condition => $x88->value); } else $xc9[] = array("at\x74r\x69\142\165t\145" => $x88->code, $x88->condition => $x88->value); break; } } }; if (count($xc9)) $xc6->addFieldToFilter($xc9); $xc6->getSelect()->joinLeft($xa2 . ' AS stock', 'stock.product_id=e.entity_id', array('qty' => 'qty', 'is_in_stock' => 'is_in_stock', 'manage_stock' => 'manage_stock', 'use_config_manage_stock' => 'use_config_manage_stock', 'backorders' => 'backorders', 'use_config_backorders' => 'use_config_backorders')); $xc6->getSelect()->joinLeft($xa3 . ' AS url', 'url.product_id=e.entity_id ' . $xa9 . ' AND is_system=1 AND ' . $x79 . ' AND url.store_id=' . $x58, array('request_path' => $xaa . '(DISTINCT request_path)')); if ($x6c[0] != '*') { $xcd = 0; $xce = null; foreach ($x6c as $x6e) { if ($xcd > 0) $xce.=','; $xce.=$x157(explode('/', $x6e)); $xcd++; } ($x6a) ? $xcf = "\x49\x4e" : $xcf = "NO\x54 IN"; $xc6->getSelect()->joinLeft($xa6 . ' AS cpsl', 'cpsl.product_id=e.entity_id ', array('parent_id' => 'parent_id')); switch ($x6b) { case 0: $xd0 = "c\x61\164\145g\x6fr\151e\x73.p\x72\157du\143t_i\x64=\x65\56e\x6e\x74\x69t\x79_\151\144"; break; case 1 : $xd0 = "\x63\x61\x74\145go\162\x69\145\x73\x2e\x70r\x6f\144u\x63\x74_i\144\x3de\56\145n\x74\151t\171_id\x20\117R ca\164e\x67\157r\x69\x65\163\56\160\x72\157d\165\143\x74_\151\x64\x3d\x63p\x73\x6c.\x70\141\162\x65\x6e\x74\137\x69\144"; break; case 2: $xd0 = "cat\x65\x67\x6f\162\151e\163.\x70\162\157\144uc\164_i\144\75\x63\x70\x73\154\x2e\160a\x72ent\137i\x64 "; break; } if ($x155(Mage::getVersion(), '1.12.0', '<=')) { $xce = "\101N\104 \143\141\164\x65g\x6fr\151\x65s\x5f\151\x6e\x64\145\170\x2ec\141\164e\x67\157\x72\x79_\x69\144\40" . $xcf . "\40\50" . $xce . "\51"; $xc6->getSelect()->joinLeft($x83 . ' AS categories', $xd0, array()); $xc6->getSelect()->joinInner($xa4 . ' AS categories_index', '((categories_index.category_id=categories.category_id AND categories_index.product_id=categories.product_id)) AND categories_index.store_id=' . $x58 . ' ' . $xce, array('categories_ids' => 'GROUP_CONCAT( DISTINCT categories_index.category_id)')); } else { $xce = "\x41N\x44 ca\164eg\157\162\x69\145\x73\56c\x61\x74\x65g\x6fr\x79\137\151\144 " . $xcf . "\40\50" . $xce . "\51"; $xc6->getSelect()->joinInner($x83 . ' AS categories', $xd0 .' '. $xce, array('categories_ids' => 'GROUP_CONCAT( DISTINCT categories.category_id)')); } } else { $xc6->getSelect()->joinLeft($x83 . ' AS categories', 'categories.product_id=e.entity_id'); $xc6->getSelect()->joinLeft($xa4 . ' AS categories_index', '((categories_index.category_id=categories.category_id AND categories_index.product_id=categories.product_id) ) AND categories_index.store_id=' . $x58, array('categories_ids' => 'GROUP_CONCAT(DISTINCT categories_index.category_id)')); } if ($x155(Mage::getVersion(), '1.4.0', '>=')) $xc6->getSelect()->joinLeft($xa5 . ' AS price_index', 'price_index.entity_id=e.entity_id AND customer_group_id=0 AND price_index.website_id=' . Mage::getModel('core/store')->load($x58)->getWebsiteId(), array('min_price' => 'min_price', 'max_price' => 'max_price', 'tier_price' => 'tier_price', 'final_price' => 'final_price')); if (!empty($xc8)) $xc6->getSelect()->where($xc8); $xc6->getSelect()->group("e.entit\x79_\164y\160e\x5fi\144"); if ($this->_log) Mage::log("\x0a>>\76\x3e>>\x3e\x3e\x3e\76\76\x3e\76\76\x3e\x3e\x3e\x3e\x3e\x3e\x3e>\76\x3e\76\x3e\76\x3e\x3e\x3e\76\x3e\x3e\x3e\76\x3e>\76\76>\x3e>\x3e\76\76\76 \115\141in s\x71l\x20\162\145\161\165e\x73t:\x20\x0a" . $xc6->getSelect(), null, $this->x165('.log')); if ($this->_debug) { echo "\74\x62\x72>\74\x62\x72\76\x2d\55-\55\55\55\x2d\55\x2d-\x2d\55 \115A\x49\x4e\40\x53\x51\x4c\x20\122\105\x51\125\105\123\124 \x2d-\55-\x2d-\x2d\x2d\x2d\x2d\x2d\55\55--\55\x3c\x62r\x3e";
echo $xc6->getSelect(); } $xd1 = 0; $xd2 = clone $xc6; $xd2->getSelect()->columns("\x43O\x55N\124\50\104\x49\x53\x54I\x4eC\x54 e\x2ee\x6e\x74\x69\x74y_i\144\x29\x20\101s\40tota\154"); $this->_counter = $xd2->getFirstItem()->getTotal(); $xd3 = ceil($this->_counter / $this->_sqlSize); $x73 = ''; $xd4 = 1; Mage::log("\n>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> Total items calculated ($this->_counter in $xd3 queries )", null, $this->x165('.log')); $xc6->getSelect()->group(array('e.entity_id'))->order('e.entity_id'); $xd5 = time(true); $xd6 = 0; while ($xd1 < $xd3) { $xab = clone $xc6; if ($this->_debug) { echo "\x3c\x62\162\x3e\74\142\162\x3e-\x2d\x2d-\x2d\x2d\x2d\55\x2d-\x2d-\40\123\x51\x4c\x20\55\x2d\x2d\x2d-\55\55\x2d\x2d\55\55\55-\55\55\x2d\74\x62\x72\76"; print($xab->getSelect()); } $xab->getSelect()->limit($this->_sqlSize, ($this->_sqlSize * $xd1)); $xd1++; if ($this->_sqlSize * $xd1 > $this->_counter) $xd7 = $this->_counter; else $xd7 = $this->_sqlSize * $xd1; if ($this->_log) Mage::log("\x0a\76\76\76\x3e>\76\76\x3e>\76\76\x3e\76\76\76\76\x3e>\76\x3e\76>>\76\76\x3e\76>\76>\76>\76\x3e>\x3e>\76\76\76\x3e>>>\76\x3e\x20\106e\164c\x68\151\156\147 p\x72o\144u\x63\x74\163\40\x66r\x6f\155\x20" . ($this->_sqlSize * ($xd1 - 1) + 1) . "\40t\x6f\x20" . $xd7, null, $this->x165('.log')); $xc3 = 1; foreach ($xab as $product) { if ($this->_debug) { echo "\74\142\162>\x3c\x62\x72>\55-\55\x2d-\55\55\55-\55-- \x50\x52\117\104U\103\x54\40[\40S\x4bU\40\55\x3e " . $product->getSku() . "\x20\174 ID\40\x2d\x3e\x20" . $product->getId() . "]\55--\55\x2d--\55\55\55\55\x2d\x2d\x2d\x2d\74b\162>"; echo "c\141t\145\147o\x72ie\163 : " . $product->getCategoriesIds() . ", \x52\x6fo\x74\40\151d\x3a\40" . $x63 . "<\x62\162\x3e"; foreach (explode(',', $product->getCategoriesIds()) as $x37 => $x7c) { echo $x7c . "\x3d\x3e" . $x7b[$x7c]["\x70at\x68"] . "<\x62\162\x3e"; } } $x48 = $x66; foreach ($x76 as $x37 => $xd8) { $x4a = ""; switch ($xd8['pattern']) { case '{G:ID}': $xd9 = $this->checkReference($xd8['reference'], $product); ($xd8['options'][0] != "\x69d") ? $xda = $xd9->getSku() : $xda = $xd9->getId(); $x4a = "<\x67:\151d\76<!\133\x43\104ATA\x5b" . $xda . "]\x5d>\x3c\x2fg\x3aid\x3e"; break; case '{G:TITLE}': $xd9 = $this->checkReference($xd8['reference'], $product); $x39 = $xd9->getName(); if (strlen($x39) > 900) { $x39 = substr($x39, 0, 150, - 3); $xdb = strrpos($x39, "\x20"); $x39 = substr($x39, 0, $xdb) . "..\56"; } $x4a = "\x3c\164\x69\x74\154e\x3e<![\x43D\101\x54A\x5b" . $x39 . "\135\135\76\x3c\57\164\x69\164\x6ce>"; break; case '{G:DESCRIPTION}': $xd9 = $this->checkReference($xd8['reference'], $product); ($xd8['options'][0] != "\163h\157rt") ? $xdc = $xd9->getDescription() : $xdc = $xd9->getShortDescription(); $x4a = "\x3cde\163cr\151\160ti\x6f\x6e>\x3c\41\x5b\103D\101\x54\101\133" . $xdc . "]]\76\74\x2f\x64esc\x72i\160t\151\157\x6e>"; break; case '{G:PROMOTION_ID}': $x4a = ""; $xdd = clone $xc5; foreach ($xdd as $xde) { if ($xde->getIsActive()) { ; $xdf = unserialize($xde->getConditions_serialized()); $xdf = $xdf["\x63\x6f\x6e\144i\164\x69\x6fn\x73"]; $xe0 = $xde->getConditions(); $xe1 = $xe0->getAggregator() === 'all'; $xe2 = (bool) $xe0->getValue(); $xe3 = ($xe1) ? true : false; $xe3 = (!count($xe0->getConditions())) ? true : $xe3; $xe4 = 0; foreach ($xe0->getConditions() as $xe5) { $xe6 = array("sa\154\x65\163\x72\165l\145/r\x75\154e\x5f\x63\157nditio\x6e\137p\162\157\x64\x75ct\x5f\x73ub\163\145le\x63\164", "\x73a\154\x65\x73\x72ul\x65/rul\x65_\x63on\x64\151\164\151\157\156\x5f\x61\x64dr\x65\163\x73"); if (!$x156($xe5->getType(), $xe6)) { $xe7 = $xe5->validate($product); if ($xe1 && $xe7 !== $xe2) { $xe3 = false; } elseif (!$xe1 && $xe7 === $xe2) { $xe3 = true; break; } } else { if ($xe5->getAttribute() == "\x62\x61\x73\x65\x5f\x73u\x62t\157\x74\141l") { } } $xe4++; } $xe8 = unserialize($xde->getActions_serialized()); $xe8 = $xe8["\x63\x6f\x6e\144i\164\x69\x6fn\x73"]; $xe9 = $xde->getActions(); $xe1 = $xe9->getAggregator() === 'all'; $xe2 = (bool) $xe9->getValue(); $xea = ($xe1) ? true : false; $xea = (!count($xe9->getConditions())) ? true : $xea; $xe4 = 0; foreach ($xe9->getConditions() as $x57) { $xe7 = $x57->validate($product); if ($xe1 && $xe7 !== $xe2) { $xea = false; } elseif (!$xe1 && $xe7 === $xe2) { $xea = true; break; } $xe4++; } if ($xea && $xe3) { $x4a = "\74g:\x70romo\x74i\x6f\156\x5f\x69\x64\76\x3c!\133CD\101\124\x41\x5b" . $xde->getData('rule_id') . "\135\x5d\76\74/\x67:\160r\x6f\x6dot\x69on\x5f\x69d\x3e"; break; } } } break; case "\173\x6c\157\141d\137\x6f\x70t\151\157\x6es}": $x9a = 1; $xeb = array(); foreach ($xd8['options'] as $x37 => $xec) { if (isset($xc2[$product->getId()][$xec])) { $x9a = $x9a * count($xc2[$product->getId()][$xec]["\x6f\x70\x74\151\157\156s"]); $xeb[$x37] = 0; } } $x35 = array(); for ($x94 = 1; $x94 <= $x9a; $x94++) { $xed = $x48; foreach ($xd8['options'] as $x37 => $xec) { if (isset($xc2[$product->getId()][$xec])) { $xed = $x147("\173" . $xec . "\x5fl\141\x62\145\154\x7d", $xc2[$product->getId()][$xec]["\x6f\x70\x74\151\157\156s"][$xeb[$x37]]['value'], $xed); $xed = $x147("\173" . $xec . "\137\163\153u}", $xc2[$product->getId()][$xec]["\x6f\x70\x74\151\157\156s"][$xeb[$x37]]['sku'], $xed); $xed = $x147("\173" . $xec . "\x5f\x70r\151\x63\145\175", $xc2[$product->getId()][$xec]["\x6f\x70\x74\151\157\156s"][$xeb[$x37]]['price'], $xed); $xed = $x147("\173" . $xec . "_\164y\160e\175", $xc2[$product->getId()][$xec]["\x6f\x70\x74\151\157\156s"][$xeb[$x37]]['price_type'], $xed); $xed = $x147("\173" . $xec . "_\151\144\x7d", $xc2[$product->getId()][$xec]["\x6f\x70\x74\151\157\156s"][$xeb[$x37]]['id'], $xed); if ($x37 > 0 || count($xc2[$product->getId()]) == 1 || count($xd8['options']) < 2) $xeb[$x37] ++; if ($xeb[$x37] >= count($xc2[$product->getId()][$xec]["\x6f\x70\x74\151\157\156s"])) { $xeb[$x37] = 0; $xeb[$x37 - 1] ++; } } } $x35[] = $xed; } if (count($x35) > 0) { $x48 = implode("\74\x2f\151\164\145m\x3e\x0a<\151t\145\155\x3e", $x35); } break; case "\173u\163e\137op\x74\151o\x6e\x73\175": foreach ($xd8['options'] as $x37 => $xec) { if (isset($xc2[$product->getId()][$xec])) { $xee = array(); $xef = array(); $xf0 = array(); $xf1 = array(); foreach ($xc2[$product->getId()][$xec]["\x6f\x70\x74\151\157\156s"] as $x4c) { $xee[] = $x4c['value']; $xef[] = $x4c['sku']; $xf0[] = $x4c['price'];
$xf1[] = $x4c['id']; } $x48 = $x147("\173" . $xec . "\x5fl\141\x62\145\154\x7d", implode(',', $xee), $x48); $x48 = $x147("\173" . $xec . "\137\163\153u}", implode(',', $xef), $x48); $x48 = $x147("\173" . $xec . "\x5f\x70r\151\x63\145\175", implode(',', $xf0), $x48); $x48 = $x147("\173" . $xec . "_\151\144\x7d", implode(',', $xf1), $x48); } } break; case '{inc}' : $x4a = $xd4; break; case '{min_price}' : $xd9 = $this->checkReference($xd8['reference'], $product); $x3e = $xd9->getMinPrice(); (!isset($xd8['options'][1])) ? $x43 = false : $x43 = $xd8['options'][1]; if ($xd9->getTypeId() == "\143\x6f\156\146\151g\x75r\x61b\x6c\145") { if (isset($this->configurablePrices[$xd9->getId()][$product->getId()])) { $xf2 = 0; foreach ($this->configurablePrices[$xd9->getId()][$product->getId()] as $xf3) { if ($xf3["i\163_\x70e\162c\145\156t"]) { $xf2+=( $xf3["p\162ic\x69\x6e\x67_\166a\x6c\x75e"] / 100) * $x3e; } else $xf2+=$xf3["p\162ic\x69\x6e\x67_\166a\x6c\x75e"]; }; $x3e+=$xf2; } } $x4a = $this->x167($x3e, $x62, $xd9->getTaxClassId(), $x43); (!isset($xd8['options'][0])) ? $x3f = $x5c : $x3f = $xd8['options'][0]; $x4a = $this->x166($x4a, $x3f); $x4a = $x14c($x4a, 2, '.', ''); break; case '{max_price}' : $xd9 = $this->checkReference($xd8['reference'], $product); $x3e = $xd9->getMaxPrice(); (!isset($xd8['options'][1])) ? $x43 = false : $x43 = $xd8['options'][1]; if ($xd9->getTypeId() == "\143\x6f\156\146\151g\x75r\x61b\x6c\145") { if (isset($this->configurablePrices[$xd9->getId()][$product->getId()])) { $xf2 = 0; foreach ($this->configurablePrices[$xd9->getId()][$product->getId()] as $xf3) { if ($xf3["i\163_\x70e\162c\145\156t"]) { $xf2+=( $xf3["p\162ic\x69\x6e\x67_\166a\x6c\x75e"] / 100) * $x3e; } else $xf2+=$xf3["p\162ic\x69\x6e\x67_\166a\x6c\x75e"]; }; $x3e+=$xf2; } } $x4a = $this->x167($x3e, $x62, $xd9->getTaxClassId(), $x43); (!isset($xd8['options'][0])) ? $x3f = $x5c : $x3f = $xd8['options'][0]; $x4a = $this->x166($x4a, $x3f); $x4a = $x14c($x4a, 2, '.', ''); break; case '{normal_price}' : $xd9 = $this->checkReference($xd8['reference'], $product); if ($xd9->type_id == 'bundle') $x3e = $xd9->price; else { $x3e = $xd9->getPrice(); } if ($xd9->getTypeId() == "\143\x6f\156\146\151g\x75r\x61b\x6c\145") { if (isset($this->configurablePrices[$xd9->getId()][$product->getId()])) { $xf2 = 0; foreach ($this->configurablePrices[$xd9->getId()][$product->getId()] as $xf3) { if ($xf3["i\163_\x70e\162c\145\156t"]) { $xf2+=( $xf3["p\162ic\x69\x6e\x67_\166a\x6c\x75e"] / 100) * $x3e; } else $xf2+=$xf3["p\162ic\x69\x6e\x67_\166a\x6c\x75e"]; }; $x3e+=$xf2; } } (!isset($xd8['options'][1])) ? $x43 = false : $x43 = $xd8['options'][1]; $x4a = $this->x167($x3e, $x62, $xd9->getTaxClassId(), $x43); (!isset($xd8['options'][0])) ? $x3f = $x5c : $x3f = $xd8['options'][0]; $x4a = $this->x166($x4a, $x3f); $x4a = $x14c($x4a, 2, '.', ''); break; case '{price}' : $xd9 = $this->checkReference($xd8['reference'], $product); if ($xd9->getSpecialFromDate() && !$xd9->getSpecialToDate()) { if ($xd9->getSpecialFromDate() <= date("\x59\x2d\x6d\x2dd H\72i:s")) { if ($xd9->type_id == "b\x75\x6e\144le") { if (($xd9->price_type || (!$xd9->price_type && $xd9->special_price < $xd9->price)) && $xd9->special_price > 0) { if ($xd9->price_type) $x3e = $x14c($xd9->price * $xd9->special_price / 100, 2, "\x2e", ""); else $x3e = $xd9->special_price; } else { $x3e = $xd9->price; } } else ($xd9->getSpecial_price() && $xd9->getSpecial_price() < $xd9->getPrice()) ? $x3e = $xd9->getSpecialPrice() : $x3e = $xd9->getPrice(); } else { if ($xd9->type_id == "b\x75\x6e\144le") $x3e = $xd9->price; else { $x3e = $xd9->getPrice(); } } } elseif ($xd9->getSpecialFromDate() && $xd9->getSpecialToDate()) { if ($xd9->getSpecialFromDate() <= date("\x59\x2d\x6d\x2dd H\72i:s") && date("\x59\x2d\x6d\x2dd H\72i:s") < $xd9->getSpecialToDate()) { if ($xd9->type_id == "b\x75\x6e\144le") { if (($xd9->price_type || (!$xd9->price_type && $xd9->special_price < $xd9->price)) && $xd9->special_price > 0) { if ($xd9->price_type) $x3e = $x14c($xd9->price * $xd9->special_price / 100, 2, "\x2e", ""); else { $x3e = $xd9->special_price; } } else { $x3e = $xd9->price; } } else { ($xd9->getSpecial_price() && $xd9->getSpecial_price() < $xd9->getPrice()) ? $x3e = $xd9->getSpecialPrice() : $x3e = $xd9->getPrice(); } } else { if ($xd9->type_id == "b\x75\x6e\144le") { $x3e = $xd9->price; } else { $x3e = $xd9->getPrice(); } } } else { if ($xd9->type_id == "b\x75\x6e\144le") { if (($xd9->price_type || (!$xd9->price_type && $xd9->special_price < $xd9->price)) && $xd9->special_price > 0) { if ($xd9->price_type) { $x3e = $x14c($xd9->price * $xd9->special_price / 100, 2, "\x2e", ""); } else { $x3e = $xd9->special_price; } } else { $x3e = $xd9->price; } } else { ($xd9->getSpecial_price() && $xd9->getSpecial_price() < $xd9->getPrice()) ? $x3e = $xd9->getSpecialPrice() : $x3e = $xd9->getPrice(); } } if ($xd9->getTypeId() == "\143\x6f\156\146\151g\x75r\x61b\x6c\145") { if (isset($this->configurablePrices[$xd9->getId()][$product->getId()])) { $xf2 = 0; foreach ($this->configurablePrices[$xd9->getId()][$product->getId()] as $xf3) { if ($xf3["i\163_\x70e\162c\145\156t"]) { $xf2+=( $xf3["p\162ic\x69\x6e\x67_\166a\x6c\x75e"] / 100) * $x3e; } else $xf2+=$xf3["p\162ic\x69\x6e\x67_\166a\x6c\x75e"]; }; $x3e+=$xf2; } } (!isset($xd8['options'][1])) ? $x43 = false : $x43 = $xd8['options'][1]; $x4a = $this->x167($x3e, $x62, $xd9->getTaxClassId(), $x43); (!isset($xd8["\x6f\x70\x74\151\157\156s"][0])) ? $x3f = $x5c : $x3f = $xd8["\x6f\x70\x74\151\157\156s"][0]; $x4a = $this->x166($x4a, $x3f); $x4a = $x14c($x4a, 2, "\x2e", ""); break; case "{i\163\137\163p\x65\143\x69a\x6c_\x70\x72\151\143\x65}" : $xd9 = $this->checkReference($xd8['reference'], $product); (!isset($xd8["\x6f\x70\x74\151\157\156s"][0])) ? $xe2 = 1 : $xe2 = $xd8["\x6f\x70\x74\151\157\156s"][0]; (!isset($xd8["\x6f\x70\x74\151\157\156s"][1])) ? $xf4 = 0 : $xf4 = $xd8["\x6f\x70\x74\151\157\156s"][1]; if ($xd9->getSpecialFromDate() && !$xd9->getSpecialToDate()) { if ($xd9->getSpecialFromDate() <= date("\x59\x2d\x6d\x2dd H\72i:s")) { if ($xd9->type_id == "b\x75\x6e\144le") (($xd9->price_type || (!$xd9->price_type && $xd9->special_price < $xd9->price)) && $xd9->special_price > 0 ) ? $x4a = $xe2 : $x4a = $xf4; else { ($xd9->getSpecial_price() && $xd9->getSpecial_price() < $xd9->getPrice()) ? $x4a = $xe2 : $x4a = $xf4; } } else { if ($xd9->type_id == "b\x75\x6e\144le") { $x4a = $xf4; } else { $x4a = $xf4; } } } elseif ($xd9->getSpecialFromDate() && $xd9->getSpecialToDate()) { if ($xd9->getSpecialFromDate() <= date("\x59\x2d\x6d\x2dd H\72i:s") && date("\x59\x2d\x6d\x2dd H\72i:s") < $xd9->getSpecialToDate()) { if ($xd9->type_id == "b\x75\x6e\144le") { (($xd9->price_type || (!$xd9->price_type && $xd9->special_price < $xd9->price)) && $xd9->special_price > 0 ) ? $x4a = $xe2 : $x4a = $xf4; } else { ($xd9->getSpecial_price() && $xd9->getSpecial_price() < $xd9->getPrice()) ? $x4a = $xe2 : $x4a = $xf4; } } else { if ($xd9->type_id == "b\x75\x6e\144le") { $x4a = $xf4; } else { $x4a = $xf4; } } } else { if ($xd9->type_id == "b\x75\x6e\144le") { (($xd9->price_type || (!$xd9->price_type && $xd9->special_price < $xd9->price)) && $xd9->special_price > 0 ) ? $x4a = $xe2 : $x4a = $xf4; } else { ($xd9->getSpecial_price() && $xd9->getSpecial_price() < $xd9->getPrice()) ? $x4a = $xe2 : $x4a = $xf4; } } break; case "{\x73pe\x63i\x61l_\x70\162\151\x63\x65\175" : $xd9 = $this->checkReference($xd8['reference'], $product); $x3e = null; if ($xd9->getSpecialFromDate() && !$xd9->getSpecialToDate()) { if ($xd9->getSpecialFromDate() <= date("\x59\x2d\x6d\x2dd H\72i:s")) { if ($xd9->type_id == 'bundle') { if ($xd9->price_type) $x3e = $x14c($xd9->price * $xd9->special_price / 100, 2, "\x2e", ""); else { $x3e = $xd9->special_price; } } else { $x3e = $xd9->getSpecial_price(); } } } elseif ($xd9->getSpecialFromDate() && $xd9->getSpecialToDate()) { if ($xd9->getSpecialFromDate() <= date("\x59\x2d\x6d\x2dd H\72i:s") && date("\x59\x2d\x6d\x2dd H\72i:s") < $xd9->getSpecialToDate()) { if ($xd9->type_id == 'bundle') { if ($xd9->price_type) $x3e = $x14c($xd9->price * $xd9->special_price / 100, 2, "\x2e", ""); else { $x3e = $xd9->special_price; } } else { $x3e = $xd9->getSpecial_price(); } } } else { if ($xd9->type_id == 'bundle') { if ($xd9->price_type) $x3e = $x14c($xd9->price * $xd9->special_price / 100, 2, "\x2e", ""); else { $x3e = $xd9->special_price;
} } else { $x3e = $xd9->getSpecial_price(); } } (!isset($xd8['options'][1])) ? $x43 = false : $x43 = $xd8['options'][1]; if ($x3e > 0) { if ($xd9->getTypeId() == "\143\x6f\156\146\151g\x75r\x61b\x6c\145") { if (isset($this->configurablePrices[$xd9->getId()][$product->getId()])) { $xf2 = 0; foreach ($this->configurablePrices[$xd9->getId()][$product->getId()] as $xf3) { if ($xf3["i\163_\x70e\162c\145\156t"]) { $xf2+=( $xf3["p\162ic\x69\x6e\x67_\166a\x6c\x75e"] / 100) * $x3e; } else $xf2+=$xf3["p\162ic\x69\x6e\x67_\166a\x6c\x75e"]; }; $x3e+=$xf2; } } $x4a = $this->x167($x3e, $x62, $xd9->getTaxClassId(), $x43); (!isset($xd8['options'][0])) ? $x3f = $x5c : $x3f = $xd8['options'][0]; $x4a = $this->x166($x4a, $x3f); $x4a = $x14c($x4a, 2, '.', ''); ; } else { $x4a = ""; } break; case '{price_rules}' : $xd9 = $this->checkReference($xd8['reference'], $product); $x58 = $this->getStoreId(); $xf5 = Mage::getResourceModel('catalogrule/rule'); $xf6 = Mage::app()->getLocale()->storeTimeStamp($x58); $xf7 = Mage::app()->getStore($x58); $xf8 = $xf7->getWebsiteId(); $xf9 = Mage::getSingleton('customer/session')->getCustomerGroupId(); $xfa = $xf5->getRulePrice($xf6, $xf8, $xf9, $xd9->getId()); if ($xfa !== false) $xfb = sprintf('%.2f', round($xfa, 2)); else $xfb = $xd9->getPrice(); if ($xd9->getSpecialFromDate() && !$xd9->getSpecialToDate()) { if ($xd9->getSpecialFromDate() <= date("\x59\x2d\x6d\x2dd H\72i:s")) { if ($xd9->type_id == "b\x75\x6e\144le") { if (($xd9->price_type || (!$xd9->price_type && $xd9->special_price < $xd9->price)) && $xd9->special_price > 0) { if ($xd9->price_type) $x3e = $x14c($xd9->price * $xd9->special_price / 100, 2, "\x2e", ""); else { $x3e = $xd9->special_price; } } else { $x3e = $xd9->price; } } else { ($xd9->getSpecial_price() && $xd9->getSpecial_price() < $xd9->getPrice()) ? $x3e = $xd9->getSpecialPrice() : $x3e = $xfb; } } else { if ($xd9->type_id == "b\x75\x6e\144le") $x3e = $xd9->price; else { $x3e = $xfb; } } } elseif ($xd9->getSpecialFromDate() && $xd9->getSpecialToDate()) { if ($xd9->getSpecialFromDate() <= date("\x59\x2d\x6d\x2dd H\72i:s") && date("\x59\x2d\x6d\x2dd H\72i:s") < $xd9->getSpecialToDate()) { if ($xd9->type_id == "b\x75\x6e\144le") { if (($xd9->price_type || (!$xd9->price_type && $xd9->special_price < $xd9->price)) && $xd9->special_price > 0) { if ($xd9->price_type) $x3e = $x14c($xd9->price * $xd9->special_price / 100, 2, "\x2e", ""); else { $x3e = $xd9->special_price; } } else { $x3e = $xd9->price; } } else { ($xd9->getSpecial_price() && $xd9->getSpecial_price() < $xd9->getPrice()) ? $x3e = $xd9->getSpecialPrice() : $x3e = $xfb; } } else { if ($xd9->type_id == "b\x75\x6e\144le") $x3e = $xd9->price; else { $x3e = $xfb; } } } else { if ($xd9->type_id == "b\x75\x6e\144le") { if (($xd9->price_type || (!$xd9->price_type && $xd9->special_price < $xd9->price)) && $xd9->special_price > 0) { if ($xd9->price_type) $x3e = $x14c($xd9->price * $xd9->special_price / 100, 2, "\x2e", ""); else { $x3e = $xd9->special_price; } } else { $x3e = $xd9->price; } } else { ($xd9->getSpecial_price() && $xd9->getSpecial_price() < $xd9->getPrice()) ? $x3e = $xd9->getSpecialPrice() : $x3e = $xfb; } } if ($xfb !== FALSE) { if ($xfb < $x3e) $x4a = $xfb; else $x4a = $x3e; } else $x4a = $x3e; if ($xd9->getTypeId() == "\143\x6f\156\146\151g\x75r\x61b\x6c\145") { if (isset($this->configurablePrices[$xd9->getId()][$product->getId()])) { $xf2 = 0; foreach ($this->configurablePrices[$xd9->getId()][$product->getId()] as $xf3) { if ($xf3["i\163_\x70e\162c\145\156t"]) { $xf2+=( $xf3["p\162ic\x69\x6e\x67_\166a\x6c\x75e"] / 100) * $x3e; } else $xf2+=$xf3["p\162ic\x69\x6e\x67_\166a\x6c\x75e"]; }; $x3e+=$xf2; } } (!isset($xd8['options'][1])) ? $x43 = false : $x43 = $xd8['options'][1]; $x4a = $this->x167($x3e, $x62, $xd9->getTaxClassId(), $x43); (!isset($xd8["\x6f\x70\x74\151\157\156s"][0])) ? $x3f = $x5c : $x3f = $xd8["\x6f\x70\x74\151\157\156s"][0]; $x4a = $this->x166($x4a, $x3f); $x4a = $x14c($x4a, 2, "\x2e", ""); break; case '{G:PRICE}' : $xd9 = $this->checkReference($xd8['reference'], $product); if ($xd9->type_id == 'bundle') $x3e = $xd9->price; else { $x3e = $xd9->getPrice(); } if ($xd9->getTypeId() == "\143\x6f\156\146\151g\x75r\x61b\x6c\145") { if (isset($this->configurablePrices[$xd9->getId()][$product->getId()])) { $xf2 = 0; foreach ($this->configurablePrices[$xd9->getId()][$product->getId()] as $xf3) { if ($xf3["i\163_\x70e\162c\145\156t"]) { $xf2+=( $xf3["p\162ic\x69\x6e\x67_\166a\x6c\x75e"] / 100) * $x3e; } else $xf2+=$xf3["p\162ic\x69\x6e\x67_\166a\x6c\x75e"]; }; $x3e+=$xf2; } } (!isset($xd8['options'][1])) ? $x43 = false : $x43 = $xd8['options'][1]; $x4a = $this->x167($x3e, $x62, $xd9->getTaxClassId(), $x43); (!isset($xd8['options'][0])) ? $x3f = $x5c : $x3f = $xd8['options'][0]; $x4a = $this->x166($x4a, $x3f); $x4a = $x14c($x4a, 2, '.', ''); $x4a = "<\x67\x3a\160r\151\143\x65\x3e\x3c\41\x5bCD\101\124\101\x5b" . $x4a . "\x20" . $x3f . "\x5d]>\74\x2f\x67\x3a\x70r\151ce\76"; break; case "\x7bG:S\x41\x4cE\137\x50\122\111\x43\x45}" : $xd9 = $this->checkReference($xd8['reference'], $product); $x58 = $this->getStoreId(); $xf5 = Mage::getResourceModel('catalogrule/rule'); $xf6 = Mage::app()->getLocale()->storeTimeStamp($x58); $xf7 = Mage::app()->getStore($x58); $xf8 = $xf7->getWebsiteId(); $xf9 = Mage::getSingleton('customer/session')->getCustomerGroupId(); $xfa = $xf5->getRulePrice($xf6, $xf8, $xf9, $xd9->getId()); if ($xfa !== false) $xfb = sprintf('%.2f', round($xfa, 2)); $xfc = Mage::getSingleton('core/date')->getGmtOffset("\150o\x75rs"); if ($xfc > 0) { $xfd = "\x2b"; $xfe = $x158(abs(floor($xfc)), 2, 0, STR_PAD_LEFT) . '' . $x158((abs($xfc) - floor(abs($xfc))) * 60, 2, 0, STR_PAD_LEFT); } else { $xfd = "\55"; $xfe = $x158(abs(floor($xfc)), 2, 0, STR_PAD_LEFT) . '' . $x158((abs($xfc) - floor(abs($xfc))) * 60, 2, 0, STR_PAD_LEFT); } $xff = substr($x147(' ', 'T', $xd9->getSpecialFromDate()), 0, -3); $x100 = substr($x147(' ', 'T', $xd9->getSpecialToDate()), 0, -3); if ($xd9->type_id == 'bundle' && $xd9->special_price) { if ($xd9->price_type) { $x3e = $x14c($xd9->price * $xd9->special_price / 100, 2, "\x2e", ""); } else { $x3e = $xd9->special_price; } } else { $x3e = $xd9->getSpecial_price(); } (!isset($xd8['options'][1])) ? $x43 = false : $x43 = $xd8['options'][1]; if ($xfb < $x3e && $xfa !== false) $x3e = $xfb; if ($x3e > 0) { if ($xd9->getTypeId() == "\143\x6f\156\146\151g\x75r\x61b\x6c\145") { if (isset($this->configurablePrices[$xd9->getId()][$product->getId()])) { $xf2 = 0; foreach ($this->configurablePrices[$xd9->getId()][$product->getId()] as $xf3) { if ($xf3["i\163_\x70e\162c\145\156t"]) { $xf2+=( $xf3["p\162ic\x69\x6e\x67_\166a\x6c\x75e"] / 100) * $x3e; } else $xf2+=$xf3["p\162ic\x69\x6e\x67_\166a\x6c\x75e"]; }; $x3e+=$xf2; } } $x3e = $this->x167($x3e, $x62, $xd9->getTaxClassId(), $x43); (!isset($xd8['options'][0])) ? $x3f = $x5c : $x3f = $xd8['options'][0]; $x3e = $this->x166($x3e, $x3f); $x3e = $x14c($x3e, 2, '.', ''); ;
} if ($x3e > 0) { $x4a = "\x3c\x67\x3a\x73ale\x5fp\x72i\143e>\74!\133C\104\x41\124A\133" . $x3e . "\x20" . $x3f . "\135]>\x3c\x2f\147:\163\141\x6ce\x5fp\162\151ce\76\x0a"; } if ($x3e > 0 && $x100) { $x4a.="\x3c\147\x3as\141le\x5f\x70\x72i\143\145\137\145\146f\145c\164\x69\166\145_\144\141\164\x65\x3e\x3c\41\x5bCD\x41\x54\101[" . $xff . $xfd . $xfe . "\57" . $x100 . $xfd . $xfe . "\135\x5d\x3e\x3c/g\72\x73\141\x6ce_\x70\x72\151\x63e_\145\x66fe\143t\151\x76\x65_d\x61\x74\145\x3e\x0a"; } break; case "\173\151m\141\x67e}" : $xd9 = $this->checkReference($xd8['reference'], $product); $x101 = $xd9->getImage(); if (!isset($xd8['options'][0]) || $xd8['options'][0] == 0) { if ($xd9->getImage() && $xd9->getImage() != 'no_selection') { $x102 = 'catalog/product/' . $xd9->getImage(); $x4a = $x61 . $x147('//', '/', $x102); } else { $x4a = $x61 . '/catalog/product/placeholder/' . $x5b; } } elseif (isset($xa1[$xd9->getId()]['src'][$xd8['options'][0] - 1]) && $xd8['options'][0] > 0) { if ($xa1[$xd9->getId()]['src'][$xd8['options'][0] - 1] != $x101) { $x102 = 'catalog/product/' . $xa1[$xd9->getId()]['src'][$xd8['options'][0] - 1]; $x4a = $x61 . $x147('//', '/', $x102); } } break; case "\x7bG:\x49\x4d\x41\107\x45_L\x49\116K}" : $xd9 = $this->checkReference($xd8['reference'], $product); $x101 = $xd9->getImage(); $x103 = array($xd9->getSmall_image(), $xd9->getThumbnail()); $x104 = ''; $xeb = 0; if ($xd9->getImage() && $xd9->getImage() != 'no_selection') { $x102 = 'catalog/product/' . $xd9->getImage(); $x4a = $x61 . $x147('//', '/', $x102); $x104.="\74\x67\x3ai\x6dag\x65\137link\x3e<!\x5bCDA\x54\x41\x5b" . $x4a . "]\x5d>\74\57\147\x3a\x69\x6d\141\x67e_\x6c\151\x6e\153\76\x0a"; $xeb++; } $xe4 = 0; while (isset($xa1[$xd9->getId()]['src'][$xe4]) && $xeb < 10) { if ($xa1[$xd9->getId()]['src'][$xe4] != $x101) { if ($x156($xa1[$xd9->getId()]['src'][$xe4], $x103) || $xa1[$xd9->getId()]['disabled'][$xe4] != 1) { $x102 = 'catalog/product/' . $xa1[$xd9->getId()]['src'][$xe4]; $x4a = $x61 . $x147('//', '/', $x102); $x104.="<\147\x3a\x61\x64\x64\x69\x74\x69\x6f\156\x61\x6c\x5f\151mag\145\x5f\x6c\151n\153\x3e\74\41[\103\x44\x41\124\101\133" . $x4a . "\135]>\74/g\72\141\x64\144i\164\151\157\156\x61l\137\151\155\x61g\x65\137\154\151nk>\x0a"; $xeb++; } } $xe4++; } $x4a = $x104; break; case "\x7b\107\x3aL\x49NK}" : $xd9 = $this->checkReference($xd8['reference'], $product); if ($xd9->getRequest_path()) { if (Mage::getStoreConfig("\x73i\x6d\x70\x6ce\147\x6f\x6fgl\145\x73ho\160\160i\x6eg/\x73\171\163\x74\x65\155\57\x75r\154\162\145w\162\151\164e") == 2) { $x105 = explode("\x2c", $xd9->getRequest_path()); usort($x105, array('Wyomind_Simplegoogleshopping_Model_Simplegoogleshopping', 'x161')); $x4a = $x60 . $x157($x105); } elseif (Mage::getStoreConfig("\x73i\x6d\x70\x6ce\147\x6f\x6fgl\145\x73ho\160\160i\x6eg/\x73\171\163\x74\x65\155\57\x75r\154\162\145w\162\151\164e") == 3) { $x105 = explode("\x2c", $xd9->getRequest_path()); usort($x105, array('Wyomind_Simplegoogleshopping_Model_Simplegoogleshopping', 'x161')); $x4a = $x60 . $x159($x105); } else $x4a = $x60 . $xd9->getRequest_path(); } else { $x4a = $xd9->getProductUrl(); } $x4a = "<\x6c\151\x6e\153>\x3c![C\104\101\x54\x41\x5b" . $x4a . "\x5d]\76</\154\151\156\153>"; break; case "\x7b\x75\162\154\x7d" : $xd9 = $this->checkReference($xd8['reference'], $product); if ($xd9->getRequest_path()) { if (Mage::getStoreConfig("\x73i\x6d\x70\x6ce\147\x6f\x6fgl\145\x73ho\160\160i\x6eg/\x73\171\163\x74\x65\155\57\x75r\154\162\145w\162\151\164e") == 2) { $x105 = explode("\x2c", $xd9->getRequest_path()); usort($x105, array('Wyomind_Simplegoogleshopping_Model_Simplegoogleshopping', 'x161')); $x4a = $x60 . $x157($x105); } elseif (Mage::getStoreConfig("\x73i\x6d\x70\x6ce\147\x6f\x6fgl\145\x73ho\160\160i\x6eg/\x73\171\163\x74\x65\155\57\x75r\154\162\145w\162\151\164e") == 3) { $x105 = explode("\x2c", $xd9->getRequest_path()); usort($x105, array('Wyomind_Simplegoogleshopping_Model_Simplegoogleshopping', 'x161')); $x4a = $x60 . $x159($x105); } else $x4a = $x60 . $xd9->getRequest_path(); } else { $x4a = $xd9->getProductUrl(); } break; case "\x7bho\x73t\x7d" : $x4a = $x60; break; case "\x7b\165\x72\x69\x7d" : $xd9 = $this->checkReference($xd8['reference'], $product); if ($xd9->getRequest_path()) { if (Mage::getStoreConfig("\x73i\x6d\x70\x6ce\147\x6f\x6fgl\145\x73ho\160\160i\x6eg/\x73\171\163\x74\x65\155\57\x75r\154\162\145w\162\151\164e") == 2) { $x105 = explode("\x2c", $xd9->getRequest_path()); usort($x105, array('Wyomind_Simplegoogleshopping_Model_Simplegoogleshopping', 'x161')); $x4a = $x157($x105); } elseif (Mage::getStoreConfig("\x73i\x6d\x70\x6ce\147\x6f\x6fgl\145\x73ho\160\160i\x6eg/\x73\171\163\x74\x65\155\57\x75r\154\162\145w\162\151\164e") == 3) { $x105 = explode("\x2c", $xd9->getRequest_path()); usort($x105, array('Wyomind_Simplegoogleshopping_Model_Simplegoogleshopping', 'x161')); $x4a = $x159($x105); } else $x4a = $xd9->getRequest_path(); } else { $x4a = $x147($x60, '', $xd9->getProductUrl()); } break; case '{G:AVAILABILITY}' : $xd9 = $this->checkReference($xd8['reference'], $product); (!isset($xd8['options'][0])) ? $x106 = 'in stock' : $x106 = $xd8['options'][0]; (!isset($xd8['options'][1])) ? $x107 = "\157\x75\x74\40o\x66\x20\x73\x74\157\x63k" : $x107 = $xd8['options'][1]; (!isset($xd8['options'][2])) ? $x108 = "pre\x6fr\x64e\162" : $x108 = $xd8['options'][2]; if (($xd9->getManageStock() && !$xd9->getUseConfigManageStock() && !$x5d) || ($xd9->getUseConfigManageStock() && $x5d ) || ($xd9->getManageStock() && !$xd9->getUseConfigManageStock())) { if ($xd9->getIsInStock() > 0) { if ($product->type_id == "\143\x6f\156\146\151g\x75r\x61b\x6c\145") $x109 = $xb0[$product->getId()]; else $x109 = $xd9->getQty(); if ($x109 > 0) { $x4a = $x106; } else { if ($xd9->getBackorders() || ($xd9->getUseConfigBackorders() && $x5e)) { $x4a = $x108; } else { $x4a = $x107; } } } else $x4a = $x107; } else { $x4a = $x106; } $x4a = "<g:a\x76\x61i\154\141b\x69\154\151t\171\76\x3c\41\x5b\x43\104A\x54\x41\x5b" . $x4a . "\x5d]\x3e<\57g\72\141v\x61\151\x6c\x61\x62\151l\x69\x74\171\x3e"; break; case '{is_in_stock}' : $xd9 = $this->checkReference($xd8['reference'], $product); (!isset($xd8['options'][0])) ? $x106 = 'in stock' : $x106 = $xd8['options'][0]; (!isset($xd8['options'][1])) ? $x107 = "\157\x75\x74\40o\x66\x20\x73\x74\157\x63k" : $x107 = $xd8['options'][1]; (!isset($xd8['options'][2])) ? $x108 = "pre\x6fr\x64e\162" : $x108 = $xd8['options'][2]; if (($xd9->getManageStock() && !$xd9->getUseConfigManageStock() && !$x5d) || ($xd9->getUseConfigManageStock() && $x5d ) || ($xd9->getManageStock() && !$xd9->getUseConfigManageStock())) { if ($xd9->getIsInStock() > 0) { if ($product->type_id == "\143\x6f\156\146\151g\x75r\x61b\x6c\145") $x109 = $xb0[$product->getId()]; else $x109 = $xd9->getQty(); if ($x109 > 0) { $x4a = $x106; } else { if ($xd9->getBackorders() || ($xd9->getUseConfigBackorders() && $x5e)) { $x4a = $x108; } else { $x4a = $x107; } } } else $x4a = $x107; } else { $x4a = $x106; } break; case '{stock_status}' : $xd9 = $this->checkReference($xd8['reference'], $product); ($xd9->getIs_in_stock() > 0) ? $x4a = 'in stock' : $x4a = 'out of stock'; break; case '{qty}' : $xd9 = $this->checkReference($xd8['reference'], $product); (!isset($xd8['options'][0])) ? $x10a = 0 : $x10a = $xd8['options'][0]; if ($product->type_id == "\143\x6f\156\146\151g\x75r\x61b\x6c\145") { $x4a = $xb0[$product->getId()]; $x4a = $x14c($x4a, $x10a, '.', ''); } else if ($xd8['reference'] == "\143\x6f\156\146\151g\x75r\x61b\x6c\145") { $x4a = $x14c($xb0[$xd9->getId()], $x10a, '.', ''); } else { $x4a = $x14c($xd9->getQty(), $x10a, '.', ''); } break; case "\173\143\141\x74\x65\x67or\x69\145s\x5fv\61}" : $xd9 = $this->checkReference($xd8['reference'], $product); (!isset($xd8['options'][0]) || !$xd8['options'][0] || $xd8['options'][0] == 'INF') ? $x10b = INF : $x10b = $xd8['options'][0]; (!isset($xd8['options'][1])) ? $x10c = 1 : $x10c = $xd8['options'][1]; (!isset($xd8['options'][2]) || !$xd8['options'][2] || $xd8['options'][2] == 'INF') ? $x10d = INF : $x10d = $xd8['options'][2];
$x10e = 0; $x4a = ''; $x10f = ''; foreach (explode(',', $xd9->getCategoriesIds()) as $x37 => $x7c) { ($x6a) ? $x110 = $x156($x7b[$x7c]["\x70at\x68"], $x6c) : $x110 = !$x156($x7b[$x7c]["\x70at\x68"], $x6c); if (isset($x7b[$x7c]) && $x10e < $x10b && ($x110 || $x6c[0] == "\x2a")) { $x111 = 0; $x112 = explode('/', $x7b[$x7c]["\x70at\x68"]); if ($x156($x63, $x112)) { $x113 = ""; if ($x10e > 0) $x10f = "\x2c"; foreach ($x112 as $x114) { if (isset($x7b[$x114])) { if ($x7b[$x114]['level'] > $x10c && $x111 < $x10d) { if ($x111 > 0) $x113.='>'; $x113.=($x7b[$x114]['name']); $x111++; } } } $x115 = ""; if (!empty($x113)) { $x4a.=$x10f . $x113 . $x115; $x10e++; } } } }; break; case "{c\x61\x74\145\147\157\162i\x65\163}" : $x116 = null; $x10b = INF; $x10c = 1; $x117 = INF; $x118 = ', '; $x119 = "\40\76 "; if (count($xd8['options']) == 1) { (!isset($xd8['options'][0])) ? $x116 = "\154\x61\163t" : $x116 = $xd8['options'][0]; $x10b = 1; } elseif (count($xd8['options']) == 2) { (!isset($xd8['options'][0])) ? $x118 = ', ' : $x118 = $xd8['options'][0]; (!isset($xd8['options'][1])) ? $x119 = "\40\76 " : $x119 = $xd8['options'][1]; } elseif (count($xd8['options']) > 2) { (!isset($xd8['options'][0]) || !$xd8['options'][0] || $xd8['options'][0] == 'INF') ? $x10b = INF : $x10b = $xd8['options'][0]; (!isset($xd8['options'][1])) ? $x10c = 1 : $x10c = $xd8['options'][1]; (!isset($xd8['options'][2]) || !$xd8['options'][2] || $xd8['options'][2] == 'INF') ? $x117 = INF : $x117 = $xd8['options'][2]; (!isset($xd8['options'][3])) ? $x118 = ', ' : $x118 = $xd8['options'][3]; (!isset($xd8['options'][4])) ? $x119 = "\40\76 " : $x119 = $xd8['options'][4]; } $xd9 = $this->checkReference($xd8['reference'], $product); $x102 = 0; $x11a = array(); foreach (explode(',', $xd9->getCategoriesIds()) as $x37 => $x7c) { ($x6a) ? $x110 = $x156(@$x7b[$x7c]["\x70at\x68"], $x6c) : $x110 = !$x156(@$x7b[$x7c]["\x70at\x68"], $x6c); if (isset($x7b[$x7c]) && ($x110 || $x6c[0] == "\x2a")) { $x102++; $x11a[$x102] = array(); $x112 = explode('/', $x7b[$x7c]["\x70at\x68"]); if ($x156($x63, $x112)) { foreach ($x112 as $x114) { if (isset($x7b[$x114]) && $x7b[$x114]['name'] != null) { $x11a[$x102][] = ($x7b[$x114]['name']); } } } } } $x11b = array(); usort($x11a, array('Wyomind_Simplegoogleshopping_Model_Simplegoogleshopping', 'x161Array')); if ($x116 == "\154\x61\163t") $x11a = $x15a($x11a); $xd9->setCategoriesArray($x11a); $x11c = 0; foreach ($x11a as $x37 => $x111) { if ($x11c < $x10b) { foreach ($x111 as $x11d => $x11e) { if ($x11d >= $x10c && $x11d <= $x117) { if (!isset($x11b[$x11c])) $x11b[$x11c] = array(); $x11b[$x11c][] .= $x11e; } } if (count($x11b[$x11c])) $x11c++; } }; $x4a = null; foreach ($x15b($x11b) as $x37 => $x11f) { if ($x37 > 0) $x4a.=$x118; $x4a.=implode($x119, $x11f); } break; case "\173G\72\120\x52OD\x55\x43\x54\x5f\x54\131P\105\x5fv\61}" : $xd9 = $this->checkReference($xd8['reference'], $product); (!isset($xd8['options'][0]) || !$xd8['options'][0] || $xd8['options'][0] == 'INF') ? $x10b = INF : $x10b = $xd8['options'][0]; (!isset($xd8['options'][1])) ? $x10c = 1 : $x10c = $xd8['options'][1]; (!isset($xd8['options'][2]) || !$xd8['options'][2] || $xd8['options'][2] == 'INF') ? $x10d = INF : $x10d = $xd8['options'][2]; $x10e = 0; $x4a = ''; foreach (explode(',', $xd9->getCategoriesIds()) as $x37 => $x7c) { ($x6a) ? $x110 = $x156($x7b[$x7c]["\x70at\x68"], $x6c) : $x110 = !$x156($x7b[$x7c]["\x70at\x68"], $x6c); if (@$x7b[$x7c]["\151\156\x63l\165\144\145\x5f\x69\156_\x6den\165"] && isset($x7b[$x7c]) && $x10e < $x10b && ($x110 || $x6c[0] == "\x2a")) { $x111 = 0; $x112 = explode('/', $x7b[$x7c]["\x70at\x68"]); if ($x156($x63, $x112)) { $x113 = ''; $x10f = '<g:product_type><![CDATA['; foreach ($x112 as $x114) { if (isset($x7b[$x114])) { if ($x7b[$x114]['level'] > $x10c && $x111 < $x10d) { if ($x111 > 0) $x113.=' > '; $x113.=($x7b[$x114]['name']); $x111++; } } } $x115 = "\x5d\135\x3e\x3c/\147:\160\x72od\165\143t\137t\171p\x65\76\x0a"; if (!empty($x113)) { $x4a.=$x10f . $x113 . $x115; $x10e++; } } } }; break; case "\173G:\120R\x4f\x44U\x43T\x5f\x54\131\120\105\x7d" : $x118 = "]\135><\x2f\147\72\160\x72\x6f\144u\x63\164\x5ft\x79\x70\x65\x3e\x0a\x3c\147:\x70\162\x6f\144u\143t_\164\171\160\145\76\x3c\x21\x5b\x43\x44\101\x54\x41["; $x119 = "\40\76 "; (!isset($xd8['options'][0]) || !$xd8['options'][0] || $xd8['options'][0] == 'INF') ? $x10b = INF : $x10b = $xd8['options'][0]; (!isset($xd8['options'][1])) ? $x10c = 1 : $x10c = $xd8['options'][1]; (!isset($xd8['options'][2]) || !$xd8['options'][2] || $xd8['options'][2] == 'INF') ? $x117 = INF : $x117 = $xd8['options'][2]; $xd9 = $this->checkReference($xd8['reference'], $product); $x102 = 0; $x11a = array(); foreach (explode(',', $xd9->getCategoriesIds()) as $x37 => $x7c) { ($x6a) ? $x110 = $x156(@$x7b[$x7c]["\x70at\x68"], $x6c) : $x110 = !$x156(@$x7b[$x7c]["\x70at\x68"], $x6c); if (isset($x7b[$x7c]) && ($x110 || $x6c[0] == "\x2a")) { $x102++; $x11a[$x102] = array(); $x112 = explode('/', $x7b[$x7c]["\x70at\x68"]); if ($x156($x63, $x112)) { foreach ($x112 as $x114) { if (isset($x7b[$x114]) && $x7b[$x114]['name'] != null) { $x11a[$x102][] = ($x7b[$x114]['name']); } } } } } $x11b = array(); usort($x11a, array('Wyomind_Simplegoogleshopping_Model_Simplegoogleshopping', 'x161Array')); foreach ($x11a as $x37 => $x111) { if ($x37 < $x10b) foreach ($x111 as $x11d => $x11e) { if ($x11d > $x10c && $x11d <= $x117) { if (!isset($x11b[$x37])) $x11b[$x37] = array(); $x11b[$x37][] .= $x11e; } } }; $x4a = null; foreach ($x15b($x11b) as $x37 => $x11f) { if ($x37 > 0) $x4a.=$x118; $x4a.=implode($x119, $x11f); } if (($x11b)) $x4a = "\74\147\72\x70\x72\x6f\x64\x75\x63\164\x5ft\171\160e>\74!\x5b\103\104A\x54\101\133" . $x4a . "\x5d\135\x3e\x3c/\147:\160\x72od\165\143t\137t\171p\x65\76\x0a"; break; case "\x7b\107:\x47O\117\107\114E\x5fPR\x4fD\125\x43\124_\103\x41\x54EGO\122Y}" : $x120 = array(); (!isset($xd8['options'][0])) ? $x116 = "\x6c\157\156\147e\x73\164" : $x116 = $xd8['options'][0]; $xd9 = $this->checkReference($xd8['reference'], $product); foreach (explode(',', $xd9->getCategoriesIds()) as $x37 => $x7c) { if (isset($x7b[$x7c]["\x70at\x68"]) && isset($x6d[$x7b[$x7c]["\x70at\x68"]])) { $x120[] = $x6d[$x7b[$x7c]["\x70at\x68"]]; } } usort($x120, array('Wyomind_Simplegoogleshopping_Model_Simplegoogleshopping', 'x161')); if ($x116 == "\x73ho\162\x74\x65\163\x74") $x120 = $x15a($x120);
$x121 = $x159($x120); if ($x121 != "") $x4a = "\x3cg:\x67\x6f\157gl\145_\x70\162o\144\165\143\x74\137\x63a\164\x65gory\76\x3c![\x43\x44A\x54\x41[" . $x121 . "\135]>\x3c/g\72g\157o\147\154\x65\137\x70r\157\x64\165\143t\x5f\143\141t\145gory\76\x0a"; break; case "\x7bc\x61\x74e\x67o\162y_m\x61\x70\160\151\x6eg\175" : (isset($xd8["\x6f\x70\x74\151\157\156s"][0])) ? $x122 = $xd8["\x6f\x70\x74\151\157\156s"][0] : $x122 = 0; $x4a = ""; $xd9 = $this->checkReference($xd8['reference'], $product); $x123 = 0; foreach (explode(',', $xd9->getCategoriesIds()) as $x37 => $x7c) { if (isset($x6d[$x7b[$x7c]["\x70at\x68"]])) { if ($x123 == $x122) { $x4a.=$x6d[$x7b[$x7c]["\x70at\x68"]]; break; } $x123++; } } break; case "{\162\145vi\x65w_\143\157\x75n\x74\175": $xd9 = $this->checkReference($xd8['reference'], $product); $x4a = ""; (isset($xd8["\x6f\x70\x74\151\157\156s"][0]) && $xd8["\x6f\x70\x74\151\157\156s"][0] == "\x2a" ) ? $x124 = 0 : $x124 = $x58; if (isset($x9b[$xd9->getId()][$x124]["\143\157\x75\x6et"])) { $x125 = $x9b[$xd9->getId()][$x124]["\143\157\x75\x6et"]; if (isset($x125)) { $x4a.=$x125; } } break; case "\173\162\x65\x76\151\145w\137\141\x76erag\x65\175": $xd9 = $this->checkReference($xd8['reference'], $product); $x4a = ""; (isset($xd8["\x6f\x70\x74\151\157\156s"][0]) && $xd8["\x6f\x70\x74\151\157\156s"][0] == "\x2a" ) ? $x124 = 0 : $x124 = $x58; (!isset($xd8["\x6f\x70\x74\151\157\156s"][1]) || !$xd8["\x6f\x70\x74\151\157\156s"][1]) ? $x126 = 5 : $x126 = $xd8["\x6f\x70\x74\151\157\156s"][1]; if (isset($x9b[$xd9->getId()][$x124]["\x73\143\157\162\145"])) { $x127 = $x14c($x9b[$xd9->getId()][$x124]["\x73\143\157\162\145"] * $x126 / 100, 2, "\x2e", ""); if (isset($x127)) { $x4a.=$x127; } } break; case "\x7b\107:\120\x52\x4f\x44\x55\103\124\x5f\122\x45\126\x49EW\175" : $xd9 = $this->checkReference($xd8['reference'], $product); (isset($xd8["\x6f\x70\x74\151\157\156s"][0]) && $xd8["\x6f\x70\x74\151\157\156s"][0] == "\x2a" ) ? $x124 = 0 : $x124 = $x58; (!isset($xd8["\x6f\x70\x74\151\157\156s"][1]) || !$xd8["\x6f\x70\x74\151\157\156s"][1]) ? $x126 = 5 : $x126 = $xd8["\x6f\x70\x74\151\157\156s"][1]; $x4a = ""; if (isset($x9b[$xd9->getId()][$x124]["\143\157\x75\x6et"])) { $x125 = $x9b[$xd9->getId()][$x124]["\143\157\x75\x6et"]; $x127 = $x14c($x9b[$xd9->getId()][$x124]["\x73\143\157\162\145"] * $x126 / 100, 2, "\x2e", ""); } if (isset($x127) && $x127 > 0) { $x4a.="\74g\x3a\160\x72o\144u\x63\x74_\162\x65v\x69\145\x77_\x61v\145\162\141\147\145\x3e\x3c!\133\103DA\x54\x41\133" . $x127 . "\135]>\x3c\x2f\x67:\160\x72oduct_r\145\x76\151e\167\137a\166e\x72\x61g\145\76\x0a"; } if (isset($x125) && $x125 > 0) { $x4a.="\x3c\x67\72\x70\x72\157\x64\x75\x63\164_r\x65v\151e\167_\x63oun\x74>\x3c\x21\x5b\103D\101TA[" . $x125 . "\x5d]\x3e<\x2f\x67:\160\x72od\x75\143t\137\162e\x76\x69\145\167_c\157\x75\x6e\x74\76\x0a"; } unset($x127); unset($x125); break; case "\x7bG\x3a\111T\105\x4d\x5fG\x52\117UP\137I\104\x7d" : if (isset($this->configurable[$product->getId()])) { $xd9 = $this->checkReference('configurable', $product); $x4a = "\74g\x3a\151\x74e\x6d\x5f\147\162\x6f\165\160_\151\144\x3e\x3c\41\133\x43\104\x41\124\x41\x5b" . $xd9->getSku() . "\135\135\x3e</\147:i\x74e\155\x5fgr\157\x75\160\x5fi\x64>"; } break; case "{\x53\103\72\105\x41\116}" : ($x14d($xd8['options'][0]) && $xd8['options'][0] > 0) ? $x128 = $xd8['options'][0] : $x128 = 0; $xd9 = $this->checkReference($xd8['reference'], $product); $x4a = explode(',', $xd9->getEan()); $x4a = "\x3c\147\x3aea\x6e\76\x3c!\133\x43\104A\124\101[" . $x4a[$x128] . "]\135\76\x3c\57\147\x3a\145a\156>"; break; case "\x7b\123\103\x3aI\x4d\101GE\123\x7d" : $xd9 = $this->checkReference($xd8['reference'], $product); $x101 = $xd9->getSmall_image(); $x103 = array($xd9->getImage(), $xd9->getThumbnail()); $x104 = ''; $xeb = 0; if ($xd9->getSmall_image() && $xd9->getSmall_image() != 'no_selection') { $x102 = $xd9->getSmall_image(); $x4a = $x102; $x104.="\74\x67\x3ai\x6dag\x65\137link\x3e<!\x5bCDA\x54\x41\x5b" . $x4a . "]\x5d>\74\57\147\x3a\x69\x6d\141\x67e_\x6c\151\x6e\153\76\x0a"; $xeb++; } $xe4 = 0; while (isset($xa1[$xd9->getId()]['src'][$xe4]) && $xeb < 10) { if ($xa1[$xd9->getId()]['src'][$xe4] != $x101) { if ($x156($xa1[$xd9->getId()]['src'][$xe4], $x103) || $xa1[$xd9->getId()]['disabled'][$xe4] != 1) { $x102 = $xa1[$xd9->getId()]['src'][$xe4]; $x4a = $x102; $x104.="<\147\x3a\x61\x64\x64\x69\x74\x69\x6f\156\x61\x6c\x5f\151mag\145\x5f\x6c\151n\153\x3e\74\41[\103\x44\x41\124\101\133" . $x4a . "\135]>\74/g\72\141\x64\144i\164\151\157\156\x61l\137\151\155\x61g\x65\137\154\151nk>\x0a"; $xeb++; } } $xe4++; } $x4a = $x104; break; case "\x7b\x53C:\104\x45S\x43\122\111\x50\124\x49O\116\175" : $xd9 = $this->checkReference($xd8['reference'], $product); $x51 = $xd9->getDescription() . $xd9->getShortDescription(); $x129 = "|\x3c\151\x66\x72\x61\155e(.\x2a\51\x3c\x2f\x69\x66\162\x61\x6d\x65\76\x7c\x55"; $x14a($x129, $x51, $x12a); if ($x12a) { $x51 = $xd9->getAttributeText('manufacturer') . "\x20" . $xd9->getName() . "\40\x2d\40\120\x61r\x74 \x6eu\x6d\x62e\162\x3a\40" . $xd9->getSku() . "\40\x2d\x20C\141\164eg\157\x72y\x20\x3a \x7bc\x61\164\x65\147\x6f\162\151\x65\x73\54\133\61\x5d,\133\61]\54[\61]\x7d"; } else { if ($x156("\163\164\x72\x69\x70\137\x74\x61\147\x73", $xd8['options'])) { $x51 = $x15c('!\<br /\>!isU', "\x20", $x51); $x51 = $x15c('!\<br/\>!isU', "\x20", $x51); $x51 = $x15c('!\<br>!isU', "\x20", $x51); $x51 = $x15d($x51); } if ($x156("\150tml\x5f\145\x6e\164it\171_\x64\x65\x63\x6f\x64\145", $xd8['options'])) { $x51 = $x15e($x51, ENT_QUOTES, 'UTF-8'); } if ($x156("\150\164ml\145\x6et\151t\x69e\x73", $xd8['options'])) { $x51 = htmlspecialchars(($x51)); } if (strlen($x51) > 900) { $x51 = substr($x51, 0, 900 - 3); $xdb = strrpos($x51, "\x20"); $x51 = substr($x51, 0, $xdb) . '...'; } } if ($x51 == null) $x51 = $xd9->getAttributeText('manufacturer') . "\x20" . $xd9->getName() . "\40\x2d\40\120\x61r\x74 \x6eu\x6d\x62e\162\x3a\40" . $xd9->getSku() . "\40\x2d\x20C\141\164eg\157\x72y\x20\x3a \x7bc\x61\164\x65\147\x6f\162\151\x65\x73\54\133\61\x5d,\133\61]\54[\61]\x7d"; $x51 = $x15c('/' . '[\x00-\x1F\x7F]' . '|[\x00-\x7F][\x80-\xBF]+' . '|([\xC0\xC1]|[\xF0-\xFF])[\x80-\xBF]*' . '|[\xC2-\xDF]((?![\x80-\xBF])|[\x80-\xBF]{2,})' . '|[\xE0-\xEF](([\x80-\xBF](?![\x80-\xBF]))|' . '(?![\x80-\xBF]{2})|[\x80-\xBF]{3,})' . '/S', ' ', $x51); $x51 = $x147('', '', $x51); $x4a = "\x3cde\163cr\151\160ti\x6f\x6e>\x3c\41\x5b\103D\101\x54\101\133" . $x51 . "]]\76\74\x2f\x64esc\x72i\160t\151\157\x6e>"; break; case "\x7b\123C:UR\114}" : (isset($xd8['options'][0])) ? $x12b = $xd8['options'][0] : $x12b = ""; (isset($xd8['options'][1])) ? $x12c = $xd8['options'][1] : $x12c = ""; $xd9 = $this->checkReference($xd8['reference'], $product); if ($xd9->getRequest_path()) { $x4a = "<\x6c\151\x6e\153>\x3c![C\104\101\x54\x41\x5b" . $x60 . $x12c . $xd9->getRequest_path() . $x12b . "\x5d]\76</\154\151\156\153>"; } else { $x4a = "<\x6c\151\x6e\153>\x3c![C\104\101\x54\x41\x5b" . $xd9->getProductUrl() . "\x5d]\76</\154\151\156\153>"; } break; case "\173\123C\x3a\x43\x4f\116\104IT\111\117N}" : $xd9 = $this->checkReference($xd8['reference'], $product); (stristr($xd9->getName(), "\162\x65fu\x72\x62\x69s\150ed")) ? $xc7 = 'refurbished' : $xc7 = 'new'; $x4a = "\74g\x3ac\x6f\156\144i\164\151o\156>\74\x21\133\x43D\101T\x41[" . $xc7 . "\135]></\147\x3ac\157n\144iti\x6f\x6e\76"; break; case "{\163\143\x3a\143\x6f\156d\x69\164\151o\156\x7d" : $xd9 = $this->checkReference($xd8['reference'], $product); (stristr($xd9->getName(), "\162\x65fu\x72\x62\x69s\150ed")) ? $xc7 = 'refurbished' : $xc7 = 'new'; $x4a = $xc7; break; default : $xd9 = $this->checkReference($xd8['reference'], $product); if ($x156($xd8['name'], $x86)) { if ($x156($x87[$xd8['name']], array('select', 'multiselect'))) { eval('$x12e =($xd9->' . $xd8['methodName'] . ")\73"); $x12d = explode(',', $x12e); if (count($x12d) > 1) { $x4a = array(); foreach ($x12d as $xcd) { if (isset($x8c[$xcd][$x58])) $x4a[] = $x8c[$xcd][$x58]; else { if (isset($x8c[$xcd][0])) $x4a[] = $x8c[$xcd][0]; } } } else { if (isset($x8c[$x12d[0]][$x58])) { $x4a = $x8c[$x12d[0]][$x58];
} else { if (isset($x8c[$x12d[0]][0])) $x4a = $x8c[$x12d[0]][0]; } } } else { eval('$x4a =($xd9->' . $xd8['methodName'] . ")\73"); } } if ($x156(@$x84[$xd8['name']], $x84)) { $x4a = $x84[$xd8['name']]; } $x4a = $x15c('/' . '[\x00-\x1F\x7F]' . '|[\x00-\x7F][\x80-\xBF]+' . '|([\xC0\xC1]|[\xF0-\xFF])[\x80-\xBF]*' . '|[\xC2-\xDF]((?![\x80-\xBF])|[\x80-\xBF]{2,})' . '|[\xE0-\xEF](([\x80-\xBF](?![\x80-\xBF]))|' . '(?![\x80-\xBF]{2})|[\x80-\xBF]{3,})' . '/S', ' ', $x4a); $x4a = $x147('', '', $x4a); $x12f = 0; if (count($xd8['options']) > 0) { while (isset($xd8['options'][$x12f])) { switch ($xd8['options'][$x12f]) { case "\163u\x62\x73\164\162" : if (isset($xd8['options'][$x12f + 1]) && strlen($x4a) > $xd8['options'][$x12f + 1]) { $x4a = substr($x4a, 0, $xd8['options'][$x12f + 1] - 3); $xdb = strrpos($x4a, "\x20"); $x4a = substr($x4a, 0, $xdb) . $xd8['options'][$x12f + 2]; } $x12f++; $x12f++; break; case "\150\164ml\145\x6et\151t\x69e\x73" : $x4a = htmlspecialchars(($x4a)); break; case "\163\164\x72\x69\x70\137\x74\x61\147\x73" : $x130 = "\x20"; $x4a = $x15c('!\<br /\>!isU', $x130, $x4a); $x4a = $x15c('!\<br/\>!isU', $x130, $x4a); $x4a = $x15c('!\<br>!isU', $x130, $x4a); $x4a = $x15d($x4a); break; case "i\x6dpl\x6f\144\x65" : $x4a = ($x152($x4a)) ? implode($xd8['options'][$x12f + 1], $x4a) : $x4a; $x12f++; break; case "\146l\x6fa\164" : $x4a = $x14c($x4a, $xd8['options'][$x12f + 1], '.', ''); $x12f++; break; case "\150tml\x5f\145\x6e\164it\171_\x64\x65\x63\x6f\x64\145" : $x4a = $x15e($x4a, ENT_QUOTES, 'UTF-8'); break; case "i\156li\156e": $x4a = $x15c('/(\r\n|\n|\r|\r\n|\t)/s', '', $x4a); break; case "\x73\164\162\x74\157\x6c\157\x77\145\x72": $x4a = $x15f($x4a, "\x55T\x46\70"); break; case "\163\x74rtou\x70p\x65\x72": $x4a = $x160($x4a, "\x55T\x46\70"); break; case "\x63le\141n\x65\x72": $x4a = $x15c('/' . '[\x00-\x1F\x7F]' . '|[\x00-\x7F][\x80-\xBF]+' . '|([\xC0\xC1]|[\xF0-\xFF])[\x80-\xBF]*' . '|[\xC2-\xDF]((?![\x80-\xBF])|[\x80-\xBF]{2,})' . '|[\xE0-\xEF](([\x80-\xBF](?![\x80-\xBF]))|' . '(?![\x80-\xBF]{2})|[\x80-\xBF]{3,})' . '/S', ' ', $x4a); $x4a = $x147('', '', $x4a); break; default : if (stristr($xd8['options'][$x12f], "\x25\x73")) { $xec = $x147("\x25\x73", '$x4a', $xd8['options'][$x12f]); eval('$x4a=' . $xec . '; '); } else eval('$x4a=' . $xd8['options'][$x12f] . '($x4a); '); break; } $x12f++; } } break; } $x4a = $x147(array("<", "\76", '"', '\\'), array("__\x4cO\x57\105RT\110\101N_\137", "__\x48I\x47\x48\105\x52T\110\101N\137\137", "\137_\x51\x55O\x54\x45\123\x5f_", "\137_\x42ACK\123\114A\123\110\x5f_"), $x4a); if ($x152($x4a)) $x4a = implode("\x2c", $x4a); if ($x4a != "") $x48 = $x147($xd8['fullpattern'], $x4a, $x48); } foreach ($x76 as $x131) { $x48 = $x147($x131['fullpattern'], "", $x48); } $x48 = $this->x163($x48, $product); $x48 = $this->x169($x48); $x48 = $this->x168($x48); $x48 = $x147(array("__\x4cO\x57\105RT\110\101N_\137", "__\x48I\x47\x48\105\x52T\110\101N\137\137", "\137_\x51\x55O\x54\x45\123\x5f_", "\137_\x42ACK\123\114A\123\110\x5f_"), array("<", "\76", '"', '\\'), $x48); if (!empty($x48)) { $x73.=("\x3c\x69\164\x65\155\x3e" ); $x73.="\x0a" . $x48 . "\x0a"; $x73.=("</i\164\145\x6d\76" . "\x0a"); $xc3++; $this->_inc = $xd4; $xd4++; } $x132 = array(); try { $xd9 = new SimpleXMLElement("\x3c\x69\164\x65\155\x3e" . $x147(array("<\147\72", "<\x2fg:"), array("<\147\137", "</\147_"), $x48) . "</i\164\145\x6d\76"); } catch (Exception $x133) { $this->x16a($x4f, $x53, "FA\111\114L\x45\x44\73\x30"); Mage::throwException($x133->getMessage() . "\x20" . Mage::helper('simplegoogleshopping')->__("\120le\141s\145\x20che\143k\x20\164\x68e t\145\x6d\x70\154ate s\x79\x6et\141x\56")); } $x134 = array(); foreach ($requirements as $x135) { if ($x152($x135['depends'])) { $x136 = false; foreach ($x135['depends'] as $x137 => $xc7) { foreach ($xc7 as $x138 => $x4a) { $x139 = $this->x16b($requirements, $x137); switch ($x138) { case "e\x71": if ($xd9->$x139['tag'] == $x4a) { $x136 = true; } else $x136 = false; break; case "\156\145q": if ($xd9->$x139['tag'] != $x4a) { $x136 = true; } else $x136 = false; break; case "lik\x65": if (stristr($xd9->$x139['tag'], $x4a)) { $x136 = true; } else $x136 = false; break; } } } } else { $x136 = true; } if ($x136 == true && !$x156($x135['label'], $x134)) { $x134[] = $x135['label']; if ($x135['required'] && (empty($xd9->$x135['tag']))) { $this->x16c($x135['label'], 'required', $xd9->{"\147\137id"}); } elseif ($x135['recommended'] && (empty($xd9->$x135['tag']))) { $this->x16c($x135['label'], 'recommended', $xd9->{"\147\137id"}, null); } elseif ((int) $x135['occurrence'] < (count($xd9->$x135['tag']))) { $this->x16c($x135['label'], 'toomany', $xd9->{"\x69d"}); } else { if (isset($x135['length']) && strlen($xd9->$x135['tag']) > $x135['length']) { $this->x16c($x135['label'], 'toolong', $xd9->{"\147\137id"}, $x135['length']); } if (isset($x135['type']) && $x135['type'] == "\122\x65\147\105\x78p" && !empty($xd9->$x135['tag']) && !$x14a("\x2f^" . $x135['regexp'] . "\x24\57\x69", $xd9->$x135['tag'])) { $this->x16c($x135['label'], 'invalid', $xd9->{"\147\137id"}, $x135['say']); } elseif (isset($x135['type']) && ($x135['type'] == "\x47o\157\147l\x65P\162o\144\x75\143\164\x43at\145\x67\x6f\x72\x79" || $x135['type'] == "T\145x\x74")) { } elseif (isset($x135['type']) && !empty($xd9->$x135['tag']) && $x135['type'] != "\122\x65\147\105\x78p") { switch ($x135['type']) { case "B\x6f\157\x6c\x65a\x6e": $x13a = "\57\136\164ru\x65|fa\x6cs\x65\44\x2fi"; break; case "A\x6c\x70\150\x61\x6e\165m\x65\x72\x69\143": $x13a = "\57\x5e\x5b\134\167\5c73\134\x2d\135+\x24\57"; break; break; case "\125\x72\154": $x13a = "\57\x5e\x68t\x74p(\x73\51\x3f\x3a\134\x2f\x5c/\x2e\x2b\44\x2f"; break; case "\120\x72i\x63\x65": $x13a = '/^([0-9]+\.[0-9]{2})\s?[A-Z]{3}$/'; break; } if (!$x14a($x13a, $xd9->$x135['tag'], $x13b)) { $this->x16c($x135['label'], 'invalid', $xd9->{"\147\137id"}, $x135['type']); } elseif ($x135['type'] == "\120\x72i\x63\x65" && (float) $x13b[1] < 0.01) { $this->x16c($x135['label'], 'invalid', $xd9->{"\147\137id"}, $x135['type']); } } } } } if ($this->_display) { $x74.=$x73; $x73 = ''; } else { if ($xc3 % Mage::getStoreConfig("si\x6d\x70\x6ce\x67\157o\x67\154\145\x73\x68\157p\x70\151\x6e\x67/\163\171\x73tem/\142\165f\146\x65\x72") == 0) { $x3a->streamWrite($x73); unset($x73); $x73 = ''; Mage::log("\x0a\76\x3e>\76>>>\x3e\x3e\x3e\76>\x3e\76\x3e\x3e\76\x3e>\x3e\76\76>\x3e\76\76\76\x3e>\76\x3e\76>\x3e\x3e\76\x3e>>\76\x3e\x3e\x3e\x3e>\76" . $xd4 . "\57" . $this->_counter . "\40\151\x74\145ms\40\x61\x64\x64e\144", null, $this->x165('.log')); $x13c = time(true);
$x13d = ((int) $x13c - (int) $xd5); $this->_time += $x13d; $this->x16a($x4f, $x53, "PROCESSING; $xd4; " . $this->_counter . "\73" . $x13d); $xd5 = time(true); } } if ($this->_limit && $xd4 > $this->_limit) { break 2; } } } $x73.=('</channel>' . "\x0a"); $x73.=('</rss>'); if (!$this->_display) { $x3a->streamWrite($x73); $this->x16a($x4f, $x53, "\123\125\103\x43EE\104\x3b\610\60\73\610\60; \x30"); } Mage::log("\x0a>\76\76\76\x3e\76\x3e\x3e\76>\x3e\x3e\x3e>>>\x3e>>\x3e\x3e\x3e\x3e\x3e>>\x3e>\x3e\76>\x3e>\76\76\x3e>>\76\76>>>>\76\76\40" . ($xd4 - 1) . "\57" . $this->_counter . "\40\151\x74\145ms\40\x61\x64\x64e\144", null, $this->x165('.log')); unset($xab); $x74.=$x73; if ($this->_display && !$this->_debug) { return $x74; } elseif ($this->_debug) { echo "\x3c\x62r><\142\162\x3e---\x2d\x2d\x2d\55--\x2d\55- \130\x4dL\x20\x4f\125T\120\125\124 \55\x2d-\55-\x2d--\x2d--\x2d-\55\x2d-\74b\162\76"; $x51 = "\x3cp\162\x65>" . htmlentities($x74) . "<\x2f\160\162\145\76"; return $x51; } else { $x3a->streamClose(); $x3a->mv($this->x165(), $this->x165(false)); $x3a->rm($this->x165()); $this->setSimplegoogleshopping_time(Mage::getSingleton('core/date')->gmtDate('Y-m-d H:i:s')); $this->_errorReport['stats'] = array(( $xd4 - 1), $this->_time); $this->setSimplegoogleshopping_report(serialize($this->_errorReport)); $this->save(); Mage::log("\x0a>\76\x3e\76\76\76\76\x3e\76\76\x3e>\x3e\76>>\x3e\76\76\76>\76>\x3e\76>\x3e\x3e\x3e>\76\x3e\x3e\76>>\x3e\x3e>\76\76>\x3e>\76\x3e \124e\155\x70 fil\145 \x63los\x65\x64\x20and mo\166\145\144 \x74\x6f " . $this->x165(false), null, $this->x165('.log')); } Mage::app()->setCurrentStore(0); return $this; } public function x16b($requirements, $x137) { $x147="\x73\x74r_r\x65\x70\x6c\x61\x63\x65"; $x148="\x75tf\70\137\145\156\143\x6fde"; $x149="\160\x72\x65\147_\155\x61\x74\x63\x68\137\x61l\154"; $x14a="\x70\x72\145\x67\x5f\155\141\164\x63\x68"; $x14b="is_\x6eu\154\x6c"; $x14c="\156u\x6d\x62\145r\x5ffo\162\x6d\x61\x74"; $x14d="\151\x73\x5fn\165\155\145ri\143"; $x14e="pr\x65\147\x5f\x73\x70\x6c\151t"; $x14f="\165\164\146\70\137d\145\x63\x6f\144\145"; $x150="\151\x73\137s\x74\x72\151ng"; $x151="\152\x73\157\x6e\137\x64\145\143\x6fde"; $x152="\x69\x73\137a\162\162\x61y"; $x153="\141r\162\x61\x79\x5fp\x75\x73\150"; $x154="pri\x6e\164\x5f\162"; $x155="\166\145\x72s\151\x6f\x6e_\143\x6f\155\x70\x61\162\145"; $x156="in_arr\x61y"; $x157="\x61\x72ra\171\x5f\x70\x6fp"; $x158="s\x74r\x5f\x70ad"; $x159="ar\x72a\x79\137\163\x68\x69\x66\x74"; $x15a="\x61r\x72\x61\x79\137r\x65v\x65\x72s\x65"; $x15b="a\x72r\x61\x79\137v\x61\154\x75es"; $x15c="\160\x72eg\137r\x65\160\x6c\141\143\145"; $x15d="\163t\162\151p\137\164ag\163"; $x15e="\x68t\x6dl\x5f\145\x6et\x69t\x79\x5f\144\145co\x64e"; $x15f="\x6d\142\137\163\x74\x72\x74\x6f\154o\x77\x65\x72"; $x160="\x6d\x62\x5f\x73\x74r\x74\x6f\x75p\x70\x65\162"; foreach ($requirements as $x9a) { if ($x9a["l\141b\x65\154"] == $x137) { return $x9a; } } } public function x16c($x13e, $x116, $x13f, $x140 = null) { $x147="st\x72_r\145\160\x6c\x61c\x65"; $x148="\x75tf\70_\x65\x6e\x63\x6f\144\x65"; $x149="\x70re\x67_m\x61\x74\x63\150\x5fal\x6c"; $x14a="\160\x72\145g\x5f\155\x61\164\x63h"; $x14b="\151\163\x5f\156\165\154l"; $x14c="n\165m\x62\x65r\x5f\146orm\141\164"; $x14d="i\x73\137\156\x75me\x72\151\x63"; $x14e="\x70r\145\x67\x5f\x73\160\x6ci\x74"; $x14f="u\x74\x66\70\137\x64e\x63ode"; $x150="\x69s\x5fs\164\x72i\x6e\x67"; $x151="\x6a\163\x6fn\x5f\144\x65\143\x6f\x64\145"; $x152="\x69s\137\141\162\162\141\171"; $x153="\141\x72\x72ay\137p\x75\163h"; $x154="\160ri\x6e\x74_\162"; $x155="\166\x65r\163\151\x6fn\137\143\x6fm\x70\141\x72e"; $x156="i\156_ar\162\x61\171"; $x157="\x61r\x72\x61y\137p\157\x70"; $x158="s\x74\162\x5f\160\141\144"; $x159="\x61\162\162\141\x79\137\x73h\x69f\164"; $x15a="\x61\162\162ay\137\x72e\x76\145rs\145"; $x15b="ar\x72\x61\171\137v\141\x6c\x75\x65\163"; $x15c="p\x72\x65g\x5fr\x65p\154a\143e"; $x15d="s\164\x72\151\x70_tags"; $x15e="h\x74\155\154_\145\156t\x69\164\x79\x5f\144\145\x63\157\x64e"; $x15f="\155\142_\163trt\x6fl\157w\145\162"; $x160="mb\x5f\163tr\x74\157u\160p\x65r"; $x141 = Mage::helper('simplegoogleshopping')->__("\115\x69\163\163i\156\147\40\x72\x65q\165\x69r\x65\x64\40\x61t\x74\162\151b\165\164e"); $x142 = Mage::helper('simplegoogleshopping')->__("\115\x69s\163i\x6eg\x20\162\145\143\x6f\x6dm\x65n\x64\145\144\40\141\x74\164\162\x69bu\x74\145"); $x143 = Mage::helper('simplegoogleshopping')->__("\124\x6fo\40m\141\x6ey\x20\141\164t\x72\151b\x75te\40"); $x144 = Mage::helper('simplegoogleshopping')->__("\x41\x74tr\x69\x62\x75\164\x65\x20\166\141\154\165\x65\x20\x74o\157\x20\x6cong"); $x145 = Mage::helper('simplegoogleshopping')->__("\x49\x6ev\141l\151d\x20at\x74\x72i\142\165\x74\145\x20\166\x61\154u\x65"); if ($x116 == 'required') $x146 = $x141 . " \72\40" . $x13e; if ($x116 == 'recommended') $x146 = $x142 . " \72\40" . $x13e; if ($x116 == 'toomany') $x146 = $x143 . " \72\40" . $x13e; if ($x116 == 'toolong') $x146 = $x144 . " \72\40" . $x13e . "\40\50" . $x140 . "\x20" . Mage::helper("\163\x69\155\160\x6c\145g\157\157\147\154\x65\163\x68op\x70\151\x6e\147")->__("\x73y\x6db\157\154\x73\40\155\141\x78i\155u\155") . "\51"; if ($x116 == 'invalid') $x146 = $x145 . " \72\40" . $x13e . "\40\50" . $x140 . "\x20" . Mage::helper("\163\x69\155\160\x6c\145g\157\157\147\154\x65\163\x68op\x70\151\x6e\147")->__("e\x78\160\x65\143te\144") . "\51"; $this->_flagErrorReport[$x116 . "\137" . $x13e][] = (string) $x13f; if (count($this->_flagErrorReport[$x116 . "\137" . $x13e]) > 1 && count($this->_flagErrorReport[$x116 . "\137" . $x13e]) <= Mage::getStoreConfig("\x73\x69\155\160\x6ce\x67\157o\147\154e\x73\150o\160\x70\151n\x67\57\x73\x79\x73\x74em/\160r\145vie\x77")) { $this->_errorReport[$x116][$x13e]["\143\157\x75\x6et"] ++; if ($x13f != "") $this->_errorReport[$x116][$x13e]["\163\x6b\x75s"].=', ' . (string) $x13f; } elseif (count($this->_flagErrorReport[$x116 . "\137" . $x13e]) > Mage::getStoreConfig("\x73\x69\155\160\x6ce\x67\157o\147\154e\x73\150o\160\x70\151n\x67\57\x73\x79\x73\x74em/\160r\145vie\x77")) { $this->_errorReport[$x116][$x13e]["\143\157\x75\x6et"] ++; } else { $this->_errorReport[$x116][$x13e] = array( "m\x65s\x73\x61\147\x65" => $x146, "\143\157\x75\x6et" => 1, ); if ($x13f != "") $this->_errorReport[$x116][$x13e]["\163\x6b\x75s"].= (string) $x13f; } } } ;
Function Calls
| None |
Stats
| MD5 | d0d2d5f9997a1df22409f14ab2e12f50 |
| Eval Count | 0 |
| Decode Time | 620 ms |