Guest User

mylist.phtm,l

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