Advertisement
Guest User

Untitled

a guest
Jan 20th, 2020
392
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 5 12.00 KB | None | 0 0
  1. <style>
  2.   .shopify .shopify-info-item {
  3.     display: flex;
  4.     justify-content: space-between;
  5.     border-bottom: 1px solid #E3E4E6;
  6.     min-height: 38px;
  7.   }
  8.  
  9.   .shopify .shopify-info-item:last-child {
  10.     border-bottom: none;
  11.   }
  12.  
  13.   .shopify .shopify-info-item .item-label {
  14.     margin-top: 10px;
  15.     color: #9D9D9D;
  16.     font-family: "Open Sans";
  17.     font-size: 12px;
  18.     font-weight: 600;
  19.   }
  20.  
  21.   .shopify .shopify-info-item .item-value-shopify {
  22.     background: transparent;
  23.     color: #5A5A5A;
  24.     border-bottom: none;
  25.     text-align: right;
  26.     margin-top: 7px;
  27.   }
  28.  
  29.   .shopify .shopify-info-item:last-child {
  30.     border-bottom: none;
  31.   }
  32.  
  33.   .shopify .item-label-shopify {
  34.     font-size: 14px;
  35.     color: #808080;
  36.     opacity: .7;
  37.     margin-bottom: 10px;
  38.     margin-top: 10px;
  39.   }
  40.  
  41.   .shopify .custom-div {
  42.     padding-top: 0 !important;
  43.   }
  44.  
  45.   .shopify .order-meta {
  46.     margin: 0;
  47.     cursor: pointer;
  48.   }
  49.  
  50.   .shopify .order-label {
  51.     margin: 0;
  52.   }
  53.  
  54.   .shopify .order-meta .s-icon.i-service-shopify {
  55.     background: #C7E6A5;
  56.     color: #fff;
  57.     border-radius: 50%;
  58.     width: 30px;
  59.     height: 30px;
  60.     display: block;
  61.     margin-right: 10px;
  62.     float: left;
  63.   }
  64.  
  65.   .shopify .order-meta .s-icon:before {
  66.     vertical-align: -16px;
  67.     margin-left: 3px;
  68.   }
  69.  
  70.   .shopify .order-meta .media-heading {
  71.     color: #5A5A5A;
  72.     background-color: #E3E4E6;
  73.     font-size: 12px;
  74.     font-weight: 600;
  75.     width: 345px;
  76.     display: flex;
  77.     justify-content: space-between;
  78.     border-radius: 6px 6px 0px 0px;
  79.     padding: 9px 10px 0px 10px;
  80.     box-sizing: border-box;
  81.     margin-bottom: 0;
  82.     height: 30px;
  83.   }
  84.  
  85.   .shopify .tab {
  86.     position: relative;
  87.     margin-bottom: 10px;
  88.     width: 100%;
  89.     overflow: hidden;
  90.     display: flex;
  91.   }
  92.  
  93.   .shopify .tab .label {
  94.     text-transform: none;
  95.   }
  96.  
  97.   .shopify .tab-side {
  98.     width: 2px;
  99.     background: #C7E6A5;
  100.     height: inherit;
  101.     border-radius: 1px;
  102.     margin-left: 13px;
  103.     margin-right: 15px;
  104.     display: block;
  105.     float: left;
  106.     min-height: 30px;
  107.   }
  108.  
  109.   .shopify .tab-content {
  110.     max-height: 0;
  111.     overflow: hidden;
  112.     padding: 0px 10px 0px 10px;
  113.     border: 1px solid #E3E4E6;
  114.     border-radius: 0px 0px 6px 6px;
  115.   }
  116.  
  117.   .shopify .tab-content-holder {
  118.     display: block;
  119.     width: 100%;
  120.   }
  121.  
  122.   .shopify input::after {
  123.     position: absolute;
  124.     right: 0;
  125.     top: 0;
  126.     display: block;
  127.     width: 3em;
  128.     height: 3em;
  129.     line-height: 3;
  130.     text-align: center;
  131.     transition: all .35s;
  132.   }
  133.  
  134.   .shopify input.hidden[type=checkbox]:checked~.tab-content {
  135.     max-height: 999em;
  136.     padding-top: 10px;
  137.     padding-bottom: 5px;
  138.   }
  139.  
  140.   .shopify input.hidden[type=checkbox]:checked~.order-label .order-meta .media-heading {
  141.     border-radius: 6px 6px 0px 0px !important;
  142.     background-color: red !important;
  143.   }
  144.  
  145.   .shopify .card-table-holder {
  146.     border: none !important;
  147.     margin-top: 15px;
  148.     margin-bottom: 10px;
  149.   }
  150.  
  151.   .shopify .order-table {
  152.     margin-bottom: 0;
  153.     overflow: hidden;
  154.     width: 100%;
  155.   }
  156.  
  157.   .shopify .order-table tr th,
  158.   .shopify .order-table tr td {
  159.     background-color: #F4F4F4;
  160.     padding: 0 4px;
  161.     line-height: 1.42857143;
  162.     vertical-align: top;
  163.   }
  164.  
  165.   .shopify .order-table th{
  166.     height: 32px;
  167.   }
  168.  
  169.   .shopify .order-table tr th {
  170.     font-size: 14px;
  171.     color: #808080;
  172.     font-weight: 400;
  173.     opacity: .7;
  174.     padding: 5px;
  175.     border-bottom: 1px solid white;
  176.     border-right: 1px solid white;
  177.     border-top: 0px!important;
  178.   }
  179.  
  180.   .shopify .order-table tr td {
  181.     color: #717171;
  182.     border-bottom: 1px solid white;
  183.     border-right: 1px solid white;
  184.     padding: 5px;
  185.   }
  186.  
  187.   .shopify .order-table tr:last-child td {
  188.     border-bottom: 0;
  189.   }
  190.  
  191.   .shopify a {
  192.     padding: 4px;
  193.   }
  194.  
  195.   .shopify p {
  196.     margin: 0;
  197.   }
  198.  
  199.   .shopify .tab label {
  200.     display: block;
  201.   }
  202.  
  203.   .shopify table {
  204.     background-color: transparent;
  205.     max-width: 100%;
  206.   }
  207.   .shopify table > tbody > tr:nth-of-type(odd) {
  208.     background-color: #f9f9f9;
  209.   }
  210. </style>
  211. <div class="shopify">
  212.   <div class="shopify-card">
  213.     {% if customer.first_name != nil %}
  214.     <div class="shopify-info-item">
  215.       <h6 class="item-label">Customer</h6>
  216.       <p class="item-value-shopify">{{ customer.first_name }} {{customer.last_name}}</p>
  217.     </div>
  218.     {% endif %}
  219.     {% if customer.email != nil %}
  220.     <div class="shopify-info-item">
  221.       <h6 class="item-label">Customer email</h6>
  222.       <p class="item-value-shopify">{{ customer.email }}</p>
  223.     </div>
  224.     {% endif %}
  225.   </div>
  226.  
  227.   {% if orders.size > 0 %}
  228.  
  229.   {% for order in orders %}
  230.   {% if forloop.index0 < 3 %}
  231.  <div class="tab">
  232.     <div class="tab-content-holder">
  233.       <label for="order_{{ order.order_number }}" class="order-label">
  234.         <div class="order-meta">
  235.           <h5 class="media-heading">
  236.             Order #{{ order.order_number }}
  237.             <span class="media-date">{{ order.created_at | date: "%a, %b %d, %y" }}</span>
  238.           </h5>
  239.         </div>
  240.       </label> {% if forloop.first == true %}
  241.       <input type="checkbox" name="" class="hidden" id="order_{{ order.order_number }}" checked> {% else %}
  242.       <input type="checkbox" name="" class="hidden" id="order_{{ order.order_number }}"> {% endif %}
  243.       <div class="tab-content">
  244.         <div class="shopify-info-item">
  245.           <h6 class="item-label">Shipping address</h6>
  246.           <p class="item-value-shopify">
  247.             {% if order.shipping_address.name != nil %} {{ order.shipping_address.name }} <br /> {% endif %} {% if order.shipping_address.address1 != nil %} {{ order.shipping_address.address1 }} <br /> {% endif %} {% if order.shipping_address.zip != nil
  248.             %} {{ order.shipping_address.zip }}, {{ order.shipping_address.city }} <br /> {% endif %} {% if order.shipping_address.phone != nil %} Tel. {{ order.shipping_address.phone }} <br /> {% endif %}
  249.           </p>
  250.         </div>
  251.  
  252.         <div class="shopify-info-item">
  253.           <h6 class="item-label">Billing address</h6>
  254.           <p class="item-value-shopify">
  255.             {% if order.billing_address.name != nil %} {{ order.billing_address.name }} <br /> {% endif %} {% if order.billing_address.address1 != nil %} {{ order.billing_address.address1 }} <br /> {% endif %} {% if order.billing_address.zip != nil %} {{
  256.             order.billing_address.zip }}, {{ order.billing_address.city }} <br /> {% endif %} {% if order.billing_address.phone != nil %} Tel. {{ order.billing_address.phone }} <br /> {% endif %}
  257.           </p>
  258.         </div>
  259.  
  260.         {% if order.closed_at != nil %}
  261.         <div class="shopify-info-item">
  262.           <h6 class="item-label">Status</h6>
  263.           <p class="item-value-shopify">Closed</p>
  264.         </div>
  265.         <div class="shopify-info-item">
  266.           <h6 class="item-label">Closing date</h6>
  267.           <p class="item-value-shopify">{{ order.closed_at | date: "%a, %b %d, %y" }}</p>
  268.         </div>
  269.         {% else %}
  270.         <div class="shopify-info-item">
  271.           <h6 class="item-label">Status</h6>
  272.           <p class="item-value-shopify">Open</p>
  273.         </div>
  274.         {% endif %}
  275.  
  276.         <div class="shopify-info-item">
  277.           <h6 class="item-label">Order price</h6>
  278.           <p class="item-value-shopify">{{ order.total_price }} ({{order.currency}})</p>
  279.         </div>
  280.  
  281.         <div class="card-table-holder">
  282.           <table class="order-table">
  283.             <tbody>
  284.               <tr>
  285.                 <th>Qty.</th>
  286.                 <th>Item</th>
  287.               </tr>
  288.               {% for item in order.line_items %}
  289.               <tr>
  290.                 <td>{{ item.quantity }}</td>
  291.                 <td>{{ item.title }}</td>
  292.               </tr>
  293.               {% endfor %}
  294.             </tbody>
  295.           </table>
  296.         </div>
  297.       </div>
  298.     </div>
  299.   </div>
  300.   {% endif %}
  301.   {% endfor %}
  302.  
  303.   {% if orders.size > 3 %}
  304.   <div class="tab">
  305.     <div class="tab-content-holder">
  306.     <label for="readMore">
  307.         <div class="order-meta">
  308.           <h5 class="media-heading">
  309.             <b>View more</b>
  310.           </h5>
  311.         </div>
  312.       </label>
  313.       <input type="checkbox" name="" class="hidden" id="readMore">
  314.       <div class="tab-content">
  315.           {% for order in orders %}
  316.           {% if forloop.index0 > 2 %}
  317.             <div class="tab">
  318.               <div class="tab-content-holder">
  319.                 <label for="order_{{ order.order_number }}">
  320.                   <div class="order-meta">
  321.                     <h5 class="media-heading">
  322.                       Order #{{ order.order_number }}
  323.                     </h5>
  324.                   </div>
  325.                 </label>
  326.                 <input type="checkbox" name="" class="hidden" id="order_{{ order.order_number }}">
  327.                 <div class="tab-content">
  328.                   <div class="shopify-info-item">
  329.                     <h6 class="item-label">Shipping address</h6>
  330.                     <p class="item-value-shopify">
  331.                       {% if order.shipping_address.name != nil %} {{ order.shipping_address.name }} <br /> {% endif %} {% if order.shipping_address.address1 != nil %} {{ order.shipping_address.address1 }} <br /> {% endif %} {% if order.shipping_address.zip != nil
  332.                       %} {{ order.shipping_address.zip }}, {{ order.shipping_address.city }} <br /> {% endif %} {% if order.shipping_address.phone != nil %} Tel. {{ order.shipping_address.phone }} <br /> {% endif %}
  333.                     </p>
  334.                   </div>
  335.  
  336.                   <div class="shopify-info-item">
  337.                     <h6 class="item-label">Billing address</h6>
  338.                     <p class="item-value-shopify">
  339.                       {% if order.billing_address.name != nil %} {{ order.billing_address.name }} <br /> {% endif %} {% if order.billing_address.address1 != nil %} {{ order.billing_address.address1 }} <br /> {% endif %} {% if order.billing_address.zip != nil %} {{
  340.                       order.billing_address.zip }}, {{ order.billing_address.city }} <br /> {% endif %} {% if order.billing_address.phone != nil %} Tel. {{ order.billing_address.phone }} <br /> {% endif %}
  341.                     </p>
  342.                   </div>
  343.  
  344.                   {% if order.closed_at != nil %}
  345.                   <div class="shopify-info-item">
  346.                     <h6 class="item-label">Status</h6>
  347.                     <p class="item-value-shopify">Closed</p>
  348.                   </div>
  349.                   <div class="shopify-info-item">
  350.                     <h6 class="item-label">Closing date</h6>
  351.                     <p class="item-value-shopify">{{ order.closed_at }}</p>
  352.                   </div>
  353.                   {% else %}
  354.                   <div class="shopify-info-item">
  355.                     <h6 class="item-label">Status</h6>
  356.                     <p class="item-value-shopify">Open</p>
  357.                   </div>
  358.                   {% endif %}
  359.  
  360.                   <div class="shopify-info-item">
  361.                     <h6 class="item-label">Order price</h6>
  362.                     <p class="item-value-shopify">{{ order.total_price }}</p>
  363.                   </div>
  364.  
  365.                   <div class="card-table-holder">
  366.                     <table class="order-table">
  367.                       <tbody>
  368.                         <tr>
  369.                           <th>Qty.</th>
  370.                           <th>Item</th>
  371.                         </tr>
  372.                         {% for item in order.line_items %}
  373.                         <tr>
  374.                           <td>{{ item.quantity }}</td>
  375.                           <td>{{ item.title }}</td>
  376.                         </tr>
  377.                         {% endfor %}
  378.                       </tbody>
  379.                     </table>
  380.                   </div>
  381.                 </div>
  382.               </div>
  383.             </div>
  384.           {% endif %}
  385.           {% endfor %}
  386.       </div>
  387.     </div>
  388.   </div>
  389.   {% endif %}
  390.  
  391.   {% else %}
  392.   <div class="shopify-info-item">
  393.     <h6 class="item-label">This customer has no orders in Shopify.</h6>
  394.   </div>
  395.   {% endif %}
  396. </div>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement