index.php 4.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. <?php
  2. /**
  3. * FecShop file.
  4. *
  5. * @link http://www.fecshop.com/
  6. * @copyright Copyright (c) 2016 FecShop Software LLC
  7. * @license http://www.fecshop.com/license/
  8. */
  9. use fec\helpers\CRequest;
  10. ?>
  11. <div class="main container two-columns-left">
  12. <?= Yii::$service->page->widget->render('breadcrumbs',$this); ?>
  13. <div class="col-main account_center">
  14. <div class="std">
  15. <div style="margin:4px 0 0">
  16. <div class="page-title">
  17. <h2><?= Yii::$service->page->translate->__('Customer Address');?></h2>
  18. </div>
  19. <table class="addressbook" width="100%" cellspacing="0" cellpadding="0" border="0">
  20. <thead>
  21. <tr class="ress_tit">
  22. <th width="76" valign="middle" align="center" height="31"><?= Yii::$service->page->translate->__('First Name');?></th>
  23. <th width="72" valign="middle" align="center" height="31"><?= Yii::$service->page->translate->__('Last Name');?></th>
  24. <th width="167" valign="middle" align="center"><?= Yii::$service->page->translate->__('Email Address');?></th>
  25. <th width="67" valign="middle" align="center"><?= Yii::$service->page->translate->__('Country');?></th>
  26. <th width="79" valign="middle" align="center"><?= Yii::$service->page->translate->__('State');?></th>
  27. <th width="81" valign="middle" align="center"> <?= Yii::$service->page->translate->__('Zip Code');?> </th>
  28. <th width="101" valign="middle" align="center"><?= Yii::$service->page->translate->__('Telephone');?> </th>
  29. <th class="th3" width="71" valign="middle" align="center"><?= Yii::$service->page->translate->__('Operation');?></th>
  30. </tr>
  31. </thead>
  32. <tbody>
  33. <?php if(is_array($coll) && !empty($coll)): ?>
  34. <?php foreach($coll as $one): ?>
  35. <tr class="">
  36. <td valign="top" align="center"><?= $one['first_name'] ?></td>
  37. <td valign="top" align="center"><?= $one['last_name'] ?></td>
  38. <td valign="top" align="center"><?= $one['email'] ?></td>
  39. <td valign="top" align="center"><?= $one['country'] ?></td>
  40. <td valign="top" align="center"><?= $one['state'] ?></td>
  41. <td valign="top" align="center"><?= $one['zip'] ?></td>
  42. <td valign="top" align="center"><?= $one['telephone'] ?></td>
  43. <td class="ltp" valign="top ltp" align="center">
  44. <input onclick="javascript:window.location.href='<?= Yii::$service->url->getUrl('customer/address/edit',['address_id' => $one['address_id']]); ?>'" class="cpointer" value="<?= Yii::$service->page->translate->__('Modify');?>" name="" type="button">
  45. <a href="javascript:deleteAddress(<?= $one['address_id'] ?>)"><?= Yii::$service->page->translate->__('Delete');?></a>
  46. <?php if($one['is_default'] == 1): ?>
  47. <span style=" color:#cc0000"><?= Yii::$service->page->translate->__('Default');?></span>
  48. <?php endif; ?>
  49. </td>
  50. </tr>
  51. <?php endforeach; ?>
  52. <?php endif; ?>
  53. </tbody>
  54. </table>
  55. <div class="product-Reviews">
  56. <input onclick="javascript:window.location.href='<?= Yii::$service->url->getUrl('customer/address/edit') ?>'" class="submitbutton addnew cpointer" value="<?= Yii::$service->page->translate->__('Add New Address');?>" name="" type="button">
  57. </div>
  58. </div>
  59. </div>
  60. <script>
  61. function deleteAddress(address_id){
  62. var r=confirm("<?= Yii::$service->page->translate->__('do you readly want delete this address?') ?>");
  63. if (r==true){
  64. url = "<?= Yii::$service->url->getUrl('customer/address') ?>";
  65. doPost(url, {"method": "remove", "address_id": address_id, "<?= CRequest::getCsrfName() ?>": "<?= CRequest::getCsrfValue() ?>" });
  66. }
  67. }
  68. </script>
  69. </div>
  70. <div class="col-left ">
  71. <?php
  72. $leftMenu = [
  73. 'class' => 'fecshop\app\appfront\modules\Customer\block\LeftMenu',
  74. 'view' => 'customer/leftmenu.php'
  75. ];
  76. ?>
  77. <?= Yii::$service->page->widget->render($leftMenu,$this); ?>
  78. </div>
  79. <div class="clear"></div>
  80. </div>