Guest User

gggfgrfdg

a guest
Dec 30th, 2015
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 55.61 KB | None | 0 0
  1. <div class = "wk_cont_ul">
  2. <div id="horizontalmenu">
  3. <ul class ="mymenu">
  4.  
  5. <li><a href="#">Listings</a>
  6. <ul>
  7. <li><a href="<?php echo Mage::getUrl('marketplace/marketplaceaccount/new/'); ?>">New Products</a></li> <li><a href="<?php echo Mage::getUrl('marketplace/marketplaceaccount/myproductslist/'); ?>">My product list</a></li> <li><a href="#">Assign product</a></li> <li><a href="#">Assign List</a></li> </ul>
  8.  
  9. </li> <li> <a href="#">Orders</a> <ul> <li><a href="#">IT/Software</a></li> <li><a href="#">Hardware</a></li> <li><a href="#">Iphone</a></li> <li><a href="#">Neuro-Science</a></li> </ul>
  10.  
  11. </li>
  12.  
  13. <li> <a href="#">Returns</a>
  14.  
  15. <ul> <li><a href="#">Cricket</a></li> <li><a href="#">Tenis</a></li> <li><a href="#">Badminton</a></li> <li><a href="#">Hockey</a></li> </ul> </li>
  16.  
  17.  
  18. </ul>
  19. </div>
  20.  
  21.  
  22. <br/><br/>
  23. </div>
  24.  
  25.  
  26.  
  27.  
  28.  
  29. <?php
  30. $isPartner= Mage::getModel('marketplace/userprofile')->isPartner();
  31. $helper= Mage::helper('marketplace');
  32. if($isPartner==1){
  33. ?>
  34. <script type="text/javascript">
  35. if (typeof jQuery == 'undefined'){
  36. document.write(unescape("%3Cscript src='//ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js' type='text/javascript'%3E%3C/script%3E"));
  37. }
  38. </script>
  39. <script src="//code.jquery.com/ui/1.10.3/jquery-ui.js"></script>
  40. <link rel="stylesheet" href="//code.jquery.com/ui/1.10.3/themes/smoothness/jquery-ui.css" />
  41. <div class="page-title">
  42. <h1 style="float:left;"><?php echo $helper->__('My Product List') ?></h1>
  43. </div>
  44. <div class="wk_mp_design">
  45. <div class="block block-account">
  46. <div class="block-title">
  47. <strong><span><h4><?php echo $helper->__('Product List') ?></h4></span></strong>
  48. </div>
  49. </div>
  50. <div class="fieldset wk_mp_fieldset">
  51. <div class="grid">
  52. <div class="hor-scroll">
  53. <form action="<?php echo Mage::helper('core/url')->getCurrentUrl();?>" method="post">
  54. <table cellspacing="0" class="border wk_mp_list_table">
  55. <thead>
  56. <tr id="wk_mp_tr_heading">
  57. <th><span><?php echo $helper->__('Product Name') ?></span></th>
  58. <th><span><?php echo $helper->__('Date') ?></span></th>
  59. <th><span><?php echo $helper->__('Product Status') ?></span></th>
  60. <th><span>&nbsp;</span></th>
  61. </tr>
  62. </thead>
  63. <tbody class="wk_mp_body">
  64. <tr>
  65. <td>
  66. <input type="text" class="input-text" name="s" placeholder='<?php echo $helper->__('Search by product name') ?>' value="<?php echo $this->getRequest()->getParam('s')?>"/>
  67. </td>
  68. <td>
  69. <span class="wk_mp_td_span">
  70. <?php echo $helper->__('From: ') ?>
  71. <input name="from_date" id="special_from_date" class="input-text" value="<?php echo $this->getRequest()->getParam('from_date')?>" />
  72. </span>
  73. <span class="wk_mp_td_span">
  74. <?php echo $helper->__('To: ') ?>
  75. <input name="to_date" id="special_to_date" class="input-text" value="<?php echo $this->getRequest()->getParam('to_date')?>" />
  76. </span>
  77. </td>
  78.  
  79.  
  80. <td>
  81. <select name="prostatus" class="input-text">
  82. <option value=""><?php echo $helper->__('All') ?></option>
  83. <option value="1" <?php if($this->getRequest()->getParam('prostatus') == 1) echo 'selected="selected"'?>>
  84. <?php echo $helper->__('Approved') ?>
  85. </option>
  86. <option value="2" <?php if($this->getRequest()->getParam('prostatus') == 2) echo 'selected="selected"'?>>
  87. <?php echo $helper->__('Unapproved') ?>
  88. </option>
  89. </select>
  90. </td>
  91.  
  92. <td>
  93. <button class="button" title="Save" type="submit">
  94. <span><span><span><?php echo $helper->__('Submit') ?></span></span></span>
  95. </button>
  96. </td>
  97. </tr>
  98. </tbody>
  99. </table>
  100. </form>
  101. <?php
  102. if(count($this->getCollection())==0){ ?>
  103. <div class="fieldset wk_mp_fieldset">
  104. <div class="wk_emptymsg">
  105. <?php echo $helper->__('No Product Available') ?>
  106. </div>
  107. </div>
  108. <?php
  109. } else{ ?>
  110. <form action="<?php echo $this->getUrl('marketplace/marketplaceaccount/massdeletesellerpro') ?>" method="post" id="formmassdelete" name="formmassdelete">
  111. <input type="hidden" name="form_key" value="<?php echo Mage::getSingleton('core/session')->getFormKey(); ?>" />
  112. <button class="button" title="<?php echo $helper->__('Delete Products') ?>" type="submit" style="float: left;padding: 5px 5px 5px 0;" id="mass_delete_butn">
  113. <span><span><?php echo $helper->__('Delete Products') ?></span></span>
  114. </button>
  115.  
  116.  
  117. <button class="button" title="<?php echo $helper->__('Update Products') ?>" type="button" style="float: left;padding: 5px 5px 5px 0;" onclick="changeaction()" id="mass_update_butn">
  118. <span><span><?php echo $helper->__('Update Products') ?></span></span>
  119. </button>
  120.  
  121.  
  122. <script type=text/javascript>
  123. function changeaction() {
  124. document.getElementById('formmassdelete').action = "<?php echo $this->getUrl('marketplace/marketplaceaccount/massupdatesellerpro') ?>";
  125. document.getElementById('formmassdelete').submit();
  126. }
  127. </script>
  128. <table cellspacing="0" class="border wk_mp_list_table wk_mp_list_container_table">
  129. <thead>
  130. <tr class="wk_content">
  131. <th class="wk_check_first_td">
  132. <span>
  133. <input type="checkbox" name="mpselecctall" value="all" id="mpselecctall"/>
  134. </span>
  135. </th>
  136. <th class="wk_first_td">
  137. <span class="label name">
  138. <?php echo $helper->__('Product')?>
  139. </span>
  140. </th>
  141. <th>
  142. <span class="label">
  143. <?php echo $helper->__('sku')?>
  144. </span>
  145. </th>
  146.  
  147. <!--
  148. <th>
  149. <span class="label pro_status">
  150. <?php echo $helper->__('Status')?>
  151. </span>
  152. </th>
  153. -->
  154.  
  155. <th>
  156. <span class="label">
  157. <?php echo $helper->__('MRP')?>
  158. </span>
  159. </th>
  160.  
  161. <th>
  162. <span class="label">
  163. <?php echo $helper->__('Special Price')?>
  164. </span>
  165. </th>
  166.  
  167. <th>
  168. <span class="label">
  169. <?php echo $helper->__('Local')?>
  170. </span>
  171. </th>
  172.  
  173. <th>
  174. <span class="label">
  175. <?php echo $helper->__('Regional')?>
  176. </span>
  177. </th>
  178.  
  179. <th>
  180. <span class="label">
  181. <?php echo $helper->__('State')?>
  182. </span>
  183. </th>
  184. <!--
  185. <th>
  186. <span class="label qty">
  187. <?php echo $helper->__('Qty. Confirmed')?>
  188. </span>
  189. </th>
  190. <th>
  191. <span class="label qty">
  192. <?php echo $helper->__('Qty. Pending')?>
  193. </span>
  194. </th>
  195. <th>
  196. <span class="label qty">
  197. <?php echo $helper->__('Qty. Sold')?>
  198. </span>
  199. </th>
  200. -->
  201. <th>
  202. <span class="label">
  203. <?php echo $helper->__('Qty')?>
  204. </span>
  205. </th>
  206.  
  207.  
  208. <th>
  209. <span class="label">
  210. <?php echo $helper->__('COD')?>
  211. </span>
  212. </th>
  213.  
  214.  
  215.  
  216.  
  217.  
  218.  
  219.  
  220. <!--
  221. <th>
  222. <span class="label">
  223. <?php echo $helper->__('Earn Amount')?>
  224. </span>
  225. </th>
  226.  
  227. -->
  228. <th>
  229. <span class="label">
  230. <?php echo $helper->__('Save all')?>
  231. </span>
  232. </th>
  233. <th>
  234. <span class="label">
  235. <?php echo $helper->__('action')?>
  236. </span>
  237. </th>
  238.  
  239.  
  240. </tr>
  241. </thead>
  242. <tbody>
  243. <?php
  244. $i = 0;
  245. foreach($this->getCollection() as $products){
  246. $pro=Mage::getModel('catalog/product')->load($products->getEntityId());
  247. echo $pro->getCod();
  248. $i++;
  249. $productMediaConfig = Mage::getModel('catalog/product_media_config');
  250. $salesdetail=Mage::getModel('marketplace/saleslist')->getSalesdetail($products->getEntityId());
  251. ?>
  252. <tr class="wk_row_view <?php echo $class = ($i == count($this->getCollection()))? 'wk_last_tr':''?>">
  253. <td class="wk_check_first_td">
  254. <span>
  255. <input type="checkbox" name="product_mass_delete[]" class="mpcheckbox" value="<?php echo $products->getEntityId(); ?>"/>
  256. <input type="hidden" name="product_mass_update[]" value="<?php echo $products->getEntityId(); ?>"/>
  257.  
  258. </span>
  259. </td>
  260. <td class="wk_first_td">
  261. <input type="hidden" class="hidden_id" value="<?php echo $products->getEntityId(); ?>" />
  262. <div class="label name" title="<?php echo $products->getName(); ?>">
  263. <div class="wk_pro_divide1">
  264. <img src="<?php echo Mage::helper('catalog/image')->init($products,'thumbnail');?>" class="image" />
  265. </div>
  266. <div class="wk_pro_divide2">
  267. <div style="width:100%;">
  268. <a href="<?php echo $this->getUrl($products->getUrlPath())?>" target="blank">
  269. <?php echo $products->getName();?>
  270. </a>
  271. </div>
  272.  
  273. </div>
  274. </div>
  275. </td>
  276.  
  277. <td>
  278. <?php echo $sku = Mage::getModel('catalog/product')->load($products->getId())->getSku();?>
  279. </td>
  280. <?php
  281. if($products->getStatus()==2) { ?>
  282. <td>
  283. <span class="label pro_status">
  284. <?php echo $helper->__('Pending')?>
  285. </span>
  286. </td>
  287. <td>
  288. <span class="label qty">
  289. <?php echo $helper->__('Pending')?>
  290. </span>
  291. </td>
  292. <td>
  293. <span class="label qty">
  294. <?php echo $helper->__('Pending')?>
  295. </span>
  296. </td>
  297. <td>
  298. <span class="label qty">
  299. <?php echo $helper->__('Pending')?>
  300. </span>
  301. </td>
  302. <td>
  303. <span class="label qty">
  304. <?php echo $helper->__('Pending')?>
  305. </span>
  306. </td>
  307. <?php }
  308. else{
  309. $id=$products->getId();
  310. $productsolddetail=Mage::getModel('marketplace/saleslist')->getProductSalesDetailById($id);
  311. $qtycom=0;
  312. $com=0;
  313. foreach($productsolddetail as $key){
  314. $qtycom+=$key['magequantity'];
  315. $com+=$key['actualparterprocost'];
  316. } ?>
  317.  
  318. <!--
  319. <td>
  320. <span class="label pro_status">
  321. <?php echo $helper->__('Approved')?>
  322. </span>
  323. </td>
  324. -->
  325.  
  326.  
  327.  
  328.  
  329.  
  330. <!-- price -->
  331. <td>
  332.  
  333. <input class="ama1" type = "text" id = "price_<?php echo $products->getId(); ?>" onkeydown="validateNumbers(event)" name= "price[]" value = "<?php echo $products->getPrice(); ?>" style = ""/>
  334.  
  335. <input type="hidden" name="curr_<?php echo $products->getId(); ?>" id="curr_<?php echo $products->getId(); ?>" value="<?php echo $products->getPrice(); ?>" />
  336.  
  337. <p id="updatedprice_<?php echo $products->getId(); ?>" style = "display:none;color:red; position:relative; top:16px;">Updated</p>
  338. <br/>
  339.  
  340. <button id="price_update_button_<?php echo $products->getId(); ?>" class="update" onclick="updateFieldPrice('<?php echo $products->getId(); ?>'); return false;" >
  341. <span><span style="font-size:12px;"><?php echo $helper->__('Update') ?></span></span>
  342. </button>
  343.  
  344. <button id="price_reset_button_<?php echo $products->getId(); ?>" type="reset" class="cancel" onclick="hideResetPrice('<?php echo $products->getId(); ?>','<?php echo $products->getPrice(); ?>'); return false;">
  345. <span><span><?php echo $helper->__('Cancel') ?></span></span>
  346. </button>
  347.  
  348. </span>
  349.  
  350. </td>
  351.  
  352.  
  353. <!-- price end -->
  354.  
  355. <!-- SP start -->
  356.  
  357. <td>
  358.  
  359. <span class="label pro_status">
  360. <input class="ama1" type = "text" id = "specialprice_<?php echo $products->getId(); ?>" onkeydown="validateNumbers(event)" name = "specialprice[]" value = "<?php echo $products->getSpecialPrice(); ?>" style = ""/>
  361.  
  362.  
  363.  
  364. <input type="hidden" name="specialcurr_<?php echo $products->getId(); ?>" id="specialcurr_<?php echo $products->getId(); ?>" value="<?php echo $products->getSpecialPrice(); ?>" />
  365.  
  366. <input type="hidden" name="specialcurr_<?php echo $products->getId(); ?>" id="curr_<?php echo $products->getId(); ?>" value="<?php echo $products->getSpecialPrice(); ?>" />
  367.  
  368. <p id="updatedspecialprice_<?php echo $products->getId(); ?>" style = "display:none;color:red; position:relative; top:16px;">Updated</p>
  369. <br/>
  370.  
  371. <button id="specialprice_update_button_<?php echo $products->getId(); ?>" class="update" onclick="updateFieldSpecialPrice('<?php echo $products->getId(); ?>'); return false;" >
  372. <span><span style="font-size:12px;"><?php echo $helper->__('Update') ?></span></span>
  373. </button>
  374. <button id="specialprice_reset_button_<?php echo $products->getId(); ?>" type="reset" class="cancel" onclick="hideResetSpecialPrice('<?php echo $products->getId(); ?>'); return false;" >
  375.  
  376.  
  377. <span><span><?php echo $helper->__('Cancel') ?></span></span>
  378. </button>
  379.  
  380. </span>
  381.  
  382. </td>
  383. <!-- SP end-->
  384.  
  385. <!-- local code-->
  386.  
  387. <td>
  388.  
  389. <?php $attribute = $products->getResource()->getAttribute('local');?>
  390. <?php if($attribute):?>
  391. <?php $attribute_value = $attribute ->getFrontend()->getValue($products); ?>
  392.  
  393. <input class="ama1" type = "text" id = "local_<?php echo $products->getId(); ?>" onkeydown="validateNumbers(event)" name= "local[]" value = "<?php echo $attribute_value; ?>" style = ""/>
  394. <?php endif; ?>
  395.  
  396.  
  397. <input type="hidden" name="localcurr_<?php echo $products->getId(); ?>" id="localcurr_<?php echo $products->getId(); ?>" value="<?php echo $products->getLocal(); ?>" />
  398.  
  399. <p id="updatedlocal_<?php echo $products->getId(); ?>" style = "display:none;color:red; position:relative; top:16px;">Updated</p>
  400. <br/>
  401. <button id="local_update_button_<?php echo $products->getId(); ?>" class="update" onclick="updateFieldLocal('<?php echo $products->getId(); ?>'); return false;" >
  402. <span><span style="font-size:12px;"><?php echo $helper->__('Update') ?></span></span>
  403. </button>
  404.  
  405. <button id="local_reset_button_<?php echo $products->getId(); ?>" type="reset" class="cancel" onclick="hideResetLocal('<?php echo $products->getId(); ?>','<?php echo $products->getPrice(); ?>'); return false;">
  406. <span><span><?php echo $helper->__('Cancel') ?></span></span>
  407. </button>
  408. </span>
  409. </td>
  410. <!-- local end-->
  411.  
  412. <!-- Regional code -->
  413.  
  414. <td>
  415. <?php $attribute = $products->getResource()->getAttribute('regional');?>
  416. <?php if($attribute):?>
  417. <?php $attribute_value = $attribute ->getFrontend()->getValue($products); ?>
  418.  
  419. <input class="ama1" type = "text" id = "regional_<?php echo $products->getId(); ?>" onkeydown="validateNumbers(event)" name= "regional[]" value = "<?php echo $attribute_value; ?>" style = ""/>
  420. <?php endif; ?>
  421.  
  422.  
  423. <input type="hidden" name="regionalcurr_<?php echo $products->getId(); ?>" id="regionalcurr_<?php echo $products->getId(); ?>" value="<?php echo $products->getRegional(); ?>" />
  424.  
  425. <p id="updatedregional_<?php echo $products->getId(); ?>" style = "display:none;color:red; position:relative; top:16px;">Updated</p>
  426. <br/>
  427. <button id="regional_update_button_<?php echo $products->getId(); ?>" class="update" onclick="updateFieldRegional('<?php echo $products->getId(); ?>'); return false;" >
  428. <span><span style="font-size:12px;"><?php echo $helper->__('Update') ?></span></span>
  429. </button>
  430.  
  431. <button id="regional_reset_button_<?php echo $products->getId(); ?>" type="reset" class="cancel" onclick="hideResetRegional('<?php echo $products->getId(); ?>','<?php echo $products->getPrice(); ?>'); return false;">
  432. <span><span><?php echo $helper->__('Cancel') ?></span></span>
  433. </button>
  434. </span>
  435. </td>
  436.  
  437. <!-- Regional end -->
  438.  
  439.  
  440. <!-- State code -->
  441.  
  442.  
  443. <td>
  444.  
  445. <?php $attribute = $products->getResource()->getAttribute('state');?>
  446. <?php if($attribute):?>
  447. <?php $attribute_value = $attribute ->getFrontend()->getValue($products); ?>
  448.  
  449. <input class="ama1" type = "text" id = "state_<?php echo $products->getId(); ?>" onkeydown="validateNumbers(event)" name= "state[]" value = "<?php echo $attribute_value; ?>" style = ""/>
  450. <?php endif; ?>
  451.  
  452.  
  453. <input type="hidden" name="statecurr_<?php echo $products->getId(); ?>" id="statecurr_<?php echo $products->getId(); ?>" value="<?php echo $products->getState(); ?>" />
  454.  
  455. <p id="updatedstate_<?php echo $products->getId(); ?>" style = "display:none;color:red; position:relative; top:16px;">Updated</p>
  456. <br/>
  457. <button id="state_update_button_<?php echo $products->getId(); ?>" class="update" onclick="updateFieldState('<?php echo $products->getId(); ?>'); return false;" >
  458. <span><span style="font-size:12px;"><?php echo $helper->__('Update') ?></span></span>
  459. </button>
  460.  
  461. <button id="state_reset_button_<?php echo $products->getId(); ?>" type="reset" class="cancel" onclick="hideResetState('<?php echo $products->getId(); ?>','<?php echo $products->getPrice(); ?>'); return false;">
  462. <span><span><?php echo $helper->__('Cancel') ?></span></span>
  463. </button>
  464. </span>
  465. </td>
  466.  
  467. <!-- state end -->
  468.  
  469. <!-- qty start -->
  470.  
  471. <td>
  472. <?php
  473. $selllermpassignproduct=Mage::getModel('mpassignproduct/mpassignproduct')->getAssignProDetails($products->getId());
  474. //Zend_Debug::dump($selllermpassignproduct,null,true);
  475. $stock_item=Mage::getModel('cataloginventory/stock_item')->loadByProduct($products);
  476.  
  477. $SellerQty=isset($selllermpassignproduct['sellerqty'])?$selllermpassignproduct['sellerqty']:$stock_item->getQty();
  478. $assignqty=isset($selllermpassignproduct['assignqty'])?$selllermpassignproduct['assignqty']:0;
  479. ?>
  480.  
  481.  
  482. <input class="ama1" type = "text" id = "qty_<?php echo $products->getId(); ?>" onkeydown="validateNumbers(event)" name = "stock" value = "<?php echo (int) $SellerQty; ?>" />
  483.  
  484.  
  485. <p id="updatedqty_<?php echo $products->getId(); ?>" style = "display:none;color:red; position:relative; top:16px;">Updated</p>
  486. <br/>
  487.  
  488.  
  489. <button id="update_button_<?php echo $products->getId(); ?>" class="update" onclick="updateField('<?php echo $products->getId(); ?>',<?php echo $assignqty;?>); return false;" >
  490. <span><span style="font-size:12px;"><?php echo $helper->__('Update') ?></span></span>
  491. </button>
  492.  
  493. <button id="reset_button_<?php echo $products->getId(); ?>" type="reset" class="cancel" onclick="hideReset('<?php echo $products->getId(); ?>'); return false;" >
  494. <span><span><?php echo $helper->__('Cancel') ?></span></span>
  495. </button>
  496. <!--qty end-->
  497.  
  498.  
  499. <!-- cod 2 -->
  500.  
  501. <td>
  502.  
  503. <?php $attribute = $products->getResource()->getAttribute('cod');?>
  504. <?php if($attribute):?>
  505. <?php $attribute_value = $attribute ->getFrontend()->getValue($products); ?>
  506.  
  507.  
  508.  
  509. <select id = "cod_<?php echo $products->getId(); ?>" name= "cod[]" ">
  510.  
  511. <option value="0" <?php if($pro->getCod()==0) { echo "selected";} ?>>No</option>
  512. <option value="1"<?php if($pro->getCod()==1) { echo "selected";} ?>>Yes</option>
  513.  
  514.  
  515. </select>
  516.  
  517.  
  518.  
  519.  
  520.  
  521.  
  522.  
  523. <?php endif; ?>
  524.  
  525.  
  526. <input type="hidden" name="codcurr_<?php echo $products->getId(); ?>" id="codcurr_<?php echo $products->getId(); ?>" value="<?php echo $products->getCod(); ?>" />
  527.  
  528. <p id="updatedcod_<?php echo $products->getId(); ?>" style = "display:none;color:red; position:relative; top:16px;">Updated</p>
  529. <br/>
  530. <button id="cod_update_button_<?php echo $products->getId(); ?>" class="update" onclick="updateFieldCod('<?php echo $products->getId(); ?>'); return false;" >
  531. <span><span style="font-size:12px;"><?php echo $helper->__('Update') ?></span></span>
  532. </button>
  533.  
  534. <button id="cod_reset_button_<?php echo $products->getId(); ?>" type="reset" class="cancel" onclick="hideResetCod('<?php echo $products->getId(); ?>','<?php echo $products->getPrice(); ?>'); return false;">
  535. <span><span><?php echo $helper->__('Cancel') ?></span></span>
  536. </button>
  537. </span>
  538. </td>
  539.  
  540. <!-- cod 2 end-->
  541.  
  542.  
  543.  
  544.  
  545.  
  546.  
  547. <!--
  548. <td>
  549. <span class="label qty">
  550. <?php echo $salesdetail['quantitysoldconfirmed']; ?>
  551. </span>
  552. </td>
  553. <td>
  554. <span class="label qty">
  555. <?php echo $salesdetail['quantitysoldpending']; ?>
  556. </span>
  557. </td>
  558. <td>
  559. <span class="label qty">
  560. <a href="<?php echo $this->getUrl('mpshippingmanager/shipping/salesdetail/')."id/".$products->getId(); ?>"><?php echo $salesdetail['quantitysold']; ?></a>
  561. </span>
  562. </td>
  563. -->
  564.  
  565. <!--
  566.  
  567. <span class="label price">
  568. <?php echo Mage::helper('core')->currency($salesdetail['amountearned'], true, false); ?>
  569. </span>
  570. </td>
  571.  
  572. -->
  573. <td>
  574. <button id="update_button_<?php echo $products->getId(); ?>" class="button wk_mp_btn1" onclick="updateAllFields('<?php echo $products->getId(); ?>'); return false;" >
  575. <span><span style="font-size:12px;"><?php echo $helper->__('Update') ?></span></span>
  576. </button>
  577. </td>
  578.  
  579.  
  580.  
  581. <?php
  582. }?>
  583. <td>
  584. <span class="label wk_action">
  585. <img src="<?php echo $this->getSkinUrl('marketplace/images/icon-edit.png'); ?>" data-type="<?php echo $products->getTypeId(); ?>" alt="<?php echo $helper->__('Edit')?>" title="<?php echo $helper->__('Edit')?>" class="mp_edit"/>
  586. <img src="<?php echo $this->getSkinUrl('marketplace/images/icon-trash.png'); ?>" alt="<?php echo $helper->__('Delete')?>" title="<?php echo $helper->__('Delete')?>" class="mp_delete"/>
  587. </span>
  588. </td>
  589. </tr>
  590. <?php
  591. }?>
  592. </tbody>
  593. </table>
  594. </form>
  595. <?php
  596. }?>
  597. </div>
  598. </div>
  599. <?php echo $this->getPagerHtml(); ?>
  600. </div>
  601. <div class="buttons-set">
  602. <p class="back-link">
  603. <a href="javascript:;" onclick="javascript: window.history.back();" class="left">&laquo; <?php echo $helper->__('Back') ?></a>
  604. </p>
  605. </div>
  606. </div>
  607.  
  608.  
  609.  
  610. <!-- edit qty start 2-->
  611.  
  612. <?php $url = Mage::getUrl('module_name/index/updateField/'); ?>
  613. <?php $url = Mage::getUrl('marketplaceaccountcontroller/index/updateField/'); ?>
  614.  
  615.  
  616. <!-- validation start -->
  617.  
  618.  
  619. <script type = "text/javascript" >
  620. function validateNumbers(e) {
  621. //var key = '#keyinput_'+ product_id;
  622. //var e = jQuery(key);
  623.  
  624. if (jQuery.inArray(e.keyCode, [46, 8, 9, 27, 13, 110, 190]) !== -1 ||
  625. // Allow: Ctrl+A, Command+A
  626. (e.keyCode == 65 && ( e.ctrlKey === true || e.metaKey === true ) ) ||
  627. // Allow: home, end, left, right, down, up
  628. (e.keyCode >= 35 && e.keyCode <= 40)) {
  629. // let it happen, don't do anything
  630. return;
  631. }
  632. // Ensure that it is a number and stop the keypress
  633. if ((e.shiftKey || (e.keyCode < 48 || e.keyCode > 57)) && (e.keyCode < 96 || e.keyCode > 105)) {
  634. e.preventDefault();
  635. }
  636. }
  637. var $wk_jq = jQuery.noConflict();
  638.  
  639. <!-- validation end -->
  640.  
  641. <!-- Qty and validation start -->
  642.  
  643. function hideReset(product_id) {
  644.  
  645. var qtyId='#qty_'+ product_id;
  646. var editLink="#edit_link_"+ product_id;
  647. var updateButton="#update_button_"+ product_id;
  648. var resetButton="#reset_button_"+ product_id;
  649.  
  650.  
  651. $wk_jq(editLink).show();
  652.  
  653. }
  654.  
  655. function showField(product_id)
  656. {
  657.  
  658. var qtyId='#qty_'+ product_id;
  659.  
  660. var editLink="#edit_link_"+ product_id;
  661. var updateButton="#update_button_"+ product_id;
  662. var resetButton="#reset_button_"+ product_id;
  663.  
  664. $wk_jq(qtyId).show();
  665.  
  666. $wk_jq(editLink).hide();
  667. $wk_jq(updateButton).show();
  668. $wk_jq(updateButton).prop('disabled', false);//just in case
  669. $wk_jq(resetButton).show();
  670.  
  671. return false;
  672.  
  673.  
  674. }
  675.  
  676. function hideReset(product_id) {
  677.  
  678. var qtyId='#qty_'+ product_id;
  679. var editLink="#edit_link_"+ product_id;
  680. var updateButton="#update_button_"+ product_id;
  681. var resetButton="#reset_button_"+ product_id;
  682.  
  683.  
  684. $wk_jq(editLink).show();
  685.  
  686. }
  687.  
  688. function showField(product_id)
  689. {
  690.  
  691. var qtyId='#qty_'+ product_id;
  692.  
  693. var editLink="#edit_link_"+ product_id;
  694. var updateButton="#update_button_"+ product_id;
  695. var resetButton="#reset_button_"+ product_id;
  696.  
  697. $wk_jq(qtyId).show();
  698.  
  699. $wk_jq(editLink).hide();
  700. $wk_jq(updateButton).show();
  701. $wk_jq(updateButton).prop('disabled', false);//just in case
  702. $wk_jq(resetButton).show();
  703.  
  704. return false;
  705.  
  706.  
  707. }
  708.  
  709. function updateField(product_id,assignqty)
  710. {
  711. var qtyId = '#qty_'+ product_id;
  712. var valueId = '#valueqty_'+ product_id;
  713. var updatedqty = '#updatedqty_'+ product_id;
  714.  
  715.  
  716. var editLink = "#edit_link_"+ product_id;
  717. var updateButton = "#update_button_"+ product_id;
  718. var resetButton = "#reset_button"+ product_id;
  719. var url ='<?php echo Mage::getUrl('marketplace/marketplaceaccount/updateField/')?>';
  720.  
  721.  
  722.  
  723. $wk_jq(editLink).hide();
  724. $wk_jq(updateButton).show();
  725. $wk_jq(resetButton).show();
  726.  
  727. $qty = $wk_jq(qtyId).val();
  728. jQuery(valueId).html($qty);
  729. hideReset(product_id);
  730.  
  731. var tmpQty=assignqty+ parseInt($qty) ;
  732.  
  733. new Ajax.Request(url, {
  734. method: 'post',
  735. parameters: {id: product_id, qty: tmpQty},
  736. onComplete: function (transport) {
  737. //alert(transport.responseText);
  738. //jQuery(priceId).val($price);
  739. // $wk_jq(priceId).setValue($price);
  740.  
  741. jQuery(updatedqty).show().delay(2000).fadeOut();
  742.  
  743. $updateButton.prop('disabled', false);
  744.  
  745. // $wk_jq(qtyId).setValue($qty);
  746.  
  747.  
  748.  
  749. }
  750. });
  751. }
  752. <!-- Qty and validation start end -->
  753.  
  754.  
  755. <!-- price start-->
  756.  
  757. function hideResetPrice(product_id,priceold) {
  758.  
  759. var qtyId='#price_'+ product_id;
  760. var currprice='#curr_'+ product_id;
  761. var editLink="#price_edit_link_"+ product_id;
  762. var updateButton="#price_update_button_"+ product_id;
  763. var valueprice="#valueprice_"+ product_id;
  764. var resetButton="#price_reset_button_"+ product_id;
  765.  
  766.  
  767. $wk_jq(valueprice).show();
  768. $wk_jq(qtyId).val( $wk_jq(currprice).val());
  769. $wk_jq(editLink).show();
  770.  
  771. }
  772.  
  773.  
  774.  
  775. function showFieldPrice(product_id)
  776. {
  777.  
  778. var qtyId='#price_'+ product_id;
  779.  
  780. var editLink="#price_edit_link_"+ product_id;
  781. var valueprice="#valueprice_"+ product_id;
  782. var updateButton="#price_update_button_"+ product_id;
  783. var resetButton="#price_reset_button_"+ product_id;
  784.  
  785. $wk_jq(qtyId).show();
  786. $wk_jq(valueprice).hide();
  787.  
  788. $wk_jq(editLink).hide();
  789. $wk_jq(updateButton).show();
  790. $wk_jq(updateButton).prop('disabled', false);//just in case
  791. $wk_jq(resetButton).show();
  792.  
  793. return false;
  794.  
  795.  
  796. }
  797.  
  798.  
  799. function updateFieldPrice(product_id)
  800. {
  801. var priceId = '#price_'+ product_id;
  802. var currprice='#curr_'+ product_id;
  803. var updatedqty = '#updatedprice_'+ product_id;
  804. var url ='<?php echo Mage::getUrl('marketplace/marketplaceaccount/updateFieldPrice/')?>';
  805. $price = $wk_jq(priceId).val();
  806. $wk_jq(currprice).val($price);
  807. new Ajax.Request(url, {
  808. method: 'post',
  809. parameters: {id: product_id, price: $price},
  810. onComplete: function (transport) {
  811. //alert(transport.responseText);
  812.  
  813. jQuery(updatedqty).show().delay(2000).fadeOut();
  814.  
  815. }
  816. });
  817. }
  818.  
  819.  
  820.  
  821. <!-- price end -->
  822.  
  823.  
  824. <!-- SP start -->
  825. function hideResetSpecialPrice(product_id,priceold) {
  826.  
  827. var qtyId='#specialprice_'+ product_id;
  828. var currspecialprice='#specialcurr_'+ product_id;
  829. var editLink="#specialprice_edit_link_"+ product_id;
  830. var updateButton="#specialprice_update_button_"+ product_id;
  831. var valuespecialprice="#valuespecialprice_"+ product_id;
  832. var resetButton="#specialprice_reset_button_"+ product_id;
  833. $wk_jq(valuespecialprice).show();
  834. $wk_jq(qtyId).val( $wk_jq(currspecialprice).val());
  835. $wk_jq(editLink).show();
  836.  
  837.  
  838.  
  839.  
  840. }
  841.  
  842.  
  843. function showFieldSpecialPrice(product_id)
  844. {
  845.  
  846. var qtyId='#specialprice_'+ product_id;
  847.  
  848. var editLink="#specialprice_edit_link_"+ product_id;
  849. var valueprice="#valuespecialprice_"+ product_id;
  850. var updateButton="#specialprice_update_button_"+ product_id;
  851. var resetButton="#specialprice_reset_button_"+ product_id;
  852.  
  853. $wk_jq(qtyId).show();
  854. $wk_jq(valueprice).hide();
  855.  
  856. $wk_jq(editLink).hide();
  857. $wk_jq(updateButton).show();
  858. $wk_jq(updateButton).prop('disabled', false);//just in case
  859. $wk_jq(resetButton).show();
  860.  
  861. return false;
  862.  
  863. }
  864.  
  865.  
  866.  
  867. function updateFieldSpecialPrice(product_id)
  868. {
  869. var priceId = '#specialprice_'+ product_id;
  870. var currspecialprice='#specialcurr_'+ product_id;
  871. var updatedqty = '#updatedspecialprice_'+ product_id;
  872. var url ='<?php echo Mage::getUrl('marketplace/marketplaceaccount/updateFieldSpecialPrice/')?>';
  873. $price = $wk_jq(priceId).val();
  874. $wk_jq(currspecialprice).val($price);
  875. new Ajax.Request(url, {
  876. method: 'post',
  877. parameters: {id: product_id, price: $price},
  878. onComplete: function (transport) {
  879. //alert(transport.responseText);
  880. jQuery(updatedqty).show().delay(2000).fadeOut();
  881. }
  882. });
  883. }
  884.  
  885.  
  886.  
  887.  
  888.  
  889.  
  890.  
  891.  
  892. <!-- SP end -->
  893.  
  894.  
  895. <!-- local code -->
  896.  
  897. function hideResetLocal(product_id,localold) {
  898.  
  899. var qtyId='#local_'+ product_id;
  900. var currlocal='#localcurr_'+ product_id;
  901. var editLink="#local_edit_link_"+ product_id;
  902. var updateButton="#local_update_button_"+ product_id;
  903. var valuelocal="#valuelocal_"+ product_id;
  904. var resetButton="#local_reset_button_"+ product_id;
  905.  
  906.  
  907. $wk_jq(valuelocal).show();
  908. $wk_jq(qtyId).val( $wk_jq(currlocal).val());
  909. $wk_jq(editLink).show();
  910.  
  911. }
  912.  
  913.  
  914.  
  915. function showFieldLocal(product_id)
  916. {
  917.  
  918. var qtyId='#local_'+ product_id;
  919.  
  920. var editLink="#local_edit_link_"+ product_id;
  921. var valuelocal="#valuelocal_"+ product_id;
  922. var updateButton="#local_update_button_"+ product_id;
  923. var resetButton="#local_reset_button_"+ product_id;
  924.  
  925. $wk_jq(qtyId).show();
  926. $wk_jq(valuelocal).hide();
  927.  
  928. $wk_jq(editLink).hide();
  929. $wk_jq(updateButton).show();
  930. $wk_jq(updateButton).prop('disabled', false);//just in case
  931. $wk_jq(resetButton).show();
  932.  
  933. return false;
  934.  
  935.  
  936. }
  937.  
  938.  
  939.  
  940.  
  941. function updateFieldLocal(product_id)
  942. {
  943. var localId = '#local_'+ product_id;
  944. var currlocal='#localcurr_'+ product_id;
  945. var updatedqty = '#updatedlocal_'+ product_id;
  946. var url ='<?php echo Mage::getUrl('marketplace/marketplaceaccount/updateFieldLocal/')?>';
  947. $local = $wk_jq(localId).val();
  948. $wk_jq(currlocal).val($local);
  949. new Ajax.Request(url, {
  950. method: 'post',
  951.  
  952. parameters: {id: product_id, local: $local},
  953. //parameters: {id: product_id, local: $local},
  954. onComplete: function (transport) {
  955. //alert(transport.responseText);
  956.  
  957. jQuery(updatedqty).show().delay(2000).fadeOut();
  958.  
  959. }
  960. });
  961. }
  962.  
  963.  
  964.  
  965. <!-- local end -->
  966.  
  967.  
  968. <!-- Regional code -->
  969.  
  970. function hideResetRegional(product_id,regionalold) {
  971.  
  972. var qtyId='#regional_'+ product_id;
  973. var currregional='#regionalcurr_'+ product_id;
  974. var editLink="#regional_edit_link_"+ product_id;
  975. var updateButton="#regional_update_button_"+ product_id;
  976. var valueregional="#valueregional_"+ product_id;
  977. var resetButton="#regional_reset_button_"+ product_id;
  978.  
  979.  
  980. $wk_jq(valueregional).show();
  981. $wk_jq(qtyId).val( $wk_jq(currregional).val());
  982. $wk_jq(editLink).show();
  983.  
  984. }
  985.  
  986.  
  987.  
  988. function showFieldRegional(product_id)
  989. {
  990.  
  991. var qtyId='#regional_'+ product_id;
  992.  
  993. var editLink="#regional_edit_link_"+ product_id;
  994. var valueregional="#valueregional_"+ product_id;
  995. var updateButton="#regional_update_button_"+ product_id;
  996. var resetButton="#regional_reset_button_"+ product_id;
  997.  
  998. $wk_jq(qtyId).show();
  999. $wk_jq(valueregional).hide();
  1000.  
  1001. $wk_jq(editLink).hide();
  1002. $wk_jq(updateButton).show();
  1003. $wk_jq(updateButton).prop('disabled', false);//just in case
  1004. $wk_jq(resetButton).show();
  1005.  
  1006. return false;
  1007.  
  1008.  
  1009. }
  1010.  
  1011.  
  1012.  
  1013.  
  1014. function updateFieldRegional(product_id)
  1015. {
  1016. var regionalId = '#regional_'+ product_id;
  1017. var currregional='#regionalcurr_'+ product_id;
  1018. var updatedqty = '#updatedregional_'+ product_id;
  1019. var url ='<?php echo Mage::getUrl('marketplace/marketplaceaccount/updateFieldRegional/')?>';
  1020. $regional = $wk_jq(regionalId).val();
  1021. $wk_jq(currregional).val($regional);
  1022. new Ajax.Request(url, {
  1023. method: 'post',
  1024.  
  1025. parameters: {id: product_id, regional: $regional},
  1026. //parameters: {id: product_id, regional: $regional},
  1027. onComplete: function (transport) {
  1028. //alert(transport.responseText);
  1029.  
  1030. jQuery(updatedqty).show().delay(2000).fadeOut();
  1031.  
  1032. }
  1033. });
  1034. }
  1035.  
  1036.  
  1037.  
  1038.  
  1039. <!-- Regional end -->
  1040.  
  1041.  
  1042. <!-- state code -->
  1043.  
  1044. function hideResetState(product_id,stateold) {
  1045.  
  1046. var qtyId='#state_'+ product_id;
  1047. var currstate='#statecurr_'+ product_id;
  1048. var editLink="#state_edit_link_"+ product_id;
  1049. var updateButton="#state_update_button_"+ product_id;
  1050. var valuestate="#valuestate_"+ product_id;
  1051. var resetButton="#state_reset_button_"+ product_id;
  1052.  
  1053.  
  1054. $wk_jq(valuestate).show();
  1055. $wk_jq(qtyId).val( $wk_jq(currstate).val());
  1056. $wk_jq(editLink).show();
  1057.  
  1058. }
  1059.  
  1060.  
  1061.  
  1062. function showFieldState(product_id)
  1063. {
  1064.  
  1065. var qtyId='#state_'+ product_id;
  1066.  
  1067. var editLink="#state_edit_link_"+ product_id;
  1068. var valuestate="#valuestate_"+ product_id;
  1069. var updateButton="#state_update_button_"+ product_id;
  1070. var resetButton="#state_reset_button_"+ product_id;
  1071.  
  1072. $wk_jq(qtyId).show();
  1073. $wk_jq(valuestate).hide();
  1074.  
  1075. $wk_jq(editLink).hide();
  1076. $wk_jq(updateButton).show();
  1077. $wk_jq(updateButton).prop('disabled', false);//just in case
  1078. $wk_jq(resetButton).show();
  1079.  
  1080. return false;
  1081.  
  1082.  
  1083. }
  1084.  
  1085.  
  1086.  
  1087.  
  1088. function updateFieldState(product_id)
  1089. {
  1090. var stateId = '#state_'+ product_id;
  1091. var currstate='#statecurr_'+ product_id;
  1092. var updatedqty = '#updatedstate_'+ product_id;
  1093. var url ='<?php echo Mage::getUrl('marketplace/marketplaceaccount/updateFieldState/')?>';
  1094. $state = $wk_jq(stateId).val();
  1095. $wk_jq(currstate).val($state);
  1096. new Ajax.Request(url, {
  1097. method: 'post',
  1098.  
  1099. parameters: {id: product_id, state: $state},
  1100. //parameters: {id: product_id, state: $state},
  1101. onComplete: function (transport) {
  1102. //alert(transport.responseText);
  1103.  
  1104. jQuery(updatedqty).show().delay(2000).fadeOut();
  1105.  
  1106. }
  1107. });
  1108. }
  1109.  
  1110.  
  1111. <!-- state code end -->
  1112.  
  1113.  
  1114.  
  1115.  
  1116. <!-- cod 2 -->
  1117.  
  1118. function hideResetCod(product_id,codold) {
  1119.  
  1120. var qtyId='#cod_'+ product_id;
  1121. var currcod='#codcurr_'+ product_id;
  1122. var editLink="#cod_edit_link_"+ product_id;
  1123. var updateButton="#cod_update_button_"+ product_id;
  1124. var valuecod="#valuecod_"+ product_id;
  1125. var resetButton="#cod_reset_button_"+ product_id;
  1126.  
  1127.  
  1128. $wk_jq(valuecod).show();
  1129. $wk_jq(qtyId).val( $wk_jq(currcod).val());
  1130. $wk_jq(editLink).show();
  1131.  
  1132. }
  1133.  
  1134.  
  1135.  
  1136. function showFieldCod(product_id)
  1137. {
  1138.  
  1139. var qtyId='#cod_'+ product_id;
  1140.  
  1141. var editLink="#cod_edit_link_"+ product_id;
  1142. var valuecod="#valuecod_"+ product_id;
  1143. var updateButton="#cod_update_button_"+ product_id;
  1144. var resetButton="#cod_reset_button_"+ product_id;
  1145.  
  1146. $wk_jq(qtyId).show();
  1147. $wk_jq(valuecod).hide();
  1148.  
  1149. $wk_jq(editLink).hide();
  1150. $wk_jq(updateButton).show();
  1151. $wk_jq(updateButton).prop('disabled', false);//just in case
  1152. $wk_jq(resetButton).show();
  1153.  
  1154. return false;
  1155.  
  1156.  
  1157. }
  1158.  
  1159.  
  1160.  
  1161.  
  1162. function updateFieldCod(product_id)
  1163. {
  1164. var codId = '#cod_'+ product_id;
  1165. var currcod='#codcurr_'+ product_id;
  1166. var updatedqty = '#updatedcod_'+ product_id;
  1167. var url ='<?php echo Mage::getUrl('marketplace/marketplaceaccount/updateFieldCod/')?>';
  1168. $cod = $wk_jq(codId).val();
  1169. $wk_jq(currcod).val($cod);
  1170. new Ajax.Request(url, {
  1171. method: 'post',
  1172.  
  1173. parameters: {id: product_id, cod: $cod},
  1174. //parameters: {id: product_id, cod: $cod},
  1175. onComplete: function (transport) {
  1176. //alert(transport.responseText);
  1177.  
  1178. jQuery(updatedqty).show().delay(2000).fadeOut();
  1179.  
  1180. }
  1181. });
  1182. }
  1183.  
  1184. <!-- cod end -->
  1185.  
  1186.  
  1187.  
  1188.  
  1189.  
  1190.  
  1191. <!-- update all start -->
  1192.  
  1193. function updateAllFields(product_id) {
  1194. updateFieldPrice(product_id);
  1195. updateFieldSpecialPrice(product_id);
  1196. updateField(product_id);
  1197. updateFieldLocal(product_id);
  1198. updateFieldRegional(product_id);
  1199. updateFieldState(product_id);
  1200.  
  1201.  
  1202. }
  1203. <!-- update all start -->
  1204.  
  1205.  
  1206. </script>
  1207.  
  1208.  
  1209.  
  1210.  
  1211. <!-- webkul code start -->
  1212.  
  1213.  
  1214. <script>
  1215. var $wk_jq=jQuery.noConflict();
  1216. var newCustomerProductForm1 = new VarienForm('formmassdelete', true);
  1217. (function($wk_jq){
  1218. $wk_jq( "#special_from_date" ).datepicker({dateFormat: "yy-mm-dd"});
  1219. $wk_jq( "#special_to_date" ).datepicker({dateFormat: "yy-mm-dd"});
  1220. $wk_jq('body').delegate('.mp_edit','click',function(){
  1221. var id=$wk_jq(this).parents('.wk_row_view').find('.hidden_id').val();
  1222. var dicision=confirm('<?php echo $helper->__(" Are you sure you want to edit this product ? ")?>');
  1223. if(dicision==true){
  1224. var $type_id=$wk_jq(this).attr('data-type');
  1225. if($type_id=='simple')
  1226. window.location = "<?php echo $this->getUrl('marketplace/marketplaceaccount/editapprovedsimple/') ?>".concat("id/",id);
  1227. if($type_id=='downloadable')
  1228. window.location = "<?php echo $this->getUrl('marketplace/marketplaceaccount/editapproveddownloadable/') ?>".concat("id/",id);
  1229. if($type_id=='virtual')
  1230. window.location = "<?php echo $this->getUrl('marketplace/marketplaceaccount/editapprovedvirtual/') ?>".concat("id/",id);
  1231. if($type_id=='configurable')
  1232. window.location = "<?php echo $this->getUrl('marketplace/marketplaceaccount/editapprovedconfigurable/') ?>".concat("id/",id);
  1233. if($type_id=='grouped')
  1234. window.location = "<?php echo $this->getUrl('mpgroupproduct/index/editapprovedgrouped/') ?>".concat("id/",id);
  1235. <?php
  1236. //echo $this->getChildHtml('mpgrouped_productslist');
  1237. // echo $this->getChildHtml('mpbundle_productslist');
  1238. ?>
  1239. if($type_id=='bundle')
  1240. window.location = "<?php echo $this->getUrl('mpbundleproduct/index/editbundle/') ?>".concat("id/",id);
  1241. }
  1242. });
  1243. $wk_jq('#mass_delete_butn').click(function(e){
  1244. var flag =0;
  1245. $wk_jq('.mpcheckbox').each(function(){
  1246. if (this.checked == true){
  1247. flag =1;
  1248. }
  1249. });
  1250. if (flag == 0){
  1251. alert("<?php echo $helper->__(' No Checkbox is checked ') ?>");
  1252. return false;
  1253. }
  1254. else{
  1255. var dicisionapp=confirm('<?php echo $helper->__(" Are you sure you want to delete these product ? ")?>');
  1256. if(dicisionapp==true){
  1257. $wk_jq('#form-customer-product-new').submit();
  1258. }else{
  1259. return false;
  1260. }
  1261. }
  1262. });
  1263.  
  1264. $wk_jq('#mpselecctall').click(function(event) {
  1265. if(this.checked) {
  1266. $wk_jq('.mpcheckbox').each(function() {
  1267. this.checked = true;
  1268. });
  1269. }else{
  1270. $wk_jq('.mpcheckbox').each(function() {
  1271. this.checked = false;
  1272. });
  1273. }
  1274. });
  1275.  
  1276. $wk_jq('.mp_delete').click(function(){
  1277. var id=$wk_jq(this).parents('.wk_row_view').find('.hidden_id').val();
  1278. var dicisionapp=confirm('<?php echo $helper->__(" Are you sure you want to delete this product ? ")?>');
  1279. if(dicisionapp==true)
  1280. window.location = "<?php echo $this->getUrl('marketplace/marketplaceaccount/delete/') ?>".concat("id/",id);
  1281. });
  1282. })($wk_jq);
  1283. </script>
  1284.  
  1285.  
  1286. <script>
  1287. var $wk_jq=jQuery.noConflict();
  1288. var i=2;
  1289. function showOtherImage(){
  1290. var newdiv = document.createElement('div');
  1291. newdiv.setAttribute("id","childDiv"+i);
  1292. newdiv.innerHTML = "<input type='file' name='images"+i+"' accept='image/\*' class='wk_imagevalidate'/><input type='radio' onClick='defaultimagevalue(this)' value='' class='defaultimage' name='defaultimage'><span class='defaultimageset'>Base image</span><a href=\"javascript:;\" onclick=\"removeEvent('childDiv"+i+"')\"><?php echo $helper->__('Remove ') ?></a>";
  1293. var ni = document.getElementById('otherimages');
  1294. ni.appendChild(newdiv);
  1295. i++;
  1296. }
  1297. function removeEvent(divNum){
  1298. var d = document.getElementById('otherimages');
  1299. var olddiv = document.getElementById(divNum);
  1300. d.removeChild(olddiv);
  1301. i--;
  1302. }
  1303. function defaultimagevalue(object){
  1304. var strs=$wk_jq(object).prev('input').val().split('\\');
  1305. $wk_jq(object).val(strs[strs.length-1]);
  1306. }
  1307. (function($wk_jq){
  1308. var newCustomerProductForm = new VarienForm('form-customer-product-editPost', true);
  1309. $wk_jq( "#special_from_date" ).datepicker({'dateFormat':'yy:mm:dd'});
  1310. $wk_jq( "#special_to_date" ).datepicker({'dateFormat':'yy:mm:dd'});
  1311.  
  1312. $wk_jq('.wk_close').click(function(){
  1313. $wk_jq(this).parent().remove();
  1314. });
  1315.  
  1316. $wk_jq('#save_butn').click(function(e){
  1317. if(newCustomerProductForm.validator.validate()!=false){
  1318. var descrip = nicEditors.findEditor( "description" ).getContent();
  1319. var sdescrip = nicEditors.findEditor( "short_description" ).getContent();
  1320. //var regex = /(&lt([^>]+)&gt)/ig;
  1321. var regex = /<script(.+?)<\/script>/g;
  1322. var result = descrip .replace(regex, "");
  1323. result = result.replace(/script/g,'');
  1324. nicEditors.findEditor( "description" ).setContent(result);
  1325.  
  1326. var sresult = sdescrip .replace(regex, "");
  1327. sresult = sresult.replace(/script/g,'');
  1328. nicEditors.findEditor( "short_description" ).setContent(sresult);
  1329.  
  1330. $wk_jq('#description').text(result);
  1331. $wk_jq('#short_description').text(sresult);
  1332.  
  1333. $wk_jq('#save_butn span span').text('<?php echo $helper->__(" Saving..")?>');
  1334. $wk_jq('.button').css('opacity','0.7');
  1335. $wk_jq('.button').css('cursor','default');
  1336. $wk_jq('.button').attr('disabled','disabled');
  1337. $wk_jq('#form-customer-product-editPost').submit();
  1338. }
  1339. });
  1340.  
  1341. $wk_jq('.input-text').change(function(){
  1342. var validt = $wk_jq(this).val();
  1343. var regex = /(<([^>]+)>)/ig;
  1344. var mainvald = validt .replace(regex, "");
  1345. $wk_jq(this).val(mainvald);
  1346. });
  1347.  
  1348. $wk_jq(".dumimg").change(function(){
  1349. $wk_jq( ".defaultimage" ).prop( "checked", false );
  1350. });
  1351. $wk_jq('input#sku').change(function(){
  1352. var len=$wk_jq('input#sku').val();
  1353. var len2=len.length;
  1354. if(len2==0){
  1355. alert('<?php echo $helper->__(" SKU can\'t be left empty ")?>');
  1356. $wk_jq('div#skuavail').css('display','none');
  1357. $wk_jq('div#skunotavail').css('display','none');
  1358. }
  1359. else{
  1360. $wk_jq.ajax({
  1361. url: "<?php echo Mage::getUrl('marketplace/marketplaceaccount/verifysku',array('_secure'=>true));?>",
  1362. type: "POST",
  1363. data: {sku:$wk_jq('input#sku').val()},
  1364. dataType: 'html',
  1365. success:function($data){
  1366. $data=JSON.parse($data);
  1367. if($data.avl==1){
  1368. $wk_jq('div#skuavail').css('display','block');
  1369. $wk_jq('div#skunotavail').css('display','none');
  1370. }
  1371. else{
  1372. $wk_jq('div#skunotavail').css('display','block');
  1373. $wk_jq('div#skuavail').css('display','none');
  1374. $wk_jq("input#sku").attr('value','');
  1375. }
  1376. }
  1377. });
  1378. }
  1379. });
  1380.  
  1381. $wk_jq("body").delegate('.wk_imagevalidate',"change",function(){
  1382. var ext = $wk_jq(this).val().split('.').pop().toLowerCase();
  1383. if($wk_jq.inArray(ext, ['gif','png','jpg','jpeg']) == -1) {
  1384. $wk_jq(this).val('');
  1385. alert('<?php echo $helper->__(" invalid extension! Please Upload an image ")?>');
  1386. }
  1387. });
  1388.  
  1389. $wk_jq("#wk_bodymain").delegate('.wk_plus ,.wk_plusend,.wk_minus, .wk_minusend ',"click",function(){
  1390. var thisthis=$wk_jq(this);
  1391. if(thisthis.hasClass("wk_plus") || thisthis.hasClass("wk_plusend")){
  1392. if(thisthis.hasClass("wk_plus"))
  1393. thisthis.removeClass('wk_plus').addClass('wk_plus_click');
  1394. if(thisthis.hasClass("wk_plusend"))
  1395. thisthis.removeClass('wk_plusend').addClass('wk_plusend_click');
  1396. thisthis.prepend("<span class='wk_node_loader'></span>");
  1397.  
  1398. $wk_jq.ajax({
  1399. url : "<?php echo $this->getUrl('marketplace/marketplaceaccount/categorytree/',array('_secure'=>true));?>",
  1400. type : "POST",
  1401. data : {CID:thisthis.siblings("input").val(),
  1402. ML:thisthis.parent(".wk_cat_container").css("margin-left").replace("px",""),
  1403. CATS : "<?php echo implode(',',$categories); ?>"},
  1404. dataType: "html",
  1405. success : function(content){
  1406. var newdata= $wk_jq.parseJSON(content);
  1407. len= newdata.length;
  1408. var pxl= parseInt(thisthis.parent(".wk_cat_container").css("margin-left").replace("px",""))+20;
  1409. thisthis.find(".wk_node_loader").remove();
  1410. if(thisthis.attr("class") == "wk_plus")
  1411. thisthis.attr("class","wk_minus");
  1412. if(thisthis.attr("class") == "wk_plusend")
  1413. thisthis.attr("class","wk_minusend");
  1414. if(thisthis.attr("class") == "wk_plus_click")
  1415. thisthis.attr("class","wk_minus");
  1416. if(thisthis.attr("class") == "wk_plusend_click")
  1417. thisthis.attr("class","wk_minusend");
  1418. for(i=0;i<len; i++){
  1419. id=newdata[i].id;
  1420. checkn=newdata[i].check;
  1421. nam=newdata[i].name;
  1422. if(checkn==1){
  1423. if(newdata[i].counting ==0){
  1424. thisthis.parent(".wk_cat_container").after('<div class="wk_removable wk_cat_container" style="display:none;margin-left:'+pxl+'px;"><span class="wk_no"></span><span class="wk_foldersign"></span><span class="wk_elements wk_cat_name">'+ nam +'</span><input class="wk_elements" type="checkbox" checked name="category[]" value='+ id+' </div>');
  1425. }else{
  1426. thisthis.parent(".wk_cat_container").after('<div class="wk_removable wk_cat_container" style="display:none;margin-left:'+pxl+'px;"><span class="wk_plusend"></span><span class="wk_foldersign"></span><span class="wk_elements wk_cat_name">'+ nam +'</span><input class="wk_elements" type="checkbox" checked name="category[]" value='+ id +'></div>');
  1427. }
  1428. }else{
  1429. if(newdata[i].counting ==0){
  1430. thisthis.parent(".wk_cat_container").after('<div class="wk_removable wk_cat_container" style="display:none;margin-left:'+pxl+'px;"><span class="wk_no"></span><span class="wk_foldersign"></span><span class="wk_elements wk_cat_name">'+ nam +'</span><input class="wk_elements" type="checkbox" name="category[]" value='+ id+'></div>');
  1431. }else{
  1432. thisthis.parent(".wk_cat_container").after('<div class="wk_removable wk_cat_container" style="display:none;margin-left:'+pxl+'px;"><span class="wk_plusend"></span><span class="wk_foldersign"></span><span class="wk_elements wk_cat_name">'+ nam +'</span><input class="wk_elements" type="checkbox" name="category[]" value='+ id +'></div>');
  1433. }
  1434. }
  1435. }
  1436. thisthis.parent(".wk_cat_container").nextAll().slideDown(300);
  1437. }
  1438. });
  1439. }
  1440. if(thisthis.hasClass("wk_minus") || thisthis.hasClass("wk_minusend")){
  1441. if(thisthis.attr("class") == "wk_minus")
  1442. thisthis.attr("class","wk_plus");
  1443. if(thisthis.attr("class") == "wk_minusend")
  1444. thisthis.attr("class","wk_plusend");
  1445. var thiscategory = thisthis.parent(".wk_cat_container");
  1446. var marg= parseInt(thiscategory.css("margin-left").replace("px",""));
  1447. while(thiscategory.next().hasClass("wk_removable")){
  1448.  
  1449. if(parseInt(thiscategory.next().css("margin-left").replace("px",""))>marg)
  1450. thiscategory.next().slideUp("slow",function(){$wk_jq(this).remove();});
  1451. thiscategory = thiscategory.next();
  1452. if(typeof thiscategory.next().css("margin-left")!= "undefined"){
  1453. if( marg==thiscategory.next().css("margin-left").replace("px",""))
  1454. {
  1455. break;
  1456. }
  1457. }
  1458. }
  1459. }
  1460. });
  1461.  
  1462. $wk_jq("body").delegate('.nicEdit-main',"blur",function(){
  1463. var x = $wk_jq(this).text()
  1464. $wk_jq(this).parent().parent().children('textarea').text(x);
  1465. });
  1466.  
  1467. $wk_jq('.image_set span').click(function(event){
  1468. var dicisionapp=confirm('<?php echo $helper->__(" Are you sure you want to delete this image ? ")?>');
  1469. if(dicisionapp==true){
  1470. var deleteflag=0;
  1471. var thisthis = $wk_jq(this);
  1472. var imag = thisthis.prev('img').attr('id');
  1473. thisthis.html("<img src='<?php echo $this->getSkinUrl('marketplace/images/loading.gif'); ?>'/>");
  1474. thisthis.removeClass('wk_imagedelete');
  1475. thisthis.addClass('wk_imagedeleteload');
  1476. $wk_jq.ajax({
  1477. url: "<?php echo $this->getUrl('marketplace/marketplaceaccount/deleteimage',array('_secure'=>true));?>",
  1478. type: "POST",
  1479. data: {file:thisthis.prev('img').attr('id'),pid:thisthis.prev('img').attr('pid')},
  1480. dataType: 'html',
  1481. success:function(content){
  1482. thisthis.parent('div.setimage').remove();
  1483. }
  1484. });
  1485. }
  1486. });
  1487. $wk_jq('.wk_imagedelete img').mouseover(function(event){
  1488. $wk_jq(event.target).css('width','22px');
  1489. });
  1490. $wk_jq('.wk_imagedelete img').mouseout(function(event){
  1491. $wk_jq(event.target).css('width','20px');
  1492. });
  1493. })($wk_jq);
  1494. </script>
  1495.  
  1496.  
  1497.  
  1498.  
  1499. <?php
  1500. }else{
  1501. echo "<h2 class='wk_new_msg'>".$helper->__("To BECOME SELLER PLEASE CONTACT TO ADMIN.")."</h2>";
  1502. }?>
  1503.  
  1504.  
  1505.  
  1506.  
  1507.  
  1508.  
  1509. <style>
  1510.  
  1511. .div_link-cart { display:none !important; /* remove cart button */ }
  1512. .header_search { display:none !important; }
  1513. .inner_menu { display:none !important }
  1514.  
  1515.  
  1516.  
  1517.  
  1518. .welcome-msg { display:none !important }
  1519. .social-icons { display:none !important }
  1520.  
  1521. .grid_6.pull_18.col-left.sidebar > div:last-child {
  1522. display: none; /* remove complete my acccount section */
  1523. }
  1524. .breadcrumbs { display:none !important /* remove home > My account */ }
  1525.  
  1526. .block-title { display:none !important /* remove markeplace text */ }
  1527.  
  1528. ul.wk_cont_ul li {
  1529. display: inline-block;
  1530.  
  1531. }
  1532.  
  1533. .wk_cont_ul {
  1534. background: #027CD5;
  1535. }
  1536.  
  1537. .wk_cont_ul_one
  1538. {
  1539.  
  1540. position:relative;
  1541. left:640px;
  1542. bottom:69px;
  1543. display: inline-block;
  1544. font-size:13px;
  1545. list-style-type: none;
  1546. }
  1547.  
  1548.  
  1549. ul.wk_cont_ul_one li
  1550. { display: inline-block;}
  1551. ul.wk_cont_ul_one li { display: inline-block;}
  1552.  
  1553. .widget.widget-static-block { display:none !important }
  1554.  
  1555.  
  1556.  
  1557.  
  1558.  
  1559.  
  1560. </style>
  1561.  
  1562.  
  1563.  
  1564. <style type="text/css" media="screen"> #horizontalmenu ul { padding:1; margin:1; list-style:none; } #horizontalmenu li { float:left; position:relative; padding-right:100; display:block; border:0px solid #CC55FF; border-style:inset; } #horizontalmenu li ul { display:none; position:absolute; } #horizontalmenu li:hover ul{ display:block; background:white; height:auto; width:8em; } #horizontalmenu li ul li{ clear:both; border-style:none;} </style>
  1565.  
  1566.  
  1567. <style>
  1568.  
  1569. .mymenu {
  1570.  
  1571. font-size:17px;
  1572. color : white;
  1573. }
  1574.  
  1575. .wk_cont_ul
  1576. {
  1577. position:relative;
  1578. bottom:50px;
  1579.  
  1580. }
  1581.  
  1582. #main_header { position: relative !important; }
  1583.  
  1584. .mymenu li { margin-right:10px; }
  1585. .mymenu li a{ text-decoration: none;padding: 5px; }
  1586. .mymenu li a:link{ text-decoration: none; }
  1587. .mymenu li a:hover{ text-decoration: none;background:#ffff00; }
  1588.  
  1589. #horizontalmenu .mymenu > li {
  1590. height: 32px;
  1591. line-height: 32px;
  1592. width: 100px;
  1593. }
  1594. #main_header .header-container .header {
  1595. background-color: #027CD5;
  1596.  
  1597. }
  1598. #horizontalmenu{
  1599. margin-top: -5px;
  1600. }
  1601.  
  1602.  
  1603.  
  1604. </style>
  1605.  
  1606. <!-- as amazon -->
  1607. <style>
  1608.  
  1609. .ama1
  1610. {
  1611. width: 80px; border-radius: 5px; border: 1px solid #C0C0C0; padding: 10px; position : relative; top: 10px;"
  1612. }
  1613. .wk_mp_list_table {
  1614.  
  1615. position:relative;
  1616. right:160px;
  1617. width:130%;
  1618. }
  1619.  
  1620.  
  1621. #main_header .header-container .header { width:100%}
  1622.  
  1623. .update { position:relative; top:18px;}
  1624. .cancel { position:relative; top:18px;}
  1625. </style>
  1626.  
  1627.  
  1628.  
  1629.  
  1630.  
  1631.  
  1632. <!-- cod
  1633.  
  1634. <script>
  1635.  
  1636. function hideResetcod(product_id,Codold) {
  1637.  
  1638. var qtyId='#cod_'+ product_id;
  1639. var currcod='#curr_'+ product_id;
  1640. var editLink="#cod_edit_link_"+ product_id;
  1641. var updateButton="#cod_update_button_"+ product_id;
  1642. var valuecod="#valuecod_"+ product_id;
  1643. var resetButton="#cod_reset_button_"+ product_id;
  1644.  
  1645.  
  1646. $wk_jq(valuecod).show();
  1647. $wk_jq(qtyId).val( $wk_jq(currcod).val());
  1648. $wk_jq(editLink).show();
  1649.  
  1650. }
  1651.  
  1652.  
  1653.  
  1654. function showFieldCod(product_id)
  1655. {
  1656.  
  1657. var qtyId='#cod_'+ product_id;
  1658.  
  1659. var editLink="#cod_edit_link_"+ product_id;
  1660. var valuecod="#valuecod_"+ product_id;
  1661. var updateButton="#cod_update_button_"+ product_id;
  1662. var resetButton="#cod_reset_button_"+ product_id;
  1663.  
  1664. $wk_jq(qtyId).show();
  1665. $wk_jq(valuecod).hide();
  1666.  
  1667. $wk_jq(editLink).hide();
  1668. $wk_jq(updateButton).show();
  1669. $wk_jq(updateButton).prop('disabled', false);//just in case
  1670. $wk_jq(resetButton).show();
  1671.  
  1672. return false;
  1673.  
  1674.  
  1675. }
  1676.  
  1677.  
  1678.  
  1679. function updateFieldCod(product_id)
  1680. {
  1681. var codId = '#cod_'+ product_id;
  1682. var updatedqty = '#updatedcod_'+ product_id;
  1683. var url ='<?php echo Mage::getUrl('marketplace/marketplaceaccount/updateFieldcod/')?>';
  1684. $cod = $wk_jq(codId).val();
  1685. new Ajax.Request(url, {
  1686. method: 'post',
  1687. parameters: {id: product_id, cod: $cod},
  1688. onComplete: function (transport) {
  1689. //alert(transport.responseText);
  1690.  
  1691. jQuery(updatedqty).show().delay(2000).fadeOut();
  1692.  
  1693. }
  1694. });
  1695. }
  1696.  
  1697. </script>
  1698.  
  1699. cod end -->
Add Comment
Please, Sign In to add comment