Plugin Directory

Changeset 2969309


Ignore:
Timestamp:
09/20/2023 02:16:38 PM (3 years ago)
Author:
orderable
Message:

Update to version 1.10.0 from GitHub

Location:
orderable
Files:
28 added
46 edited
1 copied

Legend:

Unmodified
Added
Removed
  • orderable/tags/1.10.0/.vipgoci_phpcs_skip_folders

    r2819236 r2969309  
    22dev-lib
    33node_modules
    4 vendor
    5 assets/frontend/js
    6 assets/admin/js/
     4/vendor
     5/vendor-prefixed
     6/assets/frontend/js
     7/assets/admin/js
  • orderable/tags/1.10.0/assets/admin/css/upgrade-pro.css

    r2912589 r2969309  
    11@font-face {
    2   font-family: "Creo";
     2  font-family: Creo;
    33  src: url("../../fonts/creo-bold-webfont.woff2") format("woff2"), url("../../fonts/creo-bold-webfont.woff") format("woff");
    4   font-weight: bold;
     4  font-weight: 700;
    55  font-style: normal;
    66}
    77@font-face {
    8   font-family: "Creo";
     8  font-family: Creo;
    99  src: url("../../fonts/creo-semibold-webfont.woff2") format("woff2"), url("../../fonts/creo-semibold-webfont.woff") format("woff");
    1010  font-weight: 600;
     
    7676span.ordpro-upgrade-badge {
    7777  display: inline-block;
    78   background: #4E26A1;
     78  background: #4e26a1;
    7979  padding: 6px 12px;
    8080  border-radius: 38px;
     
    8686  padding-left: 31px;
    8787  background-position: 12px 6px;
    88   font-family: "Creo";
    89   font-weight: bold;
     88  font-family: Creo;
     89  font-weight: 700;
    9090  font-size: 14px;
    9191}
     
    112112
    113113.ordpro-upgrade-features__left-heading {
    114   font-family: "Creo";
     114  font-family: Creo;
    115115  font-style: normal;
    116116  font-weight: 700;
    117117  font-size: 30px;
    118118  line-height: 140%;
    119   color: #0B2135;
     119  color: #0b2135;
    120120  max-width: 540px;
    121   margin-bottom: 0px;
     121  margin-bottom: 0;
    122122}
    123123
     
    145145
    146146.ordpro-upgrade-features__left-features-item-text-heading {
    147   font-family: "Creo";
     147  font-family: Creo;
    148148  font-style: normal;
    149149  font-weight: 600;
    150150  font-size: 18px;
    151151  line-height: 150%;
    152   color: #0B2135;
     152  color: #0b2135;
    153153  margin: 0;
    154154}
    155155
    156156.ordpro-upgrade-features__left-features-item-text-text {
    157   font-family: "Inter";
     157  font-family: Inter;
    158158  font-style: normal;
    159159  font-weight: 500;
    160160  font-size: 14px;
    161161  line-height: 150%;
    162   color: #6B6E73;
     162  color: #6b6e73;
    163163  margin: 6px 0 0 0;
    164164}
    165165
    166166.ordpro-upgrade-features__left-view-all {
    167   font-family: "Creo";
     167  font-family: Creo;
    168168  font-style: normal;
    169169  font-weight: 600;
    170170  font-size: 16px;
    171171  line-height: 150%;
    172   color: #7031F5;
     172  color: #7031f5;
    173173}
    174174
     
    180180  width: 373px;
    181181  margin-top: 197px;
    182   background: #0B2135;
     182  background: #0b2135;
    183183  border-radius: 8px;
    184184  padding: 40px 30px;
     
    189189
    190190.ordpro-upgrade-box__heading {
    191   font-family: "Creo";
     191  font-family: Creo;
    192192  font-style: normal;
    193193  font-weight: 700;
    194194  font-size: 30px;
    195195  line-height: 110%;
    196   color: #FFFFFF;
     196  color: #fff;
    197197  text-align: center;
    198198  margin-top: 18px;
     
    201201
    202202.ordpro-upgrade-box__text {
    203   font-family: "Inter";
     203  font-family: Inter;
    204204  font-style: normal;
    205205  font-weight: 400;
     
    207207  line-height: 22px;
    208208  text-align: center;
    209   color: #FFFFFF;
     209  color: #fff;
    210210  margin-bottom: 26px;
    211211  margin-top: 18px;
     
    222222  letter-spacing: 0.2em;
    223223  text-transform: uppercase;
    224   color: #FACC73;
     224  color: #facc73;
    225225  margin-bottom: 10px;
    226226}
     
    234234  text-align: center;
    235235  text-transform: uppercase;
    236   color: #FFFFFF;
     236  color: #fff;
    237237}
    238238
     
    242242
    243243.ordpro-upgrade-button {
    244   font-family: "Creo";
     244  font-family: Creo;
    245245  font-style: normal;
    246246  font-weight: 700;
    247247  font-size: 20px;
    248248  line-height: 23px;
    249   color: #FFFFFF;
    250   background: #7031F5;
     249  color: #fff;
     250  background: #7031f5;
    251251  border-radius: 6px;
    252252  width: 100%;
     
    280280  background: rgba(250, 204, 115, 0.2);
    281281  border-radius: 100px;
    282   font-family: "Creo";
     282  font-family: Creo;
    283283  font-style: normal;
    284284  font-weight: 700;
    285285  font-size: 20px;
    286286  line-height: 150%;
    287   color: #0B2135;
     287  color: #0b2135;
    288288  background-image: url(../../img/upgrade-to-pro/star.png);
    289289  background-repeat: no-repeat;
     
    300300
    301301.ordpro-upgrade-faqs__header {
    302   background: #F0F4FF;
    303   font-family: "Creo";
     302  background: #f0f4ff;
     303  font-family: Creo;
    304304  font-style: normal;
    305305  font-weight: 700;
     
    311311
    312312.ordpro-upgrade-faqs__header h3 {
    313   font-family: "Creo";
     313  font-family: Creo;
    314314  font-style: normal;
    315315  font-weight: 700;
    316316  font-size: 20px;
    317317  line-height: 110%;
    318   color: #0B2135;
     318  color: #0b2135;
    319319  margin: 0;
    320320  display: -webkit-box;
     
    333333.ordpro-upgrade-faqs__body-faq {
    334334  position: relative;
    335   padding: 0px 0 60px 30px;
    336 }
    337 
    338 .ordpro-upgrade-faqs__body-faq:after {
     335  padding: 0 0 60px 30px;
     336}
     337
     338.ordpro-upgrade-faqs__body-faq::after {
    339339  width: 93%;
    340340  content: "";
    341   background: #E5E5E5;
     341  background: #e5e5e5;
    342342  height: 1px;
    343343  position: absolute;
     
    348348}
    349349
    350 .ordpro-upgrade-faqs__body-faq:last-child:after {
     350.ordpro-upgrade-faqs__body-faq:last-child::after {
    351351  display: none;
    352352}
     
    367367
    368368.ordpro-upgrade-faqs__body-faq-content p {
    369   font-family: "Inter";
     369  font-family: Inter;
    370370  font-style: normal;
    371371  font-weight: 500;
    372372  font-size: 14px;
    373373  line-height: 150%;
    374   color: #6B6E73;
     374  color: #6b6e73;
    375375}
    376376
     
    380380
    381381.ordpro-upgrade-faqs__body-faq-header-question h4 {
    382   font-family: "Creo";
     382  font-family: Creo;
    383383  font-style: normal;
    384384  font-weight: 600;
    385385  font-size: 18px;
    386386  line-height: 120%;
    387   color: #0B2135;
     387  color: #0b2135;
    388388  margin: 0;
    389389}
     
    404404
    405405.ordpro-upgrade-faqs-view-all {
    406   font-family: "Creo";
     406  font-family: Creo;
    407407  font-style: normal;
    408408  font-weight: 600;
    409409  font-size: 16px;
    410410  line-height: 150%;
    411   color: #7031F5;
     411  color: #7031f5;
    412412}
    413413
     
    417417
    418418.ordpro-upgrade-comming-soon-badge {
    419   font-family: "Creo";
     419  font-family: Creo;
    420420  font-style: normal;
    421421  font-weight: 600;
    422422  font-size: 11px;
    423423  line-height: 13px;
    424   color: #0B2135;
     424  color: #0b2135;
    425425  display: inline-block;
    426   background: #FACC73;
     426  background: #facc73;
    427427  border-radius: 4px;
    428428  padding: 4px 10px;
     
    498498  .ordpro-upgrade__header {
    499499    background-image: unset;
    500     background-color: #7031F5;
     500    background-color: #7031f5;
    501501    aspect-ratio: unset;
    502502  }
  • orderable/tags/1.10.0/assets/admin/css/upgrade-pro.min.css

    r2933929 r2969309  
    1 @font-face{font-family:Creo;src:url(../../fonts/creo-bold-webfont.woff2) format("woff2"),url(../../fonts/creo-bold-webfont.woff) format("woff");font-weight:700;font-style:normal}@font-face{font-family:Creo;src:url(../../fonts/creo-semibold-webfont.woff2) format("woff2"),url(../../fonts/creo-semibold-webfont.woff) format("woff");font-weight:600;font-style:normal}body{background-color:#fff}#wpcontent{margin-left:140px}#wpfooter{display:none}.ordpro-upgrade-wrap{max-width:1280px}.ordpro-upgrade__header{background-image:url(../../img/upgrade-to-pro/header-blop.png);background-repeat:no-repeat;background-size:100%;display:inline-block;width:100%;height:327px;position:relative}.ordpro-upgrade__header-delivery-img{width:692px}.ordpro-upgrade__header-logo-icon{max-width:105px}.ordpro-upgrade__header-logo-text-img{max-width:230px}.ordpro-upgrade__header-delivery-img{position:absolute;top:10px;right:10px}.ordpro-upgrade__header-logo{margin-left:80px;margin-top:100px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.ordpro-upgrade__header-logo .ordpro-upgrade__header-logo-right{margin-left:16px}.ordpro-upgrade__header-logo .ordpro-upgrade__header-logo-text{margin:16px 0}span.ordpro-upgrade-badge{display:inline-block;background:#4e26a1;padding:6px 12px;border-radius:38px;color:#fff;line-height:1;background-image:url(../../img/upgrade-to-pro/star-badge.png);background-repeat:no-repeat;background-size:13px;padding-left:31px;background-position:12px 6px;font-family:Creo;font-weight:700;font-size:14px}.ordpro-upgrade__body{margin-left:80px}.ordpro-upgrade-features{display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;gap:70px;-webkit-box-align:start;-ms-flex-align:start;align-items:flex-start}.ordpro-upgrade-features__left{width:670px}.ordpro-upgrade-features__left-heading{font-family:Creo;font-style:normal;font-weight:700;font-size:30px;line-height:140%;color:#0b2135;max-width:540px;margin-bottom:0}.ordpro-upgrade-features__left-features{display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;gap:40px 30px;margin-bottom:60px}.ordpro-upgrade-features__left-features-item{width:47%;display:-webkit-box;display:-ms-flexbox;display:flex;gap:20px}.ordpro-upgrade-features__left-features-item-icon img{width:80px}.ordpro-upgrade-features__left-features-item-text-heading{font-family:Creo;font-style:normal;font-weight:600;font-size:18px;line-height:150%;color:#0b2135;margin:0}.ordpro-upgrade-features__left-features-item-text-text{font-family:Inter;font-style:normal;font-weight:500;font-size:14px;line-height:150%;color:#6b6e73;margin:6px 0 0 0}.ordpro-upgrade-features__left-view-all{font-family:Creo;font-style:normal;font-weight:600;font-size:16px;line-height:150%;color:#7031f5}.ordpro-upgrade-features__left-view-all svg{margin-left:10px}.ordpro-upgrade-box{width:373px;margin-top:197px;background:#0b2135;border-radius:8px;padding:40px 30px;-webkit-box-sizing:border-box;box-sizing:border-box;text-align:center}.ordpro-upgrade-box__heading{font-family:Creo;font-style:normal;font-weight:700;font-size:30px;line-height:110%;color:#fff;text-align:center;margin-top:18px;margin-bottom:18px}.ordpro-upgrade-box__text{font-family:Inter;font-style:normal;font-weight:400;font-size:14px;line-height:22px;text-align:center;color:#fff;margin-bottom:26px;margin-top:18px}.ordpro-upgrade-box__includes{margin-top:40px;font-family:"Open Sans";font-style:normal;font-weight:700;font-size:12px;line-height:16px;text-align:center;letter-spacing:.2em;text-transform:uppercase;color:#facc73;margin-bottom:10px}.ordpro-upgrade-box__includes-text{font-family:"Open Sans";font-style:normal;font-weight:700;font-size:14px;line-height:19px;text-align:center;text-transform:uppercase;color:#fff}.ordpro-upgrade-box__star img{width:40px}.ordpro-upgrade-button{font-family:Creo;font-style:normal;font-weight:700;font-size:20px;line-height:23px;color:#fff;background:#7031f5;border-radius:6px;width:100%;display:block;padding:15px 0;-webkit-transition:.3s all;transition:.3s all;text-decoration:none}.ordpro-upgrade-button:hover{color:#fff}.ordpro-upgrade-button__arrow{width:0;overflow:hidden;display:inline-block;vertical-align:bottom;-webkit-transition:.3s all;transition:.3s all}.ordpro-upgrade-button:hover .ordpro-upgrade-button__arrow{width:28px;line-height:23px}.ordpro-upgrade-badge-addons{padding:10px 16px;background:rgba(250,204,115,.2);border-radius:100px;font-family:Creo;font-style:normal;font-weight:700;font-size:20px;line-height:150%;color:#0b2135;background-image:url(../../img/upgrade-to-pro/star.png);background-repeat:no-repeat;padding-left:56px;background-position:16px 10px;margin:40px 0;display:inline-block;background-size:28px}.ordpro-upgrade-faqs{max-width:670px}.ordpro-upgrade-faqs__header{background:#f0f4ff;font-family:Creo;font-style:normal;font-weight:700;font-size:20px;line-height:110%;padding:25px 30px;margin:60px 0 30px 0}.ordpro-upgrade-faqs__header h3{font-family:Creo;font-style:normal;font-weight:700;font-size:20px;line-height:110%;color:#0b2135;margin:0;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.ordpro-upgrade-faqs__header h3 img{margin-right:12px;width:24px}.ordpro-upgrade-faqs__body-faq{position:relative;padding:0 0 60px 30px}.ordpro-upgrade-faqs__body-faq:after{width:93%;content:"";background:#e5e5e5;height:1px;position:absolute;display:block;margin:0 auto;left:3.5%;bottom:30px}.ordpro-upgrade-faqs__body-faq:last-child:after{display:none}.ordpro-upgrade-faqs__body-faq-header{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;cursor:pointer}.ordpro-upgrade-faqs__body-faq-content{display:none}.ordpro-upgrade-faqs__body-faq-content p{font-family:Inter;font-style:normal;font-weight:500;font-size:14px;line-height:150%;color:#6b6e73}.ordpro-upgrade-faqs__body-faq-header-question{width:90%}.ordpro-upgrade-faqs__body-faq-header-question h4{font-family:Creo;font-style:normal;font-weight:600;font-size:18px;line-height:120%;color:#0b2135;margin:0}.ordpro-upgrade-faqs__body-faq-header-icon{width:10%;text-align:center;-webkit-transition:-webkit-transform .3s ease-in-out;transition:-webkit-transform .3s ease-in-out;transition:transform .3s ease-in-out;transition:transform .3s ease-in-out,-webkit-transform .3s ease-in-out}.ordpro-upgrade-faqs .ordpro-upgrade-faqs__body-faq--open .ordpro-upgrade-faqs__body-faq-header-icon{-webkit-transform:rotate(45deg);transform:rotate(45deg)}.ordpro-upgrade-faqs-view-all{font-family:Creo;font-style:normal;font-weight:600;font-size:16px;line-height:150%;color:#7031f5}.ordpro-upgrade-faqs-view-all svg{margin-left:10px}.ordpro-upgrade-comming-soon-badge{font-family:Creo;font-style:normal;font-weight:600;font-size:11px;line-height:13px;color:#0b2135;display:inline-block;background:#facc73;border-radius:4px;padding:4px 10px;margin-bottom:6px}@media (max-width:1400px){.ordpro-upgrade__header-delivery-img{width:400px}.ordpro-upgrade__body{margin-left:60px}.ordpro-upgrade-features__left{width:600px}.ordpro-upgrade-features{gap:50px}}@media (max-width:1250px){.ordpro-upgrade__header{height:auto;aspect-ratio:4/1}.ordpro-upgrade-features{gap:3%}.ordpro-upgrade-features__left{width:55%}.ordpro-upgrade-box{width:35%}.ordpro-upgrade__body{margin-left:30px}.ordpro-upgrade-features__left-features{gap:40px 25px}}@media (max-width:1100px){.ordpro-upgrade__header-delivery-img{width:300px}.ordpro-upgrade__header-logo{margin-top:50px}}@media (max-width:960px){.auto-fold #wpcontent{padding-left:0}.ordpro-upgrade__body{margin:0 auto;width:90%}.ordpro-upgrade-features__left{width:100%}.ordpro-upgrade-box{width:80%;margin:100px auto 50px auto;max-width:600px}}@media (max-width:780px){.ordpro-upgrade__header-delivery-img{width:200px}}@media (max-width:680px){.ordpro-upgrade__header{background-image:unset;background-color:#7031f5;aspect-ratio:unset}.ordpro-upgrade__header-logo{margin-top:0;margin-left:0;padding:30px 0;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}.ordpro-upgrade__header-delivery-img{display:none}}@media (max-width:560px){.ordpro-upgrade-features__left-features-item{width:90%}}
     1@font-face{font-family:Creo;src:url(../../fonts/creo-bold-webfont.woff2) format("woff2"),url(../../fonts/creo-bold-webfont.woff) format("woff");font-weight:700;font-style:normal}@font-face{font-family:Creo;src:url(../../fonts/creo-semibold-webfont.woff2) format("woff2"),url(../../fonts/creo-semibold-webfont.woff) format("woff");font-weight:600;font-style:normal}body{background-color:#fff}#wpcontent{margin-left:140px}#wpfooter{display:none}.ordpro-upgrade-wrap{max-width:1280px}.ordpro-upgrade__header{background-image:url(../../img/upgrade-to-pro/header-blop.png);background-repeat:no-repeat;background-size:100%;display:inline-block;width:100%;height:327px;position:relative}.ordpro-upgrade__header-delivery-img{width:692px}.ordpro-upgrade__header-logo-icon{max-width:105px}.ordpro-upgrade__header-logo-text-img{max-width:230px}.ordpro-upgrade__header-delivery-img{position:absolute;top:10px;right:10px}.ordpro-upgrade__header-logo{margin-left:80px;margin-top:100px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.ordpro-upgrade__header-logo .ordpro-upgrade__header-logo-right{margin-left:16px}.ordpro-upgrade__header-logo .ordpro-upgrade__header-logo-text{margin:16px 0}span.ordpro-upgrade-badge{display:inline-block;background:#4e26a1;padding:6px 12px;border-radius:38px;color:#fff;line-height:1;background-image:url(../../img/upgrade-to-pro/star-badge.png);background-repeat:no-repeat;background-size:13px;padding-left:31px;background-position:12px 6px;font-family:Creo;font-weight:700;font-size:14px}.ordpro-upgrade__body{margin-left:80px}.ordpro-upgrade-features{display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;gap:70px;-webkit-box-align:start;-ms-flex-align:start;align-items:flex-start}.ordpro-upgrade-features__left{width:670px}.ordpro-upgrade-features__left-heading{font-family:Creo;font-style:normal;font-weight:700;font-size:30px;line-height:140%;color:#0b2135;max-width:540px;margin-bottom:0}.ordpro-upgrade-features__left-features{display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;gap:40px 30px;margin-bottom:60px}.ordpro-upgrade-features__left-features-item{width:47%;display:-webkit-box;display:-ms-flexbox;display:flex;gap:20px}.ordpro-upgrade-features__left-features-item-icon img{width:80px}.ordpro-upgrade-features__left-features-item-text-heading{font-family:Creo;font-style:normal;font-weight:600;font-size:18px;line-height:150%;color:#0b2135;margin:0}.ordpro-upgrade-features__left-features-item-text-text{font-family:Inter;font-style:normal;font-weight:500;font-size:14px;line-height:150%;color:#6b6e73;margin:6px 0 0 0}.ordpro-upgrade-features__left-view-all{font-family:Creo;font-style:normal;font-weight:600;font-size:16px;line-height:150%;color:#7031f5}.ordpro-upgrade-features__left-view-all svg{margin-left:10px}.ordpro-upgrade-box{width:373px;margin-top:197px;background:#0b2135;border-radius:8px;padding:40px 30px;-webkit-box-sizing:border-box;box-sizing:border-box;text-align:center}.ordpro-upgrade-box__heading{font-family:Creo;font-style:normal;font-weight:700;font-size:30px;line-height:110%;color:#fff;text-align:center;margin-top:18px;margin-bottom:18px}.ordpro-upgrade-box__text{font-family:Inter;font-style:normal;font-weight:400;font-size:14px;line-height:22px;text-align:center;color:#fff;margin-bottom:26px;margin-top:18px}.ordpro-upgrade-box__includes{margin-top:40px;font-family:"Open Sans";font-style:normal;font-weight:700;font-size:12px;line-height:16px;text-align:center;letter-spacing:.2em;text-transform:uppercase;color:#facc73;margin-bottom:10px}.ordpro-upgrade-box__includes-text{font-family:"Open Sans";font-style:normal;font-weight:700;font-size:14px;line-height:19px;text-align:center;text-transform:uppercase;color:#fff}.ordpro-upgrade-box__star img{width:40px}.ordpro-upgrade-button{font-family:Creo;font-style:normal;font-weight:700;font-size:20px;line-height:23px;color:#fff;background:#7031f5;border-radius:6px;width:100%;display:block;padding:15px 0;-webkit-transition:.3s all;transition:.3s all;text-decoration:none}.ordpro-upgrade-button:hover{color:#fff}.ordpro-upgrade-button__arrow{width:0;overflow:hidden;display:inline-block;vertical-align:bottom;-webkit-transition:.3s all;transition:.3s all}.ordpro-upgrade-button:hover .ordpro-upgrade-button__arrow{width:28px;line-height:23px}.ordpro-upgrade-badge-addons{padding:10px 16px;background:rgba(250,204,115,.2);border-radius:100px;font-family:Creo;font-style:normal;font-weight:700;font-size:20px;line-height:150%;color:#0b2135;background-image:url(../../img/upgrade-to-pro/star.png);background-repeat:no-repeat;padding-left:56px;background-position:16px 10px;margin:40px 0;display:inline-block;background-size:28px}.ordpro-upgrade-faqs{max-width:670px}.ordpro-upgrade-faqs__header{background:#f0f4ff;font-family:Creo;font-style:normal;font-weight:700;font-size:20px;line-height:110%;padding:25px 30px;margin:60px 0 30px 0}.ordpro-upgrade-faqs__header h3{font-family:Creo;font-style:normal;font-weight:700;font-size:20px;line-height:110%;color:#0b2135;margin:0;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.ordpro-upgrade-faqs__header h3 img{margin-right:12px;width:24px}.ordpro-upgrade-faqs__body-faq{position:relative;padding:0 0 60px 30px}.ordpro-upgrade-faqs__body-faq::after{width:93%;content:"";background:#e5e5e5;height:1px;position:absolute;display:block;margin:0 auto;left:3.5%;bottom:30px}.ordpro-upgrade-faqs__body-faq:last-child::after{display:none}.ordpro-upgrade-faqs__body-faq-header{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;cursor:pointer}.ordpro-upgrade-faqs__body-faq-content{display:none}.ordpro-upgrade-faqs__body-faq-content p{font-family:Inter;font-style:normal;font-weight:500;font-size:14px;line-height:150%;color:#6b6e73}.ordpro-upgrade-faqs__body-faq-header-question{width:90%}.ordpro-upgrade-faqs__body-faq-header-question h4{font-family:Creo;font-style:normal;font-weight:600;font-size:18px;line-height:120%;color:#0b2135;margin:0}.ordpro-upgrade-faqs__body-faq-header-icon{width:10%;text-align:center;-webkit-transition:-webkit-transform .3s ease-in-out;transition:-webkit-transform .3s ease-in-out;transition:transform .3s ease-in-out;transition:transform .3s ease-in-out,-webkit-transform .3s ease-in-out}.ordpro-upgrade-faqs .ordpro-upgrade-faqs__body-faq--open .ordpro-upgrade-faqs__body-faq-header-icon{-webkit-transform:rotate(45deg);transform:rotate(45deg)}.ordpro-upgrade-faqs-view-all{font-family:Creo;font-style:normal;font-weight:600;font-size:16px;line-height:150%;color:#7031f5}.ordpro-upgrade-faqs-view-all svg{margin-left:10px}.ordpro-upgrade-comming-soon-badge{font-family:Creo;font-style:normal;font-weight:600;font-size:11px;line-height:13px;color:#0b2135;display:inline-block;background:#facc73;border-radius:4px;padding:4px 10px;margin-bottom:6px}@media (max-width:1400px){.ordpro-upgrade__header-delivery-img{width:400px}.ordpro-upgrade__body{margin-left:60px}.ordpro-upgrade-features__left{width:600px}.ordpro-upgrade-features{gap:50px}}@media (max-width:1250px){.ordpro-upgrade__header{height:auto;aspect-ratio:4/1}.ordpro-upgrade-features{gap:3%}.ordpro-upgrade-features__left{width:55%}.ordpro-upgrade-box{width:35%}.ordpro-upgrade__body{margin-left:30px}.ordpro-upgrade-features__left-features{gap:40px 25px}}@media (max-width:1100px){.ordpro-upgrade__header-delivery-img{width:300px}.ordpro-upgrade__header-logo{margin-top:50px}}@media (max-width:960px){.auto-fold #wpcontent{padding-left:0}.ordpro-upgrade__body{margin:0 auto;width:90%}.ordpro-upgrade-features__left{width:100%}.ordpro-upgrade-box{width:80%;margin:100px auto 50px auto;max-width:600px}}@media (max-width:780px){.ordpro-upgrade__header-delivery-img{width:200px}}@media (max-width:680px){.ordpro-upgrade__header{background-image:unset;background-color:#7031f5;aspect-ratio:unset}.ordpro-upgrade__header-logo{margin-top:0;margin-left:0;padding:30px 0;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}.ordpro-upgrade__header-delivery-img{display:none}}@media (max-width:560px){.ordpro-upgrade-features__left-features-item{width:90%}}
  • orderable/tags/1.10.0/assets/frontend/js/main.js

    r2912589 r2969309  
    431431                        'product_id': product_id,
    432432                        'variation_id': variation_id,
    433                         'attributes': attributes
     433                        'attributes': attributes,
     434                        'thisbutton': $element
    434435                    },
    435436                    function( response ) {
     
    525526                    $( document.body ).trigger( 'added_to_cart', [
    526527                        response.fragments,
    527                         response.cart_hash
     528                        response.cart_hash,
     529                        args.thisbutton
    528530                    ] );
    529531
  • orderable/tags/1.10.0/assets/frontend/js/main.min.js

    r2912589 r2969309  
    1 !function(o,n){"use strict";var s={on_ready:function(){s.cache(),s.watch()},cache:function(){s.vars={classes:{parent:"orderable-accordion",link:"orderable-accordion__item-link",content:"orderable-accordion__item-content",link_active:"orderable-accordion__item-link--active",content_active:"orderable-accordion__item-content--active"}}},watch:function(){o(n.body).on("click","."+s.vars.classes.link,function(e){e.preventDefault();var e=o(this),t=e.closest("."+s.vars.classes.parent),r=e.attr("href"),r=o(r),a=e.hasClass(s.vars.classes.link_active);t.find("."+s.vars.classes.link).removeClass(s.vars.classes.link_active),t.find("."+s.vars.classes.content).removeClass(s.vars.classes.content_active),a||(e.addClass(s.vars.classes.link_active),r.addClass(s.vars.classes.content_active)),o(n.body).trigger("orderable-accordion.toggled",{link:e,content:r})}),o(n.body).on("orderable-scrollbar.created",function(e,t){var r=o(".orderable-drawer ."+s.vars.classes.link_active);r.length<=0||(r=(t=t.content).scrollTop()-t.offset().top+r.offset().top,t.scrollTop(r))})}};o(n).ready(s.on_ready)}(jQuery,document),function(o,n){"use strict";var r={debounce:function(t,r=700){let a;return(...e)=>{clearTimeout(a),a=setTimeout(()=>{t.apply(this,e)},r)}},allow_only_numbers:function(e){var t=String.fromCharCode(e.which);/^\d+$/.test(t)||e.preventDefault()},on_change_quantity:function(e){const t=o(e.currentTarget);var e=t.data("orderable-product-id"),r=t.data("orderable-cart-item-key"),a=parseInt(t.text());jQuery.post(orderable_vars.ajax_url,{action:"orderable_cart_quantity",cart_item_key:r,product_id:e,quantity:a},function(e){e&&(o(n.body).trigger("added_to_cart",[e.fragments,e.cart_hash,t]),o(n.body).trigger("orderable-drawer.quantity-updated"))})},on_ready:function(){r.cache(),r.watch(),o(n.body).on("keypress",".orderable-quantity-roller__quantity",r.allow_only_numbers),o(".orderable-drawer__cart").on("input",".orderable-quantity-roller__quantity",r.debounce(r.on_change_quantity)),orderable_vars&&!orderable_vars.woocommerce_enable_ajax_add_to_cart&&o(n.body).off("click",".add_to_cart_button")},cache:function(){r.vars={classes:{overlay:"orderable-drawer-overlay",drawer:"orderable-drawer",drawer_cart:"orderable-drawer__cart",drawer_html:"orderable-drawer__html",overlay_open:"orderable-drawer-overlay--open",drawer_open:"orderable-drawer--open",drawer_open_body:"orderable-drawer-open"}},r.elements={body:o("body"),overlay:o("."+r.vars.classes.overlay),drawer:o("."+r.vars.classes.drawer),drawer_cart:o("."+r.vars.classes.drawer_cart),drawer_html:o("."+r.vars.classes.drawer_html),floating_cart_button_class:".orderable-floating-cart__button"}},watch:function(){var e,t;void 0!==r.elements.drawer&&(o(n.body).on("orderable-drawer.open",r.open),o(n.body).on("orderable-drawer.close",r.close),o(n.body).on("click",r.elements.floating_cart_button_class,function(){o(n.body).trigger("orderable-drawer.open",{show_cart:!0})}),o(n.body).on("orderable-increase-quantity",r.cart.handle_quantity_change_by_button),o(n.body).on("orderable-decrease-quantity",r.cart.handle_quantity_change_by_button),e=r.debounce(r.cart.click_increase_decrease_quantity),o(n.body).on("orderable-increase-quantity",e),o(n.body).on("orderable-decrease-quantity",e),e=n.querySelector("body:not( .rtl ) .orderable-drawer"),t=n.querySelector("body.rtl .orderable-drawer"),e&&e.addEventListener("swiped-right",function(e){r.close()}),t)&&t.addEventListener("swiped-left",function(e){r.close()})},open:function(e,t){t.html=t.html||!1,t.show_cart=t.show_cart||!1,r.elements.drawer_html.hide(),r.elements.drawer_cart.hide(),t.html&&(r.elements.drawer_html.html(t.html),r.elements.drawer_html.show()),t.show_cart&&(r.elements.drawer_html.html(""),r.elements.drawer_cart.show()),r.elements.overlay.addClass(r.vars.classes.overlay_open),r.elements.drawer.addClass(r.vars.classes.drawer_open),r.elements.body.addClass(r.vars.classes.drawer_open_body),o(n.body).trigger("orderable-drawer.opened",t)},close:function(){r.elements.overlay.removeClass(r.vars.classes.overlay_open),r.elements.drawer.removeClass(r.vars.classes.drawer_open),r.elements.body.removeClass(r.vars.classes.drawer_open_body),r.elements.drawer_html.html(""),o(n.body).trigger("orderable-drawer.closed")},cart:{click_increase_decrease_quantity:function(e,r){var t=r.attr("data-orderable-product-id"),a={action:"orderable_cart_quantity",cart_item_key:r.attr("data-orderable-cart-item-key"),product_id:t,quantity:r.attr("data-orderable-quantity")};this.currentRequest&&(this.currentRequest.abort(),this.currentRequest=void 0),this.currentRequest=jQuery.post(orderable_vars.ajax_url,a,function(e){var t;e&&(t=r.siblings(".orderable-quantity-roller__quantity"),a.quantity===t.attr("data-orderable-updating-quantity"))&&(o(n.body).trigger("added_to_cart",[e.fragments,e.cart_hash,r]),o(n.body).trigger("orderable-drawer.quantity-updated"))}.bind(this)).always(function(){this.currentRequest=void 0}.bind(this))},handle_quantity_change_by_button:function(e,t){var r=t.data("orderable-trigger"),a=parseInt(t.attr("data-orderable-quantity")),o=t.siblings(".orderable-quantity-roller__button--"+("increase-quantity"===r?"decrease":"increase")),n=t.siblings(".orderable-quantity-roller__quantity"),r="increase-quantity"===r?a+1:Math.max(0,a-1);t.attr("data-orderable-quantity",r),o.attr("data-orderable-quantity",r),n.attr("data-orderable-updating-quantity",r),n.text(r)}}};o(n).ready(r.on_ready)}(jQuery,document),function(i,l){"use strict";var d={on_ready:function(){d.cache(),d.watch()},cache:function(){d.vars={classes:{clickable_product:"orderable-product--add-to-cart ",add_to_order_button:"orderable-product__add-to-order",product_messages:"orderable-product__messages",product_price:"orderable-product__actions-price",invalid_field:"orderable-field--invalid",option_select_td:"orderable-product__option-select",button_loading:"orderable-button--loading",out_of_stock:"orderable-button--out-of-stock"},parent_price:null},d.elements={}},watch:function(){i(l.body).on("orderable-drawer.opened",d.init_product_options),i(l.body).on("orderable-add-to-cart",d.click_add_to_order),i(l.body).on("orderable-product-options",d.click_add_to_order),i(l.body).on("orderable-view-product",d.view_product),i(l.body).on("mouseenter mouseleave","."+d.vars.classes.clickable_product,d.simulate_add_to_order_hover),i(l.body).on("orderable-edit-cart-item",d.edit_cart_item),i(l.body).on("orderable-update-cart-item",d.update_cart_item),i(l.body).on("orderable-show-cart",d.show_cart)},simulate_add_to_order_hover:function(e){i(this).find("."+d.vars.classes.add_to_order_button).toggleClass("orderable-button--hover","mouseenter"===e.type)},click_add_to_order:function(e,t){var r=(t=void 0!==t?t:i(this)).is("button")?t:t.find("."+d.vars.classes.add_to_order_button),t=r.data("orderable-trigger"),a=r.data("orderable-product-id"),o=r.data("orderable-variation-id"),n=r.data("orderable-variation-attributes"),s={action:t};r.hasClass(d.vars.classes.button_loading)||r.hasClass(d.vars.classes.out_of_stock)||(r.addClass(d.vars.classes.button_loading),"add-to-cart"===t?d.add_to_cart({product_id:a,variation_id:o,attributes:n},function(e){s.show_cart=!0,s.response=e,i(l.body).trigger("orderable-drawer.open",s),r.removeClass(d.vars.classes.button_loading)}):"product-options"===t&&d.get_product_options({product_id:a,focus:r.data("orderable-focus")},function(e){s.html=e.html,i(l.body).trigger("orderable-drawer.open",s),r.removeClass(d.vars.classes.button_loading)}))},show_cart:function(){i(l.body).trigger("orderable-drawer.open",{show_cart:!0})},view_product:function(e,t){var r=t.data("orderable-product-id"),a={action:"product-options"};d.get_product_options({product_id:r,focus:t.data("orderable-focus")},function(e){a.html=e.html,i(l.body).trigger("orderable-drawer.open",a)})},add_to_cart:function(e,t){var r;void 0!==e.product_id&&(e={action:"orderable_add_to_cart",product_id:e.product_id,variation_id:e.variation_id||!1,attributes:e.attributes||!1},i(".orderable-product-fields-group").length&&(r=jQuery(".orderable-product-fields-group :input").serializeArray(),r=d.add_unchecked_checkbox_fields(r),r=d.convert_to_flat_object(r),jQuery.isEmptyObject(r)||(e=Object.assign(e,r))),jQuery.post(orderable_vars.ajax_url,e,function(e){e&&(i(l.body).trigger("added_to_cart",[e.fragments,e.cart_hash]),"function"==typeof t)&&t(e)}))},edit_cart_item:function(e,t){var r=t.data("orderable-cart-item-key");t.addClass(d.vars.classes.button_loading),d.get_cart_item_options({cart_item_key:r},function(e){e={html:e.html,action:"update-cart-item"};i(l.body).trigger("orderable-drawer.open",e),t.removeClass(d.vars.classes.button_loading)})},update_cart_item:function(e,r){var t=r.data("orderable-cart-item-key"),a=r.data("orderable-product-id"),o=r.data("orderable-variation-id"),n=r.data("orderable-variation-attributes");r.addClass(d.vars.classes.button_loading),d.update_cart_item_options({cart_item_key:t,product_id:a,variation_id:o,attributes:n},function(e){var t={show_cart:!0,response:e};i(l.body).trigger("added_to_cart",[e.fragments,e.cart_hash]),i(l.body).trigger("orderable-drawer.open",t),r.removeClass(d.vars.classes.button_loading)})},convert_to_flat_object:function(e){var a={};return e.forEach(function(e){var t="[]"===e.name.substr(-2)||Array.isArray(e.name),r=t?e.name.substr(0,e.name.length-2):e.name;t?(a[r]=void 0===a[r]?[]:a[r],a[r].push(e.value)):a[r]=e.value}),a},get_product_options:function(e,t){void 0!==e.product_id&&(e.action="orderable_get_product_options",jQuery.post(orderable_vars.ajax_url,e,function(e){e.success&&"function"==typeof t&&t(e.data)}))},get_cart_item_options:function(e,t){void 0!==e.cart_item_key&&(e.action="orderable_get_cart_item_options",jQuery.post(orderable_vars.ajax_url,e,function(e){e.success&&"function"==typeof t&&t(e.data)}))},update_cart_item_options:function(e,t){var r;void 0!==e.cart_item_key&&(e.action="orderable_update_cart_item_options",i(".orderable-product-fields-group").length&&(r=jQuery(".orderable-product-fields-group :input").serializeArray(),r=d.add_unchecked_checkbox_fields(r),r=d.convert_to_flat_object(r),jQuery.isEmptyObject(r)||(e=Object.assign(e,r))),jQuery.post(orderable_vars.ajax_url,e,function(e){e&&"function"==typeof t&&t(e)}))},init_product_options:function(e,t){var r,a,o;void 0===t.action||"product-options"!==t.action&&"update-cart-item"!==t.action||(r=i(t=".orderable-drawer .orderable-product__options input, .orderable-drawer .orderable-product__options select, .orderable-product__options textarea"),d.vars.parent_price=i(".orderable-drawer .orderable-product__actions-price").html(),d.product_options_change(r),d.update_button_state(),a=d.debounce(d.update_button_state,500),o=d.debounce(d.product_options_change,500),i(l).on("change keyup",t,function(){o(r),a()}))},product_options_change:function(e){var t=i(".orderable-drawer .orderable-product__add-to-order, .orderable-drawer .orderable-product__update-cart-item"),r=d.check_options(e),a=t.data("orderable-product-type");"product-options"===t.attr("data-orderable-trigger")&&t.attr("data-orderable-trigger","add-to-cart"),i("."+d.vars.classes.product_messages).html(""),"variable"===a&&(r?(a=d.check_variation(e),d.set_variation(t,a)):d.clear_variation(t))},check_options:function(e){var r;return!(e.length<=0)&&(r=!0,e.each(function(e,t){i(t).hasClass("orderable-input--validate")&&(""===i(t).val()?(i(t).addClass(d.vars.classes.invalid_field),r=!1):i(t).removeClass(d.vars.classes.invalid_field))}),r)},check_variation:function(e){var t=(t=e.closest(".orderable-drawer").find(".orderable-product__variations").text())?JSON.parse(t):"",e=d.serialize_object(e),t=d.find_matching_variations(t,e);return!d.is_empty(t)&&((t=t.shift()).attributes=e,t.attributes_json=JSON.stringify(e),void 0!==t)&&t},set_variation:function(e,t){var r=t.variation_id||"",a=t.attributes_json||"",o=t.price_html||d.vars.parent_price,n="";t&&""!==t.availability_html&&(n=t.availability_html),t&&!t.is_in_stock&&(n="<p>"+orderable_vars.i18n.out_of_stock+"</p>"),t&&!t.is_purchasable&&(n="<p>"+orderable_vars.i18n.unavailable+"</p>"),!1===t&&(n="<p>"+orderable_vars.i18n.no_exist+"</p>"),!t||t.is_purchasable&&t.is_in_stock||(a=r=""),""!==n&&i("."+d.vars.classes.product_messages).html(n),e.data("orderable-variation-id",r),e.data("orderable-variation-attributes",a),i(".orderable-drawer .orderable-product__actions-price").html(o),e.trigger("orderable_variation_set",{variation:t,variation_id:r,attributes:a,price:o})},clear_variation:function(e){d.set_variation(e,""),d.vars.parent_price&&i(".orderable-drawer .orderable-product__actions-price").html(d.vars.parent_price)},find_matching_variations:function(e,t){for(var r=[],a=0;a<e.length;a++){var o=e[a];d.is_matching_variation(o.attributes,t)&&r.push(o)}return r},is_matching_variation:function(e,t){var r,a,o,n=!0;for(r in e)e.hasOwnProperty(r)&&(a=e[r],o=t[r],void 0!==a)&&void 0!==o&&0!==a.length&&0!==o.length&&a!==o&&(n=!1);return n},is_empty:function(e){return void 0===e||!1===e||e.length<=0||!e},serialize_object:function(e){for(var t=e.serializeArray(),r={},a=0;a<t.length;a++)r[t[a].name]=t[a].value;return r},update_button_state:function(){setTimeout(function(){var e=i(".orderable-drawer .orderable-product__add-to-order, .orderable-drawer .orderable-product__update-cart-item"),t=i(".orderable-drawer__html ."+d.vars.classes.invalid_field).length,r=!0;"variable"===e.data("orderable-product-type")&&(r=""!==e.data("orderable-variation-id")),e.prop("disabled",t||!r)},50)},debounce:function(a,o,n){var s;return function(){var e=this,t=arguments,r=n&&!s;clearTimeout(s),s=setTimeout(function(){s=null,n||a.apply(e,t)},o),r&&a.apply(e,t)}},add_unchecked_checkbox_fields:function(r){return jQuery('.orderable-product-fields-group :input[type="checkbox"]:not(:checked)').each(function(e,t){r.push({name:t.getAttribute("name"),value:""})}),r}};i(l).ready(d.on_ready)}(jQuery,document),function(o,n){"use strict";var s={on_ready:function(){s.cache(),s.watch()},cache:function(){s.vars={top:{}},s.elements={}},watch:function(){o(n.body).on("orderable-drawer.opened",s.trigger),o(n.body).on("orderable-tabs.changed",s.trigger),o(n.body).on("orderable-accordion.toggled",s.trigger),o(n.body).on("wc_fragments_loaded",s.trigger)},trigger:function(){o(".orderable-sb-container").each(function(e,t){var r,t=o(t),a=t.data("orderable-scroll-id");s.has_scrollbar(t)||(t.scrollBox({containerClass:"orderable-sb-container",containerNoScrollClass:"orderable-sb-container-noscroll",contentClass:"orderable-sb-content",scrollbarContainerClass:"orderable-sb-scrollbar-container",scrollBarClass:"orderable-sb-scrollbar"}),0<(r=t.find(".orderable-sb-content")).length&&(r.on("scroll.scrollBox",s.log_top_position),void 0!==s.vars.top[a])&&r.scrollTop(s.vars.top[a]),o(n.body).trigger("orderable-scrollbar.created",{element:t,content:r}))}),o(window).trigger("resize.scrollBox")},has_scrollbar:function(e){return 0<e.find(".orderable-sb-content").length},log_top_position:function(e){var t=o(e.currentTarget).closest(".orderable-sb-container").data("orderable-scroll-id");s.vars.top[t]=o(e.currentTarget).scrollTop()}};o(n).ready(s.on_ready)}(jQuery,document),function(s,i){"use strict";var l={on_ready:function(){l.cache(),l.watch(),l.toggle_scroll()},on_resize:function(){l.toggle_scroll()},cache:function(){l.vars={classes:{tabs:"orderable-tabs",tabs_list:"orderable-tabs__list",tab_items:"orderable-tabs__item",tab_item_active:"orderable-tabs__item--active",tab_links:"orderable-tabs__link",tab_arrow_right:"orderable-tabs__arrow-right",tab_arrow_left:"orderable-tabs__arrow-left"},dragging:!1},l.elements={}},watch:function(){s("body").on("touchstart",function(){l.vars.dragging=!1}).on("touchmove",function(){l.vars.dragging=!0}),s(i.body).on("click mouseup touchend","."+l.vars.classes.tab_links,function(e){var t,r,a,o,n;l.vars.dragging||(e.preventDefault(),t=(e=s(this)).attr("href"),r=e.closest("."+l.vars.classes.tab_items),a=(n=e.closest("."+l.vars.classes.tabs)).find("."+l.vars.classes.tabs_list),o=n.find("."+l.vars.classes.tab_items),n=n.data("orderable-tabs"),n=(e=e.closest(n.wrapper)).find(n.sections),e=e.find(t),n.hide(),e.show(),o.removeClass(l.vars.classes.tab_item_active),r.addClass(l.vars.classes.tab_item_active),a.animate({scrollLeft:a.scrollLeft()+r.position().left}),s(i.body).trigger("orderable-tabs.changed",{tab:r}))}),s("."+l.vars.classes.tabs_list).on("scroll",function(e){var t=s(this),r=t.parent("."+l.vars.classes.tabs),a=t.siblings("."+l.vars.classes.tab_arrow_right),o=t.siblings("."+l.vars.classes.tab_arrow_left);t[0].scrollWidth<=r.width()+t.scrollLeft()?a.fadeOut():a.fadeIn(),t.scrollLeft()-o.width()<=0?o.fadeOut():o.fadeIn()}),s("."+l.vars.classes.tabs_list).on("wheel DOMMouseScroll mousewheel touchmove",function(){s(this).stop()}),s(i).on("click","."+l.vars.classes.tab_arrow_right,function(e){e.preventDefault();var e=s(this).parent(),t=e.find("."+l.vars.classes.tabs_list);t.animate({scrollLeft:t.scrollLeft()+.5*e.width()})}),s(i).on("click","."+l.vars.classes.tab_arrow_left,function(e){e.preventDefault();var e=s(this).parent(),t=e.find("."+l.vars.classes.tabs_list);t.animate({scrollLeft:t.scrollLeft()-.5*e.width()})})},toggle_scroll:function(){s("."+l.vars.classes.tabs).each(function(e,t){var r=s(this),a=r.data("orderable-tabs"),r=r.closest(a.wrapper),a=r.find("."+l.vars.classes.tabs_list),o=r.find("."+l.vars.classes.tab_arrow_right);r.outerWidth()<a[0].scrollWidth?o.show():o.hide()})}};s(i).ready(l.on_ready),s(window).on("resize",l.on_resize)}(jQuery,document);var orderable_timings={};!function(i,e){"use strict";orderable_timings={on_ready:function(){orderable_timings.watch()},restore:function(){var e,t=orderable_timings.get_timings();t&&t.date&&(0<(e=i(".orderable-order-timings__date")).find('option[value="'+t.date+'"]').length&&(e.val(t.date),e.change()),t.time)&&0<(e=i(".orderable-order-timings__time")).find('option[value="'+t.time+'"]').length&&(e.val(t.time),e.change())},watch:function(){i(e.body).on("wc_fragments_refreshed",function(){orderable_timings.restore()}),i(e.body).on("updated_checkout",function(){orderable_timings.restore()}),i(e.body).on("change",".orderable-order-timings__date",function(e){var t=i(this).find("option:selected").data("orderable-slots"),r=i(".orderable-order-timings--time"),a=i(".orderable-order-timings__time"),o=a.find("option").first(),n=a.find('option[value="asap"]').first(),s=orderable_timings.get_timings();s.date=i(".orderable-order-timings__date").val(),window.localStorage.setItem("orderable_timings",JSON.stringify(s)),a.html(o),n&&a.append(n),t?"all-day"===t[0].value?(r.hide(),a.prop("disabled",!0)):(a.prop("disabled",!1),r.show(),i.each(t,function(e,t){a.append(i("<option />").attr("value",t.value).text(t.formatted))})):(a.prop("disabled",!0),r.hide())}),i(e.body).on("change",".orderable-order-timings__time",function(e){var t=orderable_timings.get_timings();t.time=i(".orderable-order-timings__time").val(),window.localStorage.setItem("orderable_timings",JSON.stringify(t))})},get_timings:function(){return JSON.parse(window.localStorage.getItem("orderable_timings"))||{}}},i(e).ready(orderable_timings.on_ready)}(jQuery,document),function(r,a){"use strict";var e={on_ready:function(){e.watch()},watch:function(){r(a.body).on("click","[data-orderable-trigger]",e.trigger)},trigger:function(e){e.stopImmediatePropagation();var e=r(this),t=e.data("orderable-trigger");r(a.body).trigger("orderable-"+t,[e])}};r(a).ready(e.on_ready)}(jQuery,document),function(o,e,n){"use strict";var s="scrollBox",r={containerClass:"sb-container",containerNoScrollClass:"sb-container-noscroll",contentClass:"sb-content",scrollbarContainerClass:"sb-scrollbar-container",scrollBarClass:"sb-scrollbar"};function t(e,t){this.element=e,this.settings=o.extend({},r,t),this._defaults=r,this._name=s,this.init()}o.extend(t.prototype,{init:function(){this.addScrollbar(),this.addEvents(),this.onResize()},addScrollbar:function(){o(this.element).addClass(this.settings.containerClass),this.wrapper=o("<div class='"+this.settings.contentClass+"' />"),this.wrapper.append(o(this.element).contents()),o(this.element).append(this.wrapper),this.scollbarContainer=o("<div class='"+this.settings.scrollbarContainerClass+"' />"),this.scrollBar=o("<div class='"+this.settings.scrollBarClass+"' />"),this.scollbarContainer.append(this.scrollBar),o(this.element).prepend(this.scollbarContainer)},addEvents:function(){this.wrapper.on("scroll."+s,o.proxy(this.onScroll,this)),o(e).on("resize."+s,o.proxy(this.onResize,this)),this.scrollBar.on("mousedown."+s,o.proxy(this.onMousedown,this)),this.scrollBar.on("touchstart."+s,o.proxy(this.onTouchstart,this))},onTouchstart:function(t){var r=this,a=(t.preventDefault(),r.scrollBar[0].offsetTop);o(n).on("touchmove."+s,function(e){e=e.touches[0].pageY-t.touches[0].pageY;r.scrollBar[0].style.top=Math.min(r.scollbarContainer[0].clientHeight-r.scrollBar[0].clientHeight,Math.max(0,a+e))+"px",r.wrapper[0].scrollTop=r.wrapper[0].scrollHeight*r.scrollBar[0].offsetTop/r.scollbarContainer[0].clientHeight}),o(n).on("touchend."+s,function(){o(n).off("touchmove."+s),o(n).off("touchend."+s)})},onMousedown:function(t){var r=this,a=(t.preventDefault(),r.scrollBar[0].offsetTop);o(n).on("mousemove."+s,function(e){e=e.pageY-t.pageY;r.scrollBar[0].style.top=Math.min(r.scollbarContainer[0].clientHeight-r.scrollBar[0].clientHeight,Math.max(0,a+e))+"px",r.wrapper[0].scrollTop=r.wrapper[0].scrollHeight*r.scrollBar[0].offsetTop/r.scollbarContainer[0].clientHeight}),o(n).on("mouseup."+s,function(){o(n).off("mousemove."+s),o(n).off("mouseup."+s)})},onResize:function(){this.wrapper.css("max-height",o(this.element).height());var e=this.wrapper[0].clientHeight;this.scrollBar.css("height",this.scollbarContainer[0].clientHeight*e/this.wrapper[0].scrollHeight+"px"),this.scollbarContainer[0].clientHeight<=this.scrollBar[0].clientHeight?o(this.element).addClass(this.settings.containerNoScrollClass):o(this.element).removeClass(this.settings.containerNoScrollClass),this.onScroll()},onScroll:function(){this.scrollBar.css("top",Math.min(this.scollbarContainer[0].clientHeight-this.scrollBar[0].clientHeight,this.scollbarContainer[0].clientHeight*this.wrapper[0].scrollTop/this.wrapper[0].scrollHeight)+"px")}}),o.fn[s]=function(e){return this.each(function(){o.data(this,"plugin_"+s)||o.data(this,"plugin_"+s,new t(this,e))})}}(jQuery,window,document),function(e,o){"use strict";"function"!=typeof e.CustomEvent&&(e.CustomEvent=function(e,t){t=t||{bubbles:!1,cancelable:!1,detail:void 0};var r=o.createEvent("CustomEvent");return r.initCustomEvent(e,t.bubbles,t.cancelable,t.detail),r},e.CustomEvent.prototype=e.Event.prototype),o.addEventListener("touchstart",function(e){"true"!==e.target.getAttribute("data-swipe-ignore")&&(c=e.target,d=Date.now(),n=e.touches[0].clientX,s=e.touches[0].clientY,l=i=0)},!1),o.addEventListener("touchmove",function(e){var t;n&&s&&(t=e.touches[0].clientX,e=e.touches[0].clientY,i=n-t,l=s-e)},!1),o.addEventListener("touchend",function(e){var t,r,a,o;c===e.target&&(o=parseInt(u(c,"data-swipe-threshold","20"),10),t=parseInt(u(c,"data-swipe-timeout","500"),10),r=Date.now()-d,a="",e=e.changedTouches||e.touches||[],Math.abs(i)>Math.abs(l)?Math.abs(i)>o&&r<t&&(a=0<i?"swiped-left":"swiped-right"):Math.abs(l)>o&&r<t&&(a=0<l?"swiped-up":"swiped-down"),""!==a&&(o={dir:a.replace(/swiped-/,""),touchType:(e[0]||{}).touchType||"direct",xStart:parseInt(n,10),xEnd:parseInt((e[0]||{}).clientX||-1,10),yStart:parseInt(s,10),yEnd:parseInt((e[0]||{}).clientY||-1,10)},c.dispatchEvent(new CustomEvent("swiped",{bubbles:!0,cancelable:!0,detail:o})),c.dispatchEvent(new CustomEvent(a,{bubbles:!0,cancelable:!0,detail:o}))),d=s=n=null)},!1);var n=null,s=null,i=null,l=null,d=null,c=null;function u(e,t,r){for(;e&&e!==o.documentElement;){var a=e.getAttribute(t);if(a)return a;e=e.parentNode}return r}}(window,document);
     1!function(o,n){"use strict";var s={on_ready:function(){s.cache(),s.watch()},cache:function(){s.vars={classes:{parent:"orderable-accordion",link:"orderable-accordion__item-link",content:"orderable-accordion__item-content",link_active:"orderable-accordion__item-link--active",content_active:"orderable-accordion__item-content--active"}}},watch:function(){o(n.body).on("click","."+s.vars.classes.link,function(e){e.preventDefault();var e=o(this),t=e.closest("."+s.vars.classes.parent),r=e.attr("href"),r=o(r),a=e.hasClass(s.vars.classes.link_active);t.find("."+s.vars.classes.link).removeClass(s.vars.classes.link_active),t.find("."+s.vars.classes.content).removeClass(s.vars.classes.content_active),a||(e.addClass(s.vars.classes.link_active),r.addClass(s.vars.classes.content_active)),o(n.body).trigger("orderable-accordion.toggled",{link:e,content:r})}),o(n.body).on("orderable-scrollbar.created",function(e,t){var r=o(".orderable-drawer ."+s.vars.classes.link_active);r.length<=0||(r=(t=t.content).scrollTop()-t.offset().top+r.offset().top,t.scrollTop(r))})}};o(n).ready(s.on_ready)}(jQuery,document),function(o,n){"use strict";var r={debounce:function(t,r=700){let a;return(...e)=>{clearTimeout(a),a=setTimeout(()=>{t.apply(this,e)},r)}},allow_only_numbers:function(e){var t=String.fromCharCode(e.which);/^\d+$/.test(t)||e.preventDefault()},on_change_quantity:function(e){const t=o(e.currentTarget);var e=t.data("orderable-product-id"),r=t.data("orderable-cart-item-key"),a=parseInt(t.text());jQuery.post(orderable_vars.ajax_url,{action:"orderable_cart_quantity",cart_item_key:r,product_id:e,quantity:a},function(e){e&&(o(n.body).trigger("added_to_cart",[e.fragments,e.cart_hash,t]),o(n.body).trigger("orderable-drawer.quantity-updated"))})},on_ready:function(){r.cache(),r.watch(),o(n.body).on("keypress",".orderable-quantity-roller__quantity",r.allow_only_numbers),o(".orderable-drawer__cart").on("input",".orderable-quantity-roller__quantity",r.debounce(r.on_change_quantity)),orderable_vars&&!orderable_vars.woocommerce_enable_ajax_add_to_cart&&o(n.body).off("click",".add_to_cart_button")},cache:function(){r.vars={classes:{overlay:"orderable-drawer-overlay",drawer:"orderable-drawer",drawer_cart:"orderable-drawer__cart",drawer_html:"orderable-drawer__html",overlay_open:"orderable-drawer-overlay--open",drawer_open:"orderable-drawer--open",drawer_open_body:"orderable-drawer-open"}},r.elements={body:o("body"),overlay:o("."+r.vars.classes.overlay),drawer:o("."+r.vars.classes.drawer),drawer_cart:o("."+r.vars.classes.drawer_cart),drawer_html:o("."+r.vars.classes.drawer_html),floating_cart_button_class:".orderable-floating-cart__button"}},watch:function(){var e,t;void 0!==r.elements.drawer&&(o(n.body).on("orderable-drawer.open",r.open),o(n.body).on("orderable-drawer.close",r.close),o(n.body).on("click",r.elements.floating_cart_button_class,function(){o(n.body).trigger("orderable-drawer.open",{show_cart:!0})}),o(n.body).on("orderable-increase-quantity",r.cart.handle_quantity_change_by_button),o(n.body).on("orderable-decrease-quantity",r.cart.handle_quantity_change_by_button),e=r.debounce(r.cart.click_increase_decrease_quantity),o(n.body).on("orderable-increase-quantity",e),o(n.body).on("orderable-decrease-quantity",e),e=n.querySelector("body:not( .rtl ) .orderable-drawer"),t=n.querySelector("body.rtl .orderable-drawer"),e&&e.addEventListener("swiped-right",function(e){r.close()}),t)&&t.addEventListener("swiped-left",function(e){r.close()})},open:function(e,t){t.html=t.html||!1,t.show_cart=t.show_cart||!1,r.elements.drawer_html.hide(),r.elements.drawer_cart.hide(),t.html&&(r.elements.drawer_html.html(t.html),r.elements.drawer_html.show()),t.show_cart&&(r.elements.drawer_html.html(""),r.elements.drawer_cart.show()),r.elements.overlay.addClass(r.vars.classes.overlay_open),r.elements.drawer.addClass(r.vars.classes.drawer_open),r.elements.body.addClass(r.vars.classes.drawer_open_body),o(n.body).trigger("orderable-drawer.opened",t)},close:function(){r.elements.overlay.removeClass(r.vars.classes.overlay_open),r.elements.drawer.removeClass(r.vars.classes.drawer_open),r.elements.body.removeClass(r.vars.classes.drawer_open_body),r.elements.drawer_html.html(""),o(n.body).trigger("orderable-drawer.closed")},cart:{click_increase_decrease_quantity:function(e,r){var t=r.attr("data-orderable-product-id"),a={action:"orderable_cart_quantity",cart_item_key:r.attr("data-orderable-cart-item-key"),product_id:t,quantity:r.attr("data-orderable-quantity")};this.currentRequest&&(this.currentRequest.abort(),this.currentRequest=void 0),this.currentRequest=jQuery.post(orderable_vars.ajax_url,a,function(e){var t;e&&(t=r.siblings(".orderable-quantity-roller__quantity"),a.quantity===t.attr("data-orderable-updating-quantity"))&&(o(n.body).trigger("added_to_cart",[e.fragments,e.cart_hash,r]),o(n.body).trigger("orderable-drawer.quantity-updated"))}.bind(this)).always(function(){this.currentRequest=void 0}.bind(this))},handle_quantity_change_by_button:function(e,t){var r=t.data("orderable-trigger"),a=parseInt(t.attr("data-orderable-quantity")),o=t.siblings(".orderable-quantity-roller__button--"+("increase-quantity"===r?"decrease":"increase")),n=t.siblings(".orderable-quantity-roller__quantity"),r="increase-quantity"===r?a+1:Math.max(0,a-1);t.attr("data-orderable-quantity",r),o.attr("data-orderable-quantity",r),n.attr("data-orderable-updating-quantity",r),n.text(r)}}};o(n).ready(r.on_ready)}(jQuery,document),function(l,d){"use strict";var c={on_ready:function(){c.cache(),c.watch()},cache:function(){c.vars={classes:{clickable_product:"orderable-product--add-to-cart ",add_to_order_button:"orderable-product__add-to-order",product_messages:"orderable-product__messages",product_price:"orderable-product__actions-price",invalid_field:"orderable-field--invalid",option_select_td:"orderable-product__option-select",button_loading:"orderable-button--loading",out_of_stock:"orderable-button--out-of-stock"},parent_price:null},c.elements={}},watch:function(){l(d.body).on("orderable-drawer.opened",c.init_product_options),l(d.body).on("orderable-add-to-cart",c.click_add_to_order),l(d.body).on("orderable-product-options",c.click_add_to_order),l(d.body).on("orderable-view-product",c.view_product),l(d.body).on("mouseenter mouseleave","."+c.vars.classes.clickable_product,c.simulate_add_to_order_hover),l(d.body).on("orderable-edit-cart-item",c.edit_cart_item),l(d.body).on("orderable-update-cart-item",c.update_cart_item),l(d.body).on("orderable-show-cart",c.show_cart)},simulate_add_to_order_hover:function(e){l(this).find("."+c.vars.classes.add_to_order_button).toggleClass("orderable-button--hover","mouseenter"===e.type)},click_add_to_order:function(e,t){var r=(t=void 0!==t?t:l(this)).is("button")?t:t.find("."+c.vars.classes.add_to_order_button),a=r.data("orderable-trigger"),o=r.data("orderable-product-id"),n=r.data("orderable-variation-id"),s=r.data("orderable-variation-attributes"),i={action:a};r.hasClass(c.vars.classes.button_loading)||r.hasClass(c.vars.classes.out_of_stock)||(r.addClass(c.vars.classes.button_loading),"add-to-cart"===a?c.add_to_cart({product_id:o,variation_id:n,attributes:s,thisbutton:t},function(e){i.show_cart=!0,i.response=e,l(d.body).trigger("orderable-drawer.open",i),r.removeClass(c.vars.classes.button_loading)}):"product-options"===a&&c.get_product_options({product_id:o,focus:r.data("orderable-focus")},function(e){i.html=e.html,l(d.body).trigger("orderable-drawer.open",i),r.removeClass(c.vars.classes.button_loading)}))},show_cart:function(){l(d.body).trigger("orderable-drawer.open",{show_cart:!0})},view_product:function(e,t){var r=t.data("orderable-product-id"),a={action:"product-options"};c.get_product_options({product_id:r,focus:t.data("orderable-focus")},function(e){a.html=e.html,l(d.body).trigger("orderable-drawer.open",a)})},add_to_cart:function(t,r){var e,a;void 0!==t.product_id&&(e={action:"orderable_add_to_cart",product_id:t.product_id,variation_id:t.variation_id||!1,attributes:t.attributes||!1},l(".orderable-product-fields-group").length&&(a=jQuery(".orderable-product-fields-group :input").serializeArray(),a=c.add_unchecked_checkbox_fields(a),a=c.convert_to_flat_object(a),jQuery.isEmptyObject(a)||(e=Object.assign(e,a))),jQuery.post(orderable_vars.ajax_url,e,function(e){e&&(l(d.body).trigger("added_to_cart",[e.fragments,e.cart_hash,t.thisbutton]),"function"==typeof r)&&r(e)}))},edit_cart_item:function(e,t){var r=t.data("orderable-cart-item-key");t.addClass(c.vars.classes.button_loading),c.get_cart_item_options({cart_item_key:r},function(e){e={html:e.html,action:"update-cart-item"};l(d.body).trigger("orderable-drawer.open",e),t.removeClass(c.vars.classes.button_loading)})},update_cart_item:function(e,r){var t=r.data("orderable-cart-item-key"),a=r.data("orderable-product-id"),o=r.data("orderable-variation-id"),n=r.data("orderable-variation-attributes");r.addClass(c.vars.classes.button_loading),c.update_cart_item_options({cart_item_key:t,product_id:a,variation_id:o,attributes:n},function(e){var t={show_cart:!0,response:e};l(d.body).trigger("added_to_cart",[e.fragments,e.cart_hash]),l(d.body).trigger("orderable-drawer.open",t),r.removeClass(c.vars.classes.button_loading)})},convert_to_flat_object:function(e){var a={};return e.forEach(function(e){var t="[]"===e.name.substr(-2)||Array.isArray(e.name),r=t?e.name.substr(0,e.name.length-2):e.name;t?(a[r]=void 0===a[r]?[]:a[r],a[r].push(e.value)):a[r]=e.value}),a},get_product_options:function(e,t){void 0!==e.product_id&&(e.action="orderable_get_product_options",jQuery.post(orderable_vars.ajax_url,e,function(e){e.success&&"function"==typeof t&&t(e.data)}))},get_cart_item_options:function(e,t){void 0!==e.cart_item_key&&(e.action="orderable_get_cart_item_options",jQuery.post(orderable_vars.ajax_url,e,function(e){e.success&&"function"==typeof t&&t(e.data)}))},update_cart_item_options:function(e,t){var r;void 0!==e.cart_item_key&&(e.action="orderable_update_cart_item_options",l(".orderable-product-fields-group").length&&(r=jQuery(".orderable-product-fields-group :input").serializeArray(),r=c.add_unchecked_checkbox_fields(r),r=c.convert_to_flat_object(r),jQuery.isEmptyObject(r)||(e=Object.assign(e,r))),jQuery.post(orderable_vars.ajax_url,e,function(e){e&&"function"==typeof t&&t(e)}))},init_product_options:function(e,t){var r,a,o;void 0===t.action||"product-options"!==t.action&&"update-cart-item"!==t.action||(r=l(t=".orderable-drawer .orderable-product__options input, .orderable-drawer .orderable-product__options select, .orderable-product__options textarea"),c.vars.parent_price=l(".orderable-drawer .orderable-product__actions-price").html(),c.product_options_change(r),c.update_button_state(),a=c.debounce(c.update_button_state,500),o=c.debounce(c.product_options_change,500),l(d).on("change keyup",t,function(){o(r),a()}))},product_options_change:function(e){var t=l(".orderable-drawer .orderable-product__add-to-order, .orderable-drawer .orderable-product__update-cart-item"),r=c.check_options(e),a=t.data("orderable-product-type");"product-options"===t.attr("data-orderable-trigger")&&t.attr("data-orderable-trigger","add-to-cart"),l("."+c.vars.classes.product_messages).html(""),"variable"===a&&(r?(a=c.check_variation(e),c.set_variation(t,a)):c.clear_variation(t))},check_options:function(e){var r;return!(e.length<=0)&&(r=!0,e.each(function(e,t){l(t).hasClass("orderable-input--validate")&&(""===l(t).val()?(l(t).addClass(c.vars.classes.invalid_field),r=!1):l(t).removeClass(c.vars.classes.invalid_field))}),r)},check_variation:function(e){var t=(t=e.closest(".orderable-drawer").find(".orderable-product__variations").text())?JSON.parse(t):"",e=c.serialize_object(e),t=c.find_matching_variations(t,e);return!c.is_empty(t)&&((t=t.shift()).attributes=e,t.attributes_json=JSON.stringify(e),void 0!==t)&&t},set_variation:function(e,t){var r=t.variation_id||"",a=t.attributes_json||"",o=t.price_html||c.vars.parent_price,n="";t&&""!==t.availability_html&&(n=t.availability_html),t&&!t.is_in_stock&&(n="<p>"+orderable_vars.i18n.out_of_stock+"</p>"),t&&!t.is_purchasable&&(n="<p>"+orderable_vars.i18n.unavailable+"</p>"),!1===t&&(n="<p>"+orderable_vars.i18n.no_exist+"</p>"),!t||t.is_purchasable&&t.is_in_stock||(a=r=""),""!==n&&l("."+c.vars.classes.product_messages).html(n),e.data("orderable-variation-id",r),e.data("orderable-variation-attributes",a),l(".orderable-drawer .orderable-product__actions-price").html(o),e.trigger("orderable_variation_set",{variation:t,variation_id:r,attributes:a,price:o})},clear_variation:function(e){c.set_variation(e,""),c.vars.parent_price&&l(".orderable-drawer .orderable-product__actions-price").html(c.vars.parent_price)},find_matching_variations:function(e,t){for(var r=[],a=0;a<e.length;a++){var o=e[a];c.is_matching_variation(o.attributes,t)&&r.push(o)}return r},is_matching_variation:function(e,t){var r,a,o,n=!0;for(r in e)e.hasOwnProperty(r)&&(a=e[r],o=t[r],void 0!==a)&&void 0!==o&&0!==a.length&&0!==o.length&&a!==o&&(n=!1);return n},is_empty:function(e){return void 0===e||!1===e||e.length<=0||!e},serialize_object:function(e){for(var t=e.serializeArray(),r={},a=0;a<t.length;a++)r[t[a].name]=t[a].value;return r},update_button_state:function(){setTimeout(function(){var e=l(".orderable-drawer .orderable-product__add-to-order, .orderable-drawer .orderable-product__update-cart-item"),t=l(".orderable-drawer__html ."+c.vars.classes.invalid_field).length,r=!0;"variable"===e.data("orderable-product-type")&&(r=""!==e.data("orderable-variation-id")),e.prop("disabled",t||!r)},50)},debounce:function(a,o,n){var s;return function(){var e=this,t=arguments,r=n&&!s;clearTimeout(s),s=setTimeout(function(){s=null,n||a.apply(e,t)},o),r&&a.apply(e,t)}},add_unchecked_checkbox_fields:function(r){return jQuery('.orderable-product-fields-group :input[type="checkbox"]:not(:checked)').each(function(e,t){r.push({name:t.getAttribute("name"),value:""})}),r}};l(d).ready(c.on_ready)}(jQuery,document),function(o,n){"use strict";var s={on_ready:function(){s.cache(),s.watch()},cache:function(){s.vars={top:{}},s.elements={}},watch:function(){o(n.body).on("orderable-drawer.opened",s.trigger),o(n.body).on("orderable-tabs.changed",s.trigger),o(n.body).on("orderable-accordion.toggled",s.trigger),o(n.body).on("wc_fragments_loaded",s.trigger)},trigger:function(){o(".orderable-sb-container").each(function(e,t){var r,t=o(t),a=t.data("orderable-scroll-id");s.has_scrollbar(t)||(t.scrollBox({containerClass:"orderable-sb-container",containerNoScrollClass:"orderable-sb-container-noscroll",contentClass:"orderable-sb-content",scrollbarContainerClass:"orderable-sb-scrollbar-container",scrollBarClass:"orderable-sb-scrollbar"}),0<(r=t.find(".orderable-sb-content")).length&&(r.on("scroll.scrollBox",s.log_top_position),void 0!==s.vars.top[a])&&r.scrollTop(s.vars.top[a]),o(n.body).trigger("orderable-scrollbar.created",{element:t,content:r}))}),o(window).trigger("resize.scrollBox")},has_scrollbar:function(e){return 0<e.find(".orderable-sb-content").length},log_top_position:function(e){var t=o(e.currentTarget).closest(".orderable-sb-container").data("orderable-scroll-id");s.vars.top[t]=o(e.currentTarget).scrollTop()}};o(n).ready(s.on_ready)}(jQuery,document),function(s,i){"use strict";var l={on_ready:function(){l.cache(),l.watch(),l.toggle_scroll()},on_resize:function(){l.toggle_scroll()},cache:function(){l.vars={classes:{tabs:"orderable-tabs",tabs_list:"orderable-tabs__list",tab_items:"orderable-tabs__item",tab_item_active:"orderable-tabs__item--active",tab_links:"orderable-tabs__link",tab_arrow_right:"orderable-tabs__arrow-right",tab_arrow_left:"orderable-tabs__arrow-left"},dragging:!1},l.elements={}},watch:function(){s("body").on("touchstart",function(){l.vars.dragging=!1}).on("touchmove",function(){l.vars.dragging=!0}),s(i.body).on("click mouseup touchend","."+l.vars.classes.tab_links,function(e){var t,r,a,o,n;l.vars.dragging||(e.preventDefault(),t=(e=s(this)).attr("href"),r=e.closest("."+l.vars.classes.tab_items),a=(n=e.closest("."+l.vars.classes.tabs)).find("."+l.vars.classes.tabs_list),o=n.find("."+l.vars.classes.tab_items),n=n.data("orderable-tabs"),n=(e=e.closest(n.wrapper)).find(n.sections),e=e.find(t),n.hide(),e.show(),o.removeClass(l.vars.classes.tab_item_active),r.addClass(l.vars.classes.tab_item_active),a.animate({scrollLeft:a.scrollLeft()+r.position().left}),s(i.body).trigger("orderable-tabs.changed",{tab:r}))}),s("."+l.vars.classes.tabs_list).on("scroll",function(e){var t=s(this),r=t.parent("."+l.vars.classes.tabs),a=t.siblings("."+l.vars.classes.tab_arrow_right),o=t.siblings("."+l.vars.classes.tab_arrow_left);t[0].scrollWidth<=r.width()+t.scrollLeft()?a.fadeOut():a.fadeIn(),t.scrollLeft()-o.width()<=0?o.fadeOut():o.fadeIn()}),s("."+l.vars.classes.tabs_list).on("wheel DOMMouseScroll mousewheel touchmove",function(){s(this).stop()}),s(i).on("click","."+l.vars.classes.tab_arrow_right,function(e){e.preventDefault();var e=s(this).parent(),t=e.find("."+l.vars.classes.tabs_list);t.animate({scrollLeft:t.scrollLeft()+.5*e.width()})}),s(i).on("click","."+l.vars.classes.tab_arrow_left,function(e){e.preventDefault();var e=s(this).parent(),t=e.find("."+l.vars.classes.tabs_list);t.animate({scrollLeft:t.scrollLeft()-.5*e.width()})})},toggle_scroll:function(){s("."+l.vars.classes.tabs).each(function(e,t){var r=s(this),a=r.data("orderable-tabs"),r=r.closest(a.wrapper),a=r.find("."+l.vars.classes.tabs_list),o=r.find("."+l.vars.classes.tab_arrow_right);r.outerWidth()<a[0].scrollWidth?o.show():o.hide()})}};s(i).ready(l.on_ready),s(window).on("resize",l.on_resize)}(jQuery,document);var orderable_timings={};!function(i,e){"use strict";orderable_timings={on_ready:function(){orderable_timings.watch()},restore:function(){var e,t=orderable_timings.get_timings();t&&t.date&&(0<(e=i(".orderable-order-timings__date")).find('option[value="'+t.date+'"]').length&&(e.val(t.date),e.change()),t.time)&&0<(e=i(".orderable-order-timings__time")).find('option[value="'+t.time+'"]').length&&(e.val(t.time),e.change())},watch:function(){i(e.body).on("wc_fragments_refreshed",function(){orderable_timings.restore()}),i(e.body).on("updated_checkout",function(){orderable_timings.restore()}),i(e.body).on("change",".orderable-order-timings__date",function(e){var t=i(this).find("option:selected").data("orderable-slots"),r=i(".orderable-order-timings--time"),a=i(".orderable-order-timings__time"),o=a.find("option").first(),n=a.find('option[value="asap"]').first(),s=orderable_timings.get_timings();s.date=i(".orderable-order-timings__date").val(),window.localStorage.setItem("orderable_timings",JSON.stringify(s)),a.html(o),n&&a.append(n),t?"all-day"===t[0].value?(r.hide(),a.prop("disabled",!0)):(a.prop("disabled",!1),r.show(),i.each(t,function(e,t){a.append(i("<option />").attr("value",t.value).text(t.formatted))})):(a.prop("disabled",!0),r.hide())}),i(e.body).on("change",".orderable-order-timings__time",function(e){var t=orderable_timings.get_timings();t.time=i(".orderable-order-timings__time").val(),window.localStorage.setItem("orderable_timings",JSON.stringify(t))})},get_timings:function(){return JSON.parse(window.localStorage.getItem("orderable_timings"))||{}}},i(e).ready(orderable_timings.on_ready)}(jQuery,document),function(r,a){"use strict";var e={on_ready:function(){e.watch()},watch:function(){r(a.body).on("click","[data-orderable-trigger]",e.trigger)},trigger:function(e){e.stopImmediatePropagation();var e=r(this),t=e.data("orderable-trigger");r(a.body).trigger("orderable-"+t,[e])}};r(a).ready(e.on_ready)}(jQuery,document),function(o,e,n){"use strict";var s="scrollBox",r={containerClass:"sb-container",containerNoScrollClass:"sb-container-noscroll",contentClass:"sb-content",scrollbarContainerClass:"sb-scrollbar-container",scrollBarClass:"sb-scrollbar"};function t(e,t){this.element=e,this.settings=o.extend({},r,t),this._defaults=r,this._name=s,this.init()}o.extend(t.prototype,{init:function(){this.addScrollbar(),this.addEvents(),this.onResize()},addScrollbar:function(){o(this.element).addClass(this.settings.containerClass),this.wrapper=o("<div class='"+this.settings.contentClass+"' />"),this.wrapper.append(o(this.element).contents()),o(this.element).append(this.wrapper),this.scollbarContainer=o("<div class='"+this.settings.scrollbarContainerClass+"' />"),this.scrollBar=o("<div class='"+this.settings.scrollBarClass+"' />"),this.scollbarContainer.append(this.scrollBar),o(this.element).prepend(this.scollbarContainer)},addEvents:function(){this.wrapper.on("scroll."+s,o.proxy(this.onScroll,this)),o(e).on("resize."+s,o.proxy(this.onResize,this)),this.scrollBar.on("mousedown."+s,o.proxy(this.onMousedown,this)),this.scrollBar.on("touchstart."+s,o.proxy(this.onTouchstart,this))},onTouchstart:function(t){var r=this,a=(t.preventDefault(),r.scrollBar[0].offsetTop);o(n).on("touchmove."+s,function(e){e=e.touches[0].pageY-t.touches[0].pageY;r.scrollBar[0].style.top=Math.min(r.scollbarContainer[0].clientHeight-r.scrollBar[0].clientHeight,Math.max(0,a+e))+"px",r.wrapper[0].scrollTop=r.wrapper[0].scrollHeight*r.scrollBar[0].offsetTop/r.scollbarContainer[0].clientHeight}),o(n).on("touchend."+s,function(){o(n).off("touchmove."+s),o(n).off("touchend."+s)})},onMousedown:function(t){var r=this,a=(t.preventDefault(),r.scrollBar[0].offsetTop);o(n).on("mousemove."+s,function(e){e=e.pageY-t.pageY;r.scrollBar[0].style.top=Math.min(r.scollbarContainer[0].clientHeight-r.scrollBar[0].clientHeight,Math.max(0,a+e))+"px",r.wrapper[0].scrollTop=r.wrapper[0].scrollHeight*r.scrollBar[0].offsetTop/r.scollbarContainer[0].clientHeight}),o(n).on("mouseup."+s,function(){o(n).off("mousemove."+s),o(n).off("mouseup."+s)})},onResize:function(){this.wrapper.css("max-height",o(this.element).height());var e=this.wrapper[0].clientHeight;this.scrollBar.css("height",this.scollbarContainer[0].clientHeight*e/this.wrapper[0].scrollHeight+"px"),this.scollbarContainer[0].clientHeight<=this.scrollBar[0].clientHeight?o(this.element).addClass(this.settings.containerNoScrollClass):o(this.element).removeClass(this.settings.containerNoScrollClass),this.onScroll()},onScroll:function(){this.scrollBar.css("top",Math.min(this.scollbarContainer[0].clientHeight-this.scrollBar[0].clientHeight,this.scollbarContainer[0].clientHeight*this.wrapper[0].scrollTop/this.wrapper[0].scrollHeight)+"px")}}),o.fn[s]=function(e){return this.each(function(){o.data(this,"plugin_"+s)||o.data(this,"plugin_"+s,new t(this,e))})}}(jQuery,window,document),function(e,o){"use strict";"function"!=typeof e.CustomEvent&&(e.CustomEvent=function(e,t){t=t||{bubbles:!1,cancelable:!1,detail:void 0};var r=o.createEvent("CustomEvent");return r.initCustomEvent(e,t.bubbles,t.cancelable,t.detail),r},e.CustomEvent.prototype=e.Event.prototype),o.addEventListener("touchstart",function(e){"true"!==e.target.getAttribute("data-swipe-ignore")&&(c=e.target,d=Date.now(),n=e.touches[0].clientX,s=e.touches[0].clientY,l=i=0)},!1),o.addEventListener("touchmove",function(e){var t;n&&s&&(t=e.touches[0].clientX,e=e.touches[0].clientY,i=n-t,l=s-e)},!1),o.addEventListener("touchend",function(e){var t,r,a,o;c===e.target&&(o=parseInt(u(c,"data-swipe-threshold","20"),10),t=parseInt(u(c,"data-swipe-timeout","500"),10),r=Date.now()-d,a="",e=e.changedTouches||e.touches||[],Math.abs(i)>Math.abs(l)?Math.abs(i)>o&&r<t&&(a=0<i?"swiped-left":"swiped-right"):Math.abs(l)>o&&r<t&&(a=0<l?"swiped-up":"swiped-down"),""!==a&&(o={dir:a.replace(/swiped-/,""),touchType:(e[0]||{}).touchType||"direct",xStart:parseInt(n,10),xEnd:parseInt((e[0]||{}).clientX||-1,10),yStart:parseInt(s,10),yEnd:parseInt((e[0]||{}).clientY||-1,10)},c.dispatchEvent(new CustomEvent("swiped",{bubbles:!0,cancelable:!0,detail:o})),c.dispatchEvent(new CustomEvent(a,{bubbles:!0,cancelable:!0,detail:o}))),d=s=n=null)},!1);var n=null,s=null,i=null,l=null,d=null,c=null;function u(e,t,r){for(;e&&e!==o.documentElement;){var a=e.getAttribute(t);if(a)return a;e=e.parentNode}return r}}(window,document);
  • orderable/tags/1.10.0/docs/actions.json

    r2943243 r2969309  
    387387        },
    388388        {
    389             "name": "orderable_init",
    390             "file": "orderable.php",
    391             "type": "action",
    392             "doc": {
    393                 "description": "Plugin Name: Orderable - Local Ordering System Author URI: https://orderable.com Description: Take local online ordering to a whole new level with Orderable.",
    394                 "long_description": "Version: 1.8.4 Author: Orderable Text Domain: orderable WC requires at least: 5.4.0 WC tested up to: 7.9",
    395                 "tags": [],
    396                 "long_description_html": "<p>Version: 1.8.4 Author: Orderable Text Domain: orderable WC requires at least: 5.4.0 WC tested up to: 7.9</p>"
    397             },
    398             "args": 0
    399         },
    400         {
    401389            "name": "orderable_location_save_data",
    402390            "file": "inc/modules/location/admin/class-location-admin.php",
  • orderable/tags/1.10.0/docs/filters.json

    r2913809 r2969309  
    33    "hooks": [
    44        {
    5             "name": "active_plugins",
    6             "file": "orderable.php",
    7             "type": "filter",
    8             "doc": {
    9                 "description": "",
    10                 "long_description": "",
    11                 "tags": [],
    12                 "long_description_html": ""
    13             },
    14             "args": 1
    15         },
    16         {
    175            "name": "orderable_add_to_cart_button_args",
    186            "file": "inc/class-products.php",
     
    595583            "doc": {
    596584                "description": "",
    597                 "long_description": "",
    598                 "tags": [],
    599                 "long_description_html": ""
    600             },
    601             "args": 1
    602         },
    603         {
    604             "name": "orderable_live_view_new_order_audio_file_url",
    605             "file": "inc/modules/live-view/class-live-view.php",
    606             "type": "filter",
    607             "doc": {
    608                 "description": "Allows to override the notification audio file.",
    609585                "long_description": "",
    610586                "tags": [],
  • orderable/tags/1.10.0/inc/class-assets.php

    r2912589 r2969309  
    9191
    9292        $suffix      = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? '' : '.min';
    93         $style_deps  = apply_filters( 'orderable_admin_style_deps', array() );
     93        $style_deps  = apply_filters( 'orderable_admin_style_deps', array( 'wc-admin-layout' ) );
    9494        $script_deps = apply_filters( 'orderable_admin_script_deps', array( 'jquery' ) );
    9595
  • orderable/tags/1.10.0/inc/class-orders.php

    r2943243 r2969309  
    2424        }
    2525
     26        require_once WC_ABSPATH . 'includes/admin/wc-admin-functions.php';
     27
    2628        $current_screen            = get_current_screen();
    2729        $shop_order_page_screen_id = OrderUtil::custom_orders_table_usage_is_enabled() ? wc_get_page_screen_id( 'shop-order' ) : 'edit-shop_order';
  • orderable/tags/1.10.0/inc/class-products.php

    r2745279 r2969309  
    5656        $categories = self::order_categories_by_menu_order( $categories );
    5757
     58        $orderby = ! defined( 'ORDERABLE_PRO_VERSION' ) || empty( $_GET['order_by'] ) ? '' : sanitize_text_field( wp_unslash( $_GET['order_by'] ) ); // phpcs:ignore WordPress.Security.NonceVerification
     59
     60        if ( empty( $orderby ) ) {
     61            $orderby = ! defined( 'ORDERABLE_PRO_VERSION' ) || empty( $args['sort'] ) ? 'menu_order' : $args['sort'];
     62        }
     63
    5864        $products = array();
     65
     66        /**
     67         * Filter description.
     68         *
     69         * @since 1.0.0
     70         * @hook orderable_flatten_products_by_category_level
     71         * @param string $flatten_level The flatten level. Default: `all`.
     72         * @param array  $args          The layout args.
     73         * @return string New value
     74         */
     75        $flatten_level = apply_filters( 'orderable_flatten_products_by_category_level', 'all', $args );
     76
     77        if ( 'all' === $flatten_level ) {
     78            $products[] = array(
     79                'category' => array(),
     80                'products' => array(),
     81            );
     82
     83            $categories_slug = array_filter(
     84                array_map(
     85                    function( $category_id ) {
     86                        $category = get_term_by( 'id', $category_id, 'product_cat' );
     87
     88                        return empty( $category->slug ) ? false : $category->slug;
     89                    },
     90                    $categories
     91                )
     92            );
     93
     94            $products[0]['products'] = self::get_products(
     95                array(
     96                    'category' => $categories_slug,
     97                    'orderby'  => $orderby,
     98                    'limit'    => 500,
     99                )
     100            );
     101
     102            return $products;
     103        }
    59104
    60105        if ( $has_categories ) {
     
    92137                        $category_products = self::get_products(
    93138                            array(
    94                                 'limit'    => - 1,
     139                                'limit'    => 500,
    95140                                'category' => array( $child_category->slug ),
    96                                 'orderby'  => 'menu_order',
     141                                'orderby'  => $orderby,
    97142                            )
    98143                        );
    99144
    100                         if ( ! empty( $category_products ) ) {
    101                             $products[ $category_id ]['category']['children'][ $child_category->term_id ] = array(
    102                                 'category' => array(
    103                                     'name'        => $child_category->name,
    104                                     'description' => $child_category->description,
    105                                     'depth'       => 1,
    106                                     'parent'      => $category_id,
    107                                 ),
    108                                 'products' => $category_products,
    109                             );
     145                        if ( empty( $category_products ) ) {
     146                            continue;
    110147                        }
     148
     149                        if ( 'children' === $flatten_level ) {
     150                            $products_in_category                 = empty( $products[ $category_id ]['products'] ) ? array() : $products[ $category_id ]['products'];
     151                            $products[ $category_id ]['products'] = array_merge( $products_in_category, $category_products );
     152
     153                            continue;
     154                        }
     155
     156                        $products[ $category_id ]['category']['children'][ $child_category->term_id ] = array(
     157                            'category' => array(
     158                                'name'        => $child_category->name,
     159                                'description' => $child_category->description,
     160                                'depth'       => 1,
     161                                'parent'      => $category_id,
     162                            ),
     163                            'products' => $category_products,
     164                        );
    111165                    }
    112166                } else {
    113167                    $category_products = self::get_products(
    114168                        array(
    115                             'limit'    => - 1,
     169                            'limit'    => 500,
    116170                            'category' => array( $category->slug ),
    117                             'orderby'  => 'menu_order',
     171                            'orderby'  => $orderby,
    118172                        )
    119173                    );
     
    132186            $category_products = self::get_products(
    133187                array(
    134                     'limit'   => - 1,
    135                     'orderby' => 'menu_order',
     188                    'limit'   => 500,
     189                    'orderby' => $orderby,
    136190                )
    137191            );
     
    189243        $products = wc_get_products( apply_filters( 'orderable_get_products_args', $args ) );
    190244
    191         if ( ! empty( $products ) && isset( $args['orderby'] ) ) {
    192             $order    = isset( $args['order'] ) ? $args['order'] : 'asc';
    193             $products = wc_products_array_orderby( $products, $args['orderby'], $order );
     245        if ( ! empty( $products ) ) {
     246            $orderby = empty( $args['orderby'] ) ? 'menu_order' : $args['orderby'];
     247
     248            $order   = 'price-desc' === $orderby ? 'desc' : 'asc';
     249            $orderby = 'price-desc' === $orderby ? 'price' : $orderby;
     250
     251            $products = wc_products_array_orderby( $products, $orderby, $order );
    194252        }
    195253
     
    249307
    250308        if ( 'children' === $flatten_level ) {
     309            $orderby = empty( $args['sort'] ) ? 'menu_order' : $args['sort'];
     310
     311            $order   = 'price-desc' === $orderby ? 'desc' : 'asc';
     312            $orderby = 'price-desc' === $orderby ? 'price' : $orderby;
     313
    251314            foreach ( $products as $category_id => $product_group ) {
     315                $product_group['products'] = wc_products_array_orderby( $product_group['products'], $orderby, $order );
     316
    252317                $flattened_products[ $category_id ] = $product_group;
    253 
    254                 if ( ! empty( $product_group['category']['children'] ) ) {
    255                     $flattened_products[ $category_id ]['category']['children'] = array(
    256                         array(
    257                             'category' => null,
    258                             'products' => array(),
    259                         ),
    260                     );
    261 
    262                     foreach ( $product_group['category']['children'] as $child_product_group ) {
    263                         // Add category products to list.
    264                         $flattened_products[ $category_id ]['category']['children'][0]['products'] = array_merge( $flattened_products[ $category_id ]['category']['children'][0]['products'], $child_product_group['products'] );
    265 
    266                         continue;
    267                     }
    268                 }
    269318            }
    270319        } else {
     
    329378        $args = apply_filters( 'orderable_add_to_cart_button_args', $args, $product );
    330379
    331         return sprintf( '<button class="orderable-button %s" data-orderable-trigger="%s" data-orderable-product-id="%d" data-orderable-product-type="%s" data-orderable-variation-id="%d" data-orderable-variation-attributes="">%s</button>', esc_attr( $args['classes'] ), esc_attr( $args['trigger'] ), esc_attr( $args['product_id'] ), esc_attr( $args['product_type'] ), esc_attr( $args['variation_id'] ), wp_kses_post( $args['text'] ) );
     380        return sprintf(
     381            '<button
     382                class="orderable-button %1$s"
     383                data-orderable-trigger="%2$s"
     384                data-orderable-product-id="%3$d"
     385                data-orderable-product-type="%4$s"
     386                data-orderable-variation-id="%5$d"
     387                data-orderable-variation-attributes=""
     388                data-quantity="1"
     389                data-product_id="%3$d"
     390                data-product_sku="%6$s"
     391                data-product_name="%7$s"
     392                data-price="%8$s"
     393            >
     394                %9$s
     395            </button>',
     396            esc_attr( $args['classes'] ),
     397            esc_attr( $args['trigger'] ),
     398            esc_attr( $args['product_id'] ),
     399            esc_attr( $args['product_type'] ),
     400            esc_attr( $args['variation_id'] ),
     401            esc_attr( $product->get_sku() ),
     402            esc_attr( $product->get_name() ),
     403            esc_attr( $product->get_price() ),
     404            wp_kses_post( $args['text'] )
     405        );
    332406    }
    333407
  • orderable/tags/1.10.0/inc/modules/layouts/assets/admin/css/layouts.css

    r2912589 r2969309  
    784784  padding: 2px;
    785785}
     786
     787.orderable-product-layout-ordering__select {
     788  margin-bottom: 25px;
     789}
  • orderable/tags/1.10.0/inc/modules/layouts/assets/admin/css/layouts.min.css

    r2933929 r2969309  
    1 @-webkit-keyframes spin{100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes spin{100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@-webkit-keyframes wobble-hor-bottom{0%,100%{-webkit-transform:translateX(0);transform:translateX(0);-webkit-transform-origin:50% 50%;transform-origin:50% 50%}15%{-webkit-transform:translateX(-10%) rotate(-6deg);transform:translateX(-10%) rotate(-6deg)}30%{-webkit-transform:translateX(5%) rotate(6deg);transform:translateX(5%) rotate(6deg)}45%{-webkit-transform:translateX(-5%) rotate(-3.6deg);transform:translateX(-5%) rotate(-3.6deg)}60%{-webkit-transform:translateX(2%) rotate(2.4deg);transform:translateX(2%) rotate(2.4deg)}75%{-webkit-transform:translateX(-1%) rotate(-1.2deg);transform:translateX(-1%) rotate(-1.2deg)}}@keyframes wobble-hor-bottom{0%,100%{-webkit-transform:translateX(0);transform:translateX(0);-webkit-transform-origin:50% 50%;transform-origin:50% 50%}15%{-webkit-transform:translateX(-10%) rotate(-6deg);transform:translateX(-10%) rotate(-6deg)}30%{-webkit-transform:translateX(5%) rotate(6deg);transform:translateX(5%) rotate(6deg)}45%{-webkit-transform:translateX(-5%) rotate(-3.6deg);transform:translateX(-5%) rotate(-3.6deg)}60%{-webkit-transform:translateX(2%) rotate(2.4deg);transform:translateX(2%) rotate(2.4deg)}75%{-webkit-transform:translateX(-1%) rotate(-1.2deg);transform:translateX(-1%) rotate(-1.2deg)}}.orderable-main__group{margin:0 0 36px}.orderable-main--sections-tabs .orderable-main__group{display:none}.orderable-main--sections-tabs .orderable-main__group:first-of-type{display:block}@media screen and (min-width:620px){.orderable-main--sections-side_tabs{display:-webkit-box;display:-ms-flexbox;display:flex}.orderable-main--sections-side_tabs .orderable-main__tabs{margin:0 24px 0 0!important}.orderable-main--sections-side_tabs .orderable-main__sections{-webkit-box-flex:1;-ms-flex:1;flex:1}}.orderable-products-list{margin-bottom:12px;-webkit-box-sizing:border-box;box-sizing:border-box}.orderable-products-list *{-webkit-box-sizing:border-box;box-sizing:border-box}.orderable-products-list:last-child{margin-bottom:0}@media screen and (min-width:480px){.orderable-products-list .orderable-product{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-flex:0;-ms-flex:0 0 200px;flex:0 0 200px}}@media screen and (min-width:480px){.orderable-products-list .orderable-product__hero{width:200px}}@media screen and (min-width:480px){.orderable-products-list .orderable-product__image{-o-object-fit:cover;object-fit:cover;width:100%!important;height:100%!important}}@media screen and (min-width:480px){.orderable-products-list .orderable-product__content-wrap{-webkit-box-flex:1;-ms-flex:1;flex:1;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-flow:column nowrap;flex-flow:column nowrap}}.orderable-products-list .orderable-product__actions{padding:12px 24px 18px;margin-top:auto}.orderable-products-list__item{width:100%;margin:0 0 24px}@media screen and (max-width:480px){.orderable-products-list__item{padding:0 0 24px;border-bottom:1px solid #ecf1f3}.orderable-products-list__item:last-child{border-bottom:none}}@media screen and (min-width:540px){.orderable-products-list--grid{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start;-ms-flex-wrap:wrap;flex-wrap:wrap;margin-left:-12px;margin-right:-12px}}@media screen and (min-width:768px){.orderable-products-list--grid .orderable-products-list__item{margin:0 0 24px;padding:0 12px;width:50%}}@media screen and (min-width:1120px){.orderable-products-list--grid .orderable-products-list__item{width:33.33%}}@media screen and (min-width:768px){.orderable-products-list--grid .orderable-product{padding:0 0 88px;display:block;margin:0;-webkit-box-flex:0;-ms-flex:none;flex:none}}@media screen and (min-width:768px){.orderable-products-list--grid .orderable-product__hero{width:auto}.orderable-products-list--grid .orderable-product__hero img{-o-object-fit:fill;object-fit:fill;width:100%;height:auto}}@media screen and (min-width:768px){.orderable-products-list--grid .orderable-product__content-wrap{-webkit-box-flex:0;-ms-flex:none;flex:none;display:block}}@media screen and (min-width:768px){.orderable-products-list--grid .orderable-product__actions{padding:0;margin-top:0;position:absolute;bottom:24px;left:24px;right:24px}}.orderable-product{overflow:hidden;position:relative}.orderable-product__hero{position:relative}.orderable-product__image{border-radius:0;margin:0;display:block;width:100%;height:auto!important;max-width:none!important}.orderable-product__content{padding:18px 24px 12px}.orderable-product__content :last-child{margin-bottom:0}.orderable-product__title{margin:0 0 12px!important}.orderable-product__description{margin:0}.orderable-product__tags{overflow:hidden;margin:0;padding:0;list-style:none none outside}img+.orderable-product__tags{position:absolute;bottom:0;left:0;padding:12px;z-index:20}.orderable-product__tags li{margin:6px 0 0 0}.orderable-product__options{margin:0 0 24px;padding:0;border-radius:6px}.orderable-product__options td,.orderable-product__options th{background-color:transparent!important;padding:0 0 12px;text-align:left;display:block;margin:0}.orderable-product__options th{line-height:22px}.orderable-product__options td{padding-bottom:24px}.orderable-product__options tr{padding:0;margin:0}.orderable-product__options tr:last-child td{padding-bottom:0}.orderable-product__actions{overflow:hidden;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.orderable-product__actions:last-child{margin-bottom:0}.orderable-product__actions-price{margin:0 4px 0 0}.orderable-product__actions-price .amount{white-space:nowrap;margin:0 6px 0 0;font-weight:700;color:#000;font-size:20px;line-height:24px}.orderable-product__actions-button{margin:0 0 0 auto}.orderable-product__actions-button .orderable-product__cancel-update{background-color:#f2f2f3;border-color:#f2f2f3;margin-right:10px}.orderable-product__tabs{margin:24px 0}.orderable-product__tabs-section{display:none}.orderable-product__tabs-section:first-child{display:block}.orderable-product__tabs-section :last-child{margin-bottom:0}.orderable-product--options{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;overflow:visible;height:100%}.orderable-product--options .orderable-product__hero{margin:-24px -24px 0}.orderable-product--options .orderable-product__title{text-align:left;margin:24px 0!important}.orderable-product--options .orderable-product__actions{margin-top:auto;padding-top:24px;border-top:1px solid #e6ecef;-webkit-box-flex:0;-ms-flex:0 0 auto;flex:0 0 auto}.orderable-product--add-to-cart,.orderable-product--product-options,.orderable-product--view-product{cursor:pointer}.orderable-product--image-cropped .orderable-product__hero{overflow:hidden;padding:0;text-align:center;-webkit-box-flex:0;-ms-flex:0 0 auto;flex:0 0 auto;height:72px}.orderable-product--image-cropped .orderable-product__image{-o-object-fit:cover;object-fit:cover;position:absolute;z-index:-1;width:100%;height:100%!important;left:0;top:0}.orderable-products-list__item .orderable-product{height:100%;width:100%;-webkit-box-shadow:0 .4px 1.3px rgba(0,0,0,.05),0 1.3px 4.5px rgba(0,0,0,.06),0 6px 16px rgba(0,0,0,.07);box-shadow:0 .4px 1.3px rgba(0,0,0,.05),0 1.3px 4.5px rgba(0,0,0,.06),0 6px 16px rgba(0,0,0,.07);border-radius:6px}@media screen and (max-width:480px){.orderable-products-list__item .orderable-product{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:start;-ms-flex-align:start;align-items:flex-start;-webkit-box-shadow:none;box-shadow:none;border-radius:0}}@media screen and (max-width:480px){.orderable-products-list__item .orderable-product__hero{width:100%;min-width:60px;max-width:95px;border-radius:6px;overflow:hidden}}@media screen and (max-width:480px){.orderable-products-list__item .orderable-product__content-wrap{-webkit-box-flex:1;-ms-flex:1;flex:1}}@media screen and (max-width:480px){.orderable-products-list__item .orderable-product__content{padding:0 0 0 24px}}@media screen and (max-width:480px){.orderable-products-list__item .orderable-product__actions{padding:6px 0 0 24px}}@media screen and (max-width:480px){.orderable-products-list__item .orderable-product__title{margin:0 0 6px!important}}.orderable-button{display:inline-block;border:2px solid #000;background:0 0;padding:0 24px!important;height:40px;line-height:36px;white-space:nowrap;border-radius:20px;color:#000;text-transform:none;margin:0;-webkit-transition:all 150ms ease-out;transition:all 150ms ease-out;-webkit-box-shadow:none;box-shadow:none;cursor:pointer}.orderable-button:active,.orderable-button:focus{outline:0}.orderable-button--active,.orderable-button--hover,.orderable-button:active,.orderable-button:focus,.orderable-button:hover{border-color:#000;background:#000;color:#fff;text-decoration:none;-webkit-box-shadow:none;box-shadow:none}.orderable-button--filled{background:#000!important;color:#fff}.orderable-button--filled--hover,.orderable-button--filled:hover{background:#000!important;color:#fff}.orderable-button--full{width:100%}.orderable-button--loading{position:relative;padding-right:48px!important}.orderable-button--loading:after{content:"";display:block;width:16px;height:16px;position:absolute;top:10px;right:22px;background:0 0;-webkit-box-sizing:border-box;box-sizing:border-box;border-top:2px solid #000;border-left:2px solid #000;border-right:2px solid transparent;border-bottom:2px solid transparent;border-radius:100%;-webkit-animation:spin .6s ease-out infinite;animation:spin .6s ease-out infinite}.orderable-button--filled .orderable-button--loading:after,.orderable-button--loading.orderable-button--hover:after,.orderable-button--loading:active:after,.orderable-button--loading:focus:after,.orderable-button--loading:hover:after{border-top-color:#fff;border-left-color:#fff}.orderable-button.orderable-button--out-of-stock,.orderable-button.orderable-button--out-of-stock.orderable-button--hover,.orderable-button.orderable-button--out-of-stock:active,.orderable-button.orderable-button--out-of-stock:focus,.orderable-button.orderable-button--out-of-stock:hover{cursor:not-allowed;border-color:#c7d4db;color:#a8bdc7;background:0 0!important}.orderable--button-style-square .orderable-button{border-radius:0}.orderable-button--icon{padding:10px!important;width:44px;height:44px;line-height:24px;border:none;background:0 0!important}body .orderable-button--icon:active,body .orderable-button--icon:focus,body .orderable-button--icon:hover{background:0 0!important;opacity:.6}.orderable-button--icon svg{width:24px;height:24px;border-radius:12px;overflow:hidden;-webkit-transition:opacity 250ms ease-in-out;transition:opacity 250ms ease-in-out}.orderable-button--icon.orderable-button--loading:after{display:none}.orderable-tabs{margin:0 0 24px;position:relative}.orderable-tabs__list{margin:0 1px 0 0!important;padding:0!important;list-style:none none outside;position:relative;display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:nowrap;flex-wrap:nowrap;-webkit-box-flex:1;-ms-flex:1 1 auto;flex:1 1 auto;overflow-x:auto;overflow-y:hidden;overflow:-moz-scrollbars-none;scrollbar-base-color:transparent;-webkit-overflow-scrolling:touch}.orderable-tabs__list::-webkit-scrollbar{display:none}@media screen and (min-width:620px){.orderable-main--sections-side_tabs .orderable-tabs__list{-webkit-box-flex:0;-ms-flex:0 1 auto;flex:0 1 auto;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;height:auto}}.orderable-tabs__item{display:inline-block;margin:0 10px 0 0;padding:0}.orderable-tabs__item:last-child{margin-right:0}@media screen and (min-width:620px){.orderable-main--sections-side_tabs .orderable-tabs__item{margin:0 0 12px;display:block}.orderable-main--sections-side_tabs .orderable-tabs__item:last-child{margin:0}}a.orderable-tabs__link{text-decoration:none!important;display:inline-block;padding:0 24px;white-space:nowrap;line-height:40px;color:#405763;font-weight:400;border-radius:20px;-webkit-transition:all 150ms ease-out;transition:all 150ms ease-out;background:#ecf1f3}a.orderable-tabs__link:active,a.orderable-tabs__link:focus{outline:0;-webkit-box-shadow:none;box-shadow:none}a.orderable-tabs__link:active,a.orderable-tabs__link:focus,a.orderable-tabs__link:hover{color:#405763;text-decoration:none;background:#c7d4db}.orderable-tabs__item--active a.orderable-tabs__link{background:#000;color:#fff}.orderable--button-style-square a.orderable-tabs__link{border-radius:0}.orderable-tabs__arrow{background:#fff;-webkit-box-shadow:0 .4px 1.3px rgba(0,0,0,.05),0 1.3px 4.5px rgba(0,0,0,.06),0 6px 16px rgba(0,0,0,.07);box-shadow:0 .4px 1.3px rgba(0,0,0,.05),0 1.3px 4.5px rgba(0,0,0,.06),0 6px 16px rgba(0,0,0,.07);border:none;width:40px!important;height:40px!important;padding:0!important;margin:0!important;border-radius:20px!important;position:absolute;top:0;right:0;text-align:center;line-height:40px;display:none}.orderable-tabs__arrow:active,.orderable-tabs__arrow:focus,.orderable-tabs__arrow:hover{background:#fff;outline:0}.orderable-tabs__arrow svg{width:21px;height:24px;margin:8px 0}.orderable-tabs__arrow-left{left:0;right:initial;-webkit-transform:scaleX(-1);transform:scaleX(-1)}#orderable-layout-settings-metabox{z-index:1000}#orderable-layout-preview-metabox .inside{padding:24px 24px 0;margin:0}#orderable-layout-preview-metabox .inside h2.orderable-category-heading__title,#orderable-layout-preview-metabox .inside h3{margin:0 0 24px}#orderable-layout-preview-metabox .inside h2{padding:0;font-weight:600;font-size:20px;line-height:1.2}#orderable-layout-preview-metabox .orderable-category-heading__description{margin:-12px 0 24px}#orderable-layout-preview-metabox .orderable-main{max-width:1000px;margin:0}#orderable-layout-preview-metabox .orderable-main--sections-side_tabs .orderable-main__tabs{margin:0 24px 24px 0!important}.orderable-layout-preview-notice{background:#fff;border:1px solid #c3c4c7;border-left-width:4px;-webkit-box-shadow:0 1px 1px rgba(0,0,0,.04);box-shadow:0 1px 1px rgba(0,0,0,.04);margin:0 0 25px;padding:1px 12px;border-left-color:#7031f5}.orderable-layout-preview-notice p{margin:.5em 0;padding:2px}
     1@-webkit-keyframes spin{100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes spin{100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@-webkit-keyframes wobble-hor-bottom{0%,100%{-webkit-transform:translateX(0);transform:translateX(0);-webkit-transform-origin:50% 50%;transform-origin:50% 50%}15%{-webkit-transform:translateX(-10%) rotate(-6deg);transform:translateX(-10%) rotate(-6deg)}30%{-webkit-transform:translateX(5%) rotate(6deg);transform:translateX(5%) rotate(6deg)}45%{-webkit-transform:translateX(-5%) rotate(-3.6deg);transform:translateX(-5%) rotate(-3.6deg)}60%{-webkit-transform:translateX(2%) rotate(2.4deg);transform:translateX(2%) rotate(2.4deg)}75%{-webkit-transform:translateX(-1%) rotate(-1.2deg);transform:translateX(-1%) rotate(-1.2deg)}}@keyframes wobble-hor-bottom{0%,100%{-webkit-transform:translateX(0);transform:translateX(0);-webkit-transform-origin:50% 50%;transform-origin:50% 50%}15%{-webkit-transform:translateX(-10%) rotate(-6deg);transform:translateX(-10%) rotate(-6deg)}30%{-webkit-transform:translateX(5%) rotate(6deg);transform:translateX(5%) rotate(6deg)}45%{-webkit-transform:translateX(-5%) rotate(-3.6deg);transform:translateX(-5%) rotate(-3.6deg)}60%{-webkit-transform:translateX(2%) rotate(2.4deg);transform:translateX(2%) rotate(2.4deg)}75%{-webkit-transform:translateX(-1%) rotate(-1.2deg);transform:translateX(-1%) rotate(-1.2deg)}}.orderable-main__group{margin:0 0 36px}.orderable-main--sections-tabs .orderable-main__group{display:none}.orderable-main--sections-tabs .orderable-main__group:first-of-type{display:block}@media screen and (min-width:620px){.orderable-main--sections-side_tabs{display:-webkit-box;display:-ms-flexbox;display:flex}.orderable-main--sections-side_tabs .orderable-main__tabs{margin:0 24px 0 0!important}.orderable-main--sections-side_tabs .orderable-main__sections{-webkit-box-flex:1;-ms-flex:1;flex:1}}.orderable-products-list{margin-bottom:12px;-webkit-box-sizing:border-box;box-sizing:border-box}.orderable-products-list *{-webkit-box-sizing:border-box;box-sizing:border-box}.orderable-products-list:last-child{margin-bottom:0}@media screen and (min-width:480px){.orderable-products-list .orderable-product{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-flex:0;-ms-flex:0 0 200px;flex:0 0 200px}}@media screen and (min-width:480px){.orderable-products-list .orderable-product__hero{width:200px}}@media screen and (min-width:480px){.orderable-products-list .orderable-product__image{-o-object-fit:cover;object-fit:cover;width:100%!important;height:100%!important}}@media screen and (min-width:480px){.orderable-products-list .orderable-product__content-wrap{-webkit-box-flex:1;-ms-flex:1;flex:1;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-flow:column nowrap;flex-flow:column nowrap}}.orderable-products-list .orderable-product__actions{padding:12px 24px 18px;margin-top:auto}.orderable-products-list__item{width:100%;margin:0 0 24px}@media screen and (max-width:480px){.orderable-products-list__item{padding:0 0 24px;border-bottom:1px solid #ecf1f3}.orderable-products-list__item:last-child{border-bottom:none}}@media screen and (min-width:540px){.orderable-products-list--grid{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start;-ms-flex-wrap:wrap;flex-wrap:wrap;margin-left:-12px;margin-right:-12px}}@media screen and (min-width:768px){.orderable-products-list--grid .orderable-products-list__item{margin:0 0 24px;padding:0 12px;width:50%}}@media screen and (min-width:1120px){.orderable-products-list--grid .orderable-products-list__item{width:33.33%}}@media screen and (min-width:768px){.orderable-products-list--grid .orderable-product{padding:0 0 88px;display:block;margin:0;-webkit-box-flex:0;-ms-flex:none;flex:none}}@media screen and (min-width:768px){.orderable-products-list--grid .orderable-product__hero{width:auto}.orderable-products-list--grid .orderable-product__hero img{-o-object-fit:fill;object-fit:fill;width:100%;height:auto}}@media screen and (min-width:768px){.orderable-products-list--grid .orderable-product__content-wrap{-webkit-box-flex:0;-ms-flex:none;flex:none;display:block}}@media screen and (min-width:768px){.orderable-products-list--grid .orderable-product__actions{padding:0;margin-top:0;position:absolute;bottom:24px;left:24px;right:24px}}.orderable-product{overflow:hidden;position:relative}.orderable-product__hero{position:relative}.orderable-product__image{border-radius:0;margin:0;display:block;width:100%;height:auto!important;max-width:none!important}.orderable-product__content{padding:18px 24px 12px}.orderable-product__content :last-child{margin-bottom:0}.orderable-product__title{margin:0 0 12px!important}.orderable-product__description{margin:0}.orderable-product__tags{overflow:hidden;margin:0;padding:0;list-style:none none outside}img+.orderable-product__tags{position:absolute;bottom:0;left:0;padding:12px;z-index:20}.orderable-product__tags li{margin:6px 0 0 0}.orderable-product__options{margin:0 0 24px;padding:0;border-radius:6px}.orderable-product__options td,.orderable-product__options th{background-color:transparent!important;padding:0 0 12px;text-align:left;display:block;margin:0}.orderable-product__options th{line-height:22px}.orderable-product__options td{padding-bottom:24px}.orderable-product__options tr{padding:0;margin:0}.orderable-product__options tr:last-child td{padding-bottom:0}.orderable-product__actions{overflow:hidden;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.orderable-product__actions:last-child{margin-bottom:0}.orderable-product__actions-price{margin:0 4px 0 0}.orderable-product__actions-price .amount{white-space:nowrap;margin:0 6px 0 0;font-weight:700;color:#000;font-size:20px;line-height:24px}.orderable-product__actions-button{margin:0 0 0 auto}.orderable-product__actions-button .orderable-product__cancel-update{background-color:#f2f2f3;border-color:#f2f2f3;margin-right:10px}.orderable-product__tabs{margin:24px 0}.orderable-product__tabs-section{display:none}.orderable-product__tabs-section:first-child{display:block}.orderable-product__tabs-section :last-child{margin-bottom:0}.orderable-product--options{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;overflow:visible;height:100%}.orderable-product--options .orderable-product__hero{margin:-24px -24px 0}.orderable-product--options .orderable-product__title{text-align:left;margin:24px 0!important}.orderable-product--options .orderable-product__actions{margin-top:auto;padding-top:24px;border-top:1px solid #e6ecef;-webkit-box-flex:0;-ms-flex:0 0 auto;flex:0 0 auto}.orderable-product--add-to-cart,.orderable-product--product-options,.orderable-product--view-product{cursor:pointer}.orderable-product--image-cropped .orderable-product__hero{overflow:hidden;padding:0;text-align:center;-webkit-box-flex:0;-ms-flex:0 0 auto;flex:0 0 auto;height:72px}.orderable-product--image-cropped .orderable-product__image{-o-object-fit:cover;object-fit:cover;position:absolute;z-index:-1;width:100%;height:100%!important;left:0;top:0}.orderable-products-list__item .orderable-product{height:100%;width:100%;-webkit-box-shadow:0 .4px 1.3px rgba(0,0,0,.05),0 1.3px 4.5px rgba(0,0,0,.06),0 6px 16px rgba(0,0,0,.07);box-shadow:0 .4px 1.3px rgba(0,0,0,.05),0 1.3px 4.5px rgba(0,0,0,.06),0 6px 16px rgba(0,0,0,.07);border-radius:6px}@media screen and (max-width:480px){.orderable-products-list__item .orderable-product{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:start;-ms-flex-align:start;align-items:flex-start;-webkit-box-shadow:none;box-shadow:none;border-radius:0}}@media screen and (max-width:480px){.orderable-products-list__item .orderable-product__hero{width:100%;min-width:60px;max-width:95px;border-radius:6px;overflow:hidden}}@media screen and (max-width:480px){.orderable-products-list__item .orderable-product__content-wrap{-webkit-box-flex:1;-ms-flex:1;flex:1}}@media screen and (max-width:480px){.orderable-products-list__item .orderable-product__content{padding:0 0 0 24px}}@media screen and (max-width:480px){.orderable-products-list__item .orderable-product__actions{padding:6px 0 0 24px}}@media screen and (max-width:480px){.orderable-products-list__item .orderable-product__title{margin:0 0 6px!important}}.orderable-button{display:inline-block;border:2px solid #000;background:0 0;padding:0 24px!important;height:40px;line-height:36px;white-space:nowrap;border-radius:20px;color:#000;text-transform:none;margin:0;-webkit-transition:all 150ms ease-out;transition:all 150ms ease-out;-webkit-box-shadow:none;box-shadow:none;cursor:pointer}.orderable-button:active,.orderable-button:focus{outline:0}.orderable-button--active,.orderable-button--hover,.orderable-button:active,.orderable-button:focus,.orderable-button:hover{border-color:#000;background:#000;color:#fff;text-decoration:none;-webkit-box-shadow:none;box-shadow:none}.orderable-button--filled{background:#000!important;color:#fff}.orderable-button--filled--hover,.orderable-button--filled:hover{background:#000!important;color:#fff}.orderable-button--full{width:100%}.orderable-button--loading{position:relative;padding-right:48px!important}.orderable-button--loading:after{content:"";display:block;width:16px;height:16px;position:absolute;top:10px;right:22px;background:0 0;-webkit-box-sizing:border-box;box-sizing:border-box;border-top:2px solid #000;border-left:2px solid #000;border-right:2px solid transparent;border-bottom:2px solid transparent;border-radius:100%;-webkit-animation:spin .6s ease-out infinite;animation:spin .6s ease-out infinite}.orderable-button--filled .orderable-button--loading:after,.orderable-button--loading.orderable-button--hover:after,.orderable-button--loading:active:after,.orderable-button--loading:focus:after,.orderable-button--loading:hover:after{border-top-color:#fff;border-left-color:#fff}.orderable-button.orderable-button--out-of-stock,.orderable-button.orderable-button--out-of-stock.orderable-button--hover,.orderable-button.orderable-button--out-of-stock:active,.orderable-button.orderable-button--out-of-stock:focus,.orderable-button.orderable-button--out-of-stock:hover{cursor:not-allowed;border-color:#c7d4db;color:#a8bdc7;background:0 0!important}.orderable--button-style-square .orderable-button{border-radius:0}.orderable-button--icon{padding:10px!important;width:44px;height:44px;line-height:24px;border:none;background:0 0!important}body .orderable-button--icon:active,body .orderable-button--icon:focus,body .orderable-button--icon:hover{background:0 0!important;opacity:.6}.orderable-button--icon svg{width:24px;height:24px;border-radius:12px;overflow:hidden;-webkit-transition:opacity 250ms ease-in-out;transition:opacity 250ms ease-in-out}.orderable-button--icon.orderable-button--loading:after{display:none}.orderable-tabs{margin:0 0 24px;position:relative}.orderable-tabs__list{margin:0 1px 0 0!important;padding:0!important;list-style:none none outside;position:relative;display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:nowrap;flex-wrap:nowrap;-webkit-box-flex:1;-ms-flex:1 1 auto;flex:1 1 auto;overflow-x:auto;overflow-y:hidden;overflow:-moz-scrollbars-none;scrollbar-base-color:transparent;-webkit-overflow-scrolling:touch}.orderable-tabs__list::-webkit-scrollbar{display:none}@media screen and (min-width:620px){.orderable-main--sections-side_tabs .orderable-tabs__list{-webkit-box-flex:0;-ms-flex:0 1 auto;flex:0 1 auto;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;height:auto}}.orderable-tabs__item{display:inline-block;margin:0 10px 0 0;padding:0}.orderable-tabs__item:last-child{margin-right:0}@media screen and (min-width:620px){.orderable-main--sections-side_tabs .orderable-tabs__item{margin:0 0 12px;display:block}.orderable-main--sections-side_tabs .orderable-tabs__item:last-child{margin:0}}a.orderable-tabs__link{text-decoration:none!important;display:inline-block;padding:0 24px;white-space:nowrap;line-height:40px;color:#405763;font-weight:400;border-radius:20px;-webkit-transition:all 150ms ease-out;transition:all 150ms ease-out;background:#ecf1f3}a.orderable-tabs__link:active,a.orderable-tabs__link:focus{outline:0;-webkit-box-shadow:none;box-shadow:none}a.orderable-tabs__link:active,a.orderable-tabs__link:focus,a.orderable-tabs__link:hover{color:#405763;text-decoration:none;background:#c7d4db}.orderable-tabs__item--active a.orderable-tabs__link{background:#000;color:#fff}.orderable--button-style-square a.orderable-tabs__link{border-radius:0}.orderable-tabs__arrow{background:#fff;-webkit-box-shadow:0 .4px 1.3px rgba(0,0,0,.05),0 1.3px 4.5px rgba(0,0,0,.06),0 6px 16px rgba(0,0,0,.07);box-shadow:0 .4px 1.3px rgba(0,0,0,.05),0 1.3px 4.5px rgba(0,0,0,.06),0 6px 16px rgba(0,0,0,.07);border:none;width:40px!important;height:40px!important;padding:0!important;margin:0!important;border-radius:20px!important;position:absolute;top:0;right:0;text-align:center;line-height:40px;display:none}.orderable-tabs__arrow:active,.orderable-tabs__arrow:focus,.orderable-tabs__arrow:hover{background:#fff;outline:0}.orderable-tabs__arrow svg{width:21px;height:24px;margin:8px 0}.orderable-tabs__arrow-left{left:0;right:initial;-webkit-transform:scaleX(-1);transform:scaleX(-1)}#orderable-layout-settings-metabox{z-index:1000}#orderable-layout-preview-metabox .inside{padding:24px 24px 0;margin:0}#orderable-layout-preview-metabox .inside h2.orderable-category-heading__title,#orderable-layout-preview-metabox .inside h3{margin:0 0 24px}#orderable-layout-preview-metabox .inside h2{padding:0;font-weight:600;font-size:20px;line-height:1.2}#orderable-layout-preview-metabox .orderable-category-heading__description{margin:-12px 0 24px}#orderable-layout-preview-metabox .orderable-main{max-width:1000px;margin:0}#orderable-layout-preview-metabox .orderable-main--sections-side_tabs .orderable-main__tabs{margin:0 24px 24px 0!important}.orderable-layout-preview-notice{background:#fff;border:1px solid #c3c4c7;border-left-width:4px;-webkit-box-shadow:0 1px 1px rgba(0,0,0,.04);box-shadow:0 1px 1px rgba(0,0,0,.04);margin:0 0 25px;padding:1px 12px;border-left-color:#7031f5}.orderable-layout-preview-notice p{margin:.5em 0;padding:2px}.orderable-product-layout-ordering__select{margin-bottom:25px}
  • orderable/tags/1.10.0/inc/modules/layouts/class-layouts.php

    r2912589 r2969309  
    193193            'orderable_layout_settings_save_data',
    194194            array(
    195                 'categories' => (array) filter_input( INPUT_POST, 'orderable_categories', FILTER_DEFAULT, FILTER_REQUIRE_ARRAY ),
    196                 'layout'     => empty( $_POST['orderable_layout'] ) ? '' : sanitize_text_field( wp_unslash( $_POST['orderable_layout'] ) ), // phpcs:ignore WordPress.Security.NonceVerification
    197                 'images'     => empty( $_POST['orderable_images'] ) ? false : 'yes' === sanitize_text_field( wp_unslash( $_POST['orderable_images'] ) ), // phpcs:ignore WordPress.Security.NonceVerification
    198                 'card_click' => empty( $_POST['orderable_card_click'] ) ? '' : sanitize_text_field( wp_unslash( $_POST['orderable_card_click'] ) ), // phpcs:ignore WordPress.Security.NonceVerification
     195                'categories'       => (array) filter_input( INPUT_POST, 'orderable_categories', FILTER_DEFAULT, FILTER_REQUIRE_ARRAY ),
     196                'layout'           => empty( $_POST['orderable_layout'] ) ? '' : sanitize_text_field( wp_unslash( $_POST['orderable_layout'] ) ), // phpcs:ignore WordPress.Security.NonceVerification
     197                'sort'             => empty( $_POST['orderable_sort'] ) ? '' : sanitize_text_field( wp_unslash( $_POST['orderable_sort'] ) ), // phpcs:ignore WordPress.Security.NonceVerification
     198                'sort_on_frontend' => empty( $_POST['orderable_sort_on_frontend'] ) ? false : 'yes' === sanitize_text_field( wp_unslash( $_POST['orderable_sort_on_frontend'] ) ), // phpcs:ignore WordPress.Security.NonceVerification
     199                'images'           => empty( $_POST['orderable_images'] ) ? false : 'yes' === sanitize_text_field( wp_unslash( $_POST['orderable_images'] ) ), // phpcs:ignore WordPress.Security.NonceVerification
     200                'card_click'       => empty( $_POST['orderable_card_click'] ) ? '' : sanitize_text_field( wp_unslash( $_POST['orderable_card_click'] ) ), // phpcs:ignore WordPress.Security.NonceVerification
    199201            )
    200202        );
     
    219221     * Get max orders field.
    220222     *
    221      * @param string $name
    222      * @param array  $layout_settings
    223      *
    224      * @return mixed|void
    225      */
    226     public static function get_layout_sections_field( $layout_settings ) {
     223     * @param string $field_name      The field name. Example: `sort`.
     224     * @param array  $layout_settings The layout settings.
     225     *
     226     * @return string
     227     */
     228    public static function get_layout_field( $field_name, $layout_settings ) {
     229        if ( empty( $field_name ) ) {
     230            return '';
     231        }
     232
     233        $allowed_html = array(
     234            'a' => array(
     235                'class'  => array(),
     236                'href'   => array(),
     237                'target' => array(),
     238            ),
     239        );
     240
    227241        ob_start();
    228242        ?>
    229         <?php echo Orderable_Helpers::get_pro_button( 'max-orders' ); ?>
     243        <?php echo wp_kses( Orderable_Helpers::get_pro_button( $field_name ), $allowed_html ); ?>
    230244        <?php
    231245
    232         return apply_filters( 'orderable_layout_sections_field', ob_get_clean(), $layout_settings );
     246        /**
     247         * Filter the layout field.
     248         *
     249         * The dynamic portion of the hook name, `$field_name`, refers to
     250         * the field name e.g. `sort`, `max-orders`, etc.
     251         *
     252         * @since 1.10.0
     253         * @hook filter_hook
     254         * @param  string $html            The html markup.
     255         * @param  array  $layout_settings The layout settings.
     256         * @return string New value
     257         */
     258        $html = apply_filters( "orderable_layout_{$field_name}_field", ob_get_clean(), $layout_settings );
     259
     260        echo wp_kses_post( $html );
    233261    }
    234262
     
    282310        $defaults = self::get_layout_defaults();
    283311
    284         $args           = wp_parse_args( $args, $defaults );
    285         $args['images'] = (boolean) json_decode( strtolower( $args['images'] ) );
     312        $args                     = wp_parse_args( $args, $defaults );
     313        $args['sort_on_frontend'] = (bool) json_decode( strtolower( $args['sort_on_frontend'] ) );
     314        $args['images']           = (bool) json_decode( strtolower( $args['images'] ) );
    286315
    287316        if ( ! is_null( $args['id'] ) ) {
     
    419448            'orderable_layout_defaults',
    420449            array(
    421                 'id'         => $layout_id,
    422                 'categories' => array(),
    423                 'layout'     => 'grid',
    424                 'images'     => true,
    425                 'card_click' => '',
     450                'id'               => $layout_id,
     451                'categories'       => array(),
     452                'layout'           => 'grid',
     453                'sort'             => 'menu_order',
     454                'sort_on_frontend' => false,
     455                'images'           => true,
     456                'card_click'       => '',
    426457            ),
    427458            $layout_id
  • orderable/tags/1.10.0/inc/modules/layouts/source/admin/scss/layouts.scss

    r2933929 r2969309  
    88@import "source/frontend/scss/modules/tabs";
    99@import "layout-builder";
     10@import "orderable-product-layout-ordering"
  • orderable/tags/1.10.0/inc/modules/layouts/templates/admin/layout-settings-metabox.php

    r2819211 r2969309  
    5757            <div class="orderable-fields-row__body-row-left">
    5858                <h3>
     59                    <label for="orderable_sort"><?php esc_html_e( 'Sort', 'orderable' ); ?></label>
     60                </h3>
     61                <p><?php esc_html_e( 'How should the products be sorted?', 'orderable' ); ?></p>
     62            </div>
     63            <div class="orderable-fields-row__body-row-right">
     64                <?php Orderable_Layouts::get_layout_field( 'sort', $layout_settings ); ?>
     65            </div>
     66        </div>
     67
     68        <div class="orderable-fields-row__body-row">
     69            <div class="orderable-fields-row__body-row-left">
     70                <h3>
     71                    <label for="orderable_sort_on_frontend"><?php esc_html_e( 'Allow sorting on the frontend', 'orderable' ); ?></label>
     72                </h3>
     73                <p><?php esc_html_e( 'Choose if customers can change how the products are sorted.', 'orderable' ); ?></p>
     74            </div>
     75            <div class="orderable-fields-row__body-row-right">
     76                <?php Orderable_Layouts::get_layout_field( 'sort_on_frontend', $layout_settings ); ?>
     77            </div>
     78        </div>
     79
     80        <div class="orderable-fields-row__body-row">
     81            <div class="orderable-fields-row__body-row-left">
     82                <h3>
    5983                    <label for="layout"><?php _e( 'Sections', 'orderable' ); ?></label>
    6084                </h3>
    61                 <p><?php _e( 'Separate each category by titles or tabs.', 'orderable' ); ?></p>
     85                <p><?php esc_html_e( 'Separate each category by titles or tabs.', 'orderable' ); ?></p>
    6286            </div>
    6387            <div class="orderable-fields-row__body-row-right">
    64                 <?php echo Orderable_Layouts::get_layout_sections_field( $layout_settings ); ?>
     88                <?php Orderable_Layouts::get_layout_field( 'sections', $layout_settings ); ?>
    6589            </div>
    6690        </div>
  • orderable/tags/1.10.0/inc/modules/location/admin/meta-boxes/class-location-store-address-meta-box.php

    r2912589 r2969309  
    140140                            name="orderable_country_state"
    141141                            class="wc-enhanced-select orderable-field"
     142                            style="width: 426px;"
    142143                        >
    143144                            <?php WC()->countries->country_dropdown_options( $country, $state ); ?>
  • orderable/tags/1.10.0/inc/modules/location/class-location-single.php

    r2933929 r2969309  
    886886                        $counted_lead_days ++;
    887887                        $counted_preorder_days ++;
    888 
    889                         // We aren't ready to start serving up dates yet as we
    890                         // haven't counted the number of lead days required.
    891                         if ( $lead_days >= $counted_lead_days ) {
    892                             continue;
    893                         }
     888                    }
     889
     890                    // We aren't ready to start serving up dates yet as we
     891                    // haven't counted the number of lead days required.
     892                    if ( $lead_days >= $counted_lead_days ) {
     893                        continue;
    894894                    }
    895895                }
  • orderable/tags/1.10.0/inc/modules/timings/class-timings.php

    r2912589 r2969309  
    2727    public static function load_classes() {
    2828        $classes = array(
     29            'timings-blocks'   => 'Orderable_Timings_Blocks',
    2930            'timings-settings' => 'Orderable_Timings_Settings',
    3031            'timings-checkout' => 'Orderable_Timings_Checkout',
     
    197198        $args['services']            = (bool) json_decode( strtolower( $args['services'] ) );
    198199        $args['date']                = (bool) json_decode( strtolower( $args['date'] ) );
    199         $args['location']            = empty( $args['location'] ) ? Orderable_Location::get_selected_location() : new Orderable_Location_Single( $args['location_id'] );
     200        $args['location']            = empty( $args['location_id'] ) || ! Orderable_Location::store_has_multi_locations() ? Orderable_Location::get_selected_location() : new Orderable_Location_Single( $args['location_id'] );
    200201        $args['upcoming_open_hours'] = $args['location']->get_upcoming_open_hours();
    201202
  • orderable/tags/1.10.0/inc/vendor/wp-settings-framework/assets/js/main.js

    r2933929 r2969309  
    253253
    254254                wpsf.trigger_dynamic_fields();
     255               
     256                $row.trigger('wpsfGroupRowAdded', [$row]);
    255257
    256258                return false;
     
    325327                }
    326328
    327                 $( this ).find( "input" ).each( function() {
     329                $( this ).find( 'input, select' ).each( function() {
    328330                    var this_input = this,
    329331                        name = jQuery( this ).attr( 'name' );
     
    689691    $( document ).ready( wpsf.on_ready );
    690692
     693    // Expose WPSF methods for use elsewhere.
     694    window.wpsf = wpsf;
     695
    691696}( jQuery, document ));
  • orderable/tags/1.10.0/inc/vendor/wp-settings-framework/wp-settings-framework.php

    r2933929 r2969309  
    7979            'subfields'    => array(),
    8080            'autocomplete' => '',
     81            'attributes'   => array(),
     82            'custom_args'  => array(),
    8183        );
    8284
     
    188190         */
    189191        public function add_settings_page( $args ) {
     192            if ( ! $this->settings_page ) {
     193                return;
     194            }
     195           
    190196            $defaults = array(
    191197                'parent_slug' => false,
     
    370376            wp_enqueue_style( 'jquery-ui-css' );
    371377            wp_enqueue_style( 'wpsf' );
     378
     379            // Dequeue global style inlined by WordPress since WP 5.9.
     380            wp_dequeue_style( 'global-styles' );
    372381        }
    373382
     
    577586            $args['value'] = esc_attr( stripslashes( $args['value'] ) );
    578587
    579             echo '<input type="text" name="' . esc_attr( $args['name'] ) . '" id="' . esc_attr( $args['id'] ) . '" value="' . esc_attr( $args['value'] ) . '" placeholder="' . esc_attr( $args['placeholder'] ) . '" class="regular-text ' . esc_attr( $args['class'] ) . '" />';
     588            echo '<input type="text" name="' . esc_attr( $args['name'] ) . '" id="' . esc_attr( $args['id'] ) . '" value="' . esc_attr( $args['value'] ) . '" placeholder="' . esc_attr( $args['placeholder'] ) . '" class="regular-text ' . esc_attr( $args['class'] ) . '" ' . $this->array_to_html_atts( $args['attributes'] ) . '/>';
    580589
    581590            $this->generate_description( $args );
     
    590599            $args['value'] = esc_attr( stripslashes( $args['value'] ) );
    591600
    592             echo '<input type="hidden" name="' . esc_attr( $args['name'] ) . '" id="' . esc_attr( $args['id'] ) . '" value="' . esc_attr( $args['value'] ) . '"  class="hidden-field ' . esc_attr( $args['class'] ) . '" />';
     601            echo '<input type="hidden" name="' . esc_attr( $args['name'] ) . '" id="' . esc_attr( $args['id'] ) . '" value="' . esc_attr( $args['value'] ) . '"  class="hidden-field ' . esc_attr( $args['class'] ) . '" ' . $this->array_to_html_atts( $args['attributes'] ) . '/>';
    593602        }
    594603
     
    601610            $args['value'] = esc_attr( stripslashes( $args['value'] ) );
    602611
    603             echo '<input type="number" name="' . esc_attr( $args['name'] ) . '" id="' . esc_attr( $args['id'] ) . '" value="' . esc_attr( $args['value'] ) . '" placeholder="' . esc_attr( $args['placeholder'] ) . '" class="regular-text ' . esc_attr( $args['class'] ) . '" />';
     612            echo '<input type="number" name="' . esc_attr( $args['name'] ) . '" id="' . esc_attr( $args['id'] ) . '" value="' . esc_attr( $args['value'] ) . '" placeholder="' . esc_attr( $args['placeholder'] ) . '" class="regular-text ' . esc_attr( $args['class'] ) . '" ' . $this->array_to_html_atts( $args['attributes'] ) . '/>';
    604613
    605614            $this->generate_description( $args );
     
    616625            $timepicker = ( ! empty( $args['timepicker'] ) ) ? htmlentities( wp_json_encode( $args['timepicker'] ) ) : null;
    617626
    618             echo '<input type="text" name="' . esc_attr( $args['name'] ) . '" id="' . esc_attr( $args['id'] ) . '" value="' . esc_attr( $args['value'] ) . '" class="timepicker regular-text ' . esc_attr( $args['class'] ) . '" data-timepicker="' . esc_attr( $timepicker ) . '" />';
     627            echo '<input type="text" name="' . esc_attr( $args['name'] ) . '" id="' . esc_attr( $args['id'] ) . '" value="' . esc_attr( $args['value'] ) . '" class="timepicker regular-text ' . esc_attr( $args['class'] ) . '" data-timepicker="' . esc_attr( $timepicker ) . '" ' . $this->array_to_html_atts( $args['attributes'] ) . '/>';
    619628
    620629            $this->generate_description( $args );
     
    631640            $datepicker = ( ! empty( $args['datepicker'] ) ) ? htmlentities( wp_json_encode( $args['datepicker'] ) ) : null;
    632641
    633             echo '<input type="text" name="' . esc_attr( $args['name'] ) . '" id="' . esc_attr( $args['id'] ) . '" value="' . esc_attr( $args['value'] ) . '" class="datepicker regular-text ' . esc_attr( $args['class'] ) . '" data-datepicker="' . esc_attr( $datepicker ) . '" />';
     642            echo '<input type="text" name="' . esc_attr( $args['name'] ) . '" id="' . esc_attr( $args['id'] ) . '" value="' . esc_attr( $args['value'] ) . '" class="datepicker regular-text ' . esc_attr( $args['class'] ) . '" data-datepicker="' . esc_attr( $datepicker ) . '" ' . $this->array_to_html_atts( $args['attributes'] ) . '/>';
    634643
    635644            $this->generate_description( $args );
     
    695704            $row_count = ( ! empty( $value ) ) ? count( $value ) : 1;
    696705
    697             echo '<table class="widefat wpsf-group" cellspacing="0">';
     706            echo '<table id="group-' . esc_attr( str_replace( '_', '-', $args['id'] ) ) . '" class="' . esc_attr( $args['class'] ) . ' widefat wpsf-group" cellspacing="0">';
    698707
    699708            echo '<tbody>';
     
    708717
    709718            echo '</table>';
     719
     720            $this->generate_description( $args );
    710721
    711722            printf(
     
    884895            $values = array_map( 'strval', $values );
    885896
    886             echo '<select ' . esc_html( $multiple ) . ' name="' . esc_attr( $args['name'] ) . '" id="' . esc_attr( $args['id'] ) . '" class="' . esc_attr( $args['class'] ) . '" >';
     897            echo '<select ' . esc_html( $multiple ) . ' name="' . esc_attr( $args['name'] ) . '" id="' . esc_attr( $args['id'] ) . '" class="' . esc_attr( $args['class'] ) . '" ' . $this->array_to_html_atts( $args['attributes'] ) . '>';
    887898
    888899            foreach ( $args['choices'] as $value => $text ) {
     
    914925            $args['value'] = esc_attr( stripslashes( $args['value'] ) );
    915926
    916             echo '<input type="password" name="' . esc_attr( $args['name'] ) . '" id="' . esc_attr( $args['id'] ) . '" value="' . esc_attr( $args['value'] ) . '" placeholder="' . esc_attr( $args['placeholder'] ) . '" class="regular-text ' . esc_attr( $args['class'] ) . '" autocomplete="' . esc_attr( $args['autocomplete'] ) . '"/>';
     927            echo '<input type="password" name="' . esc_attr( $args['name'] ) . '" id="' . esc_attr( $args['id'] ) . '" value="' . esc_attr( $args['value'] ) . '" placeholder="' . esc_attr( $args['placeholder'] ) . '" class="regular-text ' . esc_attr( $args['class'] ) . '" autocomplete="' . esc_attr( $args['autocomplete'] ) . '" ' . $this->array_to_html_atts( $args['attributes'] ) . '/>';
    917928
    918929            $this->generate_description( $args );
     
    926937        public function generate_textarea_field( $args ) {
    927938            $args['value'] = esc_html( esc_attr( $args['value'] ) );
    928 
    929             echo '<textarea name="' . esc_attr( $args['name'] ) . '" id="' . esc_attr( $args['id'] ) . '" placeholder="' . esc_attr( $args['placeholder'] ) . '" rows="5" cols="60" class="' . esc_attr( $args['class'] ) . '">' . esc_html( $args['value'] ) . '</textarea>';
     939            $rows = ( ! empty( $args['attributes']['rows'] ) ) ? absint( $args['attributes']['rows'] ) : 5;
     940            $cols = ( ! empty( $args['attributes']['cols'] ) ) ? absint( $args['attributes']['cols'] ) : 60;
     941
     942            echo '<textarea name="' . esc_attr( $args['name'] ) . '" id="' . esc_attr( $args['id'] ) . '" placeholder="' . esc_attr( $args['placeholder'] ) . '" rows="' . esc_attr( $rows ) . '" cols="' . esc_attr( $cols ) . '" class="' . esc_attr( $args['class'] ) . '" ' . $this->array_to_html_atts( $args['attributes'] ) . '>' . esc_html( $args['value'] ) . '</textarea>';
    930943
    931944            $this->generate_description( $args );
     
    10421055            $button_id     = sprintf( '%s_button', $args['id'] );
    10431056
     1057            /**
     1058             * Hook in to generate a file preview e.g. image thumbnail.
     1059             */
     1060            do_action( 'wpsf_file_field_preview', $args['value'], $args );
     1061
    10441062            echo sprintf( '<input type="text" name="%s" id="%s" value="%s" class="regular-text %s"> ', esc_attr( $args['name'] ), esc_attr( $args['id'] ), esc_html( $args['value'] ), esc_attr( $args['class'] ) );
    10451063
    10461064            echo sprintf( '<input type="button" class="button wpsf-browse" id="%s" value="%s" />', esc_attr( $button_id ), esc_html__( 'Browse', 'wpsf' ) );
     1065
     1066            $this->generate_description( $args );
    10471067            ?>
    10481068            <script type='text/javascript'>
     
    12281248                $descriptions[] = array(
    12291249                    'classes'     => $classes,
    1230                     'value'       => $args['value'],
     1250                    // Serialize group field data to prevent errors.
     1251                    'value'       => ( is_array( $args['value'] ) ) ? serialize( $args['value'] ) : $args['value'],
    12311252                    'description' => $description,
    12321253                );
     
    13401361            $settings[ $settings_name ] = array();
    13411362
     1363            if ( ! $this->settings ) {
     1364                return $settings[ $settings_name ];
     1365            }
     1366           
    13421367            foreach ( $this->settings as $section ) {
    13431368                if ( empty( $section['fields'] ) ) {
     
    16101635            wp_send_json_success();
    16111636        }
     1637
     1638        /**
     1639         * Helper: Array to HTML Attributes
     1640         */
     1641        public static function array_to_html_atts( $array = array() ) {
     1642            if ( ! is_array( $array ) || empty( $array ) ) {
     1643                return false;
     1644            }
     1645
     1646            $return = '';
     1647
     1648            foreach ( $array as $key => $value ) {
     1649                if ( '' === $value ) {
     1650                    continue;
     1651                }
     1652
     1653                $return .= sprintf( '%s="%s" ', $key, esc_attr( $value ) );
     1654            }
     1655
     1656            return $return;
     1657        }
    16121658    }
    16131659}
  • orderable/tags/1.10.0/languages/orderable.pot

    r2943243 r2969309  
    77"Content-Type: text/plain; charset=UTF-8\n"
    88"Content-Transfer-Encoding: 8bit\n"
    9 "POT-Creation-Date: 2023-07-20 16:25+0000\n"
     9"POT-Creation-Date: 2023-07-25 18:57+0000\n"
    1010"X-Poedit-Basepath: ..\n"
    1111"X-Poedit-KeywordsList: __;_e;_ex:1,2c;_n:1,2;_n_noop:1,2;_nx:1,2,4c;_nx_noop:1,2,3c;_x:1,2c;esc_attr__;esc_attr_e;esc_attr_x:1,2c;esc_html__;esc_html_e;esc_html_x:1,2c\n"
     
    1515"Plural-Forms: nplurals=2; plural=(n != 1);\n"
    1616
    17 #: orderable.php:119
     17#: orderable.php:130
    1818msgid "Orderable requires WooCommerce to be installed and activated."
    1919msgstr ""
    2020
    21 #: orderable.php:132
     21#: orderable.php:143
    2222msgid "Orderable Pro needs to be at least v%s for compatibility. Please update the Orderable Pro plugin."
    2323msgstr ""
    2424
    25 #: orderable.php:133
     25#: orderable.php:144
    2626msgid "Update now"
    2727msgstr ""
     
    294294msgstr ""
    295295
    296 #: inc/class-settings.php:433, inc/modules/services/class-services-order.php:34, inc/modules/services/class-services.php:109, inc/modules/location/zones/class-location-zones.php:77, inc/modules/location/admin/meta-boxes/class-location-holidays-meta-box.php:373, inc/modules/location/admin/meta-boxes/class-location-store-services-meta-box.php:307
     296#: inc/class-settings.php:433, inc/modules/services/class-services-order.php:39, inc/modules/services/class-services.php:109, inc/modules/location/zones/class-location-zones.php:77, inc/modules/location/admin/meta-boxes/class-location-holidays-meta-box.php:373, inc/modules/location/admin/meta-boxes/class-location-store-services-meta-box.php:307
    297297msgid "Delivery"
    298298msgstr ""
    299299
    300 #: inc/class-settings.php:434, inc/modules/services/class-services-order.php:35, inc/modules/services/class-services.php:108, inc/modules/location/zones/class-location-zones.php:89, inc/modules/location/admin/meta-boxes/class-location-holidays-meta-box.php:384, inc/modules/location/admin/meta-boxes/class-location-store-services-meta-box.php:316
     300#: inc/class-settings.php:434, inc/modules/services/class-services-order.php:40, inc/modules/services/class-services.php:108, inc/modules/location/zones/class-location-zones.php:89, inc/modules/location/admin/meta-boxes/class-location-holidays-meta-box.php:384, inc/modules/location/admin/meta-boxes/class-location-store-services-meta-box.php:316
    301301msgid "Pickup"
    302302msgstr ""
     
    394394msgstr ""
    395395
    396 #: inc/class-settings.php:967, inc/modules/live-view/class-live-view.php:246, inc/modules/live-view/class-live-view.php:246
     396#: inc/class-settings.php:967, inc/modules/live-view/class-live-view.php:264, inc/modules/live-view/class-live-view.php:264
    397397msgid "Live Order View"
    398398msgstr ""
     
    599599msgstr ""
    600600
    601 #: inc/modules/live-view/class-live-view.php:207
     601#: inc/modules/live-view/class-live-view.php:225
    602602msgid "Enable Live View"
    603603msgstr ""
    604604
    605 #: inc/modules/live-view/class-live-view.php:212
     605#: inc/modules/live-view/class-live-view.php:230
    606606msgid "Exit Live View"
    607607msgstr ""
    608608
    609 #: inc/modules/live-view/class-live-view.php:213
     609#: inc/modules/live-view/class-live-view.php:231
    610610msgid "Mute"
    611611msgstr ""
    612612
    613 #: inc/modules/live-view/class-live-view.php:213
     613#: inc/modules/live-view/class-live-view.php:231
    614614msgid "Unmute"
    615615msgstr ""
    616616
    617 #: inc/modules/live-view/class-live-view.php:288
     617#: inc/modules/live-view/class-live-view.php:306
    618618msgid "order_manager"
    619619msgstr ""
    620620
    621 #: inc/modules/live-view/class-live-view.php:288
     621#: inc/modules/live-view/class-live-view.php:306
    622622msgid "Order Manager"
    623623msgstr ""
     
    651651msgstr ""
    652652
    653 #: inc/modules/services/class-services-order.php:33
     653#: inc/modules/services/class-services-order.php:38
    654654msgid "All services"
    655655msgstr ""
    656656
    657 #: inc/modules/services/class-services-order.php:110
     657#: inc/modules/services/class-services-order.php:143
    658658msgid "Service"
    659659msgstr ""
    660660
    661661#. translators: 1: service name; 2: date label. E.g.: "Pickup Date", "Delivery Date"
    662 #: inc/modules/services/class-services-order.php:155
     662#: inc/modules/services/class-services-order.php:188
    663663msgctxt "Order date"
    664664msgid "%1$s %2$s"
     
    666666
    667667#. translators: 1: service name; 2: time label. E.g.: "Pickup Time", "Delivery Time"
    668 #: inc/modules/services/class-services-order.php:157
     668#: inc/modules/services/class-services-order.php:190
    669669msgctxt "Order time"
    670670msgid "%1$s %2$s"
     
    717717msgstr ""
    718718
    719 #: inc/modules/timings/class-timings-checkout.php:188
     719#: inc/modules/timings/class-timings-checkout.php:196
    720720msgid " (As soon as possible)"
    721721msgstr ""
    722722
    723 #: inc/modules/timings/class-timings-order.php:47, inc/modules/timings/class-timings.php:92
     723#: inc/modules/timings/class-timings-order.php:52, inc/modules/timings/class-timings.php:92
    724724msgid "Today"
    725725msgstr ""
    726726
    727 #: inc/modules/timings/class-timings-order.php:48, inc/modules/timings/class-timings.php:94
     727#: inc/modules/timings/class-timings-order.php:53, inc/modules/timings/class-timings.php:94
    728728msgid "Tomorrow"
    729729msgstr ""
    730730
    731 #: inc/modules/timings/class-timings-order.php:49
     731#: inc/modules/timings/class-timings-order.php:54
    732732msgid "Next 7 Days"
    733733msgstr ""
    734734
    735 #: inc/modules/timings/class-timings-order.php:50
     735#: inc/modules/timings/class-timings-order.php:55
    736736msgid "Next 30 Days"
    737737msgstr ""
    738738
    739 #: inc/modules/timings/class-timings-order.php:51
     739#: inc/modules/timings/class-timings-order.php:56
    740740msgid "Custom Range"
    741741msgstr ""
    742742
    743 #: inc/modules/timings/class-timings-order.php:52
     743#: inc/modules/timings/class-timings-order.php:57
    744744msgid "Clear"
    745745msgstr ""
    746746
    747 #: inc/modules/timings/class-timings-order.php:53
     747#: inc/modules/timings/class-timings-order.php:58
    748748msgid "Apply"
    749749msgstr ""
    750750
    751 #: inc/modules/timings/class-timings-order.php:96
     751#: inc/modules/timings/class-timings-order.php:101
    752752msgid "Su"
    753753msgstr ""
    754754
    755 #: inc/modules/timings/class-timings-order.php:97
     755#: inc/modules/timings/class-timings-order.php:102
    756756msgid "Mo"
    757757msgstr ""
    758758
    759 #: inc/modules/timings/class-timings-order.php:98
     759#: inc/modules/timings/class-timings-order.php:103
    760760msgid "Tu"
    761761msgstr ""
    762762
    763 #: inc/modules/timings/class-timings-order.php:99
     763#: inc/modules/timings/class-timings-order.php:104
    764764msgid "We"
    765765msgstr ""
    766766
    767 #: inc/modules/timings/class-timings-order.php:100
     767#: inc/modules/timings/class-timings-order.php:105
    768768msgid "Th"
    769769msgstr ""
    770770
    771 #: inc/modules/timings/class-timings-order.php:101
     771#: inc/modules/timings/class-timings-order.php:106
    772772msgid "Fr"
    773773msgstr ""
    774774
    775 #: inc/modules/timings/class-timings-order.php:102
     775#: inc/modules/timings/class-timings-order.php:107
    776776msgid "Sa"
    777777msgstr ""
    778778
    779 #: inc/modules/timings/class-timings-order.php:105
     779#: inc/modules/timings/class-timings-order.php:110
    780780msgid "January"
    781781msgstr ""
    782782
    783 #: inc/modules/timings/class-timings-order.php:106
     783#: inc/modules/timings/class-timings-order.php:111
    784784msgid "February"
    785785msgstr ""
    786786
    787 #: inc/modules/timings/class-timings-order.php:107
     787#: inc/modules/timings/class-timings-order.php:112
    788788msgid "March"
    789789msgstr ""
    790790
    791 #: inc/modules/timings/class-timings-order.php:108
     791#: inc/modules/timings/class-timings-order.php:113
    792792msgid "April"
    793793msgstr ""
    794794
    795 #: inc/modules/timings/class-timings-order.php:109
     795#: inc/modules/timings/class-timings-order.php:114
    796796msgid "May"
    797797msgstr ""
    798798
    799 #: inc/modules/timings/class-timings-order.php:110
     799#: inc/modules/timings/class-timings-order.php:115
    800800msgid "June"
    801801msgstr ""
    802802
    803 #: inc/modules/timings/class-timings-order.php:111
     803#: inc/modules/timings/class-timings-order.php:116
    804804msgid "July"
    805805msgstr ""
    806806
    807 #: inc/modules/timings/class-timings-order.php:112
     807#: inc/modules/timings/class-timings-order.php:117
    808808msgid "August"
    809809msgstr ""
    810810
    811 #: inc/modules/timings/class-timings-order.php:113
     811#: inc/modules/timings/class-timings-order.php:118
    812812msgid "September"
    813813msgstr ""
    814814
    815 #: inc/modules/timings/class-timings-order.php:114
     815#: inc/modules/timings/class-timings-order.php:119
    816816msgid "October"
    817817msgstr ""
    818818
    819 #: inc/modules/timings/class-timings-order.php:115
     819#: inc/modules/timings/class-timings-order.php:120
    820820msgid "November"
    821821msgstr ""
    822822
    823 #: inc/modules/timings/class-timings-order.php:116
     823#: inc/modules/timings/class-timings-order.php:121
    824824msgid "December"
    825825msgstr ""
    826826
    827 #: inc/modules/timings/class-timings-order.php:200, inc/modules/timings/class-timings-order.php:238
     827#: inc/modules/timings/class-timings-order.php:205, inc/modules/timings/class-timings-order.php:243
    828828msgid "Date"
    829829msgstr ""
    830830
    831 #: inc/modules/timings/class-timings-order.php:204, inc/modules/timings/class-timings-order.php:242
     831#: inc/modules/timings/class-timings-order.php:209, inc/modules/timings/class-timings-order.php:247
    832832msgid "Time"
    833833msgstr ""
    834834
    835 #: inc/modules/timings/class-timings-order.php:208
     835#: inc/modules/timings/class-timings-order.php:213
    836836msgid "Timestamp"
    837837msgstr ""
    838838
    839 #: inc/modules/timings/class-timings-order.php:221
     839#: inc/modules/timings/class-timings-order.php:226
    840840msgid "Due Date/Time"
    841841msgstr ""
    842842
    843 #: inc/modules/timings/class-timings-order.php:322
     843#: inc/modules/timings/class-timings-order.php:368
    844844msgid "Filter by due date"
    845845msgstr ""
  • orderable/tags/1.10.0/orderable.php

    r2943243 r2969309  
    44 * Author URI: https://orderable.com
    55 * Description: Take local online ordering to a whole new level with Orderable.
    6  * Version: 1.9.0
     6 * Version: 1.10.0
    77 * Author: Orderable
    88 * Text Domain: orderable
    99 * WC requires at least: 5.4.0
    10  * WC tested up to: 7.9
     10 * WC tested up to: 8.1
    1111 */
    1212
     
    2020     * @var string Plugin version.
    2121     */
    22     public static $version = '1.9.0';
     22    public static $version = '1.10.0';
    2323
    2424    /**
    2525     * @var string Required pro version.
    2626     */
    27     public static $required_pro_version = '1.8.0';
     27    public static $required_pro_version = '1.10.0';
    2828
    2929    /**
  • orderable/tags/1.10.0/readme.txt

    r2943243 r2969309  
    33Tags: ecommerce, WooCommerce, local ordering, restaurants
    44Requires at least: 5.4
    5 Tested up to: 6.2
     5Tested up to: 6.3
    66Requires PHP: 5.6
    7 Stable tag: 1.9.0
     7Stable tag: 1.10.0
    88License: GPLv2 or later
    99License URI: https://www.gnu.org/licenses/gpl-2.0.html
     
    145145
    146146== Changelog ==
     147**v1.10.0** (20 Sep 2023)
     148[new] Open hours block 
     149[new] Compatibility with TikTok plugin 
     150[fix] Date delivery offering "Tomorrow" when "Week Days Only" method is selected and the lead time is greater or equal than two 
     151[fix] Call to undefined function `wc_get_page_screen_id` 
     152
    147153**v1.9.0** (25 Jul 2023)
    148154[new] Compatibility with High-Performance Order Storage (HPOS) 
  • orderable/trunk/.vipgoci_phpcs_skip_folders

    r2819236 r2969309  
    22dev-lib
    33node_modules
    4 vendor
    5 assets/frontend/js
    6 assets/admin/js/
     4/vendor
     5/vendor-prefixed
     6/assets/frontend/js
     7/assets/admin/js
  • orderable/trunk/assets/admin/css/upgrade-pro.css

    r2912589 r2969309  
    11@font-face {
    2   font-family: "Creo";
     2  font-family: Creo;
    33  src: url("../../fonts/creo-bold-webfont.woff2") format("woff2"), url("../../fonts/creo-bold-webfont.woff") format("woff");
    4   font-weight: bold;
     4  font-weight: 700;
    55  font-style: normal;
    66}
    77@font-face {
    8   font-family: "Creo";
     8  font-family: Creo;
    99  src: url("../../fonts/creo-semibold-webfont.woff2") format("woff2"), url("../../fonts/creo-semibold-webfont.woff") format("woff");
    1010  font-weight: 600;
     
    7676span.ordpro-upgrade-badge {
    7777  display: inline-block;
    78   background: #4E26A1;
     78  background: #4e26a1;
    7979  padding: 6px 12px;
    8080  border-radius: 38px;
     
    8686  padding-left: 31px;
    8787  background-position: 12px 6px;
    88   font-family: "Creo";
    89   font-weight: bold;
     88  font-family: Creo;
     89  font-weight: 700;
    9090  font-size: 14px;
    9191}
     
    112112
    113113.ordpro-upgrade-features__left-heading {
    114   font-family: "Creo";
     114  font-family: Creo;
    115115  font-style: normal;
    116116  font-weight: 700;
    117117  font-size: 30px;
    118118  line-height: 140%;
    119   color: #0B2135;
     119  color: #0b2135;
    120120  max-width: 540px;
    121   margin-bottom: 0px;
     121  margin-bottom: 0;
    122122}
    123123
     
    145145
    146146.ordpro-upgrade-features__left-features-item-text-heading {
    147   font-family: "Creo";
     147  font-family: Creo;
    148148  font-style: normal;
    149149  font-weight: 600;
    150150  font-size: 18px;
    151151  line-height: 150%;
    152   color: #0B2135;
     152  color: #0b2135;
    153153  margin: 0;
    154154}
    155155
    156156.ordpro-upgrade-features__left-features-item-text-text {
    157   font-family: "Inter";
     157  font-family: Inter;
    158158  font-style: normal;
    159159  font-weight: 500;
    160160  font-size: 14px;
    161161  line-height: 150%;
    162   color: #6B6E73;
     162  color: #6b6e73;
    163163  margin: 6px 0 0 0;
    164164}
    165165
    166166.ordpro-upgrade-features__left-view-all {
    167   font-family: "Creo";
     167  font-family: Creo;
    168168  font-style: normal;
    169169  font-weight: 600;
    170170  font-size: 16px;
    171171  line-height: 150%;
    172   color: #7031F5;
     172  color: #7031f5;
    173173}
    174174
     
    180180  width: 373px;
    181181  margin-top: 197px;
    182   background: #0B2135;
     182  background: #0b2135;
    183183  border-radius: 8px;
    184184  padding: 40px 30px;
     
    189189
    190190.ordpro-upgrade-box__heading {
    191   font-family: "Creo";
     191  font-family: Creo;
    192192  font-style: normal;
    193193  font-weight: 700;
    194194  font-size: 30px;
    195195  line-height: 110%;
    196   color: #FFFFFF;
     196  color: #fff;
    197197  text-align: center;
    198198  margin-top: 18px;
     
    201201
    202202.ordpro-upgrade-box__text {
    203   font-family: "Inter";
     203  font-family: Inter;
    204204  font-style: normal;
    205205  font-weight: 400;
     
    207207  line-height: 22px;
    208208  text-align: center;
    209   color: #FFFFFF;
     209  color: #fff;
    210210  margin-bottom: 26px;
    211211  margin-top: 18px;
     
    222222  letter-spacing: 0.2em;
    223223  text-transform: uppercase;
    224   color: #FACC73;
     224  color: #facc73;
    225225  margin-bottom: 10px;
    226226}
     
    234234  text-align: center;
    235235  text-transform: uppercase;
    236   color: #FFFFFF;
     236  color: #fff;
    237237}
    238238
     
    242242
    243243.ordpro-upgrade-button {
    244   font-family: "Creo";
     244  font-family: Creo;
    245245  font-style: normal;
    246246  font-weight: 700;
    247247  font-size: 20px;
    248248  line-height: 23px;
    249   color: #FFFFFF;
    250   background: #7031F5;
     249  color: #fff;
     250  background: #7031f5;
    251251  border-radius: 6px;
    252252  width: 100%;
     
    280280  background: rgba(250, 204, 115, 0.2);
    281281  border-radius: 100px;
    282   font-family: "Creo";
     282  font-family: Creo;
    283283  font-style: normal;
    284284  font-weight: 700;
    285285  font-size: 20px;
    286286  line-height: 150%;
    287   color: #0B2135;
     287  color: #0b2135;
    288288  background-image: url(../../img/upgrade-to-pro/star.png);
    289289  background-repeat: no-repeat;
     
    300300
    301301.ordpro-upgrade-faqs__header {
    302   background: #F0F4FF;
    303   font-family: "Creo";
     302  background: #f0f4ff;
     303  font-family: Creo;
    304304  font-style: normal;
    305305  font-weight: 700;
     
    311311
    312312.ordpro-upgrade-faqs__header h3 {
    313   font-family: "Creo";
     313  font-family: Creo;
    314314  font-style: normal;
    315315  font-weight: 700;
    316316  font-size: 20px;
    317317  line-height: 110%;
    318   color: #0B2135;
     318  color: #0b2135;
    319319  margin: 0;
    320320  display: -webkit-box;
     
    333333.ordpro-upgrade-faqs__body-faq {
    334334  position: relative;
    335   padding: 0px 0 60px 30px;
    336 }
    337 
    338 .ordpro-upgrade-faqs__body-faq:after {
     335  padding: 0 0 60px 30px;
     336}
     337
     338.ordpro-upgrade-faqs__body-faq::after {
    339339  width: 93%;
    340340  content: "";
    341   background: #E5E5E5;
     341  background: #e5e5e5;
    342342  height: 1px;
    343343  position: absolute;
     
    348348}
    349349
    350 .ordpro-upgrade-faqs__body-faq:last-child:after {
     350.ordpro-upgrade-faqs__body-faq:last-child::after {
    351351  display: none;
    352352}
     
    367367
    368368.ordpro-upgrade-faqs__body-faq-content p {
    369   font-family: "Inter";
     369  font-family: Inter;
    370370  font-style: normal;
    371371  font-weight: 500;
    372372  font-size: 14px;
    373373  line-height: 150%;
    374   color: #6B6E73;
     374  color: #6b6e73;
    375375}
    376376
     
    380380
    381381.ordpro-upgrade-faqs__body-faq-header-question h4 {
    382   font-family: "Creo";
     382  font-family: Creo;
    383383  font-style: normal;
    384384  font-weight: 600;
    385385  font-size: 18px;
    386386  line-height: 120%;
    387   color: #0B2135;
     387  color: #0b2135;
    388388  margin: 0;
    389389}
     
    404404
    405405.ordpro-upgrade-faqs-view-all {
    406   font-family: "Creo";
     406  font-family: Creo;
    407407  font-style: normal;
    408408  font-weight: 600;
    409409  font-size: 16px;
    410410  line-height: 150%;
    411   color: #7031F5;
     411  color: #7031f5;
    412412}
    413413
     
    417417
    418418.ordpro-upgrade-comming-soon-badge {
    419   font-family: "Creo";
     419  font-family: Creo;
    420420  font-style: normal;
    421421  font-weight: 600;
    422422  font-size: 11px;
    423423  line-height: 13px;
    424   color: #0B2135;
     424  color: #0b2135;
    425425  display: inline-block;
    426   background: #FACC73;
     426  background: #facc73;
    427427  border-radius: 4px;
    428428  padding: 4px 10px;
     
    498498  .ordpro-upgrade__header {
    499499    background-image: unset;
    500     background-color: #7031F5;
     500    background-color: #7031f5;
    501501    aspect-ratio: unset;
    502502  }
  • orderable/trunk/assets/admin/css/upgrade-pro.min.css

    r2933929 r2969309  
    1 @font-face{font-family:Creo;src:url(../../fonts/creo-bold-webfont.woff2) format("woff2"),url(../../fonts/creo-bold-webfont.woff) format("woff");font-weight:700;font-style:normal}@font-face{font-family:Creo;src:url(../../fonts/creo-semibold-webfont.woff2) format("woff2"),url(../../fonts/creo-semibold-webfont.woff) format("woff");font-weight:600;font-style:normal}body{background-color:#fff}#wpcontent{margin-left:140px}#wpfooter{display:none}.ordpro-upgrade-wrap{max-width:1280px}.ordpro-upgrade__header{background-image:url(../../img/upgrade-to-pro/header-blop.png);background-repeat:no-repeat;background-size:100%;display:inline-block;width:100%;height:327px;position:relative}.ordpro-upgrade__header-delivery-img{width:692px}.ordpro-upgrade__header-logo-icon{max-width:105px}.ordpro-upgrade__header-logo-text-img{max-width:230px}.ordpro-upgrade__header-delivery-img{position:absolute;top:10px;right:10px}.ordpro-upgrade__header-logo{margin-left:80px;margin-top:100px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.ordpro-upgrade__header-logo .ordpro-upgrade__header-logo-right{margin-left:16px}.ordpro-upgrade__header-logo .ordpro-upgrade__header-logo-text{margin:16px 0}span.ordpro-upgrade-badge{display:inline-block;background:#4e26a1;padding:6px 12px;border-radius:38px;color:#fff;line-height:1;background-image:url(../../img/upgrade-to-pro/star-badge.png);background-repeat:no-repeat;background-size:13px;padding-left:31px;background-position:12px 6px;font-family:Creo;font-weight:700;font-size:14px}.ordpro-upgrade__body{margin-left:80px}.ordpro-upgrade-features{display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;gap:70px;-webkit-box-align:start;-ms-flex-align:start;align-items:flex-start}.ordpro-upgrade-features__left{width:670px}.ordpro-upgrade-features__left-heading{font-family:Creo;font-style:normal;font-weight:700;font-size:30px;line-height:140%;color:#0b2135;max-width:540px;margin-bottom:0}.ordpro-upgrade-features__left-features{display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;gap:40px 30px;margin-bottom:60px}.ordpro-upgrade-features__left-features-item{width:47%;display:-webkit-box;display:-ms-flexbox;display:flex;gap:20px}.ordpro-upgrade-features__left-features-item-icon img{width:80px}.ordpro-upgrade-features__left-features-item-text-heading{font-family:Creo;font-style:normal;font-weight:600;font-size:18px;line-height:150%;color:#0b2135;margin:0}.ordpro-upgrade-features__left-features-item-text-text{font-family:Inter;font-style:normal;font-weight:500;font-size:14px;line-height:150%;color:#6b6e73;margin:6px 0 0 0}.ordpro-upgrade-features__left-view-all{font-family:Creo;font-style:normal;font-weight:600;font-size:16px;line-height:150%;color:#7031f5}.ordpro-upgrade-features__left-view-all svg{margin-left:10px}.ordpro-upgrade-box{width:373px;margin-top:197px;background:#0b2135;border-radius:8px;padding:40px 30px;-webkit-box-sizing:border-box;box-sizing:border-box;text-align:center}.ordpro-upgrade-box__heading{font-family:Creo;font-style:normal;font-weight:700;font-size:30px;line-height:110%;color:#fff;text-align:center;margin-top:18px;margin-bottom:18px}.ordpro-upgrade-box__text{font-family:Inter;font-style:normal;font-weight:400;font-size:14px;line-height:22px;text-align:center;color:#fff;margin-bottom:26px;margin-top:18px}.ordpro-upgrade-box__includes{margin-top:40px;font-family:"Open Sans";font-style:normal;font-weight:700;font-size:12px;line-height:16px;text-align:center;letter-spacing:.2em;text-transform:uppercase;color:#facc73;margin-bottom:10px}.ordpro-upgrade-box__includes-text{font-family:"Open Sans";font-style:normal;font-weight:700;font-size:14px;line-height:19px;text-align:center;text-transform:uppercase;color:#fff}.ordpro-upgrade-box__star img{width:40px}.ordpro-upgrade-button{font-family:Creo;font-style:normal;font-weight:700;font-size:20px;line-height:23px;color:#fff;background:#7031f5;border-radius:6px;width:100%;display:block;padding:15px 0;-webkit-transition:.3s all;transition:.3s all;text-decoration:none}.ordpro-upgrade-button:hover{color:#fff}.ordpro-upgrade-button__arrow{width:0;overflow:hidden;display:inline-block;vertical-align:bottom;-webkit-transition:.3s all;transition:.3s all}.ordpro-upgrade-button:hover .ordpro-upgrade-button__arrow{width:28px;line-height:23px}.ordpro-upgrade-badge-addons{padding:10px 16px;background:rgba(250,204,115,.2);border-radius:100px;font-family:Creo;font-style:normal;font-weight:700;font-size:20px;line-height:150%;color:#0b2135;background-image:url(../../img/upgrade-to-pro/star.png);background-repeat:no-repeat;padding-left:56px;background-position:16px 10px;margin:40px 0;display:inline-block;background-size:28px}.ordpro-upgrade-faqs{max-width:670px}.ordpro-upgrade-faqs__header{background:#f0f4ff;font-family:Creo;font-style:normal;font-weight:700;font-size:20px;line-height:110%;padding:25px 30px;margin:60px 0 30px 0}.ordpro-upgrade-faqs__header h3{font-family:Creo;font-style:normal;font-weight:700;font-size:20px;line-height:110%;color:#0b2135;margin:0;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.ordpro-upgrade-faqs__header h3 img{margin-right:12px;width:24px}.ordpro-upgrade-faqs__body-faq{position:relative;padding:0 0 60px 30px}.ordpro-upgrade-faqs__body-faq:after{width:93%;content:"";background:#e5e5e5;height:1px;position:absolute;display:block;margin:0 auto;left:3.5%;bottom:30px}.ordpro-upgrade-faqs__body-faq:last-child:after{display:none}.ordpro-upgrade-faqs__body-faq-header{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;cursor:pointer}.ordpro-upgrade-faqs__body-faq-content{display:none}.ordpro-upgrade-faqs__body-faq-content p{font-family:Inter;font-style:normal;font-weight:500;font-size:14px;line-height:150%;color:#6b6e73}.ordpro-upgrade-faqs__body-faq-header-question{width:90%}.ordpro-upgrade-faqs__body-faq-header-question h4{font-family:Creo;font-style:normal;font-weight:600;font-size:18px;line-height:120%;color:#0b2135;margin:0}.ordpro-upgrade-faqs__body-faq-header-icon{width:10%;text-align:center;-webkit-transition:-webkit-transform .3s ease-in-out;transition:-webkit-transform .3s ease-in-out;transition:transform .3s ease-in-out;transition:transform .3s ease-in-out,-webkit-transform .3s ease-in-out}.ordpro-upgrade-faqs .ordpro-upgrade-faqs__body-faq--open .ordpro-upgrade-faqs__body-faq-header-icon{-webkit-transform:rotate(45deg);transform:rotate(45deg)}.ordpro-upgrade-faqs-view-all{font-family:Creo;font-style:normal;font-weight:600;font-size:16px;line-height:150%;color:#7031f5}.ordpro-upgrade-faqs-view-all svg{margin-left:10px}.ordpro-upgrade-comming-soon-badge{font-family:Creo;font-style:normal;font-weight:600;font-size:11px;line-height:13px;color:#0b2135;display:inline-block;background:#facc73;border-radius:4px;padding:4px 10px;margin-bottom:6px}@media (max-width:1400px){.ordpro-upgrade__header-delivery-img{width:400px}.ordpro-upgrade__body{margin-left:60px}.ordpro-upgrade-features__left{width:600px}.ordpro-upgrade-features{gap:50px}}@media (max-width:1250px){.ordpro-upgrade__header{height:auto;aspect-ratio:4/1}.ordpro-upgrade-features{gap:3%}.ordpro-upgrade-features__left{width:55%}.ordpro-upgrade-box{width:35%}.ordpro-upgrade__body{margin-left:30px}.ordpro-upgrade-features__left-features{gap:40px 25px}}@media (max-width:1100px){.ordpro-upgrade__header-delivery-img{width:300px}.ordpro-upgrade__header-logo{margin-top:50px}}@media (max-width:960px){.auto-fold #wpcontent{padding-left:0}.ordpro-upgrade__body{margin:0 auto;width:90%}.ordpro-upgrade-features__left{width:100%}.ordpro-upgrade-box{width:80%;margin:100px auto 50px auto;max-width:600px}}@media (max-width:780px){.ordpro-upgrade__header-delivery-img{width:200px}}@media (max-width:680px){.ordpro-upgrade__header{background-image:unset;background-color:#7031f5;aspect-ratio:unset}.ordpro-upgrade__header-logo{margin-top:0;margin-left:0;padding:30px 0;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}.ordpro-upgrade__header-delivery-img{display:none}}@media (max-width:560px){.ordpro-upgrade-features__left-features-item{width:90%}}
     1@font-face{font-family:Creo;src:url(../../fonts/creo-bold-webfont.woff2) format("woff2"),url(../../fonts/creo-bold-webfont.woff) format("woff");font-weight:700;font-style:normal}@font-face{font-family:Creo;src:url(../../fonts/creo-semibold-webfont.woff2) format("woff2"),url(../../fonts/creo-semibold-webfont.woff) format("woff");font-weight:600;font-style:normal}body{background-color:#fff}#wpcontent{margin-left:140px}#wpfooter{display:none}.ordpro-upgrade-wrap{max-width:1280px}.ordpro-upgrade__header{background-image:url(../../img/upgrade-to-pro/header-blop.png);background-repeat:no-repeat;background-size:100%;display:inline-block;width:100%;height:327px;position:relative}.ordpro-upgrade__header-delivery-img{width:692px}.ordpro-upgrade__header-logo-icon{max-width:105px}.ordpro-upgrade__header-logo-text-img{max-width:230px}.ordpro-upgrade__header-delivery-img{position:absolute;top:10px;right:10px}.ordpro-upgrade__header-logo{margin-left:80px;margin-top:100px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.ordpro-upgrade__header-logo .ordpro-upgrade__header-logo-right{margin-left:16px}.ordpro-upgrade__header-logo .ordpro-upgrade__header-logo-text{margin:16px 0}span.ordpro-upgrade-badge{display:inline-block;background:#4e26a1;padding:6px 12px;border-radius:38px;color:#fff;line-height:1;background-image:url(../../img/upgrade-to-pro/star-badge.png);background-repeat:no-repeat;background-size:13px;padding-left:31px;background-position:12px 6px;font-family:Creo;font-weight:700;font-size:14px}.ordpro-upgrade__body{margin-left:80px}.ordpro-upgrade-features{display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;gap:70px;-webkit-box-align:start;-ms-flex-align:start;align-items:flex-start}.ordpro-upgrade-features__left{width:670px}.ordpro-upgrade-features__left-heading{font-family:Creo;font-style:normal;font-weight:700;font-size:30px;line-height:140%;color:#0b2135;max-width:540px;margin-bottom:0}.ordpro-upgrade-features__left-features{display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;gap:40px 30px;margin-bottom:60px}.ordpro-upgrade-features__left-features-item{width:47%;display:-webkit-box;display:-ms-flexbox;display:flex;gap:20px}.ordpro-upgrade-features__left-features-item-icon img{width:80px}.ordpro-upgrade-features__left-features-item-text-heading{font-family:Creo;font-style:normal;font-weight:600;font-size:18px;line-height:150%;color:#0b2135;margin:0}.ordpro-upgrade-features__left-features-item-text-text{font-family:Inter;font-style:normal;font-weight:500;font-size:14px;line-height:150%;color:#6b6e73;margin:6px 0 0 0}.ordpro-upgrade-features__left-view-all{font-family:Creo;font-style:normal;font-weight:600;font-size:16px;line-height:150%;color:#7031f5}.ordpro-upgrade-features__left-view-all svg{margin-left:10px}.ordpro-upgrade-box{width:373px;margin-top:197px;background:#0b2135;border-radius:8px;padding:40px 30px;-webkit-box-sizing:border-box;box-sizing:border-box;text-align:center}.ordpro-upgrade-box__heading{font-family:Creo;font-style:normal;font-weight:700;font-size:30px;line-height:110%;color:#fff;text-align:center;margin-top:18px;margin-bottom:18px}.ordpro-upgrade-box__text{font-family:Inter;font-style:normal;font-weight:400;font-size:14px;line-height:22px;text-align:center;color:#fff;margin-bottom:26px;margin-top:18px}.ordpro-upgrade-box__includes{margin-top:40px;font-family:"Open Sans";font-style:normal;font-weight:700;font-size:12px;line-height:16px;text-align:center;letter-spacing:.2em;text-transform:uppercase;color:#facc73;margin-bottom:10px}.ordpro-upgrade-box__includes-text{font-family:"Open Sans";font-style:normal;font-weight:700;font-size:14px;line-height:19px;text-align:center;text-transform:uppercase;color:#fff}.ordpro-upgrade-box__star img{width:40px}.ordpro-upgrade-button{font-family:Creo;font-style:normal;font-weight:700;font-size:20px;line-height:23px;color:#fff;background:#7031f5;border-radius:6px;width:100%;display:block;padding:15px 0;-webkit-transition:.3s all;transition:.3s all;text-decoration:none}.ordpro-upgrade-button:hover{color:#fff}.ordpro-upgrade-button__arrow{width:0;overflow:hidden;display:inline-block;vertical-align:bottom;-webkit-transition:.3s all;transition:.3s all}.ordpro-upgrade-button:hover .ordpro-upgrade-button__arrow{width:28px;line-height:23px}.ordpro-upgrade-badge-addons{padding:10px 16px;background:rgba(250,204,115,.2);border-radius:100px;font-family:Creo;font-style:normal;font-weight:700;font-size:20px;line-height:150%;color:#0b2135;background-image:url(../../img/upgrade-to-pro/star.png);background-repeat:no-repeat;padding-left:56px;background-position:16px 10px;margin:40px 0;display:inline-block;background-size:28px}.ordpro-upgrade-faqs{max-width:670px}.ordpro-upgrade-faqs__header{background:#f0f4ff;font-family:Creo;font-style:normal;font-weight:700;font-size:20px;line-height:110%;padding:25px 30px;margin:60px 0 30px 0}.ordpro-upgrade-faqs__header h3{font-family:Creo;font-style:normal;font-weight:700;font-size:20px;line-height:110%;color:#0b2135;margin:0;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.ordpro-upgrade-faqs__header h3 img{margin-right:12px;width:24px}.ordpro-upgrade-faqs__body-faq{position:relative;padding:0 0 60px 30px}.ordpro-upgrade-faqs__body-faq::after{width:93%;content:"";background:#e5e5e5;height:1px;position:absolute;display:block;margin:0 auto;left:3.5%;bottom:30px}.ordpro-upgrade-faqs__body-faq:last-child::after{display:none}.ordpro-upgrade-faqs__body-faq-header{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;cursor:pointer}.ordpro-upgrade-faqs__body-faq-content{display:none}.ordpro-upgrade-faqs__body-faq-content p{font-family:Inter;font-style:normal;font-weight:500;font-size:14px;line-height:150%;color:#6b6e73}.ordpro-upgrade-faqs__body-faq-header-question{width:90%}.ordpro-upgrade-faqs__body-faq-header-question h4{font-family:Creo;font-style:normal;font-weight:600;font-size:18px;line-height:120%;color:#0b2135;margin:0}.ordpro-upgrade-faqs__body-faq-header-icon{width:10%;text-align:center;-webkit-transition:-webkit-transform .3s ease-in-out;transition:-webkit-transform .3s ease-in-out;transition:transform .3s ease-in-out;transition:transform .3s ease-in-out,-webkit-transform .3s ease-in-out}.ordpro-upgrade-faqs .ordpro-upgrade-faqs__body-faq--open .ordpro-upgrade-faqs__body-faq-header-icon{-webkit-transform:rotate(45deg);transform:rotate(45deg)}.ordpro-upgrade-faqs-view-all{font-family:Creo;font-style:normal;font-weight:600;font-size:16px;line-height:150%;color:#7031f5}.ordpro-upgrade-faqs-view-all svg{margin-left:10px}.ordpro-upgrade-comming-soon-badge{font-family:Creo;font-style:normal;font-weight:600;font-size:11px;line-height:13px;color:#0b2135;display:inline-block;background:#facc73;border-radius:4px;padding:4px 10px;margin-bottom:6px}@media (max-width:1400px){.ordpro-upgrade__header-delivery-img{width:400px}.ordpro-upgrade__body{margin-left:60px}.ordpro-upgrade-features__left{width:600px}.ordpro-upgrade-features{gap:50px}}@media (max-width:1250px){.ordpro-upgrade__header{height:auto;aspect-ratio:4/1}.ordpro-upgrade-features{gap:3%}.ordpro-upgrade-features__left{width:55%}.ordpro-upgrade-box{width:35%}.ordpro-upgrade__body{margin-left:30px}.ordpro-upgrade-features__left-features{gap:40px 25px}}@media (max-width:1100px){.ordpro-upgrade__header-delivery-img{width:300px}.ordpro-upgrade__header-logo{margin-top:50px}}@media (max-width:960px){.auto-fold #wpcontent{padding-left:0}.ordpro-upgrade__body{margin:0 auto;width:90%}.ordpro-upgrade-features__left{width:100%}.ordpro-upgrade-box{width:80%;margin:100px auto 50px auto;max-width:600px}}@media (max-width:780px){.ordpro-upgrade__header-delivery-img{width:200px}}@media (max-width:680px){.ordpro-upgrade__header{background-image:unset;background-color:#7031f5;aspect-ratio:unset}.ordpro-upgrade__header-logo{margin-top:0;margin-left:0;padding:30px 0;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}.ordpro-upgrade__header-delivery-img{display:none}}@media (max-width:560px){.ordpro-upgrade-features__left-features-item{width:90%}}
  • orderable/trunk/assets/frontend/js/main.js

    r2912589 r2969309  
    431431                        'product_id': product_id,
    432432                        'variation_id': variation_id,
    433                         'attributes': attributes
     433                        'attributes': attributes,
     434                        'thisbutton': $element
    434435                    },
    435436                    function( response ) {
     
    525526                    $( document.body ).trigger( 'added_to_cart', [
    526527                        response.fragments,
    527                         response.cart_hash
     528                        response.cart_hash,
     529                        args.thisbutton
    528530                    ] );
    529531
  • orderable/trunk/assets/frontend/js/main.min.js

    r2912589 r2969309  
    1 !function(o,n){"use strict";var s={on_ready:function(){s.cache(),s.watch()},cache:function(){s.vars={classes:{parent:"orderable-accordion",link:"orderable-accordion__item-link",content:"orderable-accordion__item-content",link_active:"orderable-accordion__item-link--active",content_active:"orderable-accordion__item-content--active"}}},watch:function(){o(n.body).on("click","."+s.vars.classes.link,function(e){e.preventDefault();var e=o(this),t=e.closest("."+s.vars.classes.parent),r=e.attr("href"),r=o(r),a=e.hasClass(s.vars.classes.link_active);t.find("."+s.vars.classes.link).removeClass(s.vars.classes.link_active),t.find("."+s.vars.classes.content).removeClass(s.vars.classes.content_active),a||(e.addClass(s.vars.classes.link_active),r.addClass(s.vars.classes.content_active)),o(n.body).trigger("orderable-accordion.toggled",{link:e,content:r})}),o(n.body).on("orderable-scrollbar.created",function(e,t){var r=o(".orderable-drawer ."+s.vars.classes.link_active);r.length<=0||(r=(t=t.content).scrollTop()-t.offset().top+r.offset().top,t.scrollTop(r))})}};o(n).ready(s.on_ready)}(jQuery,document),function(o,n){"use strict";var r={debounce:function(t,r=700){let a;return(...e)=>{clearTimeout(a),a=setTimeout(()=>{t.apply(this,e)},r)}},allow_only_numbers:function(e){var t=String.fromCharCode(e.which);/^\d+$/.test(t)||e.preventDefault()},on_change_quantity:function(e){const t=o(e.currentTarget);var e=t.data("orderable-product-id"),r=t.data("orderable-cart-item-key"),a=parseInt(t.text());jQuery.post(orderable_vars.ajax_url,{action:"orderable_cart_quantity",cart_item_key:r,product_id:e,quantity:a},function(e){e&&(o(n.body).trigger("added_to_cart",[e.fragments,e.cart_hash,t]),o(n.body).trigger("orderable-drawer.quantity-updated"))})},on_ready:function(){r.cache(),r.watch(),o(n.body).on("keypress",".orderable-quantity-roller__quantity",r.allow_only_numbers),o(".orderable-drawer__cart").on("input",".orderable-quantity-roller__quantity",r.debounce(r.on_change_quantity)),orderable_vars&&!orderable_vars.woocommerce_enable_ajax_add_to_cart&&o(n.body).off("click",".add_to_cart_button")},cache:function(){r.vars={classes:{overlay:"orderable-drawer-overlay",drawer:"orderable-drawer",drawer_cart:"orderable-drawer__cart",drawer_html:"orderable-drawer__html",overlay_open:"orderable-drawer-overlay--open",drawer_open:"orderable-drawer--open",drawer_open_body:"orderable-drawer-open"}},r.elements={body:o("body"),overlay:o("."+r.vars.classes.overlay),drawer:o("."+r.vars.classes.drawer),drawer_cart:o("."+r.vars.classes.drawer_cart),drawer_html:o("."+r.vars.classes.drawer_html),floating_cart_button_class:".orderable-floating-cart__button"}},watch:function(){var e,t;void 0!==r.elements.drawer&&(o(n.body).on("orderable-drawer.open",r.open),o(n.body).on("orderable-drawer.close",r.close),o(n.body).on("click",r.elements.floating_cart_button_class,function(){o(n.body).trigger("orderable-drawer.open",{show_cart:!0})}),o(n.body).on("orderable-increase-quantity",r.cart.handle_quantity_change_by_button),o(n.body).on("orderable-decrease-quantity",r.cart.handle_quantity_change_by_button),e=r.debounce(r.cart.click_increase_decrease_quantity),o(n.body).on("orderable-increase-quantity",e),o(n.body).on("orderable-decrease-quantity",e),e=n.querySelector("body:not( .rtl ) .orderable-drawer"),t=n.querySelector("body.rtl .orderable-drawer"),e&&e.addEventListener("swiped-right",function(e){r.close()}),t)&&t.addEventListener("swiped-left",function(e){r.close()})},open:function(e,t){t.html=t.html||!1,t.show_cart=t.show_cart||!1,r.elements.drawer_html.hide(),r.elements.drawer_cart.hide(),t.html&&(r.elements.drawer_html.html(t.html),r.elements.drawer_html.show()),t.show_cart&&(r.elements.drawer_html.html(""),r.elements.drawer_cart.show()),r.elements.overlay.addClass(r.vars.classes.overlay_open),r.elements.drawer.addClass(r.vars.classes.drawer_open),r.elements.body.addClass(r.vars.classes.drawer_open_body),o(n.body).trigger("orderable-drawer.opened",t)},close:function(){r.elements.overlay.removeClass(r.vars.classes.overlay_open),r.elements.drawer.removeClass(r.vars.classes.drawer_open),r.elements.body.removeClass(r.vars.classes.drawer_open_body),r.elements.drawer_html.html(""),o(n.body).trigger("orderable-drawer.closed")},cart:{click_increase_decrease_quantity:function(e,r){var t=r.attr("data-orderable-product-id"),a={action:"orderable_cart_quantity",cart_item_key:r.attr("data-orderable-cart-item-key"),product_id:t,quantity:r.attr("data-orderable-quantity")};this.currentRequest&&(this.currentRequest.abort(),this.currentRequest=void 0),this.currentRequest=jQuery.post(orderable_vars.ajax_url,a,function(e){var t;e&&(t=r.siblings(".orderable-quantity-roller__quantity"),a.quantity===t.attr("data-orderable-updating-quantity"))&&(o(n.body).trigger("added_to_cart",[e.fragments,e.cart_hash,r]),o(n.body).trigger("orderable-drawer.quantity-updated"))}.bind(this)).always(function(){this.currentRequest=void 0}.bind(this))},handle_quantity_change_by_button:function(e,t){var r=t.data("orderable-trigger"),a=parseInt(t.attr("data-orderable-quantity")),o=t.siblings(".orderable-quantity-roller__button--"+("increase-quantity"===r?"decrease":"increase")),n=t.siblings(".orderable-quantity-roller__quantity"),r="increase-quantity"===r?a+1:Math.max(0,a-1);t.attr("data-orderable-quantity",r),o.attr("data-orderable-quantity",r),n.attr("data-orderable-updating-quantity",r),n.text(r)}}};o(n).ready(r.on_ready)}(jQuery,document),function(i,l){"use strict";var d={on_ready:function(){d.cache(),d.watch()},cache:function(){d.vars={classes:{clickable_product:"orderable-product--add-to-cart ",add_to_order_button:"orderable-product__add-to-order",product_messages:"orderable-product__messages",product_price:"orderable-product__actions-price",invalid_field:"orderable-field--invalid",option_select_td:"orderable-product__option-select",button_loading:"orderable-button--loading",out_of_stock:"orderable-button--out-of-stock"},parent_price:null},d.elements={}},watch:function(){i(l.body).on("orderable-drawer.opened",d.init_product_options),i(l.body).on("orderable-add-to-cart",d.click_add_to_order),i(l.body).on("orderable-product-options",d.click_add_to_order),i(l.body).on("orderable-view-product",d.view_product),i(l.body).on("mouseenter mouseleave","."+d.vars.classes.clickable_product,d.simulate_add_to_order_hover),i(l.body).on("orderable-edit-cart-item",d.edit_cart_item),i(l.body).on("orderable-update-cart-item",d.update_cart_item),i(l.body).on("orderable-show-cart",d.show_cart)},simulate_add_to_order_hover:function(e){i(this).find("."+d.vars.classes.add_to_order_button).toggleClass("orderable-button--hover","mouseenter"===e.type)},click_add_to_order:function(e,t){var r=(t=void 0!==t?t:i(this)).is("button")?t:t.find("."+d.vars.classes.add_to_order_button),t=r.data("orderable-trigger"),a=r.data("orderable-product-id"),o=r.data("orderable-variation-id"),n=r.data("orderable-variation-attributes"),s={action:t};r.hasClass(d.vars.classes.button_loading)||r.hasClass(d.vars.classes.out_of_stock)||(r.addClass(d.vars.classes.button_loading),"add-to-cart"===t?d.add_to_cart({product_id:a,variation_id:o,attributes:n},function(e){s.show_cart=!0,s.response=e,i(l.body).trigger("orderable-drawer.open",s),r.removeClass(d.vars.classes.button_loading)}):"product-options"===t&&d.get_product_options({product_id:a,focus:r.data("orderable-focus")},function(e){s.html=e.html,i(l.body).trigger("orderable-drawer.open",s),r.removeClass(d.vars.classes.button_loading)}))},show_cart:function(){i(l.body).trigger("orderable-drawer.open",{show_cart:!0})},view_product:function(e,t){var r=t.data("orderable-product-id"),a={action:"product-options"};d.get_product_options({product_id:r,focus:t.data("orderable-focus")},function(e){a.html=e.html,i(l.body).trigger("orderable-drawer.open",a)})},add_to_cart:function(e,t){var r;void 0!==e.product_id&&(e={action:"orderable_add_to_cart",product_id:e.product_id,variation_id:e.variation_id||!1,attributes:e.attributes||!1},i(".orderable-product-fields-group").length&&(r=jQuery(".orderable-product-fields-group :input").serializeArray(),r=d.add_unchecked_checkbox_fields(r),r=d.convert_to_flat_object(r),jQuery.isEmptyObject(r)||(e=Object.assign(e,r))),jQuery.post(orderable_vars.ajax_url,e,function(e){e&&(i(l.body).trigger("added_to_cart",[e.fragments,e.cart_hash]),"function"==typeof t)&&t(e)}))},edit_cart_item:function(e,t){var r=t.data("orderable-cart-item-key");t.addClass(d.vars.classes.button_loading),d.get_cart_item_options({cart_item_key:r},function(e){e={html:e.html,action:"update-cart-item"};i(l.body).trigger("orderable-drawer.open",e),t.removeClass(d.vars.classes.button_loading)})},update_cart_item:function(e,r){var t=r.data("orderable-cart-item-key"),a=r.data("orderable-product-id"),o=r.data("orderable-variation-id"),n=r.data("orderable-variation-attributes");r.addClass(d.vars.classes.button_loading),d.update_cart_item_options({cart_item_key:t,product_id:a,variation_id:o,attributes:n},function(e){var t={show_cart:!0,response:e};i(l.body).trigger("added_to_cart",[e.fragments,e.cart_hash]),i(l.body).trigger("orderable-drawer.open",t),r.removeClass(d.vars.classes.button_loading)})},convert_to_flat_object:function(e){var a={};return e.forEach(function(e){var t="[]"===e.name.substr(-2)||Array.isArray(e.name),r=t?e.name.substr(0,e.name.length-2):e.name;t?(a[r]=void 0===a[r]?[]:a[r],a[r].push(e.value)):a[r]=e.value}),a},get_product_options:function(e,t){void 0!==e.product_id&&(e.action="orderable_get_product_options",jQuery.post(orderable_vars.ajax_url,e,function(e){e.success&&"function"==typeof t&&t(e.data)}))},get_cart_item_options:function(e,t){void 0!==e.cart_item_key&&(e.action="orderable_get_cart_item_options",jQuery.post(orderable_vars.ajax_url,e,function(e){e.success&&"function"==typeof t&&t(e.data)}))},update_cart_item_options:function(e,t){var r;void 0!==e.cart_item_key&&(e.action="orderable_update_cart_item_options",i(".orderable-product-fields-group").length&&(r=jQuery(".orderable-product-fields-group :input").serializeArray(),r=d.add_unchecked_checkbox_fields(r),r=d.convert_to_flat_object(r),jQuery.isEmptyObject(r)||(e=Object.assign(e,r))),jQuery.post(orderable_vars.ajax_url,e,function(e){e&&"function"==typeof t&&t(e)}))},init_product_options:function(e,t){var r,a,o;void 0===t.action||"product-options"!==t.action&&"update-cart-item"!==t.action||(r=i(t=".orderable-drawer .orderable-product__options input, .orderable-drawer .orderable-product__options select, .orderable-product__options textarea"),d.vars.parent_price=i(".orderable-drawer .orderable-product__actions-price").html(),d.product_options_change(r),d.update_button_state(),a=d.debounce(d.update_button_state,500),o=d.debounce(d.product_options_change,500),i(l).on("change keyup",t,function(){o(r),a()}))},product_options_change:function(e){var t=i(".orderable-drawer .orderable-product__add-to-order, .orderable-drawer .orderable-product__update-cart-item"),r=d.check_options(e),a=t.data("orderable-product-type");"product-options"===t.attr("data-orderable-trigger")&&t.attr("data-orderable-trigger","add-to-cart"),i("."+d.vars.classes.product_messages).html(""),"variable"===a&&(r?(a=d.check_variation(e),d.set_variation(t,a)):d.clear_variation(t))},check_options:function(e){var r;return!(e.length<=0)&&(r=!0,e.each(function(e,t){i(t).hasClass("orderable-input--validate")&&(""===i(t).val()?(i(t).addClass(d.vars.classes.invalid_field),r=!1):i(t).removeClass(d.vars.classes.invalid_field))}),r)},check_variation:function(e){var t=(t=e.closest(".orderable-drawer").find(".orderable-product__variations").text())?JSON.parse(t):"",e=d.serialize_object(e),t=d.find_matching_variations(t,e);return!d.is_empty(t)&&((t=t.shift()).attributes=e,t.attributes_json=JSON.stringify(e),void 0!==t)&&t},set_variation:function(e,t){var r=t.variation_id||"",a=t.attributes_json||"",o=t.price_html||d.vars.parent_price,n="";t&&""!==t.availability_html&&(n=t.availability_html),t&&!t.is_in_stock&&(n="<p>"+orderable_vars.i18n.out_of_stock+"</p>"),t&&!t.is_purchasable&&(n="<p>"+orderable_vars.i18n.unavailable+"</p>"),!1===t&&(n="<p>"+orderable_vars.i18n.no_exist+"</p>"),!t||t.is_purchasable&&t.is_in_stock||(a=r=""),""!==n&&i("."+d.vars.classes.product_messages).html(n),e.data("orderable-variation-id",r),e.data("orderable-variation-attributes",a),i(".orderable-drawer .orderable-product__actions-price").html(o),e.trigger("orderable_variation_set",{variation:t,variation_id:r,attributes:a,price:o})},clear_variation:function(e){d.set_variation(e,""),d.vars.parent_price&&i(".orderable-drawer .orderable-product__actions-price").html(d.vars.parent_price)},find_matching_variations:function(e,t){for(var r=[],a=0;a<e.length;a++){var o=e[a];d.is_matching_variation(o.attributes,t)&&r.push(o)}return r},is_matching_variation:function(e,t){var r,a,o,n=!0;for(r in e)e.hasOwnProperty(r)&&(a=e[r],o=t[r],void 0!==a)&&void 0!==o&&0!==a.length&&0!==o.length&&a!==o&&(n=!1);return n},is_empty:function(e){return void 0===e||!1===e||e.length<=0||!e},serialize_object:function(e){for(var t=e.serializeArray(),r={},a=0;a<t.length;a++)r[t[a].name]=t[a].value;return r},update_button_state:function(){setTimeout(function(){var e=i(".orderable-drawer .orderable-product__add-to-order, .orderable-drawer .orderable-product__update-cart-item"),t=i(".orderable-drawer__html ."+d.vars.classes.invalid_field).length,r=!0;"variable"===e.data("orderable-product-type")&&(r=""!==e.data("orderable-variation-id")),e.prop("disabled",t||!r)},50)},debounce:function(a,o,n){var s;return function(){var e=this,t=arguments,r=n&&!s;clearTimeout(s),s=setTimeout(function(){s=null,n||a.apply(e,t)},o),r&&a.apply(e,t)}},add_unchecked_checkbox_fields:function(r){return jQuery('.orderable-product-fields-group :input[type="checkbox"]:not(:checked)').each(function(e,t){r.push({name:t.getAttribute("name"),value:""})}),r}};i(l).ready(d.on_ready)}(jQuery,document),function(o,n){"use strict";var s={on_ready:function(){s.cache(),s.watch()},cache:function(){s.vars={top:{}},s.elements={}},watch:function(){o(n.body).on("orderable-drawer.opened",s.trigger),o(n.body).on("orderable-tabs.changed",s.trigger),o(n.body).on("orderable-accordion.toggled",s.trigger),o(n.body).on("wc_fragments_loaded",s.trigger)},trigger:function(){o(".orderable-sb-container").each(function(e,t){var r,t=o(t),a=t.data("orderable-scroll-id");s.has_scrollbar(t)||(t.scrollBox({containerClass:"orderable-sb-container",containerNoScrollClass:"orderable-sb-container-noscroll",contentClass:"orderable-sb-content",scrollbarContainerClass:"orderable-sb-scrollbar-container",scrollBarClass:"orderable-sb-scrollbar"}),0<(r=t.find(".orderable-sb-content")).length&&(r.on("scroll.scrollBox",s.log_top_position),void 0!==s.vars.top[a])&&r.scrollTop(s.vars.top[a]),o(n.body).trigger("orderable-scrollbar.created",{element:t,content:r}))}),o(window).trigger("resize.scrollBox")},has_scrollbar:function(e){return 0<e.find(".orderable-sb-content").length},log_top_position:function(e){var t=o(e.currentTarget).closest(".orderable-sb-container").data("orderable-scroll-id");s.vars.top[t]=o(e.currentTarget).scrollTop()}};o(n).ready(s.on_ready)}(jQuery,document),function(s,i){"use strict";var l={on_ready:function(){l.cache(),l.watch(),l.toggle_scroll()},on_resize:function(){l.toggle_scroll()},cache:function(){l.vars={classes:{tabs:"orderable-tabs",tabs_list:"orderable-tabs__list",tab_items:"orderable-tabs__item",tab_item_active:"orderable-tabs__item--active",tab_links:"orderable-tabs__link",tab_arrow_right:"orderable-tabs__arrow-right",tab_arrow_left:"orderable-tabs__arrow-left"},dragging:!1},l.elements={}},watch:function(){s("body").on("touchstart",function(){l.vars.dragging=!1}).on("touchmove",function(){l.vars.dragging=!0}),s(i.body).on("click mouseup touchend","."+l.vars.classes.tab_links,function(e){var t,r,a,o,n;l.vars.dragging||(e.preventDefault(),t=(e=s(this)).attr("href"),r=e.closest("."+l.vars.classes.tab_items),a=(n=e.closest("."+l.vars.classes.tabs)).find("."+l.vars.classes.tabs_list),o=n.find("."+l.vars.classes.tab_items),n=n.data("orderable-tabs"),n=(e=e.closest(n.wrapper)).find(n.sections),e=e.find(t),n.hide(),e.show(),o.removeClass(l.vars.classes.tab_item_active),r.addClass(l.vars.classes.tab_item_active),a.animate({scrollLeft:a.scrollLeft()+r.position().left}),s(i.body).trigger("orderable-tabs.changed",{tab:r}))}),s("."+l.vars.classes.tabs_list).on("scroll",function(e){var t=s(this),r=t.parent("."+l.vars.classes.tabs),a=t.siblings("."+l.vars.classes.tab_arrow_right),o=t.siblings("."+l.vars.classes.tab_arrow_left);t[0].scrollWidth<=r.width()+t.scrollLeft()?a.fadeOut():a.fadeIn(),t.scrollLeft()-o.width()<=0?o.fadeOut():o.fadeIn()}),s("."+l.vars.classes.tabs_list).on("wheel DOMMouseScroll mousewheel touchmove",function(){s(this).stop()}),s(i).on("click","."+l.vars.classes.tab_arrow_right,function(e){e.preventDefault();var e=s(this).parent(),t=e.find("."+l.vars.classes.tabs_list);t.animate({scrollLeft:t.scrollLeft()+.5*e.width()})}),s(i).on("click","."+l.vars.classes.tab_arrow_left,function(e){e.preventDefault();var e=s(this).parent(),t=e.find("."+l.vars.classes.tabs_list);t.animate({scrollLeft:t.scrollLeft()-.5*e.width()})})},toggle_scroll:function(){s("."+l.vars.classes.tabs).each(function(e,t){var r=s(this),a=r.data("orderable-tabs"),r=r.closest(a.wrapper),a=r.find("."+l.vars.classes.tabs_list),o=r.find("."+l.vars.classes.tab_arrow_right);r.outerWidth()<a[0].scrollWidth?o.show():o.hide()})}};s(i).ready(l.on_ready),s(window).on("resize",l.on_resize)}(jQuery,document);var orderable_timings={};!function(i,e){"use strict";orderable_timings={on_ready:function(){orderable_timings.watch()},restore:function(){var e,t=orderable_timings.get_timings();t&&t.date&&(0<(e=i(".orderable-order-timings__date")).find('option[value="'+t.date+'"]').length&&(e.val(t.date),e.change()),t.time)&&0<(e=i(".orderable-order-timings__time")).find('option[value="'+t.time+'"]').length&&(e.val(t.time),e.change())},watch:function(){i(e.body).on("wc_fragments_refreshed",function(){orderable_timings.restore()}),i(e.body).on("updated_checkout",function(){orderable_timings.restore()}),i(e.body).on("change",".orderable-order-timings__date",function(e){var t=i(this).find("option:selected").data("orderable-slots"),r=i(".orderable-order-timings--time"),a=i(".orderable-order-timings__time"),o=a.find("option").first(),n=a.find('option[value="asap"]').first(),s=orderable_timings.get_timings();s.date=i(".orderable-order-timings__date").val(),window.localStorage.setItem("orderable_timings",JSON.stringify(s)),a.html(o),n&&a.append(n),t?"all-day"===t[0].value?(r.hide(),a.prop("disabled",!0)):(a.prop("disabled",!1),r.show(),i.each(t,function(e,t){a.append(i("<option />").attr("value",t.value).text(t.formatted))})):(a.prop("disabled",!0),r.hide())}),i(e.body).on("change",".orderable-order-timings__time",function(e){var t=orderable_timings.get_timings();t.time=i(".orderable-order-timings__time").val(),window.localStorage.setItem("orderable_timings",JSON.stringify(t))})},get_timings:function(){return JSON.parse(window.localStorage.getItem("orderable_timings"))||{}}},i(e).ready(orderable_timings.on_ready)}(jQuery,document),function(r,a){"use strict";var e={on_ready:function(){e.watch()},watch:function(){r(a.body).on("click","[data-orderable-trigger]",e.trigger)},trigger:function(e){e.stopImmediatePropagation();var e=r(this),t=e.data("orderable-trigger");r(a.body).trigger("orderable-"+t,[e])}};r(a).ready(e.on_ready)}(jQuery,document),function(o,e,n){"use strict";var s="scrollBox",r={containerClass:"sb-container",containerNoScrollClass:"sb-container-noscroll",contentClass:"sb-content",scrollbarContainerClass:"sb-scrollbar-container",scrollBarClass:"sb-scrollbar"};function t(e,t){this.element=e,this.settings=o.extend({},r,t),this._defaults=r,this._name=s,this.init()}o.extend(t.prototype,{init:function(){this.addScrollbar(),this.addEvents(),this.onResize()},addScrollbar:function(){o(this.element).addClass(this.settings.containerClass),this.wrapper=o("<div class='"+this.settings.contentClass+"' />"),this.wrapper.append(o(this.element).contents()),o(this.element).append(this.wrapper),this.scollbarContainer=o("<div class='"+this.settings.scrollbarContainerClass+"' />"),this.scrollBar=o("<div class='"+this.settings.scrollBarClass+"' />"),this.scollbarContainer.append(this.scrollBar),o(this.element).prepend(this.scollbarContainer)},addEvents:function(){this.wrapper.on("scroll."+s,o.proxy(this.onScroll,this)),o(e).on("resize."+s,o.proxy(this.onResize,this)),this.scrollBar.on("mousedown."+s,o.proxy(this.onMousedown,this)),this.scrollBar.on("touchstart."+s,o.proxy(this.onTouchstart,this))},onTouchstart:function(t){var r=this,a=(t.preventDefault(),r.scrollBar[0].offsetTop);o(n).on("touchmove."+s,function(e){e=e.touches[0].pageY-t.touches[0].pageY;r.scrollBar[0].style.top=Math.min(r.scollbarContainer[0].clientHeight-r.scrollBar[0].clientHeight,Math.max(0,a+e))+"px",r.wrapper[0].scrollTop=r.wrapper[0].scrollHeight*r.scrollBar[0].offsetTop/r.scollbarContainer[0].clientHeight}),o(n).on("touchend."+s,function(){o(n).off("touchmove."+s),o(n).off("touchend."+s)})},onMousedown:function(t){var r=this,a=(t.preventDefault(),r.scrollBar[0].offsetTop);o(n).on("mousemove."+s,function(e){e=e.pageY-t.pageY;r.scrollBar[0].style.top=Math.min(r.scollbarContainer[0].clientHeight-r.scrollBar[0].clientHeight,Math.max(0,a+e))+"px",r.wrapper[0].scrollTop=r.wrapper[0].scrollHeight*r.scrollBar[0].offsetTop/r.scollbarContainer[0].clientHeight}),o(n).on("mouseup."+s,function(){o(n).off("mousemove."+s),o(n).off("mouseup."+s)})},onResize:function(){this.wrapper.css("max-height",o(this.element).height());var e=this.wrapper[0].clientHeight;this.scrollBar.css("height",this.scollbarContainer[0].clientHeight*e/this.wrapper[0].scrollHeight+"px"),this.scollbarContainer[0].clientHeight<=this.scrollBar[0].clientHeight?o(this.element).addClass(this.settings.containerNoScrollClass):o(this.element).removeClass(this.settings.containerNoScrollClass),this.onScroll()},onScroll:function(){this.scrollBar.css("top",Math.min(this.scollbarContainer[0].clientHeight-this.scrollBar[0].clientHeight,this.scollbarContainer[0].clientHeight*this.wrapper[0].scrollTop/this.wrapper[0].scrollHeight)+"px")}}),o.fn[s]=function(e){return this.each(function(){o.data(this,"plugin_"+s)||o.data(this,"plugin_"+s,new t(this,e))})}}(jQuery,window,document),function(e,o){"use strict";"function"!=typeof e.CustomEvent&&(e.CustomEvent=function(e,t){t=t||{bubbles:!1,cancelable:!1,detail:void 0};var r=o.createEvent("CustomEvent");return r.initCustomEvent(e,t.bubbles,t.cancelable,t.detail),r},e.CustomEvent.prototype=e.Event.prototype),o.addEventListener("touchstart",function(e){"true"!==e.target.getAttribute("data-swipe-ignore")&&(c=e.target,d=Date.now(),n=e.touches[0].clientX,s=e.touches[0].clientY,l=i=0)},!1),o.addEventListener("touchmove",function(e){var t;n&&s&&(t=e.touches[0].clientX,e=e.touches[0].clientY,i=n-t,l=s-e)},!1),o.addEventListener("touchend",function(e){var t,r,a,o;c===e.target&&(o=parseInt(u(c,"data-swipe-threshold","20"),10),t=parseInt(u(c,"data-swipe-timeout","500"),10),r=Date.now()-d,a="",e=e.changedTouches||e.touches||[],Math.abs(i)>Math.abs(l)?Math.abs(i)>o&&r<t&&(a=0<i?"swiped-left":"swiped-right"):Math.abs(l)>o&&r<t&&(a=0<l?"swiped-up":"swiped-down"),""!==a&&(o={dir:a.replace(/swiped-/,""),touchType:(e[0]||{}).touchType||"direct",xStart:parseInt(n,10),xEnd:parseInt((e[0]||{}).clientX||-1,10),yStart:parseInt(s,10),yEnd:parseInt((e[0]||{}).clientY||-1,10)},c.dispatchEvent(new CustomEvent("swiped",{bubbles:!0,cancelable:!0,detail:o})),c.dispatchEvent(new CustomEvent(a,{bubbles:!0,cancelable:!0,detail:o}))),d=s=n=null)},!1);var n=null,s=null,i=null,l=null,d=null,c=null;function u(e,t,r){for(;e&&e!==o.documentElement;){var a=e.getAttribute(t);if(a)return a;e=e.parentNode}return r}}(window,document);
     1!function(o,n){"use strict";var s={on_ready:function(){s.cache(),s.watch()},cache:function(){s.vars={classes:{parent:"orderable-accordion",link:"orderable-accordion__item-link",content:"orderable-accordion__item-content",link_active:"orderable-accordion__item-link--active",content_active:"orderable-accordion__item-content--active"}}},watch:function(){o(n.body).on("click","."+s.vars.classes.link,function(e){e.preventDefault();var e=o(this),t=e.closest("."+s.vars.classes.parent),r=e.attr("href"),r=o(r),a=e.hasClass(s.vars.classes.link_active);t.find("."+s.vars.classes.link).removeClass(s.vars.classes.link_active),t.find("."+s.vars.classes.content).removeClass(s.vars.classes.content_active),a||(e.addClass(s.vars.classes.link_active),r.addClass(s.vars.classes.content_active)),o(n.body).trigger("orderable-accordion.toggled",{link:e,content:r})}),o(n.body).on("orderable-scrollbar.created",function(e,t){var r=o(".orderable-drawer ."+s.vars.classes.link_active);r.length<=0||(r=(t=t.content).scrollTop()-t.offset().top+r.offset().top,t.scrollTop(r))})}};o(n).ready(s.on_ready)}(jQuery,document),function(o,n){"use strict";var r={debounce:function(t,r=700){let a;return(...e)=>{clearTimeout(a),a=setTimeout(()=>{t.apply(this,e)},r)}},allow_only_numbers:function(e){var t=String.fromCharCode(e.which);/^\d+$/.test(t)||e.preventDefault()},on_change_quantity:function(e){const t=o(e.currentTarget);var e=t.data("orderable-product-id"),r=t.data("orderable-cart-item-key"),a=parseInt(t.text());jQuery.post(orderable_vars.ajax_url,{action:"orderable_cart_quantity",cart_item_key:r,product_id:e,quantity:a},function(e){e&&(o(n.body).trigger("added_to_cart",[e.fragments,e.cart_hash,t]),o(n.body).trigger("orderable-drawer.quantity-updated"))})},on_ready:function(){r.cache(),r.watch(),o(n.body).on("keypress",".orderable-quantity-roller__quantity",r.allow_only_numbers),o(".orderable-drawer__cart").on("input",".orderable-quantity-roller__quantity",r.debounce(r.on_change_quantity)),orderable_vars&&!orderable_vars.woocommerce_enable_ajax_add_to_cart&&o(n.body).off("click",".add_to_cart_button")},cache:function(){r.vars={classes:{overlay:"orderable-drawer-overlay",drawer:"orderable-drawer",drawer_cart:"orderable-drawer__cart",drawer_html:"orderable-drawer__html",overlay_open:"orderable-drawer-overlay--open",drawer_open:"orderable-drawer--open",drawer_open_body:"orderable-drawer-open"}},r.elements={body:o("body"),overlay:o("."+r.vars.classes.overlay),drawer:o("."+r.vars.classes.drawer),drawer_cart:o("."+r.vars.classes.drawer_cart),drawer_html:o("."+r.vars.classes.drawer_html),floating_cart_button_class:".orderable-floating-cart__button"}},watch:function(){var e,t;void 0!==r.elements.drawer&&(o(n.body).on("orderable-drawer.open",r.open),o(n.body).on("orderable-drawer.close",r.close),o(n.body).on("click",r.elements.floating_cart_button_class,function(){o(n.body).trigger("orderable-drawer.open",{show_cart:!0})}),o(n.body).on("orderable-increase-quantity",r.cart.handle_quantity_change_by_button),o(n.body).on("orderable-decrease-quantity",r.cart.handle_quantity_change_by_button),e=r.debounce(r.cart.click_increase_decrease_quantity),o(n.body).on("orderable-increase-quantity",e),o(n.body).on("orderable-decrease-quantity",e),e=n.querySelector("body:not( .rtl ) .orderable-drawer"),t=n.querySelector("body.rtl .orderable-drawer"),e&&e.addEventListener("swiped-right",function(e){r.close()}),t)&&t.addEventListener("swiped-left",function(e){r.close()})},open:function(e,t){t.html=t.html||!1,t.show_cart=t.show_cart||!1,r.elements.drawer_html.hide(),r.elements.drawer_cart.hide(),t.html&&(r.elements.drawer_html.html(t.html),r.elements.drawer_html.show()),t.show_cart&&(r.elements.drawer_html.html(""),r.elements.drawer_cart.show()),r.elements.overlay.addClass(r.vars.classes.overlay_open),r.elements.drawer.addClass(r.vars.classes.drawer_open),r.elements.body.addClass(r.vars.classes.drawer_open_body),o(n.body).trigger("orderable-drawer.opened",t)},close:function(){r.elements.overlay.removeClass(r.vars.classes.overlay_open),r.elements.drawer.removeClass(r.vars.classes.drawer_open),r.elements.body.removeClass(r.vars.classes.drawer_open_body),r.elements.drawer_html.html(""),o(n.body).trigger("orderable-drawer.closed")},cart:{click_increase_decrease_quantity:function(e,r){var t=r.attr("data-orderable-product-id"),a={action:"orderable_cart_quantity",cart_item_key:r.attr("data-orderable-cart-item-key"),product_id:t,quantity:r.attr("data-orderable-quantity")};this.currentRequest&&(this.currentRequest.abort(),this.currentRequest=void 0),this.currentRequest=jQuery.post(orderable_vars.ajax_url,a,function(e){var t;e&&(t=r.siblings(".orderable-quantity-roller__quantity"),a.quantity===t.attr("data-orderable-updating-quantity"))&&(o(n.body).trigger("added_to_cart",[e.fragments,e.cart_hash,r]),o(n.body).trigger("orderable-drawer.quantity-updated"))}.bind(this)).always(function(){this.currentRequest=void 0}.bind(this))},handle_quantity_change_by_button:function(e,t){var r=t.data("orderable-trigger"),a=parseInt(t.attr("data-orderable-quantity")),o=t.siblings(".orderable-quantity-roller__button--"+("increase-quantity"===r?"decrease":"increase")),n=t.siblings(".orderable-quantity-roller__quantity"),r="increase-quantity"===r?a+1:Math.max(0,a-1);t.attr("data-orderable-quantity",r),o.attr("data-orderable-quantity",r),n.attr("data-orderable-updating-quantity",r),n.text(r)}}};o(n).ready(r.on_ready)}(jQuery,document),function(l,d){"use strict";var c={on_ready:function(){c.cache(),c.watch()},cache:function(){c.vars={classes:{clickable_product:"orderable-product--add-to-cart ",add_to_order_button:"orderable-product__add-to-order",product_messages:"orderable-product__messages",product_price:"orderable-product__actions-price",invalid_field:"orderable-field--invalid",option_select_td:"orderable-product__option-select",button_loading:"orderable-button--loading",out_of_stock:"orderable-button--out-of-stock"},parent_price:null},c.elements={}},watch:function(){l(d.body).on("orderable-drawer.opened",c.init_product_options),l(d.body).on("orderable-add-to-cart",c.click_add_to_order),l(d.body).on("orderable-product-options",c.click_add_to_order),l(d.body).on("orderable-view-product",c.view_product),l(d.body).on("mouseenter mouseleave","."+c.vars.classes.clickable_product,c.simulate_add_to_order_hover),l(d.body).on("orderable-edit-cart-item",c.edit_cart_item),l(d.body).on("orderable-update-cart-item",c.update_cart_item),l(d.body).on("orderable-show-cart",c.show_cart)},simulate_add_to_order_hover:function(e){l(this).find("."+c.vars.classes.add_to_order_button).toggleClass("orderable-button--hover","mouseenter"===e.type)},click_add_to_order:function(e,t){var r=(t=void 0!==t?t:l(this)).is("button")?t:t.find("."+c.vars.classes.add_to_order_button),a=r.data("orderable-trigger"),o=r.data("orderable-product-id"),n=r.data("orderable-variation-id"),s=r.data("orderable-variation-attributes"),i={action:a};r.hasClass(c.vars.classes.button_loading)||r.hasClass(c.vars.classes.out_of_stock)||(r.addClass(c.vars.classes.button_loading),"add-to-cart"===a?c.add_to_cart({product_id:o,variation_id:n,attributes:s,thisbutton:t},function(e){i.show_cart=!0,i.response=e,l(d.body).trigger("orderable-drawer.open",i),r.removeClass(c.vars.classes.button_loading)}):"product-options"===a&&c.get_product_options({product_id:o,focus:r.data("orderable-focus")},function(e){i.html=e.html,l(d.body).trigger("orderable-drawer.open",i),r.removeClass(c.vars.classes.button_loading)}))},show_cart:function(){l(d.body).trigger("orderable-drawer.open",{show_cart:!0})},view_product:function(e,t){var r=t.data("orderable-product-id"),a={action:"product-options"};c.get_product_options({product_id:r,focus:t.data("orderable-focus")},function(e){a.html=e.html,l(d.body).trigger("orderable-drawer.open",a)})},add_to_cart:function(t,r){var e,a;void 0!==t.product_id&&(e={action:"orderable_add_to_cart",product_id:t.product_id,variation_id:t.variation_id||!1,attributes:t.attributes||!1},l(".orderable-product-fields-group").length&&(a=jQuery(".orderable-product-fields-group :input").serializeArray(),a=c.add_unchecked_checkbox_fields(a),a=c.convert_to_flat_object(a),jQuery.isEmptyObject(a)||(e=Object.assign(e,a))),jQuery.post(orderable_vars.ajax_url,e,function(e){e&&(l(d.body).trigger("added_to_cart",[e.fragments,e.cart_hash,t.thisbutton]),"function"==typeof r)&&r(e)}))},edit_cart_item:function(e,t){var r=t.data("orderable-cart-item-key");t.addClass(c.vars.classes.button_loading),c.get_cart_item_options({cart_item_key:r},function(e){e={html:e.html,action:"update-cart-item"};l(d.body).trigger("orderable-drawer.open",e),t.removeClass(c.vars.classes.button_loading)})},update_cart_item:function(e,r){var t=r.data("orderable-cart-item-key"),a=r.data("orderable-product-id"),o=r.data("orderable-variation-id"),n=r.data("orderable-variation-attributes");r.addClass(c.vars.classes.button_loading),c.update_cart_item_options({cart_item_key:t,product_id:a,variation_id:o,attributes:n},function(e){var t={show_cart:!0,response:e};l(d.body).trigger("added_to_cart",[e.fragments,e.cart_hash]),l(d.body).trigger("orderable-drawer.open",t),r.removeClass(c.vars.classes.button_loading)})},convert_to_flat_object:function(e){var a={};return e.forEach(function(e){var t="[]"===e.name.substr(-2)||Array.isArray(e.name),r=t?e.name.substr(0,e.name.length-2):e.name;t?(a[r]=void 0===a[r]?[]:a[r],a[r].push(e.value)):a[r]=e.value}),a},get_product_options:function(e,t){void 0!==e.product_id&&(e.action="orderable_get_product_options",jQuery.post(orderable_vars.ajax_url,e,function(e){e.success&&"function"==typeof t&&t(e.data)}))},get_cart_item_options:function(e,t){void 0!==e.cart_item_key&&(e.action="orderable_get_cart_item_options",jQuery.post(orderable_vars.ajax_url,e,function(e){e.success&&"function"==typeof t&&t(e.data)}))},update_cart_item_options:function(e,t){var r;void 0!==e.cart_item_key&&(e.action="orderable_update_cart_item_options",l(".orderable-product-fields-group").length&&(r=jQuery(".orderable-product-fields-group :input").serializeArray(),r=c.add_unchecked_checkbox_fields(r),r=c.convert_to_flat_object(r),jQuery.isEmptyObject(r)||(e=Object.assign(e,r))),jQuery.post(orderable_vars.ajax_url,e,function(e){e&&"function"==typeof t&&t(e)}))},init_product_options:function(e,t){var r,a,o;void 0===t.action||"product-options"!==t.action&&"update-cart-item"!==t.action||(r=l(t=".orderable-drawer .orderable-product__options input, .orderable-drawer .orderable-product__options select, .orderable-product__options textarea"),c.vars.parent_price=l(".orderable-drawer .orderable-product__actions-price").html(),c.product_options_change(r),c.update_button_state(),a=c.debounce(c.update_button_state,500),o=c.debounce(c.product_options_change,500),l(d).on("change keyup",t,function(){o(r),a()}))},product_options_change:function(e){var t=l(".orderable-drawer .orderable-product__add-to-order, .orderable-drawer .orderable-product__update-cart-item"),r=c.check_options(e),a=t.data("orderable-product-type");"product-options"===t.attr("data-orderable-trigger")&&t.attr("data-orderable-trigger","add-to-cart"),l("."+c.vars.classes.product_messages).html(""),"variable"===a&&(r?(a=c.check_variation(e),c.set_variation(t,a)):c.clear_variation(t))},check_options:function(e){var r;return!(e.length<=0)&&(r=!0,e.each(function(e,t){l(t).hasClass("orderable-input--validate")&&(""===l(t).val()?(l(t).addClass(c.vars.classes.invalid_field),r=!1):l(t).removeClass(c.vars.classes.invalid_field))}),r)},check_variation:function(e){var t=(t=e.closest(".orderable-drawer").find(".orderable-product__variations").text())?JSON.parse(t):"",e=c.serialize_object(e),t=c.find_matching_variations(t,e);return!c.is_empty(t)&&((t=t.shift()).attributes=e,t.attributes_json=JSON.stringify(e),void 0!==t)&&t},set_variation:function(e,t){var r=t.variation_id||"",a=t.attributes_json||"",o=t.price_html||c.vars.parent_price,n="";t&&""!==t.availability_html&&(n=t.availability_html),t&&!t.is_in_stock&&(n="<p>"+orderable_vars.i18n.out_of_stock+"</p>"),t&&!t.is_purchasable&&(n="<p>"+orderable_vars.i18n.unavailable+"</p>"),!1===t&&(n="<p>"+orderable_vars.i18n.no_exist+"</p>"),!t||t.is_purchasable&&t.is_in_stock||(a=r=""),""!==n&&l("."+c.vars.classes.product_messages).html(n),e.data("orderable-variation-id",r),e.data("orderable-variation-attributes",a),l(".orderable-drawer .orderable-product__actions-price").html(o),e.trigger("orderable_variation_set",{variation:t,variation_id:r,attributes:a,price:o})},clear_variation:function(e){c.set_variation(e,""),c.vars.parent_price&&l(".orderable-drawer .orderable-product__actions-price").html(c.vars.parent_price)},find_matching_variations:function(e,t){for(var r=[],a=0;a<e.length;a++){var o=e[a];c.is_matching_variation(o.attributes,t)&&r.push(o)}return r},is_matching_variation:function(e,t){var r,a,o,n=!0;for(r in e)e.hasOwnProperty(r)&&(a=e[r],o=t[r],void 0!==a)&&void 0!==o&&0!==a.length&&0!==o.length&&a!==o&&(n=!1);return n},is_empty:function(e){return void 0===e||!1===e||e.length<=0||!e},serialize_object:function(e){for(var t=e.serializeArray(),r={},a=0;a<t.length;a++)r[t[a].name]=t[a].value;return r},update_button_state:function(){setTimeout(function(){var e=l(".orderable-drawer .orderable-product__add-to-order, .orderable-drawer .orderable-product__update-cart-item"),t=l(".orderable-drawer__html ."+c.vars.classes.invalid_field).length,r=!0;"variable"===e.data("orderable-product-type")&&(r=""!==e.data("orderable-variation-id")),e.prop("disabled",t||!r)},50)},debounce:function(a,o,n){var s;return function(){var e=this,t=arguments,r=n&&!s;clearTimeout(s),s=setTimeout(function(){s=null,n||a.apply(e,t)},o),r&&a.apply(e,t)}},add_unchecked_checkbox_fields:function(r){return jQuery('.orderable-product-fields-group :input[type="checkbox"]:not(:checked)').each(function(e,t){r.push({name:t.getAttribute("name"),value:""})}),r}};l(d).ready(c.on_ready)}(jQuery,document),function(o,n){"use strict";var s={on_ready:function(){s.cache(),s.watch()},cache:function(){s.vars={top:{}},s.elements={}},watch:function(){o(n.body).on("orderable-drawer.opened",s.trigger),o(n.body).on("orderable-tabs.changed",s.trigger),o(n.body).on("orderable-accordion.toggled",s.trigger),o(n.body).on("wc_fragments_loaded",s.trigger)},trigger:function(){o(".orderable-sb-container").each(function(e,t){var r,t=o(t),a=t.data("orderable-scroll-id");s.has_scrollbar(t)||(t.scrollBox({containerClass:"orderable-sb-container",containerNoScrollClass:"orderable-sb-container-noscroll",contentClass:"orderable-sb-content",scrollbarContainerClass:"orderable-sb-scrollbar-container",scrollBarClass:"orderable-sb-scrollbar"}),0<(r=t.find(".orderable-sb-content")).length&&(r.on("scroll.scrollBox",s.log_top_position),void 0!==s.vars.top[a])&&r.scrollTop(s.vars.top[a]),o(n.body).trigger("orderable-scrollbar.created",{element:t,content:r}))}),o(window).trigger("resize.scrollBox")},has_scrollbar:function(e){return 0<e.find(".orderable-sb-content").length},log_top_position:function(e){var t=o(e.currentTarget).closest(".orderable-sb-container").data("orderable-scroll-id");s.vars.top[t]=o(e.currentTarget).scrollTop()}};o(n).ready(s.on_ready)}(jQuery,document),function(s,i){"use strict";var l={on_ready:function(){l.cache(),l.watch(),l.toggle_scroll()},on_resize:function(){l.toggle_scroll()},cache:function(){l.vars={classes:{tabs:"orderable-tabs",tabs_list:"orderable-tabs__list",tab_items:"orderable-tabs__item",tab_item_active:"orderable-tabs__item--active",tab_links:"orderable-tabs__link",tab_arrow_right:"orderable-tabs__arrow-right",tab_arrow_left:"orderable-tabs__arrow-left"},dragging:!1},l.elements={}},watch:function(){s("body").on("touchstart",function(){l.vars.dragging=!1}).on("touchmove",function(){l.vars.dragging=!0}),s(i.body).on("click mouseup touchend","."+l.vars.classes.tab_links,function(e){var t,r,a,o,n;l.vars.dragging||(e.preventDefault(),t=(e=s(this)).attr("href"),r=e.closest("."+l.vars.classes.tab_items),a=(n=e.closest("."+l.vars.classes.tabs)).find("."+l.vars.classes.tabs_list),o=n.find("."+l.vars.classes.tab_items),n=n.data("orderable-tabs"),n=(e=e.closest(n.wrapper)).find(n.sections),e=e.find(t),n.hide(),e.show(),o.removeClass(l.vars.classes.tab_item_active),r.addClass(l.vars.classes.tab_item_active),a.animate({scrollLeft:a.scrollLeft()+r.position().left}),s(i.body).trigger("orderable-tabs.changed",{tab:r}))}),s("."+l.vars.classes.tabs_list).on("scroll",function(e){var t=s(this),r=t.parent("."+l.vars.classes.tabs),a=t.siblings("."+l.vars.classes.tab_arrow_right),o=t.siblings("."+l.vars.classes.tab_arrow_left);t[0].scrollWidth<=r.width()+t.scrollLeft()?a.fadeOut():a.fadeIn(),t.scrollLeft()-o.width()<=0?o.fadeOut():o.fadeIn()}),s("."+l.vars.classes.tabs_list).on("wheel DOMMouseScroll mousewheel touchmove",function(){s(this).stop()}),s(i).on("click","."+l.vars.classes.tab_arrow_right,function(e){e.preventDefault();var e=s(this).parent(),t=e.find("."+l.vars.classes.tabs_list);t.animate({scrollLeft:t.scrollLeft()+.5*e.width()})}),s(i).on("click","."+l.vars.classes.tab_arrow_left,function(e){e.preventDefault();var e=s(this).parent(),t=e.find("."+l.vars.classes.tabs_list);t.animate({scrollLeft:t.scrollLeft()-.5*e.width()})})},toggle_scroll:function(){s("."+l.vars.classes.tabs).each(function(e,t){var r=s(this),a=r.data("orderable-tabs"),r=r.closest(a.wrapper),a=r.find("."+l.vars.classes.tabs_list),o=r.find("."+l.vars.classes.tab_arrow_right);r.outerWidth()<a[0].scrollWidth?o.show():o.hide()})}};s(i).ready(l.on_ready),s(window).on("resize",l.on_resize)}(jQuery,document);var orderable_timings={};!function(i,e){"use strict";orderable_timings={on_ready:function(){orderable_timings.watch()},restore:function(){var e,t=orderable_timings.get_timings();t&&t.date&&(0<(e=i(".orderable-order-timings__date")).find('option[value="'+t.date+'"]').length&&(e.val(t.date),e.change()),t.time)&&0<(e=i(".orderable-order-timings__time")).find('option[value="'+t.time+'"]').length&&(e.val(t.time),e.change())},watch:function(){i(e.body).on("wc_fragments_refreshed",function(){orderable_timings.restore()}),i(e.body).on("updated_checkout",function(){orderable_timings.restore()}),i(e.body).on("change",".orderable-order-timings__date",function(e){var t=i(this).find("option:selected").data("orderable-slots"),r=i(".orderable-order-timings--time"),a=i(".orderable-order-timings__time"),o=a.find("option").first(),n=a.find('option[value="asap"]').first(),s=orderable_timings.get_timings();s.date=i(".orderable-order-timings__date").val(),window.localStorage.setItem("orderable_timings",JSON.stringify(s)),a.html(o),n&&a.append(n),t?"all-day"===t[0].value?(r.hide(),a.prop("disabled",!0)):(a.prop("disabled",!1),r.show(),i.each(t,function(e,t){a.append(i("<option />").attr("value",t.value).text(t.formatted))})):(a.prop("disabled",!0),r.hide())}),i(e.body).on("change",".orderable-order-timings__time",function(e){var t=orderable_timings.get_timings();t.time=i(".orderable-order-timings__time").val(),window.localStorage.setItem("orderable_timings",JSON.stringify(t))})},get_timings:function(){return JSON.parse(window.localStorage.getItem("orderable_timings"))||{}}},i(e).ready(orderable_timings.on_ready)}(jQuery,document),function(r,a){"use strict";var e={on_ready:function(){e.watch()},watch:function(){r(a.body).on("click","[data-orderable-trigger]",e.trigger)},trigger:function(e){e.stopImmediatePropagation();var e=r(this),t=e.data("orderable-trigger");r(a.body).trigger("orderable-"+t,[e])}};r(a).ready(e.on_ready)}(jQuery,document),function(o,e,n){"use strict";var s="scrollBox",r={containerClass:"sb-container",containerNoScrollClass:"sb-container-noscroll",contentClass:"sb-content",scrollbarContainerClass:"sb-scrollbar-container",scrollBarClass:"sb-scrollbar"};function t(e,t){this.element=e,this.settings=o.extend({},r,t),this._defaults=r,this._name=s,this.init()}o.extend(t.prototype,{init:function(){this.addScrollbar(),this.addEvents(),this.onResize()},addScrollbar:function(){o(this.element).addClass(this.settings.containerClass),this.wrapper=o("<div class='"+this.settings.contentClass+"' />"),this.wrapper.append(o(this.element).contents()),o(this.element).append(this.wrapper),this.scollbarContainer=o("<div class='"+this.settings.scrollbarContainerClass+"' />"),this.scrollBar=o("<div class='"+this.settings.scrollBarClass+"' />"),this.scollbarContainer.append(this.scrollBar),o(this.element).prepend(this.scollbarContainer)},addEvents:function(){this.wrapper.on("scroll."+s,o.proxy(this.onScroll,this)),o(e).on("resize."+s,o.proxy(this.onResize,this)),this.scrollBar.on("mousedown."+s,o.proxy(this.onMousedown,this)),this.scrollBar.on("touchstart."+s,o.proxy(this.onTouchstart,this))},onTouchstart:function(t){var r=this,a=(t.preventDefault(),r.scrollBar[0].offsetTop);o(n).on("touchmove."+s,function(e){e=e.touches[0].pageY-t.touches[0].pageY;r.scrollBar[0].style.top=Math.min(r.scollbarContainer[0].clientHeight-r.scrollBar[0].clientHeight,Math.max(0,a+e))+"px",r.wrapper[0].scrollTop=r.wrapper[0].scrollHeight*r.scrollBar[0].offsetTop/r.scollbarContainer[0].clientHeight}),o(n).on("touchend."+s,function(){o(n).off("touchmove."+s),o(n).off("touchend."+s)})},onMousedown:function(t){var r=this,a=(t.preventDefault(),r.scrollBar[0].offsetTop);o(n).on("mousemove."+s,function(e){e=e.pageY-t.pageY;r.scrollBar[0].style.top=Math.min(r.scollbarContainer[0].clientHeight-r.scrollBar[0].clientHeight,Math.max(0,a+e))+"px",r.wrapper[0].scrollTop=r.wrapper[0].scrollHeight*r.scrollBar[0].offsetTop/r.scollbarContainer[0].clientHeight}),o(n).on("mouseup."+s,function(){o(n).off("mousemove."+s),o(n).off("mouseup."+s)})},onResize:function(){this.wrapper.css("max-height",o(this.element).height());var e=this.wrapper[0].clientHeight;this.scrollBar.css("height",this.scollbarContainer[0].clientHeight*e/this.wrapper[0].scrollHeight+"px"),this.scollbarContainer[0].clientHeight<=this.scrollBar[0].clientHeight?o(this.element).addClass(this.settings.containerNoScrollClass):o(this.element).removeClass(this.settings.containerNoScrollClass),this.onScroll()},onScroll:function(){this.scrollBar.css("top",Math.min(this.scollbarContainer[0].clientHeight-this.scrollBar[0].clientHeight,this.scollbarContainer[0].clientHeight*this.wrapper[0].scrollTop/this.wrapper[0].scrollHeight)+"px")}}),o.fn[s]=function(e){return this.each(function(){o.data(this,"plugin_"+s)||o.data(this,"plugin_"+s,new t(this,e))})}}(jQuery,window,document),function(e,o){"use strict";"function"!=typeof e.CustomEvent&&(e.CustomEvent=function(e,t){t=t||{bubbles:!1,cancelable:!1,detail:void 0};var r=o.createEvent("CustomEvent");return r.initCustomEvent(e,t.bubbles,t.cancelable,t.detail),r},e.CustomEvent.prototype=e.Event.prototype),o.addEventListener("touchstart",function(e){"true"!==e.target.getAttribute("data-swipe-ignore")&&(c=e.target,d=Date.now(),n=e.touches[0].clientX,s=e.touches[0].clientY,l=i=0)},!1),o.addEventListener("touchmove",function(e){var t;n&&s&&(t=e.touches[0].clientX,e=e.touches[0].clientY,i=n-t,l=s-e)},!1),o.addEventListener("touchend",function(e){var t,r,a,o;c===e.target&&(o=parseInt(u(c,"data-swipe-threshold","20"),10),t=parseInt(u(c,"data-swipe-timeout","500"),10),r=Date.now()-d,a="",e=e.changedTouches||e.touches||[],Math.abs(i)>Math.abs(l)?Math.abs(i)>o&&r<t&&(a=0<i?"swiped-left":"swiped-right"):Math.abs(l)>o&&r<t&&(a=0<l?"swiped-up":"swiped-down"),""!==a&&(o={dir:a.replace(/swiped-/,""),touchType:(e[0]||{}).touchType||"direct",xStart:parseInt(n,10),xEnd:parseInt((e[0]||{}).clientX||-1,10),yStart:parseInt(s,10),yEnd:parseInt((e[0]||{}).clientY||-1,10)},c.dispatchEvent(new CustomEvent("swiped",{bubbles:!0,cancelable:!0,detail:o})),c.dispatchEvent(new CustomEvent(a,{bubbles:!0,cancelable:!0,detail:o}))),d=s=n=null)},!1);var n=null,s=null,i=null,l=null,d=null,c=null;function u(e,t,r){for(;e&&e!==o.documentElement;){var a=e.getAttribute(t);if(a)return a;e=e.parentNode}return r}}(window,document);
  • orderable/trunk/docs/actions.json

    r2943243 r2969309  
    387387        },
    388388        {
    389             "name": "orderable_init",
    390             "file": "orderable.php",
    391             "type": "action",
    392             "doc": {
    393                 "description": "Plugin Name: Orderable - Local Ordering System Author URI: https://orderable.com Description: Take local online ordering to a whole new level with Orderable.",
    394                 "long_description": "Version: 1.8.4 Author: Orderable Text Domain: orderable WC requires at least: 5.4.0 WC tested up to: 7.9",
    395                 "tags": [],
    396                 "long_description_html": "<p>Version: 1.8.4 Author: Orderable Text Domain: orderable WC requires at least: 5.4.0 WC tested up to: 7.9</p>"
    397             },
    398             "args": 0
    399         },
    400         {
    401389            "name": "orderable_location_save_data",
    402390            "file": "inc/modules/location/admin/class-location-admin.php",
  • orderable/trunk/docs/filters.json

    r2913809 r2969309  
    33    "hooks": [
    44        {
    5             "name": "active_plugins",
    6             "file": "orderable.php",
    7             "type": "filter",
    8             "doc": {
    9                 "description": "",
    10                 "long_description": "",
    11                 "tags": [],
    12                 "long_description_html": ""
    13             },
    14             "args": 1
    15         },
    16         {
    175            "name": "orderable_add_to_cart_button_args",
    186            "file": "inc/class-products.php",
     
    595583            "doc": {
    596584                "description": "",
    597                 "long_description": "",
    598                 "tags": [],
    599                 "long_description_html": ""
    600             },
    601             "args": 1
    602         },
    603         {
    604             "name": "orderable_live_view_new_order_audio_file_url",
    605             "file": "inc/modules/live-view/class-live-view.php",
    606             "type": "filter",
    607             "doc": {
    608                 "description": "Allows to override the notification audio file.",
    609585                "long_description": "",
    610586                "tags": [],
  • orderable/trunk/inc/class-assets.php

    r2912589 r2969309  
    9191
    9292        $suffix      = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? '' : '.min';
    93         $style_deps  = apply_filters( 'orderable_admin_style_deps', array() );
     93        $style_deps  = apply_filters( 'orderable_admin_style_deps', array( 'wc-admin-layout' ) );
    9494        $script_deps = apply_filters( 'orderable_admin_script_deps', array( 'jquery' ) );
    9595
  • orderable/trunk/inc/class-orders.php

    r2943243 r2969309  
    2424        }
    2525
     26        require_once WC_ABSPATH . 'includes/admin/wc-admin-functions.php';
     27
    2628        $current_screen            = get_current_screen();
    2729        $shop_order_page_screen_id = OrderUtil::custom_orders_table_usage_is_enabled() ? wc_get_page_screen_id( 'shop-order' ) : 'edit-shop_order';
  • orderable/trunk/inc/class-products.php

    r2745279 r2969309  
    5656        $categories = self::order_categories_by_menu_order( $categories );
    5757
     58        $orderby = ! defined( 'ORDERABLE_PRO_VERSION' ) || empty( $_GET['order_by'] ) ? '' : sanitize_text_field( wp_unslash( $_GET['order_by'] ) ); // phpcs:ignore WordPress.Security.NonceVerification
     59
     60        if ( empty( $orderby ) ) {
     61            $orderby = ! defined( 'ORDERABLE_PRO_VERSION' ) || empty( $args['sort'] ) ? 'menu_order' : $args['sort'];
     62        }
     63
    5864        $products = array();
     65
     66        /**
     67         * Filter description.
     68         *
     69         * @since 1.0.0
     70         * @hook orderable_flatten_products_by_category_level
     71         * @param string $flatten_level The flatten level. Default: `all`.
     72         * @param array  $args          The layout args.
     73         * @return string New value
     74         */
     75        $flatten_level = apply_filters( 'orderable_flatten_products_by_category_level', 'all', $args );
     76
     77        if ( 'all' === $flatten_level ) {
     78            $products[] = array(
     79                'category' => array(),
     80                'products' => array(),
     81            );
     82
     83            $categories_slug = array_filter(
     84                array_map(
     85                    function( $category_id ) {
     86                        $category = get_term_by( 'id', $category_id, 'product_cat' );
     87
     88                        return empty( $category->slug ) ? false : $category->slug;
     89                    },
     90                    $categories
     91                )
     92            );
     93
     94            $products[0]['products'] = self::get_products(
     95                array(
     96                    'category' => $categories_slug,
     97                    'orderby'  => $orderby,
     98                    'limit'    => 500,
     99                )
     100            );
     101
     102            return $products;
     103        }
    59104
    60105        if ( $has_categories ) {
     
    92137                        $category_products = self::get_products(
    93138                            array(
    94                                 'limit'    => - 1,
     139                                'limit'    => 500,
    95140                                'category' => array( $child_category->slug ),
    96                                 'orderby'  => 'menu_order',
     141                                'orderby'  => $orderby,
    97142                            )
    98143                        );
    99144
    100                         if ( ! empty( $category_products ) ) {
    101                             $products[ $category_id ]['category']['children'][ $child_category->term_id ] = array(
    102                                 'category' => array(
    103                                     'name'        => $child_category->name,
    104                                     'description' => $child_category->description,
    105                                     'depth'       => 1,
    106                                     'parent'      => $category_id,
    107                                 ),
    108                                 'products' => $category_products,
    109                             );
     145                        if ( empty( $category_products ) ) {
     146                            continue;
    110147                        }
     148
     149                        if ( 'children' === $flatten_level ) {
     150                            $products_in_category                 = empty( $products[ $category_id ]['products'] ) ? array() : $products[ $category_id ]['products'];
     151                            $products[ $category_id ]['products'] = array_merge( $products_in_category, $category_products );
     152
     153                            continue;
     154                        }
     155
     156                        $products[ $category_id ]['category']['children'][ $child_category->term_id ] = array(
     157                            'category' => array(
     158                                'name'        => $child_category->name,
     159                                'description' => $child_category->description,
     160                                'depth'       => 1,
     161                                'parent'      => $category_id,
     162                            ),
     163                            'products' => $category_products,
     164                        );
    111165                    }
    112166                } else {
    113167                    $category_products = self::get_products(
    114168                        array(
    115                             'limit'    => - 1,
     169                            'limit'    => 500,
    116170                            'category' => array( $category->slug ),
    117                             'orderby'  => 'menu_order',
     171                            'orderby'  => $orderby,
    118172                        )
    119173                    );
     
    132186            $category_products = self::get_products(
    133187                array(
    134                     'limit'   => - 1,
    135                     'orderby' => 'menu_order',
     188                    'limit'   => 500,
     189                    'orderby' => $orderby,
    136190                )
    137191            );
     
    189243        $products = wc_get_products( apply_filters( 'orderable_get_products_args', $args ) );
    190244
    191         if ( ! empty( $products ) && isset( $args['orderby'] ) ) {
    192             $order    = isset( $args['order'] ) ? $args['order'] : 'asc';
    193             $products = wc_products_array_orderby( $products, $args['orderby'], $order );
     245        if ( ! empty( $products ) ) {
     246            $orderby = empty( $args['orderby'] ) ? 'menu_order' : $args['orderby'];
     247
     248            $order   = 'price-desc' === $orderby ? 'desc' : 'asc';
     249            $orderby = 'price-desc' === $orderby ? 'price' : $orderby;
     250
     251            $products = wc_products_array_orderby( $products, $orderby, $order );
    194252        }
    195253
     
    249307
    250308        if ( 'children' === $flatten_level ) {
     309            $orderby = empty( $args['sort'] ) ? 'menu_order' : $args['sort'];
     310
     311            $order   = 'price-desc' === $orderby ? 'desc' : 'asc';
     312            $orderby = 'price-desc' === $orderby ? 'price' : $orderby;
     313
    251314            foreach ( $products as $category_id => $product_group ) {
     315                $product_group['products'] = wc_products_array_orderby( $product_group['products'], $orderby, $order );
     316
    252317                $flattened_products[ $category_id ] = $product_group;
    253 
    254                 if ( ! empty( $product_group['category']['children'] ) ) {
    255                     $flattened_products[ $category_id ]['category']['children'] = array(
    256                         array(
    257                             'category' => null,
    258                             'products' => array(),
    259                         ),
    260                     );
    261 
    262                     foreach ( $product_group['category']['children'] as $child_product_group ) {
    263                         // Add category products to list.
    264                         $flattened_products[ $category_id ]['category']['children'][0]['products'] = array_merge( $flattened_products[ $category_id ]['category']['children'][0]['products'], $child_product_group['products'] );
    265 
    266                         continue;
    267                     }
    268                 }
    269318            }
    270319        } else {
     
    329378        $args = apply_filters( 'orderable_add_to_cart_button_args', $args, $product );
    330379
    331         return sprintf( '<button class="orderable-button %s" data-orderable-trigger="%s" data-orderable-product-id="%d" data-orderable-product-type="%s" data-orderable-variation-id="%d" data-orderable-variation-attributes="">%s</button>', esc_attr( $args['classes'] ), esc_attr( $args['trigger'] ), esc_attr( $args['product_id'] ), esc_attr( $args['product_type'] ), esc_attr( $args['variation_id'] ), wp_kses_post( $args['text'] ) );
     380        return sprintf(
     381            '<button
     382                class="orderable-button %1$s"
     383                data-orderable-trigger="%2$s"
     384                data-orderable-product-id="%3$d"
     385                data-orderable-product-type="%4$s"
     386                data-orderable-variation-id="%5$d"
     387                data-orderable-variation-attributes=""
     388                data-quantity="1"
     389                data-product_id="%3$d"
     390                data-product_sku="%6$s"
     391                data-product_name="%7$s"
     392                data-price="%8$s"
     393            >
     394                %9$s
     395            </button>',
     396            esc_attr( $args['classes'] ),
     397            esc_attr( $args['trigger'] ),
     398            esc_attr( $args['product_id'] ),
     399            esc_attr( $args['product_type'] ),
     400            esc_attr( $args['variation_id'] ),
     401            esc_attr( $product->get_sku() ),
     402            esc_attr( $product->get_name() ),
     403            esc_attr( $product->get_price() ),
     404            wp_kses_post( $args['text'] )
     405        );
    332406    }
    333407
  • orderable/trunk/inc/modules/layouts/assets/admin/css/layouts.css

    r2912589 r2969309  
    784784  padding: 2px;
    785785}
     786
     787.orderable-product-layout-ordering__select {
     788  margin-bottom: 25px;
     789}
  • orderable/trunk/inc/modules/layouts/assets/admin/css/layouts.min.css

    r2933929 r2969309  
    1 @-webkit-keyframes spin{100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes spin{100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@-webkit-keyframes wobble-hor-bottom{0%,100%{-webkit-transform:translateX(0);transform:translateX(0);-webkit-transform-origin:50% 50%;transform-origin:50% 50%}15%{-webkit-transform:translateX(-10%) rotate(-6deg);transform:translateX(-10%) rotate(-6deg)}30%{-webkit-transform:translateX(5%) rotate(6deg);transform:translateX(5%) rotate(6deg)}45%{-webkit-transform:translateX(-5%) rotate(-3.6deg);transform:translateX(-5%) rotate(-3.6deg)}60%{-webkit-transform:translateX(2%) rotate(2.4deg);transform:translateX(2%) rotate(2.4deg)}75%{-webkit-transform:translateX(-1%) rotate(-1.2deg);transform:translateX(-1%) rotate(-1.2deg)}}@keyframes wobble-hor-bottom{0%,100%{-webkit-transform:translateX(0);transform:translateX(0);-webkit-transform-origin:50% 50%;transform-origin:50% 50%}15%{-webkit-transform:translateX(-10%) rotate(-6deg);transform:translateX(-10%) rotate(-6deg)}30%{-webkit-transform:translateX(5%) rotate(6deg);transform:translateX(5%) rotate(6deg)}45%{-webkit-transform:translateX(-5%) rotate(-3.6deg);transform:translateX(-5%) rotate(-3.6deg)}60%{-webkit-transform:translateX(2%) rotate(2.4deg);transform:translateX(2%) rotate(2.4deg)}75%{-webkit-transform:translateX(-1%) rotate(-1.2deg);transform:translateX(-1%) rotate(-1.2deg)}}.orderable-main__group{margin:0 0 36px}.orderable-main--sections-tabs .orderable-main__group{display:none}.orderable-main--sections-tabs .orderable-main__group:first-of-type{display:block}@media screen and (min-width:620px){.orderable-main--sections-side_tabs{display:-webkit-box;display:-ms-flexbox;display:flex}.orderable-main--sections-side_tabs .orderable-main__tabs{margin:0 24px 0 0!important}.orderable-main--sections-side_tabs .orderable-main__sections{-webkit-box-flex:1;-ms-flex:1;flex:1}}.orderable-products-list{margin-bottom:12px;-webkit-box-sizing:border-box;box-sizing:border-box}.orderable-products-list *{-webkit-box-sizing:border-box;box-sizing:border-box}.orderable-products-list:last-child{margin-bottom:0}@media screen and (min-width:480px){.orderable-products-list .orderable-product{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-flex:0;-ms-flex:0 0 200px;flex:0 0 200px}}@media screen and (min-width:480px){.orderable-products-list .orderable-product__hero{width:200px}}@media screen and (min-width:480px){.orderable-products-list .orderable-product__image{-o-object-fit:cover;object-fit:cover;width:100%!important;height:100%!important}}@media screen and (min-width:480px){.orderable-products-list .orderable-product__content-wrap{-webkit-box-flex:1;-ms-flex:1;flex:1;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-flow:column nowrap;flex-flow:column nowrap}}.orderable-products-list .orderable-product__actions{padding:12px 24px 18px;margin-top:auto}.orderable-products-list__item{width:100%;margin:0 0 24px}@media screen and (max-width:480px){.orderable-products-list__item{padding:0 0 24px;border-bottom:1px solid #ecf1f3}.orderable-products-list__item:last-child{border-bottom:none}}@media screen and (min-width:540px){.orderable-products-list--grid{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start;-ms-flex-wrap:wrap;flex-wrap:wrap;margin-left:-12px;margin-right:-12px}}@media screen and (min-width:768px){.orderable-products-list--grid .orderable-products-list__item{margin:0 0 24px;padding:0 12px;width:50%}}@media screen and (min-width:1120px){.orderable-products-list--grid .orderable-products-list__item{width:33.33%}}@media screen and (min-width:768px){.orderable-products-list--grid .orderable-product{padding:0 0 88px;display:block;margin:0;-webkit-box-flex:0;-ms-flex:none;flex:none}}@media screen and (min-width:768px){.orderable-products-list--grid .orderable-product__hero{width:auto}.orderable-products-list--grid .orderable-product__hero img{-o-object-fit:fill;object-fit:fill;width:100%;height:auto}}@media screen and (min-width:768px){.orderable-products-list--grid .orderable-product__content-wrap{-webkit-box-flex:0;-ms-flex:none;flex:none;display:block}}@media screen and (min-width:768px){.orderable-products-list--grid .orderable-product__actions{padding:0;margin-top:0;position:absolute;bottom:24px;left:24px;right:24px}}.orderable-product{overflow:hidden;position:relative}.orderable-product__hero{position:relative}.orderable-product__image{border-radius:0;margin:0;display:block;width:100%;height:auto!important;max-width:none!important}.orderable-product__content{padding:18px 24px 12px}.orderable-product__content :last-child{margin-bottom:0}.orderable-product__title{margin:0 0 12px!important}.orderable-product__description{margin:0}.orderable-product__tags{overflow:hidden;margin:0;padding:0;list-style:none none outside}img+.orderable-product__tags{position:absolute;bottom:0;left:0;padding:12px;z-index:20}.orderable-product__tags li{margin:6px 0 0 0}.orderable-product__options{margin:0 0 24px;padding:0;border-radius:6px}.orderable-product__options td,.orderable-product__options th{background-color:transparent!important;padding:0 0 12px;text-align:left;display:block;margin:0}.orderable-product__options th{line-height:22px}.orderable-product__options td{padding-bottom:24px}.orderable-product__options tr{padding:0;margin:0}.orderable-product__options tr:last-child td{padding-bottom:0}.orderable-product__actions{overflow:hidden;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.orderable-product__actions:last-child{margin-bottom:0}.orderable-product__actions-price{margin:0 4px 0 0}.orderable-product__actions-price .amount{white-space:nowrap;margin:0 6px 0 0;font-weight:700;color:#000;font-size:20px;line-height:24px}.orderable-product__actions-button{margin:0 0 0 auto}.orderable-product__actions-button .orderable-product__cancel-update{background-color:#f2f2f3;border-color:#f2f2f3;margin-right:10px}.orderable-product__tabs{margin:24px 0}.orderable-product__tabs-section{display:none}.orderable-product__tabs-section:first-child{display:block}.orderable-product__tabs-section :last-child{margin-bottom:0}.orderable-product--options{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;overflow:visible;height:100%}.orderable-product--options .orderable-product__hero{margin:-24px -24px 0}.orderable-product--options .orderable-product__title{text-align:left;margin:24px 0!important}.orderable-product--options .orderable-product__actions{margin-top:auto;padding-top:24px;border-top:1px solid #e6ecef;-webkit-box-flex:0;-ms-flex:0 0 auto;flex:0 0 auto}.orderable-product--add-to-cart,.orderable-product--product-options,.orderable-product--view-product{cursor:pointer}.orderable-product--image-cropped .orderable-product__hero{overflow:hidden;padding:0;text-align:center;-webkit-box-flex:0;-ms-flex:0 0 auto;flex:0 0 auto;height:72px}.orderable-product--image-cropped .orderable-product__image{-o-object-fit:cover;object-fit:cover;position:absolute;z-index:-1;width:100%;height:100%!important;left:0;top:0}.orderable-products-list__item .orderable-product{height:100%;width:100%;-webkit-box-shadow:0 .4px 1.3px rgba(0,0,0,.05),0 1.3px 4.5px rgba(0,0,0,.06),0 6px 16px rgba(0,0,0,.07);box-shadow:0 .4px 1.3px rgba(0,0,0,.05),0 1.3px 4.5px rgba(0,0,0,.06),0 6px 16px rgba(0,0,0,.07);border-radius:6px}@media screen and (max-width:480px){.orderable-products-list__item .orderable-product{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:start;-ms-flex-align:start;align-items:flex-start;-webkit-box-shadow:none;box-shadow:none;border-radius:0}}@media screen and (max-width:480px){.orderable-products-list__item .orderable-product__hero{width:100%;min-width:60px;max-width:95px;border-radius:6px;overflow:hidden}}@media screen and (max-width:480px){.orderable-products-list__item .orderable-product__content-wrap{-webkit-box-flex:1;-ms-flex:1;flex:1}}@media screen and (max-width:480px){.orderable-products-list__item .orderable-product__content{padding:0 0 0 24px}}@media screen and (max-width:480px){.orderable-products-list__item .orderable-product__actions{padding:6px 0 0 24px}}@media screen and (max-width:480px){.orderable-products-list__item .orderable-product__title{margin:0 0 6px!important}}.orderable-button{display:inline-block;border:2px solid #000;background:0 0;padding:0 24px!important;height:40px;line-height:36px;white-space:nowrap;border-radius:20px;color:#000;text-transform:none;margin:0;-webkit-transition:all 150ms ease-out;transition:all 150ms ease-out;-webkit-box-shadow:none;box-shadow:none;cursor:pointer}.orderable-button:active,.orderable-button:focus{outline:0}.orderable-button--active,.orderable-button--hover,.orderable-button:active,.orderable-button:focus,.orderable-button:hover{border-color:#000;background:#000;color:#fff;text-decoration:none;-webkit-box-shadow:none;box-shadow:none}.orderable-button--filled{background:#000!important;color:#fff}.orderable-button--filled--hover,.orderable-button--filled:hover{background:#000!important;color:#fff}.orderable-button--full{width:100%}.orderable-button--loading{position:relative;padding-right:48px!important}.orderable-button--loading:after{content:"";display:block;width:16px;height:16px;position:absolute;top:10px;right:22px;background:0 0;-webkit-box-sizing:border-box;box-sizing:border-box;border-top:2px solid #000;border-left:2px solid #000;border-right:2px solid transparent;border-bottom:2px solid transparent;border-radius:100%;-webkit-animation:spin .6s ease-out infinite;animation:spin .6s ease-out infinite}.orderable-button--filled .orderable-button--loading:after,.orderable-button--loading.orderable-button--hover:after,.orderable-button--loading:active:after,.orderable-button--loading:focus:after,.orderable-button--loading:hover:after{border-top-color:#fff;border-left-color:#fff}.orderable-button.orderable-button--out-of-stock,.orderable-button.orderable-button--out-of-stock.orderable-button--hover,.orderable-button.orderable-button--out-of-stock:active,.orderable-button.orderable-button--out-of-stock:focus,.orderable-button.orderable-button--out-of-stock:hover{cursor:not-allowed;border-color:#c7d4db;color:#a8bdc7;background:0 0!important}.orderable--button-style-square .orderable-button{border-radius:0}.orderable-button--icon{padding:10px!important;width:44px;height:44px;line-height:24px;border:none;background:0 0!important}body .orderable-button--icon:active,body .orderable-button--icon:focus,body .orderable-button--icon:hover{background:0 0!important;opacity:.6}.orderable-button--icon svg{width:24px;height:24px;border-radius:12px;overflow:hidden;-webkit-transition:opacity 250ms ease-in-out;transition:opacity 250ms ease-in-out}.orderable-button--icon.orderable-button--loading:after{display:none}.orderable-tabs{margin:0 0 24px;position:relative}.orderable-tabs__list{margin:0 1px 0 0!important;padding:0!important;list-style:none none outside;position:relative;display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:nowrap;flex-wrap:nowrap;-webkit-box-flex:1;-ms-flex:1 1 auto;flex:1 1 auto;overflow-x:auto;overflow-y:hidden;overflow:-moz-scrollbars-none;scrollbar-base-color:transparent;-webkit-overflow-scrolling:touch}.orderable-tabs__list::-webkit-scrollbar{display:none}@media screen and (min-width:620px){.orderable-main--sections-side_tabs .orderable-tabs__list{-webkit-box-flex:0;-ms-flex:0 1 auto;flex:0 1 auto;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;height:auto}}.orderable-tabs__item{display:inline-block;margin:0 10px 0 0;padding:0}.orderable-tabs__item:last-child{margin-right:0}@media screen and (min-width:620px){.orderable-main--sections-side_tabs .orderable-tabs__item{margin:0 0 12px;display:block}.orderable-main--sections-side_tabs .orderable-tabs__item:last-child{margin:0}}a.orderable-tabs__link{text-decoration:none!important;display:inline-block;padding:0 24px;white-space:nowrap;line-height:40px;color:#405763;font-weight:400;border-radius:20px;-webkit-transition:all 150ms ease-out;transition:all 150ms ease-out;background:#ecf1f3}a.orderable-tabs__link:active,a.orderable-tabs__link:focus{outline:0;-webkit-box-shadow:none;box-shadow:none}a.orderable-tabs__link:active,a.orderable-tabs__link:focus,a.orderable-tabs__link:hover{color:#405763;text-decoration:none;background:#c7d4db}.orderable-tabs__item--active a.orderable-tabs__link{background:#000;color:#fff}.orderable--button-style-square a.orderable-tabs__link{border-radius:0}.orderable-tabs__arrow{background:#fff;-webkit-box-shadow:0 .4px 1.3px rgba(0,0,0,.05),0 1.3px 4.5px rgba(0,0,0,.06),0 6px 16px rgba(0,0,0,.07);box-shadow:0 .4px 1.3px rgba(0,0,0,.05),0 1.3px 4.5px rgba(0,0,0,.06),0 6px 16px rgba(0,0,0,.07);border:none;width:40px!important;height:40px!important;padding:0!important;margin:0!important;border-radius:20px!important;position:absolute;top:0;right:0;text-align:center;line-height:40px;display:none}.orderable-tabs__arrow:active,.orderable-tabs__arrow:focus,.orderable-tabs__arrow:hover{background:#fff;outline:0}.orderable-tabs__arrow svg{width:21px;height:24px;margin:8px 0}.orderable-tabs__arrow-left{left:0;right:initial;-webkit-transform:scaleX(-1);transform:scaleX(-1)}#orderable-layout-settings-metabox{z-index:1000}#orderable-layout-preview-metabox .inside{padding:24px 24px 0;margin:0}#orderable-layout-preview-metabox .inside h2.orderable-category-heading__title,#orderable-layout-preview-metabox .inside h3{margin:0 0 24px}#orderable-layout-preview-metabox .inside h2{padding:0;font-weight:600;font-size:20px;line-height:1.2}#orderable-layout-preview-metabox .orderable-category-heading__description{margin:-12px 0 24px}#orderable-layout-preview-metabox .orderable-main{max-width:1000px;margin:0}#orderable-layout-preview-metabox .orderable-main--sections-side_tabs .orderable-main__tabs{margin:0 24px 24px 0!important}.orderable-layout-preview-notice{background:#fff;border:1px solid #c3c4c7;border-left-width:4px;-webkit-box-shadow:0 1px 1px rgba(0,0,0,.04);box-shadow:0 1px 1px rgba(0,0,0,.04);margin:0 0 25px;padding:1px 12px;border-left-color:#7031f5}.orderable-layout-preview-notice p{margin:.5em 0;padding:2px}
     1@-webkit-keyframes spin{100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes spin{100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@-webkit-keyframes wobble-hor-bottom{0%,100%{-webkit-transform:translateX(0);transform:translateX(0);-webkit-transform-origin:50% 50%;transform-origin:50% 50%}15%{-webkit-transform:translateX(-10%) rotate(-6deg);transform:translateX(-10%) rotate(-6deg)}30%{-webkit-transform:translateX(5%) rotate(6deg);transform:translateX(5%) rotate(6deg)}45%{-webkit-transform:translateX(-5%) rotate(-3.6deg);transform:translateX(-5%) rotate(-3.6deg)}60%{-webkit-transform:translateX(2%) rotate(2.4deg);transform:translateX(2%) rotate(2.4deg)}75%{-webkit-transform:translateX(-1%) rotate(-1.2deg);transform:translateX(-1%) rotate(-1.2deg)}}@keyframes wobble-hor-bottom{0%,100%{-webkit-transform:translateX(0);transform:translateX(0);-webkit-transform-origin:50% 50%;transform-origin:50% 50%}15%{-webkit-transform:translateX(-10%) rotate(-6deg);transform:translateX(-10%) rotate(-6deg)}30%{-webkit-transform:translateX(5%) rotate(6deg);transform:translateX(5%) rotate(6deg)}45%{-webkit-transform:translateX(-5%) rotate(-3.6deg);transform:translateX(-5%) rotate(-3.6deg)}60%{-webkit-transform:translateX(2%) rotate(2.4deg);transform:translateX(2%) rotate(2.4deg)}75%{-webkit-transform:translateX(-1%) rotate(-1.2deg);transform:translateX(-1%) rotate(-1.2deg)}}.orderable-main__group{margin:0 0 36px}.orderable-main--sections-tabs .orderable-main__group{display:none}.orderable-main--sections-tabs .orderable-main__group:first-of-type{display:block}@media screen and (min-width:620px){.orderable-main--sections-side_tabs{display:-webkit-box;display:-ms-flexbox;display:flex}.orderable-main--sections-side_tabs .orderable-main__tabs{margin:0 24px 0 0!important}.orderable-main--sections-side_tabs .orderable-main__sections{-webkit-box-flex:1;-ms-flex:1;flex:1}}.orderable-products-list{margin-bottom:12px;-webkit-box-sizing:border-box;box-sizing:border-box}.orderable-products-list *{-webkit-box-sizing:border-box;box-sizing:border-box}.orderable-products-list:last-child{margin-bottom:0}@media screen and (min-width:480px){.orderable-products-list .orderable-product{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-flex:0;-ms-flex:0 0 200px;flex:0 0 200px}}@media screen and (min-width:480px){.orderable-products-list .orderable-product__hero{width:200px}}@media screen and (min-width:480px){.orderable-products-list .orderable-product__image{-o-object-fit:cover;object-fit:cover;width:100%!important;height:100%!important}}@media screen and (min-width:480px){.orderable-products-list .orderable-product__content-wrap{-webkit-box-flex:1;-ms-flex:1;flex:1;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-flow:column nowrap;flex-flow:column nowrap}}.orderable-products-list .orderable-product__actions{padding:12px 24px 18px;margin-top:auto}.orderable-products-list__item{width:100%;margin:0 0 24px}@media screen and (max-width:480px){.orderable-products-list__item{padding:0 0 24px;border-bottom:1px solid #ecf1f3}.orderable-products-list__item:last-child{border-bottom:none}}@media screen and (min-width:540px){.orderable-products-list--grid{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start;-ms-flex-wrap:wrap;flex-wrap:wrap;margin-left:-12px;margin-right:-12px}}@media screen and (min-width:768px){.orderable-products-list--grid .orderable-products-list__item{margin:0 0 24px;padding:0 12px;width:50%}}@media screen and (min-width:1120px){.orderable-products-list--grid .orderable-products-list__item{width:33.33%}}@media screen and (min-width:768px){.orderable-products-list--grid .orderable-product{padding:0 0 88px;display:block;margin:0;-webkit-box-flex:0;-ms-flex:none;flex:none}}@media screen and (min-width:768px){.orderable-products-list--grid .orderable-product__hero{width:auto}.orderable-products-list--grid .orderable-product__hero img{-o-object-fit:fill;object-fit:fill;width:100%;height:auto}}@media screen and (min-width:768px){.orderable-products-list--grid .orderable-product__content-wrap{-webkit-box-flex:0;-ms-flex:none;flex:none;display:block}}@media screen and (min-width:768px){.orderable-products-list--grid .orderable-product__actions{padding:0;margin-top:0;position:absolute;bottom:24px;left:24px;right:24px}}.orderable-product{overflow:hidden;position:relative}.orderable-product__hero{position:relative}.orderable-product__image{border-radius:0;margin:0;display:block;width:100%;height:auto!important;max-width:none!important}.orderable-product__content{padding:18px 24px 12px}.orderable-product__content :last-child{margin-bottom:0}.orderable-product__title{margin:0 0 12px!important}.orderable-product__description{margin:0}.orderable-product__tags{overflow:hidden;margin:0;padding:0;list-style:none none outside}img+.orderable-product__tags{position:absolute;bottom:0;left:0;padding:12px;z-index:20}.orderable-product__tags li{margin:6px 0 0 0}.orderable-product__options{margin:0 0 24px;padding:0;border-radius:6px}.orderable-product__options td,.orderable-product__options th{background-color:transparent!important;padding:0 0 12px;text-align:left;display:block;margin:0}.orderable-product__options th{line-height:22px}.orderable-product__options td{padding-bottom:24px}.orderable-product__options tr{padding:0;margin:0}.orderable-product__options tr:last-child td{padding-bottom:0}.orderable-product__actions{overflow:hidden;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.orderable-product__actions:last-child{margin-bottom:0}.orderable-product__actions-price{margin:0 4px 0 0}.orderable-product__actions-price .amount{white-space:nowrap;margin:0 6px 0 0;font-weight:700;color:#000;font-size:20px;line-height:24px}.orderable-product__actions-button{margin:0 0 0 auto}.orderable-product__actions-button .orderable-product__cancel-update{background-color:#f2f2f3;border-color:#f2f2f3;margin-right:10px}.orderable-product__tabs{margin:24px 0}.orderable-product__tabs-section{display:none}.orderable-product__tabs-section:first-child{display:block}.orderable-product__tabs-section :last-child{margin-bottom:0}.orderable-product--options{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;overflow:visible;height:100%}.orderable-product--options .orderable-product__hero{margin:-24px -24px 0}.orderable-product--options .orderable-product__title{text-align:left;margin:24px 0!important}.orderable-product--options .orderable-product__actions{margin-top:auto;padding-top:24px;border-top:1px solid #e6ecef;-webkit-box-flex:0;-ms-flex:0 0 auto;flex:0 0 auto}.orderable-product--add-to-cart,.orderable-product--product-options,.orderable-product--view-product{cursor:pointer}.orderable-product--image-cropped .orderable-product__hero{overflow:hidden;padding:0;text-align:center;-webkit-box-flex:0;-ms-flex:0 0 auto;flex:0 0 auto;height:72px}.orderable-product--image-cropped .orderable-product__image{-o-object-fit:cover;object-fit:cover;position:absolute;z-index:-1;width:100%;height:100%!important;left:0;top:0}.orderable-products-list__item .orderable-product{height:100%;width:100%;-webkit-box-shadow:0 .4px 1.3px rgba(0,0,0,.05),0 1.3px 4.5px rgba(0,0,0,.06),0 6px 16px rgba(0,0,0,.07);box-shadow:0 .4px 1.3px rgba(0,0,0,.05),0 1.3px 4.5px rgba(0,0,0,.06),0 6px 16px rgba(0,0,0,.07);border-radius:6px}@media screen and (max-width:480px){.orderable-products-list__item .orderable-product{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:start;-ms-flex-align:start;align-items:flex-start;-webkit-box-shadow:none;box-shadow:none;border-radius:0}}@media screen and (max-width:480px){.orderable-products-list__item .orderable-product__hero{width:100%;min-width:60px;max-width:95px;border-radius:6px;overflow:hidden}}@media screen and (max-width:480px){.orderable-products-list__item .orderable-product__content-wrap{-webkit-box-flex:1;-ms-flex:1;flex:1}}@media screen and (max-width:480px){.orderable-products-list__item .orderable-product__content{padding:0 0 0 24px}}@media screen and (max-width:480px){.orderable-products-list__item .orderable-product__actions{padding:6px 0 0 24px}}@media screen and (max-width:480px){.orderable-products-list__item .orderable-product__title{margin:0 0 6px!important}}.orderable-button{display:inline-block;border:2px solid #000;background:0 0;padding:0 24px!important;height:40px;line-height:36px;white-space:nowrap;border-radius:20px;color:#000;text-transform:none;margin:0;-webkit-transition:all 150ms ease-out;transition:all 150ms ease-out;-webkit-box-shadow:none;box-shadow:none;cursor:pointer}.orderable-button:active,.orderable-button:focus{outline:0}.orderable-button--active,.orderable-button--hover,.orderable-button:active,.orderable-button:focus,.orderable-button:hover{border-color:#000;background:#000;color:#fff;text-decoration:none;-webkit-box-shadow:none;box-shadow:none}.orderable-button--filled{background:#000!important;color:#fff}.orderable-button--filled--hover,.orderable-button--filled:hover{background:#000!important;color:#fff}.orderable-button--full{width:100%}.orderable-button--loading{position:relative;padding-right:48px!important}.orderable-button--loading:after{content:"";display:block;width:16px;height:16px;position:absolute;top:10px;right:22px;background:0 0;-webkit-box-sizing:border-box;box-sizing:border-box;border-top:2px solid #000;border-left:2px solid #000;border-right:2px solid transparent;border-bottom:2px solid transparent;border-radius:100%;-webkit-animation:spin .6s ease-out infinite;animation:spin .6s ease-out infinite}.orderable-button--filled .orderable-button--loading:after,.orderable-button--loading.orderable-button--hover:after,.orderable-button--loading:active:after,.orderable-button--loading:focus:after,.orderable-button--loading:hover:after{border-top-color:#fff;border-left-color:#fff}.orderable-button.orderable-button--out-of-stock,.orderable-button.orderable-button--out-of-stock.orderable-button--hover,.orderable-button.orderable-button--out-of-stock:active,.orderable-button.orderable-button--out-of-stock:focus,.orderable-button.orderable-button--out-of-stock:hover{cursor:not-allowed;border-color:#c7d4db;color:#a8bdc7;background:0 0!important}.orderable--button-style-square .orderable-button{border-radius:0}.orderable-button--icon{padding:10px!important;width:44px;height:44px;line-height:24px;border:none;background:0 0!important}body .orderable-button--icon:active,body .orderable-button--icon:focus,body .orderable-button--icon:hover{background:0 0!important;opacity:.6}.orderable-button--icon svg{width:24px;height:24px;border-radius:12px;overflow:hidden;-webkit-transition:opacity 250ms ease-in-out;transition:opacity 250ms ease-in-out}.orderable-button--icon.orderable-button--loading:after{display:none}.orderable-tabs{margin:0 0 24px;position:relative}.orderable-tabs__list{margin:0 1px 0 0!important;padding:0!important;list-style:none none outside;position:relative;display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:nowrap;flex-wrap:nowrap;-webkit-box-flex:1;-ms-flex:1 1 auto;flex:1 1 auto;overflow-x:auto;overflow-y:hidden;overflow:-moz-scrollbars-none;scrollbar-base-color:transparent;-webkit-overflow-scrolling:touch}.orderable-tabs__list::-webkit-scrollbar{display:none}@media screen and (min-width:620px){.orderable-main--sections-side_tabs .orderable-tabs__list{-webkit-box-flex:0;-ms-flex:0 1 auto;flex:0 1 auto;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;height:auto}}.orderable-tabs__item{display:inline-block;margin:0 10px 0 0;padding:0}.orderable-tabs__item:last-child{margin-right:0}@media screen and (min-width:620px){.orderable-main--sections-side_tabs .orderable-tabs__item{margin:0 0 12px;display:block}.orderable-main--sections-side_tabs .orderable-tabs__item:last-child{margin:0}}a.orderable-tabs__link{text-decoration:none!important;display:inline-block;padding:0 24px;white-space:nowrap;line-height:40px;color:#405763;font-weight:400;border-radius:20px;-webkit-transition:all 150ms ease-out;transition:all 150ms ease-out;background:#ecf1f3}a.orderable-tabs__link:active,a.orderable-tabs__link:focus{outline:0;-webkit-box-shadow:none;box-shadow:none}a.orderable-tabs__link:active,a.orderable-tabs__link:focus,a.orderable-tabs__link:hover{color:#405763;text-decoration:none;background:#c7d4db}.orderable-tabs__item--active a.orderable-tabs__link{background:#000;color:#fff}.orderable--button-style-square a.orderable-tabs__link{border-radius:0}.orderable-tabs__arrow{background:#fff;-webkit-box-shadow:0 .4px 1.3px rgba(0,0,0,.05),0 1.3px 4.5px rgba(0,0,0,.06),0 6px 16px rgba(0,0,0,.07);box-shadow:0 .4px 1.3px rgba(0,0,0,.05),0 1.3px 4.5px rgba(0,0,0,.06),0 6px 16px rgba(0,0,0,.07);border:none;width:40px!important;height:40px!important;padding:0!important;margin:0!important;border-radius:20px!important;position:absolute;top:0;right:0;text-align:center;line-height:40px;display:none}.orderable-tabs__arrow:active,.orderable-tabs__arrow:focus,.orderable-tabs__arrow:hover{background:#fff;outline:0}.orderable-tabs__arrow svg{width:21px;height:24px;margin:8px 0}.orderable-tabs__arrow-left{left:0;right:initial;-webkit-transform:scaleX(-1);transform:scaleX(-1)}#orderable-layout-settings-metabox{z-index:1000}#orderable-layout-preview-metabox .inside{padding:24px 24px 0;margin:0}#orderable-layout-preview-metabox .inside h2.orderable-category-heading__title,#orderable-layout-preview-metabox .inside h3{margin:0 0 24px}#orderable-layout-preview-metabox .inside h2{padding:0;font-weight:600;font-size:20px;line-height:1.2}#orderable-layout-preview-metabox .orderable-category-heading__description{margin:-12px 0 24px}#orderable-layout-preview-metabox .orderable-main{max-width:1000px;margin:0}#orderable-layout-preview-metabox .orderable-main--sections-side_tabs .orderable-main__tabs{margin:0 24px 24px 0!important}.orderable-layout-preview-notice{background:#fff;border:1px solid #c3c4c7;border-left-width:4px;-webkit-box-shadow:0 1px 1px rgba(0,0,0,.04);box-shadow:0 1px 1px rgba(0,0,0,.04);margin:0 0 25px;padding:1px 12px;border-left-color:#7031f5}.orderable-layout-preview-notice p{margin:.5em 0;padding:2px}.orderable-product-layout-ordering__select{margin-bottom:25px}
  • orderable/trunk/inc/modules/layouts/class-layouts.php

    r2912589 r2969309  
    193193            'orderable_layout_settings_save_data',
    194194            array(
    195                 'categories' => (array) filter_input( INPUT_POST, 'orderable_categories', FILTER_DEFAULT, FILTER_REQUIRE_ARRAY ),
    196                 'layout'     => empty( $_POST['orderable_layout'] ) ? '' : sanitize_text_field( wp_unslash( $_POST['orderable_layout'] ) ), // phpcs:ignore WordPress.Security.NonceVerification
    197                 'images'     => empty( $_POST['orderable_images'] ) ? false : 'yes' === sanitize_text_field( wp_unslash( $_POST['orderable_images'] ) ), // phpcs:ignore WordPress.Security.NonceVerification
    198                 'card_click' => empty( $_POST['orderable_card_click'] ) ? '' : sanitize_text_field( wp_unslash( $_POST['orderable_card_click'] ) ), // phpcs:ignore WordPress.Security.NonceVerification
     195                'categories'       => (array) filter_input( INPUT_POST, 'orderable_categories', FILTER_DEFAULT, FILTER_REQUIRE_ARRAY ),
     196                'layout'           => empty( $_POST['orderable_layout'] ) ? '' : sanitize_text_field( wp_unslash( $_POST['orderable_layout'] ) ), // phpcs:ignore WordPress.Security.NonceVerification
     197                'sort'             => empty( $_POST['orderable_sort'] ) ? '' : sanitize_text_field( wp_unslash( $_POST['orderable_sort'] ) ), // phpcs:ignore WordPress.Security.NonceVerification
     198                'sort_on_frontend' => empty( $_POST['orderable_sort_on_frontend'] ) ? false : 'yes' === sanitize_text_field( wp_unslash( $_POST['orderable_sort_on_frontend'] ) ), // phpcs:ignore WordPress.Security.NonceVerification
     199                'images'           => empty( $_POST['orderable_images'] ) ? false : 'yes' === sanitize_text_field( wp_unslash( $_POST['orderable_images'] ) ), // phpcs:ignore WordPress.Security.NonceVerification
     200                'card_click'       => empty( $_POST['orderable_card_click'] ) ? '' : sanitize_text_field( wp_unslash( $_POST['orderable_card_click'] ) ), // phpcs:ignore WordPress.Security.NonceVerification
    199201            )
    200202        );
     
    219221     * Get max orders field.
    220222     *
    221      * @param string $name
    222      * @param array  $layout_settings
    223      *
    224      * @return mixed|void
    225      */
    226     public static function get_layout_sections_field( $layout_settings ) {
     223     * @param string $field_name      The field name. Example: `sort`.
     224     * @param array  $layout_settings The layout settings.
     225     *
     226     * @return string
     227     */
     228    public static function get_layout_field( $field_name, $layout_settings ) {
     229        if ( empty( $field_name ) ) {
     230            return '';
     231        }
     232
     233        $allowed_html = array(
     234            'a' => array(
     235                'class'  => array(),
     236                'href'   => array(),
     237                'target' => array(),
     238            ),
     239        );
     240
    227241        ob_start();
    228242        ?>
    229         <?php echo Orderable_Helpers::get_pro_button( 'max-orders' ); ?>
     243        <?php echo wp_kses( Orderable_Helpers::get_pro_button( $field_name ), $allowed_html ); ?>
    230244        <?php
    231245
    232         return apply_filters( 'orderable_layout_sections_field', ob_get_clean(), $layout_settings );
     246        /**
     247         * Filter the layout field.
     248         *
     249         * The dynamic portion of the hook name, `$field_name`, refers to
     250         * the field name e.g. `sort`, `max-orders`, etc.
     251         *
     252         * @since 1.10.0
     253         * @hook filter_hook
     254         * @param  string $html            The html markup.
     255         * @param  array  $layout_settings The layout settings.
     256         * @return string New value
     257         */
     258        $html = apply_filters( "orderable_layout_{$field_name}_field", ob_get_clean(), $layout_settings );
     259
     260        echo wp_kses_post( $html );
    233261    }
    234262
     
    282310        $defaults = self::get_layout_defaults();
    283311
    284         $args           = wp_parse_args( $args, $defaults );
    285         $args['images'] = (boolean) json_decode( strtolower( $args['images'] ) );
     312        $args                     = wp_parse_args( $args, $defaults );
     313        $args['sort_on_frontend'] = (bool) json_decode( strtolower( $args['sort_on_frontend'] ) );
     314        $args['images']           = (bool) json_decode( strtolower( $args['images'] ) );
    286315
    287316        if ( ! is_null( $args['id'] ) ) {
     
    419448            'orderable_layout_defaults',
    420449            array(
    421                 'id'         => $layout_id,
    422                 'categories' => array(),
    423                 'layout'     => 'grid',
    424                 'images'     => true,
    425                 'card_click' => '',
     450                'id'               => $layout_id,
     451                'categories'       => array(),
     452                'layout'           => 'grid',
     453                'sort'             => 'menu_order',
     454                'sort_on_frontend' => false,
     455                'images'           => true,
     456                'card_click'       => '',
    426457            ),
    427458            $layout_id
  • orderable/trunk/inc/modules/layouts/source/admin/scss/layouts.scss

    r2933929 r2969309  
    88@import "source/frontend/scss/modules/tabs";
    99@import "layout-builder";
     10@import "orderable-product-layout-ordering"
  • orderable/trunk/inc/modules/layouts/templates/admin/layout-settings-metabox.php

    r2819211 r2969309  
    5757            <div class="orderable-fields-row__body-row-left">
    5858                <h3>
     59                    <label for="orderable_sort"><?php esc_html_e( 'Sort', 'orderable' ); ?></label>
     60                </h3>
     61                <p><?php esc_html_e( 'How should the products be sorted?', 'orderable' ); ?></p>
     62            </div>
     63            <div class="orderable-fields-row__body-row-right">
     64                <?php Orderable_Layouts::get_layout_field( 'sort', $layout_settings ); ?>
     65            </div>
     66        </div>
     67
     68        <div class="orderable-fields-row__body-row">
     69            <div class="orderable-fields-row__body-row-left">
     70                <h3>
     71                    <label for="orderable_sort_on_frontend"><?php esc_html_e( 'Allow sorting on the frontend', 'orderable' ); ?></label>
     72                </h3>
     73                <p><?php esc_html_e( 'Choose if customers can change how the products are sorted.', 'orderable' ); ?></p>
     74            </div>
     75            <div class="orderable-fields-row__body-row-right">
     76                <?php Orderable_Layouts::get_layout_field( 'sort_on_frontend', $layout_settings ); ?>
     77            </div>
     78        </div>
     79
     80        <div class="orderable-fields-row__body-row">
     81            <div class="orderable-fields-row__body-row-left">
     82                <h3>
    5983                    <label for="layout"><?php _e( 'Sections', 'orderable' ); ?></label>
    6084                </h3>
    61                 <p><?php _e( 'Separate each category by titles or tabs.', 'orderable' ); ?></p>
     85                <p><?php esc_html_e( 'Separate each category by titles or tabs.', 'orderable' ); ?></p>
    6286            </div>
    6387            <div class="orderable-fields-row__body-row-right">
    64                 <?php echo Orderable_Layouts::get_layout_sections_field( $layout_settings ); ?>
     88                <?php Orderable_Layouts::get_layout_field( 'sections', $layout_settings ); ?>
    6589            </div>
    6690        </div>
  • orderable/trunk/inc/modules/location/admin/meta-boxes/class-location-store-address-meta-box.php

    r2912589 r2969309  
    140140                            name="orderable_country_state"
    141141                            class="wc-enhanced-select orderable-field"
     142                            style="width: 426px;"
    142143                        >
    143144                            <?php WC()->countries->country_dropdown_options( $country, $state ); ?>
  • orderable/trunk/inc/modules/location/class-location-single.php

    r2933929 r2969309  
    886886                        $counted_lead_days ++;
    887887                        $counted_preorder_days ++;
    888 
    889                         // We aren't ready to start serving up dates yet as we
    890                         // haven't counted the number of lead days required.
    891                         if ( $lead_days >= $counted_lead_days ) {
    892                             continue;
    893                         }
     888                    }
     889
     890                    // We aren't ready to start serving up dates yet as we
     891                    // haven't counted the number of lead days required.
     892                    if ( $lead_days >= $counted_lead_days ) {
     893                        continue;
    894894                    }
    895895                }
  • orderable/trunk/inc/modules/timings/class-timings.php

    r2912589 r2969309  
    2727    public static function load_classes() {
    2828        $classes = array(
     29            'timings-blocks'   => 'Orderable_Timings_Blocks',
    2930            'timings-settings' => 'Orderable_Timings_Settings',
    3031            'timings-checkout' => 'Orderable_Timings_Checkout',
     
    197198        $args['services']            = (bool) json_decode( strtolower( $args['services'] ) );
    198199        $args['date']                = (bool) json_decode( strtolower( $args['date'] ) );
    199         $args['location']            = empty( $args['location'] ) ? Orderable_Location::get_selected_location() : new Orderable_Location_Single( $args['location_id'] );
     200        $args['location']            = empty( $args['location_id'] ) || ! Orderable_Location::store_has_multi_locations() ? Orderable_Location::get_selected_location() : new Orderable_Location_Single( $args['location_id'] );
    200201        $args['upcoming_open_hours'] = $args['location']->get_upcoming_open_hours();
    201202
  • orderable/trunk/inc/vendor/wp-settings-framework/assets/js/main.js

    r2933929 r2969309  
    253253
    254254                wpsf.trigger_dynamic_fields();
     255               
     256                $row.trigger('wpsfGroupRowAdded', [$row]);
    255257
    256258                return false;
     
    325327                }
    326328
    327                 $( this ).find( "input" ).each( function() {
     329                $( this ).find( 'input, select' ).each( function() {
    328330                    var this_input = this,
    329331                        name = jQuery( this ).attr( 'name' );
     
    689691    $( document ).ready( wpsf.on_ready );
    690692
     693    // Expose WPSF methods for use elsewhere.
     694    window.wpsf = wpsf;
     695
    691696}( jQuery, document ));
  • orderable/trunk/inc/vendor/wp-settings-framework/wp-settings-framework.php

    r2933929 r2969309  
    7979            'subfields'    => array(),
    8080            'autocomplete' => '',
     81            'attributes'   => array(),
     82            'custom_args'  => array(),
    8183        );
    8284
     
    188190         */
    189191        public function add_settings_page( $args ) {
     192            if ( ! $this->settings_page ) {
     193                return;
     194            }
     195           
    190196            $defaults = array(
    191197                'parent_slug' => false,
     
    370376            wp_enqueue_style( 'jquery-ui-css' );
    371377            wp_enqueue_style( 'wpsf' );
     378
     379            // Dequeue global style inlined by WordPress since WP 5.9.
     380            wp_dequeue_style( 'global-styles' );
    372381        }
    373382
     
    577586            $args['value'] = esc_attr( stripslashes( $args['value'] ) );
    578587
    579             echo '<input type="text" name="' . esc_attr( $args['name'] ) . '" id="' . esc_attr( $args['id'] ) . '" value="' . esc_attr( $args['value'] ) . '" placeholder="' . esc_attr( $args['placeholder'] ) . '" class="regular-text ' . esc_attr( $args['class'] ) . '" />';
     588            echo '<input type="text" name="' . esc_attr( $args['name'] ) . '" id="' . esc_attr( $args['id'] ) . '" value="' . esc_attr( $args['value'] ) . '" placeholder="' . esc_attr( $args['placeholder'] ) . '" class="regular-text ' . esc_attr( $args['class'] ) . '" ' . $this->array_to_html_atts( $args['attributes'] ) . '/>';
    580589
    581590            $this->generate_description( $args );
     
    590599            $args['value'] = esc_attr( stripslashes( $args['value'] ) );
    591600
    592             echo '<input type="hidden" name="' . esc_attr( $args['name'] ) . '" id="' . esc_attr( $args['id'] ) . '" value="' . esc_attr( $args['value'] ) . '"  class="hidden-field ' . esc_attr( $args['class'] ) . '" />';
     601            echo '<input type="hidden" name="' . esc_attr( $args['name'] ) . '" id="' . esc_attr( $args['id'] ) . '" value="' . esc_attr( $args['value'] ) . '"  class="hidden-field ' . esc_attr( $args['class'] ) . '" ' . $this->array_to_html_atts( $args['attributes'] ) . '/>';
    593602        }
    594603
     
    601610            $args['value'] = esc_attr( stripslashes( $args['value'] ) );
    602611
    603             echo '<input type="number" name="' . esc_attr( $args['name'] ) . '" id="' . esc_attr( $args['id'] ) . '" value="' . esc_attr( $args['value'] ) . '" placeholder="' . esc_attr( $args['placeholder'] ) . '" class="regular-text ' . esc_attr( $args['class'] ) . '" />';
     612            echo '<input type="number" name="' . esc_attr( $args['name'] ) . '" id="' . esc_attr( $args['id'] ) . '" value="' . esc_attr( $args['value'] ) . '" placeholder="' . esc_attr( $args['placeholder'] ) . '" class="regular-text ' . esc_attr( $args['class'] ) . '" ' . $this->array_to_html_atts( $args['attributes'] ) . '/>';
    604613
    605614            $this->generate_description( $args );
     
    616625            $timepicker = ( ! empty( $args['timepicker'] ) ) ? htmlentities( wp_json_encode( $args['timepicker'] ) ) : null;
    617626
    618             echo '<input type="text" name="' . esc_attr( $args['name'] ) . '" id="' . esc_attr( $args['id'] ) . '" value="' . esc_attr( $args['value'] ) . '" class="timepicker regular-text ' . esc_attr( $args['class'] ) . '" data-timepicker="' . esc_attr( $timepicker ) . '" />';
     627            echo '<input type="text" name="' . esc_attr( $args['name'] ) . '" id="' . esc_attr( $args['id'] ) . '" value="' . esc_attr( $args['value'] ) . '" class="timepicker regular-text ' . esc_attr( $args['class'] ) . '" data-timepicker="' . esc_attr( $timepicker ) . '" ' . $this->array_to_html_atts( $args['attributes'] ) . '/>';
    619628
    620629            $this->generate_description( $args );
     
    631640            $datepicker = ( ! empty( $args['datepicker'] ) ) ? htmlentities( wp_json_encode( $args['datepicker'] ) ) : null;
    632641
    633             echo '<input type="text" name="' . esc_attr( $args['name'] ) . '" id="' . esc_attr( $args['id'] ) . '" value="' . esc_attr( $args['value'] ) . '" class="datepicker regular-text ' . esc_attr( $args['class'] ) . '" data-datepicker="' . esc_attr( $datepicker ) . '" />';
     642            echo '<input type="text" name="' . esc_attr( $args['name'] ) . '" id="' . esc_attr( $args['id'] ) . '" value="' . esc_attr( $args['value'] ) . '" class="datepicker regular-text ' . esc_attr( $args['class'] ) . '" data-datepicker="' . esc_attr( $datepicker ) . '" ' . $this->array_to_html_atts( $args['attributes'] ) . '/>';
    634643
    635644            $this->generate_description( $args );
     
    695704            $row_count = ( ! empty( $value ) ) ? count( $value ) : 1;
    696705
    697             echo '<table class="widefat wpsf-group" cellspacing="0">';
     706            echo '<table id="group-' . esc_attr( str_replace( '_', '-', $args['id'] ) ) . '" class="' . esc_attr( $args['class'] ) . ' widefat wpsf-group" cellspacing="0">';
    698707
    699708            echo '<tbody>';
     
    708717
    709718            echo '</table>';
     719
     720            $this->generate_description( $args );
    710721
    711722            printf(
     
    884895            $values = array_map( 'strval', $values );
    885896
    886             echo '<select ' . esc_html( $multiple ) . ' name="' . esc_attr( $args['name'] ) . '" id="' . esc_attr( $args['id'] ) . '" class="' . esc_attr( $args['class'] ) . '" >';
     897            echo '<select ' . esc_html( $multiple ) . ' name="' . esc_attr( $args['name'] ) . '" id="' . esc_attr( $args['id'] ) . '" class="' . esc_attr( $args['class'] ) . '" ' . $this->array_to_html_atts( $args['attributes'] ) . '>';
    887898
    888899            foreach ( $args['choices'] as $value => $text ) {
     
    914925            $args['value'] = esc_attr( stripslashes( $args['value'] ) );
    915926
    916             echo '<input type="password" name="' . esc_attr( $args['name'] ) . '" id="' . esc_attr( $args['id'] ) . '" value="' . esc_attr( $args['value'] ) . '" placeholder="' . esc_attr( $args['placeholder'] ) . '" class="regular-text ' . esc_attr( $args['class'] ) . '" autocomplete="' . esc_attr( $args['autocomplete'] ) . '"/>';
     927            echo '<input type="password" name="' . esc_attr( $args['name'] ) . '" id="' . esc_attr( $args['id'] ) . '" value="' . esc_attr( $args['value'] ) . '" placeholder="' . esc_attr( $args['placeholder'] ) . '" class="regular-text ' . esc_attr( $args['class'] ) . '" autocomplete="' . esc_attr( $args['autocomplete'] ) . '" ' . $this->array_to_html_atts( $args['attributes'] ) . '/>';
    917928
    918929            $this->generate_description( $args );
     
    926937        public function generate_textarea_field( $args ) {
    927938            $args['value'] = esc_html( esc_attr( $args['value'] ) );
    928 
    929             echo '<textarea name="' . esc_attr( $args['name'] ) . '" id="' . esc_attr( $args['id'] ) . '" placeholder="' . esc_attr( $args['placeholder'] ) . '" rows="5" cols="60" class="' . esc_attr( $args['class'] ) . '">' . esc_html( $args['value'] ) . '</textarea>';
     939            $rows = ( ! empty( $args['attributes']['rows'] ) ) ? absint( $args['attributes']['rows'] ) : 5;
     940            $cols = ( ! empty( $args['attributes']['cols'] ) ) ? absint( $args['attributes']['cols'] ) : 60;
     941
     942            echo '<textarea name="' . esc_attr( $args['name'] ) . '" id="' . esc_attr( $args['id'] ) . '" placeholder="' . esc_attr( $args['placeholder'] ) . '" rows="' . esc_attr( $rows ) . '" cols="' . esc_attr( $cols ) . '" class="' . esc_attr( $args['class'] ) . '" ' . $this->array_to_html_atts( $args['attributes'] ) . '>' . esc_html( $args['value'] ) . '</textarea>';
    930943
    931944            $this->generate_description( $args );
     
    10421055            $button_id     = sprintf( '%s_button', $args['id'] );
    10431056
     1057            /**
     1058             * Hook in to generate a file preview e.g. image thumbnail.
     1059             */
     1060            do_action( 'wpsf_file_field_preview', $args['value'], $args );
     1061
    10441062            echo sprintf( '<input type="text" name="%s" id="%s" value="%s" class="regular-text %s"> ', esc_attr( $args['name'] ), esc_attr( $args['id'] ), esc_html( $args['value'] ), esc_attr( $args['class'] ) );
    10451063
    10461064            echo sprintf( '<input type="button" class="button wpsf-browse" id="%s" value="%s" />', esc_attr( $button_id ), esc_html__( 'Browse', 'wpsf' ) );
     1065
     1066            $this->generate_description( $args );
    10471067            ?>
    10481068            <script type='text/javascript'>
     
    12281248                $descriptions[] = array(
    12291249                    'classes'     => $classes,
    1230                     'value'       => $args['value'],
     1250                    // Serialize group field data to prevent errors.
     1251                    'value'       => ( is_array( $args['value'] ) ) ? serialize( $args['value'] ) : $args['value'],
    12311252                    'description' => $description,
    12321253                );
     
    13401361            $settings[ $settings_name ] = array();
    13411362
     1363            if ( ! $this->settings ) {
     1364                return $settings[ $settings_name ];
     1365            }
     1366           
    13421367            foreach ( $this->settings as $section ) {
    13431368                if ( empty( $section['fields'] ) ) {
     
    16101635            wp_send_json_success();
    16111636        }
     1637
     1638        /**
     1639         * Helper: Array to HTML Attributes
     1640         */
     1641        public static function array_to_html_atts( $array = array() ) {
     1642            if ( ! is_array( $array ) || empty( $array ) ) {
     1643                return false;
     1644            }
     1645
     1646            $return = '';
     1647
     1648            foreach ( $array as $key => $value ) {
     1649                if ( '' === $value ) {
     1650                    continue;
     1651                }
     1652
     1653                $return .= sprintf( '%s="%s" ', $key, esc_attr( $value ) );
     1654            }
     1655
     1656            return $return;
     1657        }
    16121658    }
    16131659}
  • orderable/trunk/languages/orderable.pot

    r2943243 r2969309  
    77"Content-Type: text/plain; charset=UTF-8\n"
    88"Content-Transfer-Encoding: 8bit\n"
    9 "POT-Creation-Date: 2023-07-20 16:25+0000\n"
     9"POT-Creation-Date: 2023-07-25 18:57+0000\n"
    1010"X-Poedit-Basepath: ..\n"
    1111"X-Poedit-KeywordsList: __;_e;_ex:1,2c;_n:1,2;_n_noop:1,2;_nx:1,2,4c;_nx_noop:1,2,3c;_x:1,2c;esc_attr__;esc_attr_e;esc_attr_x:1,2c;esc_html__;esc_html_e;esc_html_x:1,2c\n"
     
    1515"Plural-Forms: nplurals=2; plural=(n != 1);\n"
    1616
    17 #: orderable.php:119
     17#: orderable.php:130
    1818msgid "Orderable requires WooCommerce to be installed and activated."
    1919msgstr ""
    2020
    21 #: orderable.php:132
     21#: orderable.php:143
    2222msgid "Orderable Pro needs to be at least v%s for compatibility. Please update the Orderable Pro plugin."
    2323msgstr ""
    2424
    25 #: orderable.php:133
     25#: orderable.php:144
    2626msgid "Update now"
    2727msgstr ""
     
    294294msgstr ""
    295295
    296 #: inc/class-settings.php:433, inc/modules/services/class-services-order.php:34, inc/modules/services/class-services.php:109, inc/modules/location/zones/class-location-zones.php:77, inc/modules/location/admin/meta-boxes/class-location-holidays-meta-box.php:373, inc/modules/location/admin/meta-boxes/class-location-store-services-meta-box.php:307
     296#: inc/class-settings.php:433, inc/modules/services/class-services-order.php:39, inc/modules/services/class-services.php:109, inc/modules/location/zones/class-location-zones.php:77, inc/modules/location/admin/meta-boxes/class-location-holidays-meta-box.php:373, inc/modules/location/admin/meta-boxes/class-location-store-services-meta-box.php:307
    297297msgid "Delivery"
    298298msgstr ""
    299299
    300 #: inc/class-settings.php:434, inc/modules/services/class-services-order.php:35, inc/modules/services/class-services.php:108, inc/modules/location/zones/class-location-zones.php:89, inc/modules/location/admin/meta-boxes/class-location-holidays-meta-box.php:384, inc/modules/location/admin/meta-boxes/class-location-store-services-meta-box.php:316
     300#: inc/class-settings.php:434, inc/modules/services/class-services-order.php:40, inc/modules/services/class-services.php:108, inc/modules/location/zones/class-location-zones.php:89, inc/modules/location/admin/meta-boxes/class-location-holidays-meta-box.php:384, inc/modules/location/admin/meta-boxes/class-location-store-services-meta-box.php:316
    301301msgid "Pickup"
    302302msgstr ""
     
    394394msgstr ""
    395395
    396 #: inc/class-settings.php:967, inc/modules/live-view/class-live-view.php:246, inc/modules/live-view/class-live-view.php:246
     396#: inc/class-settings.php:967, inc/modules/live-view/class-live-view.php:264, inc/modules/live-view/class-live-view.php:264
    397397msgid "Live Order View"
    398398msgstr ""
     
    599599msgstr ""
    600600
    601 #: inc/modules/live-view/class-live-view.php:207
     601#: inc/modules/live-view/class-live-view.php:225
    602602msgid "Enable Live View"
    603603msgstr ""
    604604
    605 #: inc/modules/live-view/class-live-view.php:212
     605#: inc/modules/live-view/class-live-view.php:230
    606606msgid "Exit Live View"
    607607msgstr ""
    608608
    609 #: inc/modules/live-view/class-live-view.php:213
     609#: inc/modules/live-view/class-live-view.php:231
    610610msgid "Mute"
    611611msgstr ""
    612612
    613 #: inc/modules/live-view/class-live-view.php:213
     613#: inc/modules/live-view/class-live-view.php:231
    614614msgid "Unmute"
    615615msgstr ""
    616616
    617 #: inc/modules/live-view/class-live-view.php:288
     617#: inc/modules/live-view/class-live-view.php:306
    618618msgid "order_manager"
    619619msgstr ""
    620620
    621 #: inc/modules/live-view/class-live-view.php:288
     621#: inc/modules/live-view/class-live-view.php:306
    622622msgid "Order Manager"
    623623msgstr ""
     
    651651msgstr ""
    652652
    653 #: inc/modules/services/class-services-order.php:33
     653#: inc/modules/services/class-services-order.php:38
    654654msgid "All services"
    655655msgstr ""
    656656
    657 #: inc/modules/services/class-services-order.php:110
     657#: inc/modules/services/class-services-order.php:143
    658658msgid "Service"
    659659msgstr ""
    660660
    661661#. translators: 1: service name; 2: date label. E.g.: "Pickup Date", "Delivery Date"
    662 #: inc/modules/services/class-services-order.php:155
     662#: inc/modules/services/class-services-order.php:188
    663663msgctxt "Order date"
    664664msgid "%1$s %2$s"
     
    666666
    667667#. translators: 1: service name; 2: time label. E.g.: "Pickup Time", "Delivery Time"
    668 #: inc/modules/services/class-services-order.php:157
     668#: inc/modules/services/class-services-order.php:190
    669669msgctxt "Order time"
    670670msgid "%1$s %2$s"
     
    717717msgstr ""
    718718
    719 #: inc/modules/timings/class-timings-checkout.php:188
     719#: inc/modules/timings/class-timings-checkout.php:196
    720720msgid " (As soon as possible)"
    721721msgstr ""
    722722
    723 #: inc/modules/timings/class-timings-order.php:47, inc/modules/timings/class-timings.php:92
     723#: inc/modules/timings/class-timings-order.php:52, inc/modules/timings/class-timings.php:92
    724724msgid "Today"
    725725msgstr ""
    726726
    727 #: inc/modules/timings/class-timings-order.php:48, inc/modules/timings/class-timings.php:94
     727#: inc/modules/timings/class-timings-order.php:53, inc/modules/timings/class-timings.php:94
    728728msgid "Tomorrow"
    729729msgstr ""
    730730
    731 #: inc/modules/timings/class-timings-order.php:49
     731#: inc/modules/timings/class-timings-order.php:54
    732732msgid "Next 7 Days"
    733733msgstr ""
    734734
    735 #: inc/modules/timings/class-timings-order.php:50
     735#: inc/modules/timings/class-timings-order.php:55
    736736msgid "Next 30 Days"
    737737msgstr ""
    738738
    739 #: inc/modules/timings/class-timings-order.php:51
     739#: inc/modules/timings/class-timings-order.php:56
    740740msgid "Custom Range"
    741741msgstr ""
    742742
    743 #: inc/modules/timings/class-timings-order.php:52
     743#: inc/modules/timings/class-timings-order.php:57
    744744msgid "Clear"
    745745msgstr ""
    746746
    747 #: inc/modules/timings/class-timings-order.php:53
     747#: inc/modules/timings/class-timings-order.php:58
    748748msgid "Apply"
    749749msgstr ""
    750750
    751 #: inc/modules/timings/class-timings-order.php:96
     751#: inc/modules/timings/class-timings-order.php:101
    752752msgid "Su"
    753753msgstr ""
    754754
    755 #: inc/modules/timings/class-timings-order.php:97
     755#: inc/modules/timings/class-timings-order.php:102
    756756msgid "Mo"
    757757msgstr ""
    758758
    759 #: inc/modules/timings/class-timings-order.php:98
     759#: inc/modules/timings/class-timings-order.php:103
    760760msgid "Tu"
    761761msgstr ""
    762762
    763 #: inc/modules/timings/class-timings-order.php:99
     763#: inc/modules/timings/class-timings-order.php:104
    764764msgid "We"
    765765msgstr ""
    766766
    767 #: inc/modules/timings/class-timings-order.php:100
     767#: inc/modules/timings/class-timings-order.php:105
    768768msgid "Th"
    769769msgstr ""
    770770
    771 #: inc/modules/timings/class-timings-order.php:101
     771#: inc/modules/timings/class-timings-order.php:106
    772772msgid "Fr"
    773773msgstr ""
    774774
    775 #: inc/modules/timings/class-timings-order.php:102
     775#: inc/modules/timings/class-timings-order.php:107
    776776msgid "Sa"
    777777msgstr ""
    778778
    779 #: inc/modules/timings/class-timings-order.php:105
     779#: inc/modules/timings/class-timings-order.php:110
    780780msgid "January"
    781781msgstr ""
    782782
    783 #: inc/modules/timings/class-timings-order.php:106
     783#: inc/modules/timings/class-timings-order.php:111
    784784msgid "February"
    785785msgstr ""
    786786
    787 #: inc/modules/timings/class-timings-order.php:107
     787#: inc/modules/timings/class-timings-order.php:112
    788788msgid "March"
    789789msgstr ""
    790790
    791 #: inc/modules/timings/class-timings-order.php:108
     791#: inc/modules/timings/class-timings-order.php:113
    792792msgid "April"
    793793msgstr ""
    794794
    795 #: inc/modules/timings/class-timings-order.php:109
     795#: inc/modules/timings/class-timings-order.php:114
    796796msgid "May"
    797797msgstr ""
    798798
    799 #: inc/modules/timings/class-timings-order.php:110
     799#: inc/modules/timings/class-timings-order.php:115
    800800msgid "June"
    801801msgstr ""
    802802
    803 #: inc/modules/timings/class-timings-order.php:111
     803#: inc/modules/timings/class-timings-order.php:116
    804804msgid "July"
    805805msgstr ""
    806806
    807 #: inc/modules/timings/class-timings-order.php:112
     807#: inc/modules/timings/class-timings-order.php:117
    808808msgid "August"
    809809msgstr ""
    810810
    811 #: inc/modules/timings/class-timings-order.php:113
     811#: inc/modules/timings/class-timings-order.php:118
    812812msgid "September"
    813813msgstr ""
    814814
    815 #: inc/modules/timings/class-timings-order.php:114
     815#: inc/modules/timings/class-timings-order.php:119
    816816msgid "October"
    817817msgstr ""
    818818
    819 #: inc/modules/timings/class-timings-order.php:115
     819#: inc/modules/timings/class-timings-order.php:120
    820820msgid "November"
    821821msgstr ""
    822822
    823 #: inc/modules/timings/class-timings-order.php:116
     823#: inc/modules/timings/class-timings-order.php:121
    824824msgid "December"
    825825msgstr ""
    826826
    827 #: inc/modules/timings/class-timings-order.php:200, inc/modules/timings/class-timings-order.php:238
     827#: inc/modules/timings/class-timings-order.php:205, inc/modules/timings/class-timings-order.php:243
    828828msgid "Date"
    829829msgstr ""
    830830
    831 #: inc/modules/timings/class-timings-order.php:204, inc/modules/timings/class-timings-order.php:242
     831#: inc/modules/timings/class-timings-order.php:209, inc/modules/timings/class-timings-order.php:247
    832832msgid "Time"
    833833msgstr ""
    834834
    835 #: inc/modules/timings/class-timings-order.php:208
     835#: inc/modules/timings/class-timings-order.php:213
    836836msgid "Timestamp"
    837837msgstr ""
    838838
    839 #: inc/modules/timings/class-timings-order.php:221
     839#: inc/modules/timings/class-timings-order.php:226
    840840msgid "Due Date/Time"
    841841msgstr ""
    842842
    843 #: inc/modules/timings/class-timings-order.php:322
     843#: inc/modules/timings/class-timings-order.php:368
    844844msgid "Filter by due date"
    845845msgstr ""
  • orderable/trunk/orderable.php

    r2943243 r2969309  
    44 * Author URI: https://orderable.com
    55 * Description: Take local online ordering to a whole new level with Orderable.
    6  * Version: 1.9.0
     6 * Version: 1.10.0
    77 * Author: Orderable
    88 * Text Domain: orderable
    99 * WC requires at least: 5.4.0
    10  * WC tested up to: 7.9
     10 * WC tested up to: 8.1
    1111 */
    1212
     
    2020     * @var string Plugin version.
    2121     */
    22     public static $version = '1.9.0';
     22    public static $version = '1.10.0';
    2323
    2424    /**
    2525     * @var string Required pro version.
    2626     */
    27     public static $required_pro_version = '1.8.0';
     27    public static $required_pro_version = '1.10.0';
    2828
    2929    /**
  • orderable/trunk/readme.txt

    r2943243 r2969309  
    33Tags: ecommerce, WooCommerce, local ordering, restaurants
    44Requires at least: 5.4
    5 Tested up to: 6.2
     5Tested up to: 6.3
    66Requires PHP: 5.6
    7 Stable tag: 1.9.0
     7Stable tag: 1.10.0
    88License: GPLv2 or later
    99License URI: https://www.gnu.org/licenses/gpl-2.0.html
     
    145145
    146146== Changelog ==
     147**v1.10.0** (20 Sep 2023)
     148[new] Open hours block 
     149[new] Compatibility with TikTok plugin 
     150[fix] Date delivery offering "Tomorrow" when "Week Days Only" method is selected and the lead time is greater or equal than two 
     151[fix] Call to undefined function `wc_get_page_screen_id` 
     152
    147153**v1.9.0** (25 Jul 2023)
    148154[new] Compatibility with High-Performance Order Storage (HPOS) 
Note: See TracChangeset for help on using the changeset viewer.