....................................../////.===Shadow-Here===./////................................................ > < > < > < > < > < > < > < > < > < > < > < > < > < > < > < > < > < > < > < > < > < > < > < > < > < > < > < > < > < ------------------------------------------------------------------------------------------------------------------- /////////////////////////////////////////////////////////////////////////////////////////////////////////////////// RIFF¤ WEBPVP8 ˜ ðÑ *ôô>‘HŸK¥¤"§£±¨àð enü¹%½_F‘åè¿2ºQú³íªú`N¿­3ÿƒügµJžaÿ¯ÿ°~¼ÎùnúîÞÖô•òíôÁÉß®Sm¥Ü/ ‡ó˜f£Ùà<˜„xëJ¢Ù€SO3x<ªÔ©4¿+ç¶A`q@Ì“Úñè™ÍÿJÌ´ª-˜ÆtÊÛL]Ïq*‘Ý”ì#ŸÌÏãY]@ê`¿ /ªfkØB4·®£ó z—Üw¥Pxù–ÞLШKÇN¾AkÙTf½è'‰g gÆv›Øuh~ a˜Z— ïj*á¥t d£“uÒ ¨`K˜¹ßþ]b>˜]_ÏÔ6W—è2r4x•íÖ…"ƒÖNîä!¦å Ú}ýxGøÌ —@ ;ÆÚŠ=ɾ1ý8lªË¥ô ^yf®Œ¢u&2©nÙÇ›ñÂñŒ³ aPo['½»øFùà­+4ê“$!lövlüÞ=;N®3ð‚õ›DÉKòÞ>ÄÍ ¥ˆuߤ#ˆ$6ù™¥îЇy’ÍB¼ çxÛ;X"WL£R÷͝*ó-¶Zu}º.s¸sšXqù–DþÿvªhüïwyŸ ¯é³lÀ:KCûÄ£Ëá\…­ ~—ýóî ¼ûûÜTÓüÇy…ŽÆvc»¾×U ñ¸žþоP÷¦ó:Ò¨¨5;Ð#&#ÖúñläÿÁœ GxÉ­/ñ‡áQðìYÉtÒw޼GÔ´zàÒò ð*ëzƒ•4~H]Ø‹f ñÓÈñ`NåWçs'ÆÏW^ø¹!XžµmQ5ÃËoLœÎ: ÞËÍ¥J ù…î èo£ßPÎñ¶ž8.Œ]ʵ~5›ÙË-ù*8ÙÖß±~ ©¹rÓê‚j¶d¸{^Q'˜±Crß ÚH—#¥¥QlÀ×ëã‡DÜ«èî þ&Çæžî;ŽÏºò6ÒLÃXy&ZŒ'j‚¢Ù€IßÚù+–MGi‰*jE€‘JcÜ ÓÌ EÏÚj]o˜ Þr <¾U ûŪæÍ/šÝH¥˜b”¼ ÁñßX GP›ï2›4WŠÏà×£…íÓk†¦H·ÅíMh–*nó÷à]ÁjCº€b7<ب‹¨5車bp2:Á[UªM„QŒçiNMa#<5›áËó¸HýÊ"…×Éw¹¦ì2º–x<›»a±¸3Weü®FÝ⑱ö–î–³|LPÈ~çð~Çå‡|º kD¢µÏàÆAI %1À% ¹Ò – ”ϝS¦‰4&¶£°à Öý”û_Ò Áw°A«Å€?mÇÛgHÉ/8)á¾ÛìáöŽP í¨PŸNÙµº¦‡§Ùš"ÿ«>+ªÕ`Ê÷‡‚ß Õû˜þãÇ-PÍ.¾XV‘€ dÜ"þ4¹ ±Oú‘©t¥¦FªÄÃÄ•b‚znýu½—#cDs˜ÃiÑOˆñ×QO=*IAÊ,¶ŽZƒ;‡wøXè%EÐk:F±Ú” .Ѽ+Áu&Ç`."pÈÉw o&¿dE6‘’EqTuK@Ì¥ã™À(Êk(h‰,H}RÀIXÛš3µ1©_OqÚÒJAñ$ÊÙÜ;D3çŒ[þùœh¬Ã³™ö6ç†NY".Ú‰ï[ªŸŒ '²Ð öø_¨ÂÉ9ué¶³ÒŠõTàîMØ#û¯gN‡bÙ놚X„ö …ÉeüÌ^J ‹€.œ$Æ)βÄeæW#óüßĺŸ€ ÀzwV 9oä»f4V*uB «Ë†¹ì¯žR霓æHXa=&“I4K;¯ç‹h×·"UŠ~<•╪Vêª&ÍSÃÆÅ?ÔqÎ*mTM ˜›µwêd#[C¡©§‘D<©àb†–ÁœøvH/,í:¯( ²£|4-„Æövv„Yͼ™^Á$ˆ„¢Û[6yB.åH*V¨æ?$=˜Ñ€•ñ·­(VlŸ‘ nÀt8W÷´Bûba?q9ú¶Xƒl«ÿ\ù¶’þòUÐj/õ¢Ìµ³g$ƒÎR!¸»|Oߍë’BhîÚÑ¢ñåŒJ„®„£2Ð3•ô02Nt…!£Í]Ïc½Qÿ?ˆ<&ÃA¾Ú,JˆijÌ#5yz„‰Î|ÊŽ5QÏ:‹ÐaóVÔxW—CpeÏzÐïíçôÿÅ_[hãsÐ_/ŽTÝ?BîˆííV$<¿i>²F¬_Eß¿ †bÊŒº­ÿ®Z H“C}”¬,Mp ý/Bá£w>˜YV°aƒúh+cŠ- r/[%|üUMHäQ°X»|û/@|°¥Ð !BÔ Ç¢Ä©š+Õì D«7ìN¶ŽðÔ " ƶ’ÖçtA‰Û×}{tþz­¾GÍ›k¹OEJR$ Â׃ «ëÁ"oÉôž$oUK(Ä)Ãz³Ê-‹êN[Ò3Œñbï8P 4ƒ×q¢bo|?<ÛX¬òÄͰL–±›(™ûG?ýË©ÚÄ–ÂDØÐ_Ç¡ô ¾–ÄÏø ×e8Ë©$ÄF¹Å‹ì[©óìl:F¾f´‹‹Xì²ï®\¬ôùƒ ÿat¥óèÒùHß0äe‚;ü×h:ÆWðHž=Ã8骣"kœ'Y?³}Tûè€>?0l›e1Lòñ„aæKÆw…hÖŠùW…ÈÆÄ0ši·›[pcwËþñiêíY/~-Á5˜!¿†A›™Mÿþ(±“t@â“ö2­´TG5yé]çå僳 .·ÍïçÝ7UÚ±Ð/Nè»,_Ï ùdj7\ï Wì4›„»c¸àešg#ÒÊ⥭áØo5‘?ÌdÝô¯ ¹kzsƒ=´#ëÉK›Ø´±-¥eW?‡çßtòTã…$Ý+qÿ±ƒ÷_3Ô¥í÷:æ–ž<·Ö‡‰Å¢ š‡%Ô—utÌÈìðžgÖÀz²À—ï÷Óîäõ{K'´È÷³yaÏÁjƒô}ž§®æÊydÕÈë5¯èˆõvÕ©ã*çD„ “z„Ó‡^^xÂ3M§A´JG‚öï 3W'ˆ.OvXè¡ÊÕª?5º7†˜(˜Ç¶#çê’¶!ÌdZK§æ 0fãaN]òY³RV ™î$®K2R¨`W!1Ôó\;Ý ýB%qæK•&ÓÈe9È0êI±žeŸß -ú@žQr¦ ö4»M¼Áè¹µmw 9 EÆE_°2ó„ŸXKWÁ×Hóì^´²GѝF©óäR†¦‰ç"V»eØ<3ùd3ÿÚ¤Žú“Gi" —‘_ÙËÎ~Üö¯¥½Î»üŸEÚŽåmÞþí ;ÞólËΦMzA"Âf(´òá;Éï(/7½ûñÌ­cïÕçлþÝz¾-ÍvÑ“pH­–ðÓj$¸Äû¤‚‘ãUBË-n“2åPkS5&‹Â|+g^œ®Ì͆d!OïäîU«c;{Û!ÅŽ«ëZ9Ókóˆ]¯ƒ›né `ÇÒ+tÆš (ØKá¾—=3œ®•vuMñg²\ï Ec€ 05±d™‡×iÇ×›UúvÌ¢£Èþ¡ÕØô¶ßÎA"ß±#Ö²ˆÊŸ¦*Ä~ij|àø.-¼'»Ú¥£h ofº¦‡VsR=N½„Î v˜Z*SÌ{=jÑB‹tê…;’HžH¯8–îDù8ñ¢|Q•bÛçš–‹m³“ê¨ åÏ^m¬Žãþ©ïêO‡½6] µÆ„Ooòü ²x}N¦Ë3ïé¿»€›HA˜m%çÞ/¿í7Fø“‹léUk)É°Œµ8Q8›:ÀŠeT*šõ~ôڝG6 ¢}`ùH­–”¡k ‰P1>š†®9z11!X wKfmÁ¦xÑ,N1Q”–æB¶M…ÒÃv6SMˆhU¬ÊPŽï‘öj=·CŒ¯u¹ƒVIЃsx4’ömÛýcå¡¶7ßŠß 57^\wÒÐÆ k§h,Œý î«q^R½3]J¸ÇðN ‚çU¬ôº^Áì} ³f©Õœ§ˆã:FÄÈ‚é(€™?àýÓüè1Gô£¼éj‚OÅñ  #>×—ßtà 0G¥Åa뀐kßhc™À_ÉñÞ#±)GD" YîäË-ÿÙ̪ ¹™a¯´¢E\ÝÒö‚;™„ë]_ p8‰o¡ñ+^÷ 3‘'dT4œŽ ðVë½° :¬víÑ«£tßÚS-3¶“þ2 †üüʨòrš¹M{É_¤`Û¨0ìjœøJ‡:÷ÃáZ˜†@GP&œÑDGÏs¡þ¦þDGú‘1Yá9Ôþ¼ ûø…§÷8&–ÜÑnÄ_m®^üÆ`;ÉVÁJ£?â€-ßê}suÍ2sõA NÌúA磸‘îÿÚ»ƒìö·á¿±tÑÐ"Tÿü˜[@/äj¬€uüªìù¥Ý˜á8Ý´sõj 8@rˆð äþZÇD®ÿUÏ2ùôõrBzÆÏÞž>Ì™xœ“ wiÎ×7_… ¸ \#€MɁV¶¥üÕÿPÔ9Z‡ø§É8#H:ƒ5ÀÝå9ÍIŒ5åKÙŠ÷qÄ>1AÈøžj"µÂд/ªnÀ qªã}"iŸBå˜ÓÛŽ¦…&ݧ;G@—³b¯“•"´4í¨ôM¨åñC‹ïùÉó¯ÓsSH2Ý@ßáM‡ˆKÀªÛUeø/4\gnm¥‹ŸŒ qÄ b9ÞwÒNÏ_4Ég³ú=܆‚´ •â¥õeíþkjz>éÚyU«Íӝ݃6"8/ø{=Ô¢»G¥ äUw°W«,ô—¿ãㆅү¢³xŠUû™yŒ (øSópÐ 9\åTâ»—*oG$/×ÍT†Y¿1¤Þ¢_‡ ¼ „±ÍçèSaÓ 3ÛMÁBkxs‰’R/¡¤ˆÙçª(*õ„üXÌ´ƒ E§´¬EF"Ù”R/ÐNyÆÂ^°?™6¡œïJ·±$§?º>ÖüœcNÌù¯G ‹ñ2ЁBB„^·úìaz¨k:#¨Æ¨8LÎõލ£^§S&cŒÐU€ü(‡F±Š¼&P>8ÙÁ ‰ p5?0ÊÆƒZl¸aô š¼¡}gÿ¶zÆC²¹¬ÎÖG*HB¡O<º2#ñŒAƒ–¡B˜´É$¥›É:FÀÔx¾u?XÜÏÓvN©RS{2ʈãk9rmP¼Qq̳ è¼ÐFׄ^¡Öì fE“F4A…!ì/…¦Lƒ… … $%´¾yã@CI¬ á—3PþBÏNÿ<ý°4Ü ËÃ#ØÍ~âW«rEñw‹eùMMHß²`¬Öó½íf³:‹k˜¯÷}Z!ã¿<¥,\#öµÀ¯aÒNÆIé,Ћ–lŽ#Àæ9ÀÒS·I’½-Ïp Äz¤Š Â* ­íÄ9­< h>׍3ZkËU¹§˜ŒŠ±f­’¤º³Q ÏB?‹#µíÃ¥®@(Gs«†vI¥Mµ‹Á©e~2ú³ÁP4ìÕi‚²Ê^ö@-DþÓàlÜOÍ]n"µã:žpsŽ¢:! Aõ.ç~ÓBûH÷JCÌ]õVƒd «ú´QÙEA–¯¯Œ!.ˆˆëQ±ù œ·Ì!Õâ )ùL„ÅÀlÚè5@B…o´Æ¸XÓ&Û…O«˜”_#‡ƒ„ûÈt!¤ÁÏ›ÎÝŠ?c9 â\>lÓÁVÄÑ™£eØY]:fÝ–—ù+p{™ðè û³”g±OƒÚSù£áÁÊ„ä,ï7š²G ÕÌBk)~ÑiCµ|h#u¤¶îK¨² #²vݯGãeÖ϶ú…¾múÀ¶þÔñ‚Š9'^($¤§ò “š½{éúp÷J›ušS¹áªCÂubÃH9™D™/ZöØÁ‡¦ÝÙŸ·kð*_”.C‹{áXó€‡c¡c€§/šò/&éš÷,àéJþ‰X›fµ“C¨œ®r¬"kL‰Â_q…Z–.ÉL~O µ›zn‚¹À¦Öª7\àHµšÖ %»ÇníV[¥*Õ;ƒ#½¾HK-ÖIÊdÏEÚ#=o÷Óò³´Š: Ç?{¾+9›–‘OEáU·S€˜j"ÄaÜ ŒÛWt› á–c#a»pÔZÞdŽtWê=9éöÊ¢µ~ ë ;Öe‡Œ®:bî3±ýê¢wà¼îpêñ¹¾4 zc¾ðÖÿzdêŒÑÒŝÀ‰s6¤í³ÎÙB¿OZ”+F¤á‡3@Ñëäg©·Ž ˆèª<ù@É{&S„œÕúÀA)‰h:YÀ5^ÂÓŒ°õäU\ ùËÍû#²?Xe¬tu‰^zÒÔãë¼ÛWtEtû …‚g¶Úüâî*moGè¨7%u!]PhÏd™Ý%Îx: VÒ¦ôÊD3ÀŽKÛËãvÆî…N¯ä>Eró–ð`5 Œ%u5XkñÌ*NU%¶áœÊ:Qÿú»“úzyÏ6å-၇¾ ´ ÒÊ]y žO‘w2Äøæ…H’²f±ÎÇ.ª|¥'gîV•Ü .̘¯€šòü¤U~Ù†*¢!?ò wý,}´°ÔÞnïoKq5µb!áÓ3"vAßH¡³¡·G(ÐÎ0Îò¼MG!/ài®@—¬04*`…«é8ªøøló“ˆÊ”èù¤…ßÊoÿé'ËuÌÖ5×È¡§ˆˆfŽë9}hìâ_!!¯  B&Ëö¶‰ÀAÙNVŸ Wh›¸®XÑJì¨ú“¿÷3uj²˜¨ÍÎìë±aúŠÝå¯ð*Ó¨ôJ“yºØ)m°WýOè68†ŸÏ2—‰Ïüꪫٚ¥‹l1 ø ÏÄFjêµvÌbü¦èÝx:X±¢H=MÐß—,ˆÉÇ´(9ú¾^ÅÚ4¿m‡$âX‘å%(AlZo@½¨UOÌÕ”1ø¸jÎÀÃÃ_ µ‘Ü.œº¦Ut: Æï’!=¯uwû#,“pþÇúŒø(é@?³ü¥‘Mo §—s@Œ#)§ŒùkL}NOÆêA›¸~r½¼ÙA—HJ«eˆÖ´*¡ÓpÌŸö.m<-"³ûÈ$¬_6­åf£ïÚâj1y§ÕJ½@dÞÁr&Í\Z%D£Íñ·AZ Û³øüd/ªAi†/Й~  ‡âĮҮÏh§°b—›Û«mJžòG'[ÈYýŒ¦9psl ýÁ ®±f¦x,‰½tN ‚Xª9 ÙÖH.«Lo0×?͹m¡å†Ѽ+›2ƒF ±Ê8 7Hցϓ²Æ–m9…òŸï]Â1äN†VLâCˆU .ÿ‰Ts +ÅÎx(%¦u]6AF Š ØF鈄‘ |¢¶c±soŒ/t[a¾–û:s·`i햍ê›ËchÈ…8ßÀUÜewŒðNOƒõD%q#éû\9¤x¹&UE×G¥ Í—™$ð E6-‡¼!ýpãÔM˜ Âsìe¯ñµK¢Ç¡ùôléœ4Ö£”À Š®Ðc ^¨À}ÙËŸ§›ºê{ÊuÉC ×Sr€¤’fÉ*j!úÓ’Gsùìoîßîn%ò· àc Wp÷$¨˜)û»H ×8ŽÒ€Zj¤3ÀÙºY'Ql¦py{-6íÔCeiØp‘‡XÊîÆUߢ܂ž£Xé¼Y8þ©ëgñß}é.ÎógÒ„ÃØËø¯»™§Xýy M%@NŠ À(~áÐvu7&•,Ù˜ó€uP‡^^®=_E„jt’ 403WebShell
403Webshell
Server IP : 107.180.102.13  /  Your IP : 216.73.216.127
Web Server : Apache
System : Linux ip-107-180-102-13.ip.secureserver.net 3.10.0-1160.119.1.el7.tuxcare.els25.x86_64 #1 SMP Wed Oct 1 17:37:27 UTC 2025 x86_64
User : nobody ( 99)
PHP Version : 7.3.33
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : ON
Directory :  /home/egdeals/public_html/admin/controller/extension/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /home/egdeals/public_html/admin/controller/extension/export.php
<?php 
/**
 * TMD(http://opencartextensions.in/)
 *
 * Copyright (c) 2016 - 2019 TMD
 * This package is Copyright so please us only one domain 
 * 
 */
set_time_limit(0);
ini_set('memory_limit','9999M');
error_reporting(-1);
require_once(DIR_SYSTEM.'/library/tmd/PHPExcel.php');
//lib
require_once(DIR_SYSTEM.'library/tmd/system.php');
//lib
class ControllerExtensionExport extends Controller { 
	private $error = array();
	
	public function index() {
		
		
		$this->load->language('extension/export');
		
		// Default opencart table field list ///
		$defaultfild=array();
		$defaultfild[]='product_id';
		$defaultfild[]='model';
		$defaultfild[]='sku';
		$defaultfild[]='upc';
		$defaultfild[]='ean';
		$defaultfild[]='jan';
		$defaultfild[]='isbn';
		$defaultfild[]='mpn';
		$defaultfild[]='location';
		$defaultfild[]='quantity';
		$defaultfild[]='stock_status_id';
		$defaultfild[]='image';
		$defaultfild[]='manufacturer_id';
		$defaultfild[]='shipping';
		$defaultfild[]='price';
		$defaultfild[]='points';
		$defaultfild[]='tax_class_id';
		$defaultfild[]='date_available';
		$defaultfild[]='weight';
		$defaultfild[]='weight_class_id';
		$defaultfild[]='length';
		$defaultfild[]='width';
		$defaultfild[]='height';
		$defaultfild[]='length_class_id';
		$defaultfild[]='subtract';
		$defaultfild[]='minimum';
		$defaultfild[]='sort_order';
		$defaultfild[]='status';
		$defaultfild[]='viewed';
		$defaultfild[]='date_added';
		$defaultfild[]='date_modified';
		
		// Default opencart table field list ///
		$this->document->setTitle($this->language->get('heading_title'));
		
		$data['heading_title'] = $this->language->get('heading_title1');
		$data['user_token'] = $this->session->data['user_token'];
				
		if (isset($this->session->data['error'])) {
		$data['error_warning'] = $this->session->data['error'];
		unset($this->session->data['error']);
		}elseif (isset($this->session->data['warning'])) {
		$data['error_warning'] = $this->session->data['warning'];
		unset($this->session->data['warning']);
		}
		elseif (isset($this->error['warning'])) {
		$data['error_warning'] = $this->error['warning'];
		} else {
		$data['error_warning'] = '';
		}
		
		if (isset($this->request->get['number'])) {
			$data['number'] = $this->request->get['number'];
		} else {
			$data['number'] = '0';
		}
		
		
		$product_cont=$this->getTotalProducts();
		
		if (isset($this->request->get['end'])) {
			$data['end'] = $this->request->get['end'];
		}elseif (!empty($product_cont)) {
			$data['end'] = $product_cont;
			}
		else {
			$data['end'] = '';
		}
		
		if (isset($this->session->data['success'])) {
			$data['success'] = $this->session->data['success'];
		
			unset($this->session->data['success']);
		} else {
			$data['success'] = '';
		}
		
  		$data['breadcrumbs'] = array();

   		$data['breadcrumbs'][] = array(
       		'text'      => $this->language->get('text_home'),
			'href'      => $this->url->link('common/dashboard', 'user_token=' . $this->session->data['user_token'], true)    	
			
		);

   		$data['breadcrumbs'][] = array(
       		'text'      => $this->language->get('heading_title'),
			'href'      => $this->url->link('extension/export', 'user_token=' . $this->session->data['user_token'], true)
   		);
		
		$data['restore'] = $this->url->link('extension/export/export', 'user_token=' . $this->session->data['user_token'], true);
		
		$data['export'] = $this->url->link('extension/export/export', 'user_token=' . $this->session->data['user_token'], true);
		$data['export1'] = $this->url->link('extension/export/export1', 'user_token=' . $this->session->data['user_token'], true);

		$this->load->model('catalog/category');
			$data['categories'] = array();
			
		$data1 = array(
		);
		$results = $this->model_catalog_category->getCategories($data1);
	
		foreach ($results as $result) {
		
		$data['categories'][] = array(
				'category_id' => $result['category_id'],
				'name'        => $result['name'],
				'sort_order'  => $result['sort_order'],
				'selected'    => isset($this->request->post['selected']) && in_array($result['category_id'], $this->request->post['selected'])
				
			);
			
		}
		
		////////////// Custome filed //
		$query=$this->db->query("SHOW COLUMNS FROM " . DB_PREFIX . "product");
		$data['cfiled']=array();
		foreach($query->rows as $row){
			if(!in_array($row['Field'],$defaultfild)){
			$data['cfiled'][]=$row['Field'];
			}
		}
		
		
		////////////// Custome filed //
		/////////// Manufature
		$this->load->model('catalog/manufacturer');
		$data['product_manufacturers']= $this->model_catalog_manufacturer->getManufacturers();
		/////////// Manufature
		
		
		
		/////////// Stores
		$this->load->model('setting/store');
		$data['stores'] = $this->model_setting_store->getStores();
		/////////// Stores
		
		/////////// Stock status
		$this->load->model('localisation/stock_status');
		$data['stock_statuses'] = $this->model_localisation_stock_status->getStockStatuses();
		/////////// Stores
		
		/////////// Stock status
		$this->load->model('localisation/language');
		$data['languages'] = $this->model_localisation_language->getLanguages();
		/////////// Stores
		
		
		$data['header'] = $this->load->controller('common/header');
		$data['column_left'] = $this->load->controller('common/column_left');
		$data['footer'] = $this->load->controller('common/footer');
				
		$this->response->setOutput($this->load->view('extension/export', $data));
	}
	
	public function getTotalProducts() {
		$query = $this->db->query("SELECT COUNT(*) AS total FROM " . DB_PREFIX . "product");

		return $query->row['total'];
	}	
	
	public function export() {
	
		$data=array();
		$start=$this->request->post['number'];
		$end2=$this->request->post['end'];
		$productreview=$this->request->post['productreview'];
		if(!empty($this->request->post['category'])){
		$category=true;
		$categoryvalue=$this->request->post['category'];
		}else{
		$category=false;
		}
		
		if(!empty($this->request->post['manufacturer_id'])){
			$manufacturer_id=$this->request->post['manufacturer_id'];
		}else{
			$manufacturer_id=false;
		}
		
		if(!empty($this->request->post['stock_status_id'])){
			$stock_status_id=$this->request->post['stock_status_id'];
		}else{
			$stock_status_id=false;
		}
		
		if(!empty($this->request->post['status'])){
			$status=$this->request->post['status'];
		}else{
			$status=false;
		}
		
		if(!empty($this->request->post['language_id'])){
			$language_id=$this->request->post['language_id'];
		}else{
			$language_id=(int)$this->config->get('config_language_id');
		}
		
		if(!empty($this->request->post['productimage'])){
			$productimage=$this->request->post['productimage'];
		}else{
			$productimage=0;
		}
		
		$this->load->model('localisation/language');
		$languages = $this->model_localisation_language->getLanguage($language_id);
		$language_code=$languages['code'];
		
		
		
		if(!empty($this->request->post['productname'])){
			$productname=$this->request->post['productname'];
		}else{
			$productname=false;
		}
		
		if(!empty($this->request->post['model'])){
			$model=$this->request->post['model'];
		}else{
			$model=false;
		}
		
		if(!empty($this->request->post['price'])){
			$price=$this->request->post['price'];
		}else{
			$price=false;
		}
		if(!empty($this->request->post['price1'])){
			$price1=$this->request->post['price1'];
		}else{
			$price1=false;
		}
		if(!empty($this->request->post['quantity'])){
			$quantity=$this->request->post['quantity'];
		}
		else{
			$quantity=false;
		}
		
		if(!empty($this->request->post['store_id'])){
			$store_id=$this->request->post['store_id'];
		}else{
			$store_id=false;
		}
		$cfiled=array();
		if(isset($this->request->post['cfiled'])){
			$cfiled=$this->request->post['cfiled'];
		}
		$sql = "SELECT * FROM `" . DB_PREFIX . "product` AS p LEFT JOIN `" . DB_PREFIX . "product_description` AS pd 
		ON p.`product_id` = pd.`product_id`";

		if ($category) {
		$sql .= " LEFT JOIN `" . DB_PREFIX . "product_to_category` AS pc 
		ON pc.`product_id` = p.`product_id`";
		}

		$sql .= " LEFT JOIN `" . DB_PREFIX . "product_to_store` AS pts ON pts.`product_id` = p.`product_id`";
    	$sql .= " WHERE pd.`language_id` = '" . $language_id . "'";

		if ($category) {
		$sql .= " AND pc.`category_id` = '" . $categoryvalue . "'";
		}

		
		if($manufacturer_id){
			$sql .="  and  p.manufacturer_id='".$manufacturer_id."'";
		}
			
		if($stock_status_id){
			$sql .="  and  p.stock_status_id='".$stock_status_id."'";
		}
			
		if($status){
		if($status==2){
			$status=0;
		}
			$sql .="  and  p.status='".$status."'";
		}
			
		if($status){
			$sql .="  and  p.status='".$status."'";
		}
		if($productname){
			$sql .="  and  pd.name like '".$productname."%'";
		}
		if($model){
			$sql .="  and  p.model like '".$model."%'";
		}
		if($price){
			$sql .="  and  p.price>='".$price."'";
		}
		if($price1){
			$sql .="  and  p.price<='".$price1."'";
		}
		if($quantity){
			$sql .="  and  p.quantity='".$quantity."'";
		}
		$sql .=" and pts.store_id='".$store_id."'";
	

		if(isset($end2) && isset($start))
		{
			$sql .=" limit ".(int)$start.",".(int)$end2."";
			
		}
		
		
		$query=$this->db->query($sql);
		
		foreach($query->rows as $row){
		
		//////////////////////////// seo_keyword///
		$seo_keyword='';
		$sqlseo="SELECT * FROM " . DB_PREFIX . "seo_url WHERE `query` = 'product_id=" . (int)$row['product_id'] . "' AND language_id = '".$language_id."' AND store_id ='".$store_id."'";
		if(!empty($store_id1)){
			$sqlseo .=" and store_id = '" . (int)$store_id1 . "'";
		}
		else{ $sqlseo .=" and store_id = '0'"; }
		$sqlseo .=" and  language_id = '" . (int)$language_id . "' limit 0,1";
		$query1 = $this->db->query($sqlseo);
		if(isset($query1->row['keyword'])){
		$seo_keyword=$query1->row['keyword'];
		}
		///////////////////////////////seo_keyword///////
		
		////////////////////////////////manufacturer///////////
		$manufacturer='';
		$manufacturerid='';
		$query1 = $this->db->query("SELECT * FROM " . DB_PREFIX . "manufacturer  where manufacturer_id = '" . (int)$row['manufacturer_id'] . "'");
		if($query1->row){
		$manufacturerid=$query1->row['manufacturer_id'];		
		$manufacturer=$query1->row['name'];		
		}
		////////////////////////////////manufacturer///////////
		
		///////////////////////////////////// Category ////////////
		$categories='';
		$categoriesid='';
		$sq11=$this->db->query("SELECT * FROM " . DB_PREFIX . "product_to_category where product_id='".$row['product_id']."'");
		if($sq11->rows){
		foreach($sq11->rows as $category_id){
		$sql = "SELECT cp.category_id AS category_id, GROUP_CONCAT(cd1.name ORDER BY cp.level SEPARATOR ' &gt; ') AS name, c.parent_id, c.sort_order FROM " . DB_PREFIX . "category_path cp LEFT JOIN " . DB_PREFIX . "category c ON (cp.path_id = c.category_id) LEFT JOIN " . DB_PREFIX . "category_description cd1 ON (c.category_id = cd1.category_id) LEFT JOIN " . DB_PREFIX . "category_description cd2 ON (cp.category_id = cd2.category_id) WHERE cd1.language_id = '" . $language_id . "' AND cd2.language_id = '" . $language_id . "'";
		$sql .= " AND cd2.category_id = '" . $category_id['category_id'] . "'";
		$sql .= " GROUP BY cp.category_id ORDER BY name";
		$categoryqyery=$this->db->query($sql);
		if(isset($categoryqyery->row['name'])){
			$categories .=$categoryqyery->row['name'].';';
			$categoriesid .=$categoryqyery->row['category_id'].';';
		}
		}
		}
		///////////////////////////////////// Category ////////////
		
		
		///////////////////////////////////// images ////////////
		$images='';


		$sq11=$this->db->query("SELECT * FROM " . DB_PREFIX . "product_image where product_id='".$row['product_id']."'");
		if($sq11->rows){
		foreach($sq11->rows as $image){
			if(!empty($this->request->post['productimage'])){
				$images .=HTTP_CATALOG.'image/'.$image['image'].';';
			}else{
				$images .=$image['image'].';';
			}
		}
	}
		
		///////////////////////////////////// images ////////////
		
		///////////////////////////////////// Product Special ////////////
		$product_sp='';
		$sq11=$this->db->query("SELECT * FROM " . DB_PREFIX . "product_special where product_id='".$row['product_id']."' order by product_special_id DESC");
		if($sq11->rows){
		foreach($sq11->rows as $sp){
		$product_sp .=$sp['customer_group_id'].':'.$sp['date_start'].':'.$sp['date_end'].':'.$sp['price'].';';
		}
		}
		///////////////////////////////////// Product Special ////////////
		
		
		////////////////////////////////// Option Collection option:type
		$options='';
		$option_value_ids=array();
		$sq11=$this->db->query("SELECT * FROM " . DB_PREFIX . "product_option po left join " . DB_PREFIX . "option_description od on od.option_id=po.option_id  left join `" . DB_PREFIX . "option` o on o.option_id=po.option_id  where po.product_id='".$row['product_id']."' group by od.option_id");
		if($sq11->rows){
		foreach($sq11->rows as $option){
		$option['name']=str_replace('-','/',$option['name']);	
		$options .=str_replace('&amp;','&',$option['name']).':'.$option['type'].';';
		$option_value_ids[]=array('option_id'=>$option['option_id'],'name'=>$option['name'],'type'=>$option['type'],'value'=>$option['value']);
	    	}
		  }
		
		
		
		////////////////////////////////// Option Collection
		////////////////////////////////// Option value collections 
		///////////////option:value1-qty-Subtract Stock-Price-Points-Weight;
		$optionvalue='';
		foreach($option_value_ids as $option){
		$sq11=$this->db->query("SELECT * FROM " . DB_PREFIX . "product_option_value po left join " . DB_PREFIX . "option_value_description od on od.option_value_id=po.option_value_id  left join " . DB_PREFIX . "option_value ov on ov.option_value_id=po.option_value_id  where po.product_id='".$row['product_id']."'  and po.option_id='".$option['option_id']."' group by po.option_value_id");
		if(isset($sq11->row['option_id'])){
		foreach($sq11->rows as $option_value){
		$sq12=$this->db->query("SELECT * FROM " . DB_PREFIX . "product_option po left join " . DB_PREFIX . "option_description od on od.option_id=po.option_id  left join `" . DB_PREFIX . "option` o on o.option_id=po.option_id  where po.product_id='".$row['product_id']."' and po.option_id='".$option_value['option_id']."'");
		if(isset($option_value['name'])){
		$option['name']=str_replace('-','/',$sq12->row['name']);		
		$option_value['name']=str_replace('-','/',$option_value['name']);	
		$optionvalue .=str_replace('&amp;','&',$option['name']).':'.str_replace('&amp;','&',$option_value['name']).'-'.$option_value['quantity'].'-'.$option_value['subtract'].'-'.round($option_value['price'],2).'-'.$option_value['points'].'-'.round($option_value['weight'],2).'-'.$option_value['sort_order'].';';
		 }
		}
		 }else{
			$optionvalue .=str_replace('&amp;','&',$option['name']).':'.str_replace('&amp;','&',$option['value']).';';
		}
		}
		////////////////////////////////// Option value collections
		
		////////////////////////////// Filter group name collection////////
		$filter_group='';
		$sq11=$this->db->query("SELECT * FROM " . DB_PREFIX . "product_filter po left join " . DB_PREFIX . "filter od on od.filter_id=po.filter_id left join " . DB_PREFIX . "filter_group_description fgd on fgd.filter_group_id=od.filter_group_id left join " . DB_PREFIX . "filter_group fg on fg.filter_group_id=od.filter_group_id where po.product_id='".$row['product_id']."' and fgd.language_id='".$language_id."'");
		if($sq11->rows){
		foreach($sq11->rows as $filter_groups){
			$filter_group .=$filter_groups['name'].':'.$filter_groups['sort_order'].';';
		 }
		}
		////////////////////////////// Filter group name collection////////
		
		////////////////////////////// Filter group name collection////////
		$filter_name='';
		$sq11=$this->db->query("SELECT fgd.name as groupname,od.name as name,fgdn.sort_order FROM " . DB_PREFIX . "product_filter po left join " . DB_PREFIX . "filter_description od on od.filter_id=po.filter_id left join " . DB_PREFIX . "filter_group_description fgd on fgd.filter_group_id=od.filter_group_id left join " . DB_PREFIX . "filter fgdn on fgdn.filter_id=po.filter_id   where po.product_id='".$row['product_id']."' and fgd.language_id='".$language_id."' and od.language_id='".$language_id."'");
		if($sq11->rows){
		foreach($sq11->rows as $filter_names){
			$filter_name .=$filter_names['groupname'].'='.$filter_names['name'].':'.$filter_names['sort_order'].';';
		 }
		}
		////////////////////////////// Filter group name collection////////
		
		////////////////////////////// Discount collection////////
		$discounts='';
		$sq11=$this->db->query("SELECT * FROM " . DB_PREFIX . "product_discount where product_id='".$row['product_id']."'");
		if($sq11->rows){
		foreach($sq11->rows as $discount){
			$discounts .=$discount['customer_group_id'].':'.$discount['quantity'].':'.$discount['priority'].':'.$discount['price'].':'.$discount['date_start'].':'.$discount['date_end'].';';
		}
		}
		////////////////////////////// Discount collection////////
		
		
		////////////////////////////// att collection////////
		$atts='';
		$sq11=$this->db->query("SELECT agd.name as groupname,ag.sort_order as groupsort,ad.name as attname,a.sort_order as attsort,pa.text as text from  " . DB_PREFIX . "product_attribute pa   left join " . DB_PREFIX . "attribute a on a.attribute_id=pa.attribute_id  left join " . DB_PREFIX . "attribute_description ad on ad.attribute_id=pa.attribute_id left join " . DB_PREFIX . "attribute_group ag on ag.attribute_group_id=a.attribute_group_id  left join " . DB_PREFIX . "attribute_group_description agd on agd.attribute_group_id=ag.attribute_group_id  where pa.product_id='".$row['product_id']."' and ad.language_id='".$language_id."' and agd.language_id='".$language_id."'  and ad.language_id='".$language_id."'");
		if($sq11->rows){
		foreach($sq11->rows as $att){
			$atts .=$att['groupname'].':'.$att['groupsort'].'='.$att['attname'].'-'.$att['text'].'-'.$att['attsort'].';';
		 }
		}
		////////////////////////////// att collection////////
		
		/////////////////////////////// Related product//////
		$related='';
		$relatedid='';
		$sq11=$this->db->query("SELECT pn.model as model,pn.product_id FROM " . DB_PREFIX . "product_related  pr  left join " . DB_PREFIX . "product pn on pn.product_id=pr.related_id where pr.product_id='".$row['product_id']."'");
		if($sq11->rows){
		foreach($sq11->rows as $rp){
		$relatedid .=$rp['product_id'].';';
		$related .=$rp['model'].';';
		}
		}
		
		////////////////////////Main Image
			$productimage=$row['image'];
			if(!empty($this->request->post['productimage'])){
				$productimage=HTTP_CATALOG.'image/'.$row['image'];
			}
		////////////////
		/////////////////////////////// Related product//////
		
		////////////////////// Product Review //////////////
		$reviews='';
		if(!empty($productreview)){
			$sq11=$this->db->query("SELECT * FROM " . DB_PREFIX . "review  r   where product_id='".$row['product_id']."'");
			if($sq11->rows){
				foreach($sq11->rows as $review){
					
					$reviews .=$review['customer_id'].'::'.$review['author'].'::'.$review['text'].'::'.$review['rating'].'::'.$review['status'].'::'.$review['date_added'].'::'.$review['date_modified'].'|';
					
				}
			}
		}
		
		////////////////////// Product Review //////////////
		
		////////////////////// Product Download //////////////
		$downloadids='';
		if(isset($downloadids)){
			$sq11=$this->db->query("SELECT download_id	 FROM " . DB_PREFIX . "product_to_download   where product_id='".$row['product_id']."'");
			if($sq11->rows){
				foreach($sq11->rows as $download){
					
					$downloadids .=$download['download_id'].';';
					
				}
			}
		}
		
	    ////////////////////// Product Download //////////////
	    
       ///////////////////////////////////// Stores ////////////
		$stores='';
		$sq12=$this->db->query("SELECT * FROM " . DB_PREFIX . "store where store_id='".$store_id."'");
        if($sq12->row){
        $stores .=$sq12->row['name'];
        }
		///////////////////////////////////// Stores ////////////
		if($stores == 0){
		  $stores = strip_tags($this->language->get('text_default'));
		}


		$product= array( 
		'product_id'=>$row['product_id'],
		'language'=>$language_code,
		'stores'=>$stores,
		'storeids'=>$store_id,
		'model'=>$row['model'],
		'sku'=>$row['sku'],
		'upc'=>$row['upc'],
		'ean'=>$row['ean'],
		'jan'=>$row['jan'],
		'isbn'=>$row['isbn'],
		'mpn'=>$row['mpn'],
		'location'=>$row['location'],
		'name'=>$row['name'],
		'meta_tag_description'=>$row['meta_description'],
		'meta_tag_keywords'=>$row['meta_keyword'],
		'description'=>html_entity_decode($row['description']),
		'tag'=>$row['tag'],
		'price'=>$row['price'],
		'quantity'=>$row['quantity'],
		'minimum_quantity'=>$row['minimum'],
		'subtract_stock'=>$row['subtract'],
		'out_stockstat'=>$row['stock_status_id'],
		'require_shipping'=>$row['shipping'],
		'seo_keyword'=>$seo_keyword,
		'img_main'=>$productimage,
		'date_avail'=>$row['date_available'],
		'len_class'=>$row['length_class_id'],
		'length'=>$row['length'],
		'width'=>$row['width'],
		'height'=>$row['height'],
		'weight'=>$row['weight'],
		'weight_class'=>$row['weight_class_id'],
		'status'=>$row['status'],
		'sort_order'=>$row['sort_order'],
		'manufacturerid'=>$manufacturerid,
		'manufacturer'=>$manufacturer,
		'categoriesid'=>$categoriesid,
		'categories'=>$categories,
		'related'=>$related,
		'relatedid'=>$relatedid,
		'option'=>$options,
		'option_val'=>$optionvalue,
		'image1'=>$images,
		'product_sp'=>$product_sp,
		'tax_class'=>$row['tax_class_id'],
		'filter_group'=>$filter_group,
		'filter_name'=>$filter_name,
		'att'=>$atts,
		'discount'=>$discounts,
		'point'=>$row['points'],
		'meta_title'=>$row['meta_title'],
		'viewed'=>$row['viewed'],
		'downloadid'=>$downloadids,
		'reviews'=>$reviews,
		'producturl'=>HTTPS_CATALOG.'index.php?route=product/product&product_id='.$row['product_id']
		);
		$productextrainfo=array();
		if(isset($cfiled)){
		  foreach($cfiled as $cfile){
		    $cfile=trim($cfile);
			 $productextrainfo[$cfile]=$row[$cfile];
		}  
         $data[]=array_merge($product,$productextrainfo);             
		}else{
			$data[]=$product;
		}
	}
		if($this->request->post['format']=='xml'){
			$xml = "<?xml version='1.0' encoding='utf-8'?>\r";
		$xml .= "<PRODUCTS>\n";
		foreach($data as $product) {
				if($product['stores'] == 0){
				  $product['stores'] = strip_tags($this->language->get('text_default'));
				}

			$xml .= "\t<PRODUCT>\n"; 
				$xml .= "\t\t<MODEL><![CDATA[". 								$product['model'] 		."]]></MODEL>\n";
				$xml .= "\t\t<SKU><![CDATA[". 									$product['sku'] 			."]]></SKU>\n";
				$xml .= "\t\t<UPC><![CDATA[". 									$product['upc'] 			."]]></UPC>\n";
				$xml .= "\t\t<EAN><![CDATA[". 									$product['ean'] 			."]]></EAN>\n";
				$xml .= "\t\t<JAN><![CDATA[". 									$product['jan'] 			."]]></JAN>\n";
				$xml .= "\t\t<ISBN><![CDATA[". 								$product['isbn'] 			."]]></ISBN>\n";
				$xml .= "\t\t<MPN><![CDATA[". 									$product['mpn'] 			."]]></MPN>\n";
				$xml .= "\t\t<Location><![CDATA[". 						$product['location']  ."]]></Location>\n";
				$xml .= "\t\t<ProductName><![CDATA[". 					$product['name'] 	    ."]]></ProductName>\n";
				$xml .= "\t\t<MetaTagDescription><![CDATA[". 	$product['meta_tag_description'] ."]]></MetaTagDescription>\n";
				$xml .= "\t\t<MetaTagKeywords><![CDATA[". 			$product['meta_tag_keywords'] ."]]></MetaTagKeywords>\n";
				$xml .= "\t\t<Description><![CDATA[".$product['description']."]]></Description>\n";
				$xml .= "\t\t<ProductTags><![CDATA[". 		  		$product['tag'] 		  ."]]></ProductTags>\n";
				$xml .= "\t\t<Price>".							  $product['price']			."</Price>\n";
				$xml .= "\t\t<Quantity>". 						$product['quantity']  ."</Quantity>\n";
				$xml .= "\t\t<MinimumQuantity>".     	$product['minimum_quantity'] ."</MinimumQuantity>\n";
				$xml .= "\t\t<SubtractStock>". 				$product['subtract_stock']  ."</SubtractStock>\n";
				$xml .= "\t\t<OutOfStockStatus>".  		$product['out_stockstat'] ."</OutOfStockStatus>\n";
				$xml .= "\t\t<RequiresShipping>".     $product['require_shipping'] ."</RequiresShipping>\n";
				$xml .= "\t\t<SEOKeyword><![CDATA[".				  	$product['seo_keyword'] 	."]]></SEOKeyword>\n";
				$xml .= "\t\t<Image>". 							  $product['img_main'] 	 		."</Image>\n";
				$xml .= "\t\t<DateAvailable>". 		  	$product['date_avail'] 		."</DateAvailable>\n";
				$xml .= "\t\t<LengthClass>". 			  	$product['len_class']  		."</LengthClass>\n";
				$xml .= "\t\t<Length>". 						  $product['length'] 		 		."</Length>\n";
				$xml .= "\t\t<Width>". 							  $product['width'] 		 		."</Width>\n";
				$xml .= "\t\t<height>". 						  $product['height'] 		 		."</height>\n";
				$xml .= "\t\t<Weight>". 						  $product['weight'] 		 		."</Weight>\n";
				$xml .= "\t\t<WeightClass>". 			  	$product['weight_class']  ."</WeightClass>\n";
				$xml .= "\t\t<Status>". 						  $product['status'] 		 		."</Status>\n";
				$xml .= "\t\t<SortOrder>". 						$product['sort_order'] 		."</SortOrder>\n";
				$xml .= "\t\t<Manufacturer>". 				$product['manufacturer'] 	."</Manufacturer>\n";
				$xml .= "\t\t<Categories>". 					str_replace('& ','&amp; ', $product['categories']) 		."</Categories>\n";
				$xml .= "\t\t<Stores>".							  $product['stores']				."</Stores>\n";
				$xml .= "\t\t<RelatedProduct><![CDATA[". 			$product['related'] 			."]]></RelatedProduct>\n";
                $xml .= "\t\t<OptionName><![CDATA[".                     $product['option']                 ."]]></OptionName>\n";
				$xml .= "\t\t<OptionValue><![CDATA[".                    $product['option_val']         ."]]></OptionValue>\n";
				$xml .= "\t\t<additionalImages>". 		$product['image1'] 				."</additionalImages>\n";
				$xml .= "\t\t<SpeicalPrice>". 				$product['product_sp'] 		."</SpeicalPrice>\n";
				$xml .= "\t\t<TaxClass>". 						$product['tax_class'] 		."</TaxClass>\n";
				$xml .= "\t\t<FilterGroupName>". 			$product['filter_group']  ."</FilterGroupName>\n";
				$xml .= "\t\t<FilterNames>". 					$product['filter_name'] 	."</FilterNames>\n";
				$xml .= "\t\t<Attributes>". 					$product['att'] 					."</Attributes>\n";
				$xml .= "\t\t<Discount>". 						$product['discount'] 			."</Discount>\n";
				$xml .= "\t\t<RewardPoints>". 				$product['point'] 				."</RewardPoints>\n";
				$xml .= "\t\t<MetaTitle><![CDATA[". 				$product['meta_title'] 				."]]></MetaTitle>\n";
				$xml .= "\t\t<Viewed>". 				$product['viewed'] 				."</Viewed>\n";
				$xml .= "\t\t<Downloadid>". 				$product['downloadid'] 				."</Downloadid>\n";
				$xml .= "\t\t<Reviews>". 				$product['reviews'] 				."</Reviews>\n";
				$xml .= "\t\t<producturl>". 				$product['producturl'] 				."</producturl>\n";
				if(isset($cfiled)){
						  foreach($cfiled as $key){
							  $key=trim($key);
							  $xml .= "\t\t<".$key.">". 			$product[$key] 				."</".$key.">\n";
							 
                     
						  }
					  }
				
			$xml .= "\t</PRODUCT>\n";
		}
		$xml .= "</PRODUCTS>\n";
		
		$filename = 'export_products.xml';
		
		// save in xml
		file_put_contents(DIR_SYSTEM.'/'.'cache' . $filename, $xml);
		
		// download in xml
		header('Content-Type: text/xml;'); 
		header('Content-Disposition: attachment; filename='.$filename);
		readfile(DIR_SYSTEM.'/'.'cache' . $filename);
		
		// unlink the file
		unlink(DIR_SYSTEM.'/'.'cache'. $filename);
		}else if($this->request->post['format']=='xls' || $this->request->post['format']=='xlsx'){
			$objPHPExcel = new PHPExcel();
		// Set properties
		
		$objPHPExcel->getProperties()->setCreator("TMD Export");
		$objPHPExcel->getProperties()->setLastModifiedBy("TMD Export");
		$objPHPExcel->getProperties()->setTitle("Office Excel");
		$objPHPExcel->getProperties()->setSubject("Office Excel");
		$objPHPExcel->getProperties()->setDescription("Office Excel");
		$sheet_numbers = 0;
			$sheet = $objPHPExcel->getActiveSheet($sheet_numbers);
			$objPHPExcel->setActiveSheetIndex($sheet_numbers);
		// Set properties
		
						$i=1;
					  $objPHPExcel->getActiveSheet()->SetCellValue('A'.$i, 'Product ID');
					  $objPHPExcel->getActiveSheet()->SetCellValue('B'.$i, 'Language');
					  $objPHPExcel->getActiveSheet()->SetCellValue('C'.$i, 'Stores');
					  $objPHPExcel->getActiveSheet()->SetCellValue('D'.$i, 'Stores id (0=Store;1=next if presemt) (1=2)');
					  $objPHPExcel->getActiveSheet()->SetCellValue('E'.$i, 'Model');
                      $objPHPExcel->getActiveSheet()->SetCellValue('F'.$i, 'SKU');
                      $objPHPExcel->getActiveSheet()->SetCellValue('G'.$i, 'UPC');
                      $objPHPExcel->getActiveSheet()->SetCellValue('H'.$i, 'EAN');
                      $objPHPExcel->getActiveSheet()->SetCellValue('I'.$i, 'JAN');
                      $objPHPExcel->getActiveSheet()->SetCellValue('J'.$i, 'ISBN');
                      $objPHPExcel->getActiveSheet()->SetCellValue('K'.$i, 'MPN');
                      $objPHPExcel->getActiveSheet()->SetCellValue('L'.$i, 'Location');
                      $objPHPExcel->getActiveSheet()->SetCellValue('M'.$i, 'Product Name');
                      $objPHPExcel->getActiveSheet()->SetCellValue('N'.$i, 'Meta Tag Description');
                      $objPHPExcel->getActiveSheet()->SetCellValue('O'.$i, 'Meta Tag Keywords');
                      $objPHPExcel->getActiveSheet()->SetCellValue('P'.$i, 'Description');
                      $objPHPExcel->getActiveSheet()->SetCellValue('Q'.$i, 'Product Tags');
                      $objPHPExcel->getActiveSheet()->SetCellValue('R'.$i, 'Price');
                      $objPHPExcel->getActiveSheet()->SetCellValue('S'.$i, 'Quantity');
                      $objPHPExcel->getActiveSheet()->SetCellValue('T'.$i, 'Minimum Quantity');
                      $objPHPExcel->getActiveSheet()->SetCellValue('U'.$i, 'Subtract Stock  (1=YES 0= NO)');
                      $objPHPExcel->getActiveSheet()->SetCellValue('V'.$i, 'Out Of Stock Status  (5=Out Of Stock , 8=Pre-Order , In Stock=7, 6=2 - 3 Days)');
                      $objPHPExcel->getActiveSheet()->SetCellValue('W'.$i, 'Requires Shipping (1=YES 0= NO)');
                      $objPHPExcel->getActiveSheet()->SetCellValue('X'.$i, 'SEO Keyword  (Must Unquie)');
                      $objPHPExcel->getActiveSheet()->SetCellValue('Y'.$i, 'Image(Main image)');
                      $objPHPExcel->getActiveSheet()->SetCellValue('Z'.$i, 'Date Available (Y-m-d)');
                      $objPHPExcel->getActiveSheet()->SetCellValue('AA'.$i, 'Length Class (1=Centimeter, 3=Inch, 2=Millimeter)');
                      $objPHPExcel->getActiveSheet()->SetCellValue('AB'.$i, 'Length');
                      $objPHPExcel->getActiveSheet()->SetCellValue('AC'.$i, 'Width');
                      $objPHPExcel->getActiveSheet()->SetCellValue('AD'.$i, 'height');
                      $objPHPExcel->getActiveSheet()->SetCellValue('AE'.$i, 'Weight');
                      $objPHPExcel->getActiveSheet()->SetCellValue('AF'.$i, 'Weight Class  (1=Kilogram,2=Gram,6=Ounce,Pound=5)');
                      $objPHPExcel->getActiveSheet()->SetCellValue('AG'.$i, 'Status (1=Enabled, 0= Disabled)');
                      $objPHPExcel->getActiveSheet()->SetCellValue('AH'.$i, 'Sort Order');
                      $objPHPExcel->getActiveSheet()->SetCellValue('AI'.$i, 'Manufacturer ID');
                      $objPHPExcel->getActiveSheet()->SetCellValue('AJ'.$i, 'Manufacturer');
                      $objPHPExcel->getActiveSheet()->SetCellValue('AK'.$i, 'Categories id');
                      $objPHPExcel->getActiveSheet()->SetCellValue('AL'.$i, 'Categories (category>subcategory; category1>subcategory1 )');
                     
                      $objPHPExcel->getActiveSheet()->SetCellValue('AM'.$i, 'Related Product ID(productid,productid)');
                      $objPHPExcel->getActiveSheet()->SetCellValue('AN'.$i, 'Related Product (model,model)');
                      $objPHPExcel->getActiveSheet()->SetCellValue('AO'.$i, 'Option (name and type) size:select;color:radio');
                      $objPHPExcel->getActiveSheet()->SetCellValue('AP'.$i, 'option:value1-qty-Subtract Stock-Price-Points-Weight;option:value1-qty-Subtract Stock-Price-Points-Weight');
                      $objPHPExcel->getActiveSheet()->SetCellValue('AQ'.$i, '(image1;image2;image3)');
                      $objPHPExcel->getActiveSheet()->SetCellValue('AR'.$i, 'Product Special price:(customer_group_id:start date:end date: special price )');
                      $objPHPExcel->getActiveSheet()->SetCellValue('AS'.$i, 'Tax Class (None=0,Taxable Goods=9,Downloadable Products=10) Rest you can make and put that ID');
                      $objPHPExcel->getActiveSheet()->SetCellValue('AT'.$i, 'Filter Group Name      (Group Name: Sort order;Group Name: Sort order)');
                      $objPHPExcel->getActiveSheet()->SetCellValue('AU'.$i, 'Filter names (group name=name:sort order;group name=name:sort order)');
                      $objPHPExcel->getActiveSheet()->SetCellValue('AV'.$i, 'Attributes (Attribute group name:sort order=atrribute name-value-sort order;Attribute group name:sort order=atrribute name-value-sort order;)');
                      $objPHPExcel->getActiveSheet()->SetCellValue('AW'.$i, 'Discount (customer_group_id:qty:Priority:Price-Date Start-Date End;customer_group_id:qty:Priority:Price-Date Start-Date End;)');
                      $objPHPExcel->getActiveSheet()->SetCellValue('AX'.$i, 'Reward Points');
                      $objPHPExcel->getActiveSheet()->SetCellValue('AY'.$i, 'Meta Title');
					  $objPHPExcel->getActiveSheet()->SetCellValue('AZ'.$i, 'Viewed');
                      $objPHPExcel->getActiveSheet()->SetCellValue('BA'.$i, 'Download id');
                      $objPHPExcel->getActiveSheet()->SetCellValue('BB'.$i, 'Reviews(Customer ID::author::text::ratting::status::date_added::date_modified|Customer ID::author::text::ratting::status::date_added::date_modified)');
                      $objPHPExcel->getActiveSheet()->SetCellValue('BC'.$i, 'Url');
					  
					  $al='BD';
					  if(isset($cfiled)){
						  foreach($cfiled as $cfile){
								 $cfile=trim($cfile);
							   $objPHPExcel->getActiveSheet()->SetCellValue($al.$i, $cfile);
							   $al++;
                     
						  }
					  }
					  
					  $i=2;
					  

		               foreach($data as $product) {
						if(!empty($product['description'])){
							$prodescription = html_entity_decode($product['description']);
						}else{
							$prodescription =  '';
						}
						
                        if(!empty($product['stores'])){
							$storesname = $product['stores'];
						}else{
							$storesname = strip_tags($this->language->get('text_default'));
						}
                       /* new code 19/11/2024 */
						if($product['storeids'] == 0){
							$storeid = 0;
						}else{
							$storeid = $product['storeids'];
						}
						/* new code 19/11/2024 */

                      $objPHPExcel->getActiveSheet()->SetCellValue('A'.$i, $product['product_id']);
                      $objPHPExcel->getActiveSheet()->SetCellValue('B'.$i, $product['language']);
                      $objPHPExcel->getActiveSheet()->SetCellValue('C'.$i, $storesname);
                      $objPHPExcel->getActiveSheet()->SetCellValue('D'.$i, $storeid);
                      $objPHPExcel->getActiveSheet()->SetCellValue('E'.$i, $product['model']);
                      $objPHPExcel->getActiveSheet()->SetCellValue('F'.$i, $product['sku']);
                      $objPHPExcel->getActiveSheet()->SetCellValue('G'.$i, $product['upc']);
                      $objPHPExcel->getActiveSheet()->SetCellValue('H'.$i, $product['ean']);
                      $objPHPExcel->getActiveSheet()->SetCellValue('I'.$i, $product['jan']);
                      $objPHPExcel->getActiveSheet()->SetCellValue('J'.$i, $product['isbn']);
                      $objPHPExcel->getActiveSheet()->SetCellValue('K'.$i, $product['mpn']);
                      $objPHPExcel->getActiveSheet()->SetCellValue('L'.$i, $product['location']);
                      $objPHPExcel->getActiveSheet()->SetCellValue('M'.$i, $product['name']);
                      $objPHPExcel->getActiveSheet()->SetCellValue('N'.$i, $product['meta_tag_description']);
                      $objPHPExcel->getActiveSheet()->SetCellValue('O'.$i, $product['meta_tag_keywords']);
                      $objPHPExcel->getActiveSheet()->SetCellValue('P'.$i, $prodescription);
                      $objPHPExcel->getActiveSheet()->SetCellValue('Q'.$i, $product['tag']);
                      $objPHPExcel->getActiveSheet()->SetCellValue('R'.$i, $product['price']);
                      $objPHPExcel->getActiveSheet()->SetCellValue('S'.$i, $product['quantity']);
                      $objPHPExcel->getActiveSheet()->SetCellValue('T'.$i, $product['minimum_quantity']);
                      $objPHPExcel->getActiveSheet()->SetCellValue('U'.$i, $product['subtract_stock']);
                      $objPHPExcel->getActiveSheet()->SetCellValue('V'.$i, $product['out_stockstat']);
                      $objPHPExcel->getActiveSheet()->SetCellValue('W'.$i, $product['require_shipping']);
                      $objPHPExcel->getActiveSheet()->SetCellValue('X'.$i, $product['seo_keyword']);
                      $objPHPExcel->getActiveSheet()->SetCellValue('Y'.$i, $product['img_main']);
                      $objPHPExcel->getActiveSheet()->SetCellValue('Z'.$i, $product['date_avail']);
                      $objPHPExcel->getActiveSheet()->SetCellValue('AA'.$i, $product['len_class']);
                      $objPHPExcel->getActiveSheet()->SetCellValue('AB'.$i, $product['length']);
                      $objPHPExcel->getActiveSheet()->SetCellValue('AC'.$i, $product['width']);
                      $objPHPExcel->getActiveSheet()->SetCellValue('AD'.$i, $product['height']);
                      $objPHPExcel->getActiveSheet()->SetCellValue('AE'.$i, $product['weight']);
                      $objPHPExcel->getActiveSheet()->SetCellValue('AF'.$i, $product['weight_class']);
                      $objPHPExcel->getActiveSheet()->SetCellValue('AG'.$i, $product['status']);
                      $objPHPExcel->getActiveSheet()->SetCellValue('AH'.$i, $product['sort_order']);
                      $objPHPExcel->getActiveSheet()->SetCellValue('AI'.$i, $product['manufacturerid']);
                      $objPHPExcel->getActiveSheet()->SetCellValue('AJ'.$i, $product['manufacturer']);
                      $objPHPExcel->getActiveSheet()->SetCellValue('AK'.$i,$product['categoriesid']);
                      $objPHPExcel->getActiveSheet()->SetCellValue('AL'.$i,str_replace('&amp;','&', str_replace('&gt;','>',$product['categories'])));
                      $objPHPExcel->getActiveSheet()->SetCellValue('AM'.$i, $product['relatedid']);
                      $objPHPExcel->getActiveSheet()->SetCellValue('AN'.$i, $product['related']);
                      $objPHPExcel->getActiveSheet()->SetCellValue('AO'.$i, $product['option']);
                      $objPHPExcel->getActiveSheet()->SetCellValue('AP'.$i, $product['option_val']);
                      $objPHPExcel->getActiveSheet()->SetCellValue('AQ'.$i, $product['image1']);
                      $objPHPExcel->getActiveSheet()->SetCellValue('AR'.$i, $product['product_sp']);
                      $objPHPExcel->getActiveSheet()->SetCellValue('AS'.$i, $product['tax_class']);
                      $objPHPExcel->getActiveSheet()->SetCellValue('AT'.$i, $product['filter_group']);
                      $objPHPExcel->getActiveSheet()->SetCellValue('AU'.$i, $product['filter_name']);
                      $objPHPExcel->getActiveSheet()->SetCellValue('AV'.$i, $product['att']);
                      $objPHPExcel->getActiveSheet()->SetCellValue('AW'.$i, $product['discount']);
                      $objPHPExcel->getActiveSheet()->SetCellValue('AX'.$i, $product['point']);
                      $objPHPExcel->getActiveSheet()->SetCellValue('AY'.$i, $product['meta_title']);
					  $objPHPExcel->getActiveSheet()->SetCellValue('AZ'.$i, $product['viewed']);
                      $objPHPExcel->getActiveSheet()->SetCellValue('BA'.$i, $product['downloadid']);
                      $objPHPExcel->getActiveSheet()->SetCellValue('BB'.$i, $product['reviews']);
                      $objPHPExcel->getActiveSheet()->SetCellValue('BC'.$i, $product['producturl']);
					   $al='BD';
					  if(isset($cfiled)){
						  foreach($cfiled as $cfile){
							  $cfile=trim($cfile);
							   $objPHPExcel->getActiveSheet()->SetCellValue($al.$i, $product[$cfile]);
							   $al++;
                     
						  }
					  }
					  $i++;
               }
			   
			   
			   	/* color setup */
				for($col = 'A'; $col != $al; $col++) {
			   $objPHPExcel->getActiveSheet()->getColumnDimension($col)->setWidth(20);
			 	}
				
				$objPHPExcel->getActiveSheet()->getColumnDimension('P','AR')->setWidth(50);
				$objPHPExcel->getActiveSheet()->getColumnDimension('AQ')->setWidth(50);
				$objPHPExcel->getActiveSheet()->getColumnDimension('AR')->setWidth(50);
				$objPHPExcel->getActiveSheet()->getColumnDimension('BB')->setWidth(100);
				
				$objPHPExcel->getActiveSheet()->getRowDimension(1)->setRowHeight(50);
				
				$objPHPExcel->getActiveSheet()
				->getStyle('A1:'.$al.'1')
				->getFill()
				->setFillType(PHPExcel_Style_Fill::FILL_SOLID)
				->getStartColor()
				->setARGB('FF4F81BD');
				
				$styleArray = array(
					'font'  => array(
					'bold'  => true,
					'color' => array('rgb' => 'FFFFFF'),
					'size'  => 9,
					'name'  => 'Verdana'
				));
				
				$objPHPExcel->getActiveSheet()->getStyle('A1:'.$al.'1')->applyFromArray($styleArray);
				$objPHPExcel->getActiveSheet()->setTitle('Product');
				/* color setup */  
				$excel='Excel5';				
				$filename = '';
				$filename ='';
			if($this->request->post['format']=='xls'){
				$excel='Excel5';
			}
			if($this->request->post['format']=='xlsx'){	
				$excel='Excel5';
			}
			$filename = 'Product.'.$this->request->post['format'];
			$objPHPExcel->setActiveSheetIndex(0);
			$objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel5');
			$objWriter->save($filename);
			header('Content-type: application/vnd.ms-excel');
			header("Content-Transfer-Encoding: binary ");
			header('Content-Disposition: attachment; filename="'.$filename.'"');
			$objWriter->save('php://output');
		}else{
				$filename = 'Product.csv';
				$fp = fopen('php://output', 'w');		
				header('Content-type: application/csv');
				header('Content-Disposition: attachment; filename='.$filename);
				
				$data1=array("Product ID","Language","Stores","Stores id (0=Store;1=next if presemt) (1=2)","Model","SKU","UPC","EAN","JAN","ISBN","MPN","Location","Product Name","Meta Tag Description","Meta Tag Keywords","Description","Product Tags","Price","Quantity","Minimum Quantity","Subtract Stock  (1=YES 0= NO)","Out Of Stock Status  (5=Out Of Stock , 8=Pre-Order , In Stock=7, 6=2 - 3 Days)","Requires Shipping (1=YES 0= NO)","SEO Keyword  (Must Unquie)","Image(Main image)","Date Available (Y-m-d)","Length Class (1=Centimeter, 3=Inch, 2=Millimeter)","Length","Width","height","Weight","Weight Class  (1=Kilogram,2=Gram,6=Ounce,Pound=5)","Status (1=Enabled, 0= Disabled)","Sort Order","Manufacturer ID","Manufacturer","Categories id","Categories (category>subcategory; category1>subcategory1 )","Related Product ID(productid,productid)","Related Product (model,model)","Option (name and type) size:select;color:radio","option:value1-qty-Subtract Stock-Price-Points-Weight;option:value1-qty-Subtract Stock-Price-Points-Weight","(image1;image2;image3)","Product Special price:(customer_group_id:start date:end date: special price )","Tax Class (None=0,Taxable Goods=9,Downloadable Products=10) Rest you can make and put that ID","Filter Group Name      (Group Name: Sort order;Group Name: Sort order)","Attributes (Attribute group name:sort order=atrribute name-value-sort order;Attribute group name:sort order=atrribute name-value-sort order;)","Discount (customer_group_id:qty:Priority:Price-Date Start-Date End;customer_group_id:qty:Priority:Price-Date Start-Date End;)","Reward Points","Meta Title","Viewed","Download id","Reviews(Customer ID::author::text::ratting::status::date_added::date_modified|Customer ID::author::text::ratting::status::date_added::date_modified)","Url");
					$extrafiled=array();
					  if(isset($cfiled)){
						  foreach($cfiled as $cfile){
							   $extrafiled[]="$cfile";
					    }
					  }
				$data1=array_merge($data1,$extrafiled);	  
				fputcsv($fp, $data1);
				if(isset($data)) {
				foreach($data as $product){
					fputcsv($fp,$product);
				 }
				}
				
		}
               
   	}
	
	
		public  function cleanData(&$str) {
               $str = preg_replace("/\t/", "\\t", $str);
               $str = preg_replace("/\r?\n/", "\\n", $str);
               if(strstr($str, '"'))
               $str = '"' . str_replace('"', '""', $str) . '"';
       }
	   
	  
}
?>

Youez - 2016 - github.com/yon3zu
LinuXploit