Plugin Directory

Changeset 3403526


Ignore:
Timestamp:
11/26/2025 04:10:46 PM (7 weeks ago)
Author:
bbioon
Message:

version 2.2.0

Location:
merchant
Files:
1013 added
23 edited

Legend:

Unmodified
Added
Removed
  • merchant/trunk/assets/css/modules/address-autocomplete/admin/preview.css

    r3013093 r3403526  
    11.merchant-preview {
    22  padding: 30px;
     3  min-height: 300px;
    34}
    45.merchant-preview .address label {
     
    2526  background-color: #f5f5f5;
    2627}
     28
     29gmp-place-autocomplete {
     30  border-radius: 0;
     31  color-scheme: light;
     32  background-color: #fff;
     33}
  • merchant/trunk/assets/css/modules/address-autocomplete/admin/preview.min.css

    r3013093 r3403526  
    1 .merchant-preview{padding:30px}.merchant-preview .address label{display:block;margin-bottom:10px;font-weight:bold}.merchant-preview .address input{display:block;width:100%;padding:5px 8px;border-radius:0;border:1px solid #2a2a2a;-webkit-transition:300ms;transition:300ms;background-repeat:no-repeat;background-size:38px;background-position:center center}.merchant-preview .address input:focus{outline:1px solid #000}.merchant-preview .address input[disabled]{background-color:#f5f5f5}
     1.merchant-preview{padding:30px;min-height:300px}.merchant-preview .address label{display:block;margin-bottom:10px;font-weight:bold}.merchant-preview .address input{display:block;width:100%;padding:5px 8px;border-radius:0;border:1px solid #2a2a2a;-webkit-transition:300ms;transition:300ms;background-repeat:no-repeat;background-size:38px;background-position:center center}.merchant-preview .address input:focus{outline:1px solid #000}.merchant-preview .address input[disabled]{background-color:#f5f5f5}gmp-place-autocomplete{border-radius:0;color-scheme:light;background-color:#fff}
  • merchant/trunk/assets/css/modules/buy-now/admin/preview.css

    r3160081 r3403526  
    121121}
    122122.merchant-buy-now-button.merchant-custom-buy-now-button {
    123   margin-top: 1.3rem !important;
     123  margin-top: var(--mrc-buy-now-margin-top, 1.3rem);
     124  margin-bottom: var(--mrc-buy-now-margin-bottom, 1rem);
    124125}
  • merchant/trunk/assets/css/modules/buy-now/admin/preview.min.css

    r3160081 r3403526  
    1 .merchant-module-page-setting-fields{gap:24px}.merchant-module-page-setting-field{margin:0}.merchant-module-page-setting-field[data-id=shortcode_text]{margin-top:0}.merchant-module-page-preview-browser-inner{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-flex:0;-ms-flex-positive:0;flex-grow:0;width:100%;margin:auto;padding:25px}.mrc-preview-single-product-elements{width:100%;display:-webkit-box;display:-ms-flexbox;display:flex;gap:25px}.mrc-preview-single-product-elements .mrc-preview-left-column{width:30%;min-width:30%}.mrc-preview-single-product-elements .mrc-preview-right-column{width:70%;padding-top:25px}.mrc-preview-single-product-elements .mrc-preview-product-image-wrapper .mrc-preview-product-image{background-color:#f5f5f5;height:12vw}.mrc-preview-single-product-elements .mrc-preview-product-image-wrapper .mrc-preview-product-image-thumbs{width:100%;display:-webkit-box;display:-ms-flexbox;display:flex;gap:10px;-ms-flex-wrap:nowrap;flex-wrap:nowrap}.mrc-preview-single-product-elements .mrc-preview-product-image-wrapper .mrc-preview-product-image-thumbs .mrc-preview-product-image-thumb{width:100%;height:3vw;background-color:#f5f5f5;margin-top:10px}.mrc-mw-70{max-width:70%}.mrc-mw-30{max-width:30%}.mrc-mw-40{max-width:40%}.mrc-preview-text-placeholder{background-color:#f5f5f5;height:13px}.mrc-preview-text-placeholder+.mrc-preview-text-placeholder,.mrc-preview-text-placeholder+.mrc-preview-addtocart-placeholder{margin-top:15px}.mrc-preview-addtocart-placeholder{background-color:#e5e5e5;width:140px;height:30px}@media(max-width: 991px){.mrc-preview-single-product-elements .mrc-preview-product-image-wrapper .mrc-preview-product-image{height:33vw}.mrc-preview-single-product-elements .mrc-preview-product-image-wrapper .mrc-preview-product-image-thumbs .mrc-preview-product-image-thumb{height:7vw}}.merchant-buy-now-button{display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;margin-top:1.3rem !important;text-decoration:none;padding-top:var(--mrc-buy-now-padding-top-bottom, 13px) !important;padding-bottom:var(--mrc-buy-now-padding-top-bottom, 13px) !important;padding-left:var(--mrc-buy-now-padding-left-right, 24px) !important;padding-right:var(--mrc-buy-now-padding-left-right, 24px) !important;font-size:var(--mrc-buy-now-font-size, 16px);border-radius:var(--mrc-buy-now-border-radius, 0px);color:#fff !important;border-color:#212121 !important;background-color:#212121 !important}.merchant-buy-now-button:hover{color:#fff !important;border-color:#414141 !important;background-color:#414141 !important}.merchant-buy-now-button.merchant-custom-buy-now-button{margin-top:1.3rem !important}
     1.merchant-module-page-setting-fields{gap:24px}.merchant-module-page-setting-field{margin:0}.merchant-module-page-setting-field[data-id=shortcode_text]{margin-top:0}.merchant-module-page-preview-browser-inner{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-flex:0;-ms-flex-positive:0;flex-grow:0;width:100%;margin:auto;padding:25px}.mrc-preview-single-product-elements{width:100%;display:-webkit-box;display:-ms-flexbox;display:flex;gap:25px}.mrc-preview-single-product-elements .mrc-preview-left-column{width:30%;min-width:30%}.mrc-preview-single-product-elements .mrc-preview-right-column{width:70%;padding-top:25px}.mrc-preview-single-product-elements .mrc-preview-product-image-wrapper .mrc-preview-product-image{background-color:#f5f5f5;height:12vw}.mrc-preview-single-product-elements .mrc-preview-product-image-wrapper .mrc-preview-product-image-thumbs{width:100%;display:-webkit-box;display:-ms-flexbox;display:flex;gap:10px;-ms-flex-wrap:nowrap;flex-wrap:nowrap}.mrc-preview-single-product-elements .mrc-preview-product-image-wrapper .mrc-preview-product-image-thumbs .mrc-preview-product-image-thumb{width:100%;height:3vw;background-color:#f5f5f5;margin-top:10px}.mrc-mw-70{max-width:70%}.mrc-mw-30{max-width:30%}.mrc-mw-40{max-width:40%}.mrc-preview-text-placeholder{background-color:#f5f5f5;height:13px}.mrc-preview-text-placeholder+.mrc-preview-text-placeholder,.mrc-preview-text-placeholder+.mrc-preview-addtocart-placeholder{margin-top:15px}.mrc-preview-addtocart-placeholder{background-color:#e5e5e5;width:140px;height:30px}@media(max-width: 991px){.mrc-preview-single-product-elements .mrc-preview-product-image-wrapper .mrc-preview-product-image{height:33vw}.mrc-preview-single-product-elements .mrc-preview-product-image-wrapper .mrc-preview-product-image-thumbs .mrc-preview-product-image-thumb{height:7vw}}.merchant-buy-now-button{display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;margin-top:1.3rem !important;text-decoration:none;padding-top:var(--mrc-buy-now-padding-top-bottom, 13px) !important;padding-bottom:var(--mrc-buy-now-padding-top-bottom, 13px) !important;padding-left:var(--mrc-buy-now-padding-left-right, 24px) !important;padding-right:var(--mrc-buy-now-padding-left-right, 24px) !important;font-size:var(--mrc-buy-now-font-size, 16px);border-radius:var(--mrc-buy-now-border-radius, 0px);color:#fff !important;border-color:#212121 !important;background-color:#212121 !important}.merchant-buy-now-button:hover{color:#fff !important;border-color:#414141 !important;background-color:#414141 !important}.merchant-buy-now-button.merchant-custom-buy-now-button{margin-top:var(--mrc-buy-now-margin-top, 1.3rem);margin-bottom:var(--mrc-buy-now-margin-bottom, 1rem)}
  • merchant/trunk/assets/css/modules/buy-now/buy-now.css

    r3150302 r3403526  
    1212  line-height: 1.2 !important;
    1313  max-width: none;
    14   margin-top: 0.5rem !important;
    15   margin-bottom: 1rem !important;
     14  margin-top: var(--mrc-buy-now-margin-top, 0.5rem) !important;
     15  margin-bottom: var(--mrc-buy-now-margin-bottom, 1rem) !important;
    1616  -webkit-box-pack: center;
    1717      -ms-flex-pack: center;
     
    5757  width: -moz-fit-content !important;
    5858  width: fit-content !important;
    59   margin-top: 0 !important;
    60   margin-bottom: 0 !important;
     59  margin-top: var(--mrc-buy-now-margin-top, 0) !important;
     60  margin-bottom: var(--mrc-buy-now-margin-bottom, 0) !important;
    6161  margin-left: 5px;
    6262  float: none !important;
  • merchant/trunk/assets/css/modules/buy-now/buy-now.min.css

    r3150302 r3403526  
    1 .merchant-buy-now-button.merchant-custom-buy-now-button{display:-webkit-inline-box !important;display:-ms-inline-flexbox !important;display:inline-flex !important;-webkit-box-align:center;-ms-flex-align:center;align-items:center;line-height:1.2 !important;max-width:none;margin-top:.5rem !important;margin-bottom:1rem !important;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;text-decoration:none !important;padding-top:var(--mrc-buy-now-padding-top-bottom, 13px) !important;padding-bottom:var(--mrc-buy-now-padding-top-bottom, 13px) !important;padding-left:var(--mrc-buy-now-padding-left-right, 24px) !important;padding-right:var(--mrc-buy-now-padding-left-right, 24px) !important;font-size:var(--mrc-buy-now-font-size, 16px) !important;border-radius:var(--mrc-buy-now-border-radius, 0px) !important;color:var(--mrc-buy-now-text-color, #FFF) !important;border-color:var(--mrc-buy-now-border-color, #212121) !important;background-color:var(--mrc-buy-now-background-color, #212121) !important}.merchant-buy-now-button.merchant-custom-buy-now-button.disabled{cursor:not-allowed;opacity:.5}.merchant-buy-now-button.merchant-custom-buy-now-button:hover{color:var(--mrc-buy-now-text-hover-color, #FFF) !important;border-color:var(--mrc-buy-now-border-hover-color, #414141) !important;background-color:var(--mrc-buy-now-background-hover-color, #414141) !important}.merchant-buy-now-button.merchant-custom-buy-now-button::before{display:none}.products .product .merchant-buy-now-button.merchant-custom-buy-now-button,.wc-block-grid__products .wc-block-grid__product .merchant-buy-now-button.merchant-custom-buy-now-button{width:100%}.single-product .product .cart .merchant-buy-now-button{-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;width:-webkit-fit-content !important;width:-moz-fit-content !important;width:fit-content !important;margin-top:0 !important;margin-bottom:0 !important;margin-left:5px;float:none !important}.rtl.single-product .merchant-buy-now-button{margin-left:0;margin-right:5px}
     1.merchant-buy-now-button.merchant-custom-buy-now-button{display:-webkit-inline-box !important;display:-ms-inline-flexbox !important;display:inline-flex !important;-webkit-box-align:center;-ms-flex-align:center;align-items:center;line-height:1.2 !important;max-width:none;margin-top:var(--mrc-buy-now-margin-top, 0.5rem) !important;margin-bottom:var(--mrc-buy-now-margin-bottom, 1rem) !important;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;text-decoration:none !important;padding-top:var(--mrc-buy-now-padding-top-bottom, 13px) !important;padding-bottom:var(--mrc-buy-now-padding-top-bottom, 13px) !important;padding-left:var(--mrc-buy-now-padding-left-right, 24px) !important;padding-right:var(--mrc-buy-now-padding-left-right, 24px) !important;font-size:var(--mrc-buy-now-font-size, 16px) !important;border-radius:var(--mrc-buy-now-border-radius, 0px) !important;color:var(--mrc-buy-now-text-color, #FFF) !important;border-color:var(--mrc-buy-now-border-color, #212121) !important;background-color:var(--mrc-buy-now-background-color, #212121) !important}.merchant-buy-now-button.merchant-custom-buy-now-button.disabled{cursor:not-allowed;opacity:.5}.merchant-buy-now-button.merchant-custom-buy-now-button:hover{color:var(--mrc-buy-now-text-hover-color, #FFF) !important;border-color:var(--mrc-buy-now-border-hover-color, #414141) !important;background-color:var(--mrc-buy-now-background-hover-color, #414141) !important}.merchant-buy-now-button.merchant-custom-buy-now-button::before{display:none}.products .product .merchant-buy-now-button.merchant-custom-buy-now-button,.wc-block-grid__products .wc-block-grid__product .merchant-buy-now-button.merchant-custom-buy-now-button{width:100%}.single-product .product .cart .merchant-buy-now-button{-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;width:-webkit-fit-content !important;width:-moz-fit-content !important;width:fit-content !important;margin-top:var(--mrc-buy-now-margin-top, 0) !important;margin-bottom:var(--mrc-buy-now-margin-bottom, 0) !important;margin-left:5px;float:none !important}.rtl.single-product .merchant-buy-now-button{margin-left:0;margin-right:5px}
  • merchant/trunk/assets/css/modules/product-labels/product-labels.css

    r3208675 r3403526  
    1515@media (min-width: 769px) {
    1616  .merchant-product-labels.show-on-desktop {
    17     display: -webkit-box;
    18     display: -ms-flexbox;
    19     display: flex;
     17    display: block;
    2018  }
    2119}
    2220@media (max-width: 768px) {
    2321  .merchant-product-labels.show-on-mobile {
    24     display: -webkit-box;
    25     display: -ms-flexbox;
    26     display: flex;
     22    display: block;
    2723  }
    2824}
     
    3228.merchant-product-labels__regular {
    3329  position: absolute;
    34   top: 10px;
     30  top: 0;
    3531  z-index: 999;
    3632}
     
    4339.merchant-product-labels__regular.position-top-right {
    4440  right: 10px;
     41}
     42.merchant-product-labels--multiple {
     43  width: 100%;
     44}
     45.merchant-product-labels__position {
     46  position: absolute;
     47  z-index: 999;
     48  gap: 10px;
     49  width: 100%;
     50}
     51.merchant-product-labels__position--top-left {
     52  top: 10px;
     53  left: 10px;
     54}
     55.merchant-product-labels__position--top-right {
     56  top: 10px;
     57  right: 10px;
     58}
     59.merchant-product-labels__label-wrapper {
     60  position: absolute;
     61  -webkit-box-align: center;
     62      -ms-flex-align: center;
     63          align-items: center;
     64  -webkit-box-pack: center;
     65      -ms-flex-pack: center;
     66          justify-content: center;
     67}
     68.merchant-product-labels__label-wrapper.merchant-product-labels__text-shape-5.position-top-left {
     69  -webkit-transform: rotate(-45deg) translate(-50%, 50%);
     70          transform: rotate(-45deg) translate(-50%, 50%);
     71  -webkit-transform-origin: left;
     72          transform-origin: left;
     73}
     74.merchant-product-labels__label-wrapper.merchant-product-labels__text-shape-5.position-top-right {
     75  -webkit-transform: rotate(45deg) translate(50%, 50%);
     76          transform: rotate(45deg) translate(50%, 50%);
     77  -webkit-transform-origin: right;
     78          transform-origin: right;
     79}
     80.merchant-product-labels__label-wrapper.merchant-product-labels__text-shape-5.position-absolute {
     81  -webkit-transform: rotate(45deg) translate(-50%, 50%);
     82          transform: rotate(45deg) translate(-50%, 50%);
     83  -webkit-transform-origin: left;
     84          transform-origin: left;
     85}
     86.merchant-product-labels__label-wrapper.merchant-product-labels__text-shape-6.position-top-left {
     87  -webkit-transform: rotate(-45deg) translate(-50%, 25%);
     88          transform: rotate(-45deg) translate(-50%, 25%);
     89  -webkit-transform-origin: left;
     90          transform-origin: left;
     91}
     92.merchant-product-labels__label-wrapper.merchant-product-labels__text-shape-6.position-top-right {
     93  -webkit-transform: rotate(45deg) translate(50%, 25%);
     94          transform: rotate(45deg) translate(50%, 25%);
     95  -webkit-transform-origin: right;
     96          transform-origin: right;
     97}
     98.merchant-product-labels__label-wrapper.merchant-product-labels__text-shape-6.position-absolute {
     99  -webkit-transform: rotate(45deg) translate(-50%, 25%);
     100          transform: rotate(45deg) translate(-50%, 25%);
     101  -webkit-transform-origin: left;
     102          transform-origin: left;
    45103}
    46104.merchant-product-labels__text .merchant-label {
     
    75133  border-radius: 4px;
    76134}
    77 .merchant-product-labels.merchant-product-labels__text-shape-2 {
     135.merchant-product-labels__text-shape-2 {
    78136  border-top-right-radius: 0 !important;
    79137  border-bottom-right-radius: 0 !important;
    80138}
    81 .merchant-product-labels.merchant-product-labels__text-shape-2 .merchant-label {
     139.merchant-product-labels__text-shape-2 .merchant-label {
    82140  background: inherit;
    83141  border-top-left-radius: inherit;
     
    85143  padding-left: 10px;
    86144}
    87 .merchant-product-labels.merchant-product-labels__text-shape-2 .merchant-label:after {
     145.merchant-product-labels__text-shape-2 .merchant-label:after {
    88146  content: "";
    89147  position: absolute;
     
    96154  clip-path: polygon(0 0, 100% 0%, 34% 100%, 0% 100%);
    97155}
    98 .merchant-product-labels.merchant-product-labels__text-shape-3 {
     156.merchant-product-labels__text-shape-3 {
    99157  clip-path: polygon(10px 0, 100% 0, 100% 100%, 10px 100%, 0 50%);
    100158}
    101 .merchant-product-labels.merchant-product-labels__text-shape-3 .merchant-label {
     159.merchant-product-labels__text-shape-3 .merchant-label {
    102160  padding-left: 12px;
    103161}
    104 .merchant-product-labels.merchant-product-labels__text-shape-4 {
     162.merchant-product-labels__text-shape-4 {
    105163  clip-path: polygon(100% 0px, 100% 100%, 0% 100%, 10px 50%, 0% 0%);
    106164  border-top-left-radius: 0 !important;
    107165  border-bottom-left-radius: 0 !important;
    108166}
    109 .merchant-product-labels.merchant-product-labels__text-shape-4 .merchant-label {
     167.merchant-product-labels__text-shape-4 .merchant-label {
    110168  padding-left: 12px;
    111169}
    112 .merchant-product-labels.merchant-product-labels__text-shape-5 {
    113   -webkit-box-pack: center;
    114       -ms-flex-pack: center;
    115           justify-content: center;
    116 }
    117 .merchant-product-labels.merchant-product-labels__text-shape-5.position-top-left {
     170.merchant-product-labels__text-shape-5 {
     171  -webkit-box-pack: center;
     172      -ms-flex-pack: center;
     173          justify-content: center;
     174}
     175.merchant-product-labels__text-shape-5.position-top-left {
    118176  -webkit-transform: rotate(-45deg) translate(-50%, 50%);
    119177          transform: rotate(-45deg) translate(-50%, 50%);
     
    121179          transform-origin: left;
    122180}
    123 .merchant-product-labels.merchant-product-labels__text-shape-5.position-top-right {
    124   -webkit-transform: rotate(45deg) translate(50%, 50%);
    125           transform: rotate(45deg) translate(50%, 50%);
    126   -webkit-transform-origin: right;
    127           transform-origin: right;
    128 }
    129 .merchant-product-labels.merchant-product-labels__text-shape-6 {
     181.merchant-product-labels__text-shape-5.position-top-right {
     182  -webkit-transform: rotate(-45deg) translate(50%, 50%);
     183          transform: rotate(-45deg) translate(50%, 50%);
     184  -webkit-transform-origin: right;
     185          transform-origin: right;
     186}
     187.merchant-product-labels__text-shape-6 {
    130188  -webkit-box-pack: center;
    131189      -ms-flex-pack: center;
     
    136194          transform-origin: left;
    137195}
    138 .merchant-product-labels.merchant-product-labels__text-shape-6.position-top-left {
     196.merchant-product-labels__text-shape-6.position-top-left {
    139197  -webkit-transform: rotate(-45deg) translate(-50%, 25%);
    140198          transform: rotate(-45deg) translate(-50%, 25%);
     
    142200          transform-origin: left;
    143201}
    144 .merchant-product-labels.merchant-product-labels__text-shape-6.position-top-right {
    145   -webkit-transform: rotate(45deg) translate(50%, 25%);
    146           transform: rotate(45deg) translate(50%, 25%);
    147   -webkit-transform-origin: right;
    148           transform-origin: right;
    149 }
    150 .merchant-product-labels.merchant-product-labels__text-shape-6:after {
     202.merchant-product-labels__text-shape-6.position-top-right {
     203  -webkit-transform: rotate(-45deg) translate(50%, 25%);
     204          transform: rotate(-45deg) translate(50%, 25%);
     205  -webkit-transform-origin: right;
     206          transform-origin: right;
     207}
     208.merchant-product-labels__text-shape-6:after {
    151209  content: "";
    152210  background: inherit;
     
    158216  right: 0;
    159217}
    160 .merchant-product-labels.merchant-product-labels__text-shape-8 {
     218.merchant-product-labels__text-shape-8 {
    161219  border-radius: 50%;
    162220}
  • merchant/trunk/assets/css/modules/product-labels/product-labels.min.css

    r3208675 r3403526  
    1 .merchant-product-labels{-ms-flex-wrap:wrap;flex-wrap:wrap;gap:10px;-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start;display:none}@media(min-width: 769px){.merchant-product-labels.show-on-desktop{display:-webkit-box;display:-ms-flexbox;display:flex}}@media(max-width: 768px){.merchant-product-labels.show-on-mobile{display:-webkit-box;display:-ms-flexbox;display:flex}}.merchant-product-labels~.merchant-product-labels{display:none}.merchant-product-labels__regular{position:absolute;top:10px;z-index:999}.merchant-product-labels__regular.position-top-left{left:10px;-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start}.merchant-product-labels__regular.position-top-right{right:10px}.merchant-product-labels__text .merchant-label{position:relative;padding:0 8px}.merchant-product-labels__image img{height:100%;width:100%;display:block}.merchant-product-labels .merchant-label{line-height:1;width:100%;height:100%;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;gap:2px;text-align:center}.merchant-product-labels .merchant-label .woocommerce-Price-amount{color:inherit}.merchant-product-labels .merchant-label-shape-rounded{border-radius:4px}.merchant-product-labels.merchant-product-labels__text-shape-2{border-top-right-radius:0 !important;border-bottom-right-radius:0 !important}.merchant-product-labels.merchant-product-labels__text-shape-2 .merchant-label{background:inherit;border-top-left-radius:inherit;border-bottom-left-radius:inherit;padding-left:10px}.merchant-product-labels.merchant-product-labels__text-shape-2 .merchant-label:after{content:"";position:absolute;width:15px;top:0;bottom:0;right:-10px;background:inherit;z-index:-1;clip-path:polygon(0 0, 100% 0%, 34% 100%, 0% 100%)}.merchant-product-labels.merchant-product-labels__text-shape-3{clip-path:polygon(10px 0, 100% 0, 100% 100%, 10px 100%, 0 50%)}.merchant-product-labels.merchant-product-labels__text-shape-3 .merchant-label{padding-left:12px}.merchant-product-labels.merchant-product-labels__text-shape-4{clip-path:polygon(100% 0px, 100% 100%, 0% 100%, 10px 50%, 0% 0%);border-top-left-radius:0 !important;border-bottom-left-radius:0 !important}.merchant-product-labels.merchant-product-labels__text-shape-4 .merchant-label{padding-left:12px}.merchant-product-labels.merchant-product-labels__text-shape-5{-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}.merchant-product-labels.merchant-product-labels__text-shape-5.position-top-left{-webkit-transform:rotate(-45deg) translate(-50%, 50%);transform:rotate(-45deg) translate(-50%, 50%);-webkit-transform-origin:left;transform-origin:left}.merchant-product-labels.merchant-product-labels__text-shape-5.position-top-right{-webkit-transform:rotate(45deg) translate(50%, 50%);transform:rotate(45deg) translate(50%, 50%);-webkit-transform-origin:right;transform-origin:right}.merchant-product-labels.merchant-product-labels__text-shape-6{-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;-webkit-transform:rotate(-45deg) translate(-50%, 50%);transform:rotate(-45deg) translate(-50%, 50%);-webkit-transform-origin:left;transform-origin:left}.merchant-product-labels.merchant-product-labels__text-shape-6.position-top-left{-webkit-transform:rotate(-45deg) translate(-50%, 25%);transform:rotate(-45deg) translate(-50%, 25%);-webkit-transform-origin:left;transform-origin:left}.merchant-product-labels.merchant-product-labels__text-shape-6.position-top-right{-webkit-transform:rotate(45deg) translate(50%, 25%);transform:rotate(45deg) translate(50%, 25%);-webkit-transform-origin:right;transform-origin:right}.merchant-product-labels.merchant-product-labels__text-shape-6:after{content:"";background:inherit;position:absolute;z-index:-1;top:-100%;bottom:0;left:0;right:0}.merchant-product-labels.merchant-product-labels__text-shape-8{border-radius:50%}.merchant-product-labels-image-wrap{overflow:hidden}li.type-product,div.type-product{position:relative}li.type-product a img,div.type-product a img{width:100%}ul.wc-block-product-template li.product,ul.wc-block-grid__products li.wc-block-grid__product,ul.wc-block-grid__products li.product,ul.products li.wc-block-grid__product,ul.products li.product{overflow:hidden}.theme-kadence .editor-styles-wrapper .merchant_product-labels-grid_item_html a,.theme-kadence .editor-styles-wrapper .merchant_product-labels-grid_item_html .wc-block-grid__product-image,.theme-kadence .editor-styles-wrapper .merchant_product-labels-grid_item_html .wc-block-grid__product-image img{width:100% !important}
     1.merchant-product-labels{-ms-flex-wrap:wrap;flex-wrap:wrap;gap:10px;-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start;display:none}@media(min-width: 769px){.merchant-product-labels.show-on-desktop{display:block}}@media(max-width: 768px){.merchant-product-labels.show-on-mobile{display:block}}.merchant-product-labels~.merchant-product-labels{display:none}.merchant-product-labels__regular{position:absolute;top:0;z-index:999}.merchant-product-labels__regular.position-top-left{left:10px;-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start}.merchant-product-labels__regular.position-top-right{right:10px}.merchant-product-labels--multiple{width:100%}.merchant-product-labels__position{position:absolute;z-index:999;gap:10px;width:100%}.merchant-product-labels__position--top-left{top:10px;left:10px}.merchant-product-labels__position--top-right{top:10px;right:10px}.merchant-product-labels__label-wrapper{position:absolute;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}.merchant-product-labels__label-wrapper.merchant-product-labels__text-shape-5.position-top-left{-webkit-transform:rotate(-45deg) translate(-50%, 50%);transform:rotate(-45deg) translate(-50%, 50%);-webkit-transform-origin:left;transform-origin:left}.merchant-product-labels__label-wrapper.merchant-product-labels__text-shape-5.position-top-right{-webkit-transform:rotate(45deg) translate(50%, 50%);transform:rotate(45deg) translate(50%, 50%);-webkit-transform-origin:right;transform-origin:right}.merchant-product-labels__label-wrapper.merchant-product-labels__text-shape-5.position-absolute{-webkit-transform:rotate(45deg) translate(-50%, 50%);transform:rotate(45deg) translate(-50%, 50%);-webkit-transform-origin:left;transform-origin:left}.merchant-product-labels__label-wrapper.merchant-product-labels__text-shape-6.position-top-left{-webkit-transform:rotate(-45deg) translate(-50%, 25%);transform:rotate(-45deg) translate(-50%, 25%);-webkit-transform-origin:left;transform-origin:left}.merchant-product-labels__label-wrapper.merchant-product-labels__text-shape-6.position-top-right{-webkit-transform:rotate(45deg) translate(50%, 25%);transform:rotate(45deg) translate(50%, 25%);-webkit-transform-origin:right;transform-origin:right}.merchant-product-labels__label-wrapper.merchant-product-labels__text-shape-6.position-absolute{-webkit-transform:rotate(45deg) translate(-50%, 25%);transform:rotate(45deg) translate(-50%, 25%);-webkit-transform-origin:left;transform-origin:left}.merchant-product-labels__text .merchant-label{position:relative;padding:0 8px}.merchant-product-labels__image img{height:100%;width:100%;display:block}.merchant-product-labels .merchant-label{line-height:1;width:100%;height:100%;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;gap:2px;text-align:center}.merchant-product-labels .merchant-label .woocommerce-Price-amount{color:inherit}.merchant-product-labels .merchant-label-shape-rounded{border-radius:4px}.merchant-product-labels__text-shape-2{border-top-right-radius:0 !important;border-bottom-right-radius:0 !important}.merchant-product-labels__text-shape-2 .merchant-label{background:inherit;border-top-left-radius:inherit;border-bottom-left-radius:inherit;padding-left:10px}.merchant-product-labels__text-shape-2 .merchant-label:after{content:"";position:absolute;width:15px;top:0;bottom:0;right:-10px;background:inherit;z-index:-1;clip-path:polygon(0 0, 100% 0%, 34% 100%, 0% 100%)}.merchant-product-labels__text-shape-3{clip-path:polygon(10px 0, 100% 0, 100% 100%, 10px 100%, 0 50%)}.merchant-product-labels__text-shape-3 .merchant-label{padding-left:12px}.merchant-product-labels__text-shape-4{clip-path:polygon(100% 0px, 100% 100%, 0% 100%, 10px 50%, 0% 0%);border-top-left-radius:0 !important;border-bottom-left-radius:0 !important}.merchant-product-labels__text-shape-4 .merchant-label{padding-left:12px}.merchant-product-labels__text-shape-5{-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}.merchant-product-labels__text-shape-5.position-top-left{-webkit-transform:rotate(-45deg) translate(-50%, 50%);transform:rotate(-45deg) translate(-50%, 50%);-webkit-transform-origin:left;transform-origin:left}.merchant-product-labels__text-shape-5.position-top-right{-webkit-transform:rotate(-45deg) translate(50%, 50%);transform:rotate(-45deg) translate(50%, 50%);-webkit-transform-origin:right;transform-origin:right}.merchant-product-labels__text-shape-6{-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;-webkit-transform:rotate(-45deg) translate(-50%, 50%);transform:rotate(-45deg) translate(-50%, 50%);-webkit-transform-origin:left;transform-origin:left}.merchant-product-labels__text-shape-6.position-top-left{-webkit-transform:rotate(-45deg) translate(-50%, 25%);transform:rotate(-45deg) translate(-50%, 25%);-webkit-transform-origin:left;transform-origin:left}.merchant-product-labels__text-shape-6.position-top-right{-webkit-transform:rotate(-45deg) translate(50%, 25%);transform:rotate(-45deg) translate(50%, 25%);-webkit-transform-origin:right;transform-origin:right}.merchant-product-labels__text-shape-6:after{content:"";background:inherit;position:absolute;z-index:-1;top:-100%;bottom:0;left:0;right:0}.merchant-product-labels__text-shape-8{border-radius:50%}.merchant-product-labels-image-wrap{overflow:hidden}li.type-product,div.type-product{position:relative}li.type-product a img,div.type-product a img{width:100%}ul.wc-block-product-template li.product,ul.wc-block-grid__products li.wc-block-grid__product,ul.wc-block-grid__products li.product,ul.products li.wc-block-grid__product,ul.products li.product{overflow:hidden}.theme-kadence .editor-styles-wrapper .merchant_product-labels-grid_item_html a,.theme-kadence .editor-styles-wrapper .merchant_product-labels-grid_item_html .wc-block-grid__product-image,.theme-kadence .editor-styles-wrapper .merchant_product-labels-grid_item_html .wc-block-grid__product-image img{width:100% !important}
  • merchant/trunk/assets/js/admin/admin.js

    r3239506 r3403526  
    135135      });
    136136    });
    137     $('.merchant-range').each(function () {
    138       var $range = $(this);
    139       var $rangeInput = $range.find('.merchant-range-input');
    140       var $numberInput = $range.find('.merchant-range-number-input');
    141       $rangeInput.on('change input merchant.range merchant-init.range', function (e) {
     137
     138    // Create a function that initializes a single range or all ranges in a context for range field
     139    function initMerchantRange() {
     140      var rangeFields = $(document).find('.merchant-range');
     141      if (rangeFields.length === 0) {
     142        return;
     143      }
     144      rangeFields.each(function () {
    142145        var $range = $(this);
    143         var value = (e.type === 'merchant' ? $numberInput.val() : $range.val()) || 0;
    144         var min = $range.attr('min') || 0;
    145         var max = $range.attr('max') || 1;
    146         var percentage = (value - min) / (max - min) * 100;
    147         if ($('body').hasClass('rtl')) {
    148           $range.css({
    149             'background': 'linear-gradient(to left, #3858E9 0%, #3858E9 ' + percentage + '%, #ddd ' + percentage + '%, #ddd 100%)'
    150           });
    151         } else {
    152           $range.css({
    153             'background': 'linear-gradient(to right, #3858E9 0%, #3858E9 ' + percentage + '%, #ddd ' + percentage + '%, #ddd 100%)'
    154           });
    155         }
    156         $rangeInput.val(value);
    157         $numberInput.val(value);
    158       }).trigger('merchant-init.range');
    159       $numberInput.on('change input blur', function () {
    160         if ($rangeInput.hasClass('merchant-range-input')) {
    161           $rangeInput.val($(this).val()).trigger('merchant.range');
    162         }
    163       });
    164     });
     146        var $rangeInput = $range.find('.merchant-range-input');
     147        var $numberInput = $range.find('.merchant-range-number-input');
     148        $rangeInput.on('change input merchant.range merchant-init.range', function (e) {
     149          var $range = $(this);
     150          var value = (e.type === 'merchant' ? $numberInput.val() : $range.val()) || 0;
     151          var min = $range.attr('min') || 0;
     152          var max = $range.attr('max') || 1;
     153          var percentage = (value - min) / (max - min) * 100;
     154          if ($('body').hasClass('rtl')) {
     155            $range.css({
     156              'background': 'linear-gradient(to left, #3858E9 0%, #3858E9 ' + percentage + '%, #ddd ' + percentage + '%, #ddd 100%)'
     157            });
     158          } else {
     159            $range.css({
     160              'background': 'linear-gradient(to right, #3858E9 0%, #3858E9 ' + percentage + '%, #ddd ' + percentage + '%, #ddd 100%)'
     161            });
     162          }
     163          $rangeInput.val(value);
     164          $numberInput.val(value);
     165        }).trigger('merchant-init.range');
     166        $numberInput.on('change input blur', function () {
     167          if ($rangeInput.hasClass('merchant-range-input')) {
     168            $rangeInput.val($(this).val()).trigger('merchant.range');
     169          }
     170        });
     171      });
     172    }
     173
     174    // 1. Initialize on DOM ready (existing fields)
     175    initMerchantRange();
    165176    $(document).on('click', '.merchant-module-page-setting-field-hidden-desc-trigger', function () {
    166177      var $trigger = $(this);
     
    10691080          GroubField.init();
    10701081          $(document).trigger('merchant-flexible-content-added', [$layout]);
     1082          initMerchantRange();
    10711083          self.updateLayoutTitle();
    10721084          self.updateDiscountPercentMaxVal();
     
    17401752        }
    17411753      });
     1754
     1755      // Hide fixed changelog items
     1756      var merchantNotificationsContent = $('.merchant-notification-content');
     1757      merchantNotificationsContent.each(function () {
     1758        var notificationContentItem = $(this);
     1759        // search for all spans that contains class "changelog-fixed" and then go to the parent li of that span and add class hidden
     1760        var fixedItems = notificationContentItem.find('span.changelog-fixed');
     1761        fixedItems.each(function () {
     1762          var fixedItem = $(this);
     1763          fixedItem.closest('li').remove();
     1764        });
     1765        // now check if all li inside this notificationContentItem are hidden, so we need to look for the parent .merchant-notification and remove it
     1766        var allItems = notificationContentItem.find('li');
     1767        var hiddenItems = notificationContentItem.find('li.hidden');
     1768        if (allItems.length === hiddenItems.length) {
     1769          notificationContentItem.closest('.merchant-notification').remove();
     1770        }
     1771      });
    17421772      $(window).on('scroll', function () {
    17431773        if (window.pageYOffset > 60) {
  • merchant/trunk/assets/js/admin/admin.min.js

    r3239506 r3403526  
    1 function _typeof(e){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}((m,h,u,p)=>{var f={},v=new URLSearchParams(h.location.search),g=v.get("module");function b(e){return"string"==typeof e&&!isNaN(e)&&!isNaN(parseFloat(e))}m(u).ready(function(){var e=m(".merchant-module-page-ajax-form"),n=m(".merchant-module-page-ajax-header"),a=(m(".merchant-module-save-button"),m(".merchant-module-page-content").on("change keypress change.merchant",function(e){m(e.target).hasClass("merchant-backup-file")||(m(this).is(".merchant-module-question-answer-textarea, .merchant-license-code-input")||f.show_save||(n.addClass("merchant-show"),n.removeClass("merchant-saving"),f.show_save=!0),c.initFlag())}),e.ajaxForm({beforeSubmit:function(){n.addClass("merchant-saving")},success:function(){var t;n.removeClass("merchant-show"),f.show_save=!1,m(".merchant-module-action").hasClass("merchant-enabled")||((t=m(".merchant-module-alert")).addClass("merchant-show"),m(u).off("click.merchant-alert-close"),m(u).on("click.merchant-alert-close",function(e){m(e.target).closest(".merchant-module-alert-wrapper").length||(t.removeClass("merchant-show"),m(u).off("click.merchant-alert-close"))})),m(u).trigger("save.merchant",[g])}}),m(".merchant-module-question-answer-button")),i=m(".merchant-module-question-answer-textarea");i.on("input",function(){a.prop("disabled",""===m(this).val().trim())}),a.on("click",function(e){e.preventDefault();var t,e=i.val();e.trim()?(t=m(this),m(".merchant-module-question-answer-dropdown").removeClass("merchant-show"),m(".merchant-module-question-thank-you-dropdown").addClass("merchant-show"),h.wp.ajax.post("merchant_module_feedback",{subject:i.attr("data-subject"),message:e,module:t.closest(".merchant-module-action").find(".merchant-module-page-button-action-activate").data("module"),nonce:h.merchant.nonce})):alert("Please provide the required information.")}),m(".merchant-module-page-button-action-activate").on("click",function(e){if(e.preventDefault(),m(this).hasClass("merchant-module-deactivated-by-bp"))return!1;m(".merchant-module-question-list-dropdown").removeClass("merchant-show"),m(".merchant-module-question-answer-dropdown").removeClass("merchant-show"),m(".merchant-module-question-answer-form").removeClass("merchant-show"),m(".merchant-module-question-answer-title").removeClass("merchant-show"),m(".merchant-module-question-thank-you-dropdown").removeClass("merchant-show"),m(".merchant-module-question-answer-textarea").val(""),h.wp.ajax.post("merchant_module_activate",{module:m(this).data("module"),nonce:h.merchant.nonce}).done(function(){m("body").removeClass("merchant-module-disabled").addClass("merchant-module-enabled"),m(".merchant-module-action").addClass("merchant-enabled")})}),m(".merchant-module-page-button-action-deactivate").on("click",function(e){e.preventDefault(),h.wp.ajax.post("merchant_module_deactivate",{module:m(this).data("module"),nonce:h.merchant.nonce}).done(function(){m("body").removeClass("merchant-module-enabled").addClass("merchant-module-disabled"),m(".merchant-module-action").removeClass("merchant-enabled"),m(".merchant-module-question-list-dropdown").addClass("merchant-show")})}),m(".merchant-module-question-list-dropdown li").on("click",function(e){a.prop("disabled",""===i.val().trim());var t=m(this),n=t.data("answer-target"),n=m('[data-answer-title="'+n+'"]');n.length?(n.addClass("merchant-show").siblings().removeClass("merchant-show"),m(".merchant-module-question-answer-dropdown").addClass("merchant-show"),m(".merchant-module-question-answer-textarea").attr("data-subject",t.text().trim())):(m(".merchant-module-question-thank-you-dropdown").addClass("merchant-show"),m(".merchant-module-question-answer-dropdown").removeClass("merchant-show")),m(".merchant-module-question-answer-textarea").val(""),m(".merchant-module-question-list-dropdown").removeClass("merchant-show")}),m(".merchant-module-dropdown-close").on("click",function(e){e.preventDefault(),m(this).closest(".merchant-module-dropdown").removeClass("merchant-show")}),m(".merchant-module-page-button-deactivate").on("click",function(e){e.preventDefault();m(this);var t=m(".merchant-module-deactivate-dropdown");t.toggleClass("merchant-show"),m(u).off("click.merchant-close"),m(u).on("click.merchant-close",function(e){m(e.target).closest(".merchant-module-deactivate").length||(t.removeClass("merchant-show"),m(u).off("click.merchant-close"))})}),m(".merchant-range").each(function(){var e=m(this),a=e.find(".merchant-range-input"),i=e.find(".merchant-range-number-input");a.on("change input merchant.range merchant-init.range",function(e){var t=m(this),e=("merchant"===e.type?i:t).val()||0,n=t.attr("min")||0,n=(e-n)/((t.attr("max")||1)-n)*100;m("body").hasClass("rtl")?t.css({background:"linear-gradient(to left, #3858E9 0%, #3858E9 "+n+"%, #ddd "+n+"%, #ddd 100%)"}):t.css({background:"linear-gradient(to right, #3858E9 0%, #3858E9 "+n+"%, #ddd "+n+"%, #ddd 100%)"}),a.val(e),i.val(e)}).trigger("merchant-init.range"),i.on("change input blur",function(){a.hasClass("merchant-range-input")&&a.val(m(this).val()).trigger("merchant.range")})}),m(u).on("click",".merchant-module-page-setting-field-hidden-desc-trigger",function(){var e=m(this),t=(e.toggleClass("expanded"),e.attr("data-show-text")),n=e.attr("data-hidden-text");m(this).find("span:first").text(e.text()===t?n:t),m(this).closest(".merchant-module-page-setting-field").find(".merchant-module-page-setting-field-hidden-desc").stop(!0,!0).slideToggle("fast")});({init:function(){this.events()},events:function(){m(u).on("click","#download-backup-button",this.download.bind(this)),m(u).on("click","#restore-backup-button",this.restore.bind(this)),m(u).on("change","#merchant-backup-file",this.removeBackupFile.bind(this))},download:function(e){var a=this,i=(e.preventDefault(),m(".merchant-module-page-setting-fields .backup-section")),o=(a.hideError(i),m(e.target).attr("data-module-id"));m.ajax({url:merchant_admin_options.ajaxurl,type:"GET",data:{action:"merchant_get_module_settings",nonce:merchant_admin_options.ajaxnonce,module_id:o},beforeSend:function(){a.showLoadingIndicator(i)},success:function(e){var t,n;e.success?(t=e.data,n="merchant-"+o+"-backup-"+(new Date).toISOString().slice(0,10)+"-"+(new Date).getHours()+"-"+(new Date).getMinutes()+"-"+(new Date).getSeconds()+".json",a.downloadJson(t,n)):a.displayError(e.data.message,i),a.hideLoadingIndicator(i)},error:function(e,t,n){a.displayError(n,i),a.hideLoadingIndicator(i)}})},restore:function(e){var t,a=this,i=(e.preventDefault(),m(".merchant-module-page-setting-fields .restore-section")),n=(a.hideError(i),m(e.target).attr("data-module-id")),e=m(".merchant-backup-file").prop("files")[0];e&&"application/json"===e.type?((t=new FileReader).onload=function(e){e=e.target.result;m.ajax({url:merchant_admin_options.ajaxurl,type:"POST",data:{action:"merchant_restore_module_settings",nonce:merchant_admin_options.ajaxnonce,module_id:n,module_settings:e},beforeSend:function(){a.showLoadingIndicator(i)},success:function(e){e.success?h.location.href=e.data.redirect_url:a.displayError(e.data.message,i),a.hideLoadingIndicator(i)},error:function(e,t,n){a.displayError(n,i),a.hideLoadingIndicator(i)}})},t.readAsText(e)):a.displayError(merchant_admin_options.invalid_file,i)},removeBackupFile:function(e){var t,n=m(e.target);n.length&&(e=m(".backup-file-remove"),0<(null==(t=n[0])?void 0:t.files.length)?e.show():e.hide(),e.on("click",function(){n.val(""),m(this).hide()}))},downloadJson:function(e,t){"object"===_typeof(e)&&(e=JSON.stringify(e));var e=new Blob([e],{type:"application/json"}),e=URL.createObjectURL(e),n=u.createElement("a");n.href=e,n.download=t,n.click(),URL.revokeObjectURL(e)},displayError:function(e,t){t.append('<div class="error-message"><p>'.concat(e,"</p></div>"))},hideError:function(e){e.find(".error-message").remove()},showLoadingIndicator:function(e){e.find(".merchant-loading-spinner").addClass("show")},hideLoadingIndicator:function(e){e.find(".merchant-loading-spinner").removeClass("show")}}).init();e={init:function(e){this.events()},events:function(){m(u).on("click",".merchant-flexible-content .merchant-toggle-switch .toggle-switch-label span",function(){var e=m(this).closest(".merchant-toggle-switch").find(".toggle-switch-checkbox");e.prop("checked",!e.prop("checked"))}).trigger("merchant.change")}};({init:function(){this.initiate_datepicker(),this.events()},initiate_datepicker:function(){var e=m(".merchant-module-page-setting-field .merchant-datetime-field");0!==e.length&&e.each(function(n){var a=m(this).find("input"),i={locale:JSON.parse(merchant_datepicker_locale),selectedDates:[a.val()?new Date(a.val()):""],onSelect:function(e){e.date;var t=e.formattedDate;void 0===t&&(e.datepicker.$el.value=""),a.trigger("change.merchant"),a.trigger("change.merchant-datepicker",[t,a,i,n])}},e=m(this).data("options"),e=(e.buttons=["clear"],e&&(e.minDate!==p&&"today"===e.minDate&&(e.minDate=new Date,e.timeZone!==p)&&""!==e.timeZone&&(e.minDate=new Date(e.minDate.toLocaleString("en-US",{timeZone:e.timeZone}))),i=Object.assign(i,e)),new AirDatepicker(a.getPath(),i));a.attr("readonly",!0),m(u).trigger("initiated.merchant-datepicker",[e,a,i,n])})},events:function(){var e=this;m(u).on("merchant-flexible-content-added",function(){e.initiate_datepicker()})}}).init();({init:function(e){this.events()},events:function(){var n=this;m(".merchant-sortable").each(function(){var e=m(this),t=e.find(".merchant-sortable-input");m(e.find("ul.merchant-sortable-list").first()).sortable({update:function(){t.val(n.sortableGetNewVal(e)).trigger("change.merchant")}}).disableSelection().find("li").each(function(){m(this).find("i.visibility").click(function(){m(this).toggleClass("dashicons-visibility-faint").parents("li:eq(0)").toggleClass("invisible")})}).click(function(){m(event.target).hasClass("dashicons-visibility")&&t.val(n.sortableGetNewVal(e)).trigger("change.merchant")})})},sortableGetNewVal:function(e){var e=m(e.find("li")),t=[];return _.each(e,function(e){m(e).hasClass("invisible")||t.push(m(e).data("value"))}),JSON.stringify(t)}}).init(),e.init(),m(u).on("merchant-flexible-content-added",function(e,t){t=t.find(".merchant-sortable-repeater-control").find(".merchant-sortable-repeater.sortable");r.makeFieldsSortable(t)});var o,r={init:function(e){var a=this;m(".merchant-sortable-repeater-control").each(function(){var e=JSON.parse(m(this).find(".merchant-sortable-repeater-input").val()),t=e.length;if(0<t&&(m(this).find(".repeater-input").val(e[0]),1<t))for(var n=1;n<t;++n)a.appendRow(m(this),e[n])}),this.events()},events:function(){var t=this;m(u).on("click",".merchant-sortable-repeater.sortable .customize-control-sortable-repeater-delete",function(e){e.preventDefault(),m(this).parent().slideUp("fast",function(){var e=m(this).parent().parent();m(this).remove(),t.getAllInputs(e)}),m(u).trigger("merchant-sortable-repeater-item-deleted")}),m(u).on("click",".customize-control-sortable-repeater-add",function(e){e.preventDefault(),t.appendRow(m(this).parent()),t.getAllInputs(m(this).parent())}),m(u).on("change",".merchant-sortable-repeater.sortable",function(){t.getAllInputs(m(this).parent())}),m(u).on("focusout",".merchant-sortable-repeater.sortable .repeater-input",function(){t.getAllInputs(m(this).parent())})},appendRow:function(e){var t='<div class="repeater" style="display:none"><input type="text" value="'+(1<arguments.length&&arguments[1]!==p?arguments[1]:"")+'" class="repeater-input" /><span class="dashicons dashicons-menu"></span><a class="customize-control-sortable-repeater-delete" href="#"><span class="dashicons dashicons-no-alt"></span></a></div>',t=(e.find(".sortable").append(t),e.find(".sortable").find(".repeater:last"));t.slideDown("slow",function(){m(this).find("input").focus()}),this.makeFieldsSortable(e.find(".sortable")),m(u).trigger("merchant-sortable-repeater-item-added",[t,e.find(".sortable")])},makeFieldsSortable:function(n){n.hasClass("disable-sorting")||n.sortable({update:function(e,t){r.getAllInputs(n.parent())}})},getAllInputs:function(e){var t=e.find(".repeater-input").map(function(){return m(this).val()}).toArray();t.length||t.push(""),e.find(".merchant-sortable-repeater-input").val(JSON.stringify(t)),e.find(".merchant-sortable-repeater-input").trigger("change"),e.find(".merchant-sortable-repeater-input").trigger("sortable.repeater.change")}},c=(r.init(),{init:function(){this.initAccordion(),this.initFlag()},initAccordion:function(){m(".merchant-group-field.has-accordion").each(function(){var e=m(this);e.accordion({collapsible:!0,header:"> .title-area",heightStyle:"content",active:!!e.hasClass("open")&&0})})},initFlag:function(){m(".merchant-group-field.has-flag").each(function(){var e=m(this),t=e.data("id"),t=e.find(".merchant-field-".concat(t,"_status select")),n=t.val(),t=t.find("option:selected").text();e.find(".field-status").removeClass("hidden active inactive").text(t).addClass(n)})}}),e={accordion:null,activePopupContainer:null,init:function(){this.initAccordion(),this.events(),this.makeSelectedReviewsSortable(m(".merchant-reviews-selector").not(".layouts .merchant-reviews-selector"))},events:function(){var n=this;m(u).on("input",".merchant-reviews-selector .products-search",n.ajaxSearch.bind(n)),m(u).on("change",'.merchant-reviews-selector .product-review input[type="checkbox"]',n.toggleReview.bind(n)),m(u).on("click",".merchant-reviews-selector .review-photo img",n.requestReviewImages.bind(n)),m(u).on("click",".review-photos-popup .overlay",n.dismissImagesGallery.bind(n)),m(u).on("click",".merchant-reviews-selector .product-reviews-load-more button",n.loadMoreReviews.bind(n)),m(u).on("click",".merchant-reviews-selector .popup-trigger",n.initPopUp.bind(n)),m(u).on("click",".merchant-reviews-selector .popup-header .close, .merchant-reviews-selector > .overlay",n.dismissPopUp.bind(n)),m(u).on("click",".merchant-reviews-selector .product-review-delete",n.deleteSelectedReview.bind(n)),m(u).on("keyup",function(e){"Escape"!==e.key||n.dismissImagesGallery()||n.dismissPopUp(n)}),m(u).on("merchant-flexible-content-added",function(e,t){n.makeSelectedReviewsSortable(),n.initAccordion()})},makeSelectedReviewsSortable:function(){var e=0<arguments.length&&arguments[0]!==p?arguments[0]:m(u).find(".merchant-reviews-selector").not(".layouts .merchant-reviews-selector"),n=this;e.find(".selected-reviews .product-reviews").sortable({axis:"y",cursor:"move",helper:"original",handle:".product-review-move",cancel:"",placeholder:"placeholder",update:function(e,t){t=t.item.closest(".merchant-reviews-selector");n.saveModifications(t)},start:function(e,t){t.placeholder.height(t.item.height())}})},deleteSelectedReview:function(e){var e=m(e.target).closest(".product-review"),t=e.closest(".merchant-reviews-selector");e.remove(),this.saveModifications(t),this.updateSelectedReviewsCheckboxState(t),this.countSelectedReviewsInProduct(t)},ajaxSearch:function(e){var t=this,e=m(e.target),n=e.closest(".merchant-reviews-selector"),a=n.find(".popup-header");(0===e.val().length||3<=e.val().length)&&m.ajax({url:merchant_admin_options.ajaxurl,type:"POST",data:{action:"merchant_search_reviews",search:e.val(),nonce:merchant_admin_options.ajaxnonce},beforeSend:function(){a.addClass("loading"),t.destroyAccordion(n)},success:function(e){e.success?(a.removeClass("popup-error"),n.find(".products-search-results").html(e.data),t.initAccordion(n)):a.addClass("popup-error")},complete:function(){a.removeClass("loading")},error:function(){a.addClass("popup-error")}})},loadMoreReviews:function(e){var t=this,n=m(e.target).closest(".product-item"),e=n.find(".product-review").length;m.ajax({url:merchant_admin_options.ajaxurl,type:"POST",data:{action:"merchant_load_more_reviews",product_id:n.attr("data-id"),offset:e,nonce:merchant_admin_options.ajaxnonce},beforeSend:function(){n.addClass("loading")},success:function(e){e.success&&(n.find(".product-reviews .reviews-wrapper").append(e.data.reviews),""===e.data.load_more&&t.hideLoadMoreButton(n),t.updateSelectedReviewsCheckboxState(n.closest(".merchant-reviews-selector")),t.countSelectedReviewsInProduct(n.closest(".merchant-reviews-selector")))},complete:function(){n.removeClass("loading")}})},hideLoadMoreButton:function(e){e.find(".product-reviews-load-more").remove()},initPopUp:function(e){var e=m(e.target).closest(".merchant-reviews-selector"),t=e.find(".selector-popup"),n=e.find(".overlay");t.addClass("active"),n.addClass("active"),this.activePopupContainer=e},dismissPopUp:function(){var e,t=this.activePopupContainer;null!==t&&(e=t.find(".selector-popup"),t=t.find(".overlay"),e.removeClass("active"),t.removeClass("active"),this.activePopupContainer=null)},initAccordion:function(){var e=0<arguments.length&&arguments[0]!==p?arguments[0]:m(u).find(".merchant-reviews-selector"),t=this;e.each(function(){var n=m(this).find(".popup-content .product-item.product-item-has-reviews");n.each(function(){n.accordion({collapsible:!0,heightStyle:"content",icons:!1,active:!!n.hasClass("opened")&&0,activate:function(e,t){t.newPanel.length?t.newPanel.parent().addClass("opened"):n.removeClass("opened")}})}),n.find("a").on("click",function(e){e.stopPropagation()}),t.updateSelectedReviewsCheckboxState(m(this)),t.countSelectedReviewsInProduct(m(this))})},destroyAccordion:function(e){e.find(".selector-popup .product-item.product-item-has-reviews").each(function(){m(this).hasClass("ui-accordion")&&m(this).accordion("destroy")})},toggleReview:function(e){var t=this,n=m(e.target).prop("checked"),a=m(e.target).closest(".merchant-reviews-selector"),e=m(e.target).closest(".product-review"),i=e.attr("data-id"),o=a.find(".selected-reviews .product-reviews"),i=o.find('.product-review[data-id="'.concat(i,'"]'));n?0===i.length&&(n=e.clone(),o.append(n),t.makeSelectedReviewsSortable()):i.remove(),setTimeout(function(){t.saveModifications(a)},150)},saveModifications:function(e){var t=e.find(".review-saved-ids"),n=e.find(".selected-reviews .product-reviews").find(".product-review"),a=[];n.each(function(){var e=m(this).attr("data-id");a.push(e)}),t.val(a.join(",")),t.trigger("change"),this.updateSelectedReviewsCheckboxState(e),this.countSelectedReviewsInProduct(e)},updateSelectedReviewsCheckboxState:function(n){var e=n.find(".selector-popup"),t=n.find(".review-saved-ids"),e=e.find(".product-review"),a=t.val().split(",");e.each(function(){var e=m(this).attr("data-id"),t=n.find('.product-review[data-id="'.concat(e,'"] input[type="checkbox"]'));a.includes(e)?t.prop("checked",!0):t.prop("checked",!1)})},countSelectedReviewsInProduct:function(e){var t=e.find(".selector-popup .product-item"),n=e.find(".review-saved-ids").val().split(",");t.each(function(){var t=0,e=m(this);e.find(".product-review").each(function(){var e=m(this).attr("data-id");n.includes(e)&&t++}),e.find(".selected-reviews-count .counter").text(t)})},requestReviewImages:function(e){var t=m(e.target).closest(".product-review"),n=m(e.target),e=t.attr("data-id");m.ajax({url:merchant_admin_options.ajaxurl,type:"POST",data:{action:"merchant_get_review_images",review_id:e,nonce:merchant_admin_options.ajaxnonce},beforeSend:function(){n.addClass("loading")},success:function(e){e.success&&(m("body").append(e.data),setTimeout(function(){m("body").find(".review-photos-popup").addClass("active")},300))},complete:function(){n.removeClass("loading")}})},dismissImagesGallery:function(){var e=m("body").find(".review-photos-popup");return!!e.length&&(e.removeClass("active"),setTimeout(function(){e.remove()},300),!0)}};({init:function(e){var i=this;m(".merchant-flexible-content-control").each(function(){var e=m(this).hasClass("has-accordion"),n=m(this).find(".merchant-flexible-content"),t=v.get("campaign_id"),a=0;t&&n.find("input.flexible-id").each(function(e){if(m(this).val()===t)return a=e,!1}),e?n.accordion({active:a,collapsible:!0,header:function(e){return e.find(".layout__inner > .layout-header")},heightStyle:"content"}).sortable({axis:"y",cursor:"move",helper:"original",handle:".customize-control-flexible-content-move",stop:function(e,t){n.trigger("merchant.sorted"),i.refreshNumbers(n),n.accordion("refresh")}}):n.sortable({axis:"y",cursor:"move",helper:"original",handle:".customize-control-flexible-content-move",stop:function(e,t){n.trigger("merchant.sorted"),i.refreshNumbers(n),n.accordion("refresh")}})}),this.updateLayoutTitle(),this.updateDiscountPercentMaxVal(),this.events()},updateLayoutTitle:function(){m(".merchant-flexible-content .layout").each(function(){var e,t=m(this).find(".layout-title[data-title-field]");t.length&&((e=m(this).find(".layout-body .merchant-field-"+t.data("title-field")+" input")).on("change keyup",function(){t.text(m(this).val())}),t.text(e.val()))})},updateDiscountPercentMaxVal:function(){m(".merchant-flexible-content .layout").each(function(){var e=m(this),t=e.find('.merchant-module-page-setting-field[data-id="discount_type"]'),n=e.find('.merchant-module-page-setting-field[data-id="discount_value"]'),e=(n=(n=n.length?n:e.find('.merchant-module-page-setting-field[data-id="discount"]')).length?n:e.find('.merchant-module-page-setting-field[data-id="discount_amount"]'),t.find("input:checked").val());"percentage_discount"===e||"percentage"===e?n.find("input").attr("max",100):n.find("input").removeAttr("max")}),m(".merchant-module-page-setting-fields")},generateUUID:function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){var t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)})},events:function(){var o=this;function n(e){e&&e.length&&e.siblings().find(".layout-actions__inner").slideUp(300)}m(u).on("change",'.merchant-module-page-setting-field[data-id="discount_type"] input',function(){o.updateDiscountPercentMaxVal()}),m(u).on("change","select",function(){var t=m(this).val(),n=m(this).prop("multiple");m(this).find("option").each(function(){var e=m(this).val(),e=n?t.includes(e):e===t;m(this).attr("selected",e)})}),m(".customize-control-flexible-content-add-button").click(function(e){e.preventDefault(),e.stopImmediatePropagation(),1===m(this).parent().find(".customize-control-flexible-content-add-list a").length?m(this).parent().find(".customize-control-flexible-content-add-list a").trigger("click"):m(this).parent().find(".customize-control-flexible-content-add-list").toggleClass("active")}),m(u).on("click",".customize-control-flexible-content-add",function(e){e.preventDefault(),e.stopImmediatePropagation();var e=m(".merchant-flexible-content-control[data-id="+m(this).data("id")+"]"),t=e.find(".layouts"),n=m(this).data("layout"),t=t.find(".layout[data-type="+n+"]").clone(!0),n=e.find(".merchant-flexible-content"),a=n.find(".layout"),e=o.generateUUID(),e=(t.find("input, select, textarea").each(function(){m(this).data("name")&&m(this).attr("name",m(this).data("name").replace("0",a.length)),m(this).is(":checkbox, :radio")&&m(this).attr("checked")&&m(this).prop("checked",!0)}),t.attr("data-layout-id",e),t.find(".layout-count").text(a.length+1),t.find(".flexible-id").val(e),n.append(t),n.removeClass("empty"),m(this).parent().removeClass("active"),t.find(".merchant-module-page-setting-field-upload").length&&s(t.find(".merchant-module-page-setting-field-upload")),t.find(".merchant-module-page-setting-field-select_ajax").length&&l(t.find(".merchant-module-page-setting-field-select_ajax")),m(this).closest(".merchant-flexible-content-control"));e.hasClass("has-accordion")&&(e.find(".merchant-flexible-content").accordion("refresh"),e.find(".merchant-flexible-content").accordion("option","active",-1)),c.init(),m(u).trigger("merchant-flexible-content-added",[t]),o.updateLayoutTitle(),o.updateDiscountPercentMaxVal()}),m(u).on("click",".customize-control-flexible-content-duplicate",function(e){e.preventDefault(),e.stopImmediatePropagation();var t,a,e=m(this),n=e.closest(".merchant-flexible-content-control[data-id="+e.data("id")+"]"),i=null==n?void 0:n.find(".merchant-flexible-content");n.length&&i.length&&(e=e.closest(".layout")).length&&(e.find(".layout-actions__inner").hide(),t=e.clone(),i.find(".layout"),a=e.find(".layout-count").text(),t.find("input, select, textarea").each(function(){var e,t=m(this),n=t.attr("name");n&&(e=n.split("[")[0],n=n.match(/\[(.*?)\]/g))&&1<n.length&&(n[1]="["+a+"]",e="".concat(e).concat(n.join("")),t.attr("name",e))}),t.find("select").each(function(){m(this).hasClass("select2-hidden-accessible")&&(m(this).removeClass("select2-hidden-accessible").removeAttr("data-live-search").removeAttr("data-select2-id").removeAttr("aria-hidden").removeAttr("tabindex"),m(this).nextAll(".select2-container").remove(),m(this).select2())}),t.find(".layout-body").removeAttr("style"),t.hide(),t.insertAfter(e),t.fadeIn(),t.find(".merchant-module-page-setting-field-upload").length&&s(t.find(".merchant-module-page-setting-field-upload")),t.find(".merchant-module-page-setting-field-select_ajax").length&&l(t.find(".merchant-module-page-setting-field-select_ajax")),o.refreshNumbers(i),m(u).trigger("merchant-flexible-content-added",[t]),n.hasClass("has-accordion")&&i.accordion("refresh"),o.updateLayoutTitle(),c.init())}),m(u).on("click",".customize-control-flexible-content-delete",function(e){e.preventDefault();var e=m(this).closest(".layout"),t=e.parent(),t=(e.remove(),0===t.find(".layout").length&&t.addClass("empty"),o.refreshNumbers(t),m(u).trigger("merchant-flexible-content-deleted",[e]),m(this).closest(".merchant-flexible-content-control"));t.hasClass("has-accordion")&&t.find(".merchant-flexible-content").accordion("refresh"),m(u).trigger("change.merchant")}),m(u).on("click",".layout-actions__toggle",function(e){e.preventDefault(),n(m(this).closest(".layout")),m(this).closest(".layout-actions").find(".layout-actions__inner").stop().slideToggle(300)}),m(u).on("click",".layout-header",function(){n(m(this).closest(".layout"))}),m(u).on("merchant-flexible-content-added",function(e,t){n(t)})},refreshNumbers:function(e){e.find(".layout").each(function(e){var t=m(this).find(".layout-count").text(),n=parseInt(t)-1;m(this).find(".layout-count").text(e+1),m(this).find("input, select, textarea").each(function(){m(this).attr("name")&&m(this).attr("name",m(this).attr("name").replace("["+n+"]","[*refreshed*"+e+"]"))})}),e.find(".layout").each(function(e){m(this).find("input, select, textarea").each(function(){var e=m(this).attr("name");e&&m(this).attr("name",e.replace("*refreshed*",""))})}),e.parent().find("input").trigger("change.merchant")}}).init(),c.init(),e.init(),m(u).on("keyup",".merchant-module-page-setting-field-products_selector .merchant-search-field",function(){clearTimeout(o);var e,t,n,a=[],i=(!m(this).closest('[data-id="excluded_products"]').length||"categories"!==(t=(e=m(this).closest(".layout")).find(".merchant-field-rules_to_apply select").val()||e.find(".merchant-field-rules_to_display select").val()||e.find(".merchant-field-display_rules select").val())&&"by_category"!==t||(a=e.find(".merchant-field-category_slugs select").val()||e.find(".merchant-field-product_cats select").val()),m(this).closest(".merchant-products-search-container"));""!==m(this).val()?(i.find(".merchant-searching").addClass("active"),n={action:"merchant_admin_products_search",nonce:merchant_admin_options.ajaxnonce,keyword:m(this).val(),product_types:m(this).data("allowed-types"),ids:i.find(".merchant-selected-products").val(),categories:a},o=setTimeout(function(){m.post(merchant_admin_options.ajaxurl,n,function(e){var t=i.find(".merchant-selections-products-preview");t.show(),t.html(e),i.find(".merchant-searching").removeClass("active")})},250)):i.find(".merchant-selections-products-preview").html("").hide()}),m(u).on("click touch",".merchant-module-page-setting-field-products_selector .merchant-selections-products-preview li",function(){var e=m(this).closest(".merchant-products-search-container"),t=e.find(".merchant-selected-products"),n=t.val(),a="multiple"===e.data("multiple");0<e.find(".merchant-selected-products-preview ul li").length&&!a&&(e.find(".merchant-selected-products-preview ul li").remove(),t.val("").change()),m(this).children(".remove").attr("aria-label","Remove").html("×"),e.find(".merchant-selected-products-preview ul").append(m(this)),e.find(".merchant-selections-products-preview").html("").hide(),e.find(".merchant-search-field").val("").change(),""===n?t.val(m(this).data("id")):(a?((e=n.split(",")).push(m(this).data("id")),t.val(e.join(","))):t.val(m(this).data("id"))).change()}),m(u).on("click touch",".merchant-selected-products-preview .remove",function(){var e=m(this);if(confirm(merchant_admin_options.product_delete_confirmation_message)){var t=e.closest(".merchant-products-search-container").find(".merchant-selected-products"),n=e.parent().data("id"),a=(e.parent().remove(),t.val().split(","));if(0<a.length)for(var i in a)parseInt(a[i])===parseInt(n)&&a.splice(i,1);t.val(a.join(",")).change(),t.trigger("change.merchant")}}),m(u).on("merchant-admin-check-fields merchant-flexible-content-added",function(){m(".merchant-module-page-setting-field").each(function(){var e=m(this);if(e.data("condition")&&e.data("condition").length){var t=e.data("condition"),n=m(this).closest(".layout-body").find('input[name*="'+t[0]+'"],select[name*="'+t[0]+'"]');if((n=n.length?n:m('input[name="merchant['+t[0]+']"],select[name="merchant['+t[0]+']"]')).length){var a,i=!1;switch(t[1]){case"==":"radio"!==n.attr("type")&&"checkbox"!==n.attr("type")||(a=n.parent().find("input:checked")).length&&a.val()===t[2]&&(i=!0),n.is("select")&&n.val()==t[2]&&(i=!0);break;case"any":"radio"!==n.attr("type")&&"checkbox"!==n.attr("type")||(a=n.parent().find("input:checked")).length&&t[2].split("|").includes(a.val())&&(i=!0),n.is("select")&&t[2].split("|").includes(n.val())&&(i=!0)}i?e.removeClass("merchant-hide").addClass("merchant-show"):e.removeClass("merchant-show").addClass("merchant-hide")}}})}).trigger("merchant.change"),m(u).on("merchant-admin-check-fields merchant-flexible-content-added change keyup",function(){m(u).find(".merchant-module-page-setting-field").each(function(){var e=m(this);e.data("conditions")&&(function e(t){var n=1<arguments.length&&arguments[1]!==p&&arguments[1];var a=!1;if("relation"in t){var i=t.relation.toUpperCase();if("OR"===i)for(var o=0;o<t.terms.length;o++){var r=t.terms[o];if(a=e(r,n))return!0}else if("AND"===i){for(var c=0,s=0;s<t.terms.length;s++){var l=t.terms[s];e(l,n)&&c++}c===t.terms.length&&(a=!0)}}else{var d,i="",h=(i="terms"in t?t.terms[0]:t,m('input[name="merchant['+i.field+']"],select[name="merchant['+i.field+']"]')),u=(h.length||0<(d=n.closest(".layout-body")).length&&(h=d.find(".merchant-field-"+i.field).find("input, select")),(h=(h=h.length?h:m('input[name="merchant['+i.field+'][]"],select[name="merchant['+i.field+'][]"]')).length?h:m(".merchant-group-fields-container").find(".merchant-field-"+i.field+' input[name*="'+i.field+'"],.merchant-field-'+i.field+' select[name*="'+i.field+'"]')).val());"checkbox"===h.attr("type")&&(u=h.is(":checked")),"radio"===h.attr("type")&&(u=h.filter(":checked").val()),"checkbox"===h.attr("type")&&1<h.length&&(u=[],h.each(function(){m(this).is(":checked")&&u.push(m(this).val())})),b(u)&&(u=Number(u)),Array.isArray(i.value)&&(i.value=i.value.map(function(e){return b(e)?Number(e):e})),("==="===i.operator&&u===i.value||"!=="===i.operator&&u!==i.value||">"===i.operator&&u>i.value||"<"===i.operator&&u<i.value||">="===i.operator&&u>=i.value||"<="===i.operator&&u<=i.value||"in"===i.operator&&i.value.includes(u)||"!in"===i.operator&&!i.value.includes(u)||"contains"===i.operator&&Array.isArray(u)&&u.includes(i.value)||"!contains"===i.operator&&Array.isArray(u)&&!u.includes(i.value))&&(a=!0)}return a}(e.data("conditions"),e)?e.removeClass("merchant-hide").addClass("merchant-show"):e.removeClass("merchant-show").addClass("merchant-hide"))})}).trigger("merchant.change"),m(u).on("change",".merchant-module-page-setting-field",function(){m(u).trigger("merchant-admin-check-fields")}).trigger("merchant.change"),m(u).trigger("merchant-admin-check-fields"),m(u).on("merchant-admin-check-color-fields merchant-flexible-content-added",function(){m(".merchant-color").each(function(){var n,e=m(this),a=e.find(".merchant-color-picker"),i=e.find(".merchant-color-input"),o=!1;a.off("click").on("click",function(e){e.preventDefault(),e.stopPropagation();var t=m("body,html");t.addClass("merchant-height-auto"),o?n.setColor(i.val()):((n=new Pickr({el:a.get(0),container:"body",theme:"merchant",appClass:"merchant-pcr-app",default:i.val()||a.data("default-color")||"#212121",swatches:["#000000","#F44336","#E91E63","#673AB7","#03A9F4","#8BC34A","#FFEB3B","#FFC107","#FFFFFF"],sliders:"h",useAsButton:!0,components:{hue:!0,preview:!0,opacity:!0,interaction:{input:!0,clear:!0}},i18n:{"btn:clear":"Default"}})).on("change",function(e){e=(1===e.a?(n.setColorRepresentation("HEX"),e.toHEXA()):(n.setColorRepresentation("RGBA"),e.toRGBA())).toString(0);a.css({"background-color":e}),i.val()!==e&&i.val(e).trigger("change.merchant"),m(u).trigger("merchant-color-picker-updated",[e,i])}),n.on("clear",function(){var e=a.data("default-color");e?n.setColor(e):(a.css({"background-color":"white"}),i.val(""))}),n.on("hide",function(){t.removeClass("merchant-height-auto")}),a.data("pickr",n),setTimeout(function(){n.show()},200),o=!0)}),i.on("change keyup",function(){var e=m(this).val();a.css({"background-color":e})})})}),m(u).trigger("merchant-admin-check-color-fields");({init:function(){this.events()},events:function(){var l=this;m(u).on("click",".merchant-create-page-control-button",function(e){e.preventDefault();var t=m(this),n=t.parent().find(".merchant-create-page-control-create-message"),a=t.parent().find(".merchant-create-page-control-success-message"),e=(t.text(),t.data("creating-text")),i=(t.data("created-text"),t.data("page-title")),o=t.data("page-meta-key"),r=t.data("page-meta-value"),c=t.data("option-name"),s=t.data("nonce");if(!i)return!1;m(this).text(e),m(this).attr("disabled",!0),m.ajax({type:"post",url:ajaxurl,data:{action:"merchant_create_page_control",page_title:i,page_meta_key:o,page_meta_value:r,option_name:c,nonce:s},success:function(e){l.ajaxResponseHandler(e,t,a,n)}})})},ajaxResponseHandler:function(e,t,n,a){"success"===e.status&&(e=n.find("a").attr("href").replace("?post=&","?post="+e.page_id+"&"),n.find("a").attr("href",e),n.css("display","block"),a.remove(),t.remove())}}).init(),m(".merchant-module-page-setting-field-gallery").each(function(){var a,i=m(this),e=i.find(".merchant-gallery-button"),o=i.find(".merchant-gallery-input"),r=i.find(".merchant-gallery-images"),t=i.find(".merchant-gallery-remove");r.sortable({helper:"original",update:function(e,t){var n=[];r.find(".merchant-gallery-image").each(function(){n.push(m(this).data("item-id"))}),o.val(n.join(",")).trigger("change")}});t.on("click",function(e){e.preventDefault(),m(this).parent().remove();var t=[];r.find(".merchant-gallery-image").each(function(){t.push(m(this).data("item-id"))}),o.val(t.join(",")).trigger("change")}),e.on("click",function(e){m(this);var t=o.val(),n=t?"edit":"add";e.preventDefault(),void 0!==h.wp&&h.wp.media&&h.wp.media.gallery&&("add"==n?(a=h.wp.media({library:{type:"image"},frame:"post",state:"gallery",multiple:!0})).open():a=h.wp.media.gallery.edit('[gallery ids="'+t+'"]'),a.on("update",function(e){r.empty();e=e.models.map(function(e){var e=e.toJSON(),t=(e.sizes&&e.sizes.thumbnail&&e.sizes.thumbnail.url?e.sizes.thumbnail:e).url;return r.append('<div class="merchant-gallery-image" data-item-id="'+e.id+'"><i class="merchant-gallery-remove dashicons dashicons-no-alt"></i><img src="'+t+'" /></div>'),e.id});o.val(e.join(",")).trigger("change"),i.find(".merchant-gallery-remove").on("click",function(e){e.preventDefault(),m(this).parent().remove();var t=[];r.find(".merchant-gallery-image").each(function(){t.push(m(this).data("item-id"))}),o.val(t.join(",")).trigger("change")})}))})});var s=function(e){var a,i=e,e=i.find(".merchant-upload-button"),o=i.find(".merchant-upload-input"),r=i.find(".merchant-upload-wrapper");i.find(".merchant-upload-remove").on("click",function(e){e.preventDefault(),m(this).parent().remove(),o.val("").trigger("change")}),e.on("click",function(e){e.preventDefault(),void 0!==h.wp&&h.wp.media&&((a=a||h.wp.media({library:{type:"image"}})).open(),a.on("select",function(){r.empty();var e=a.state().get("selection").first().attributes,t=(e.sizes&&e.sizes.thumbnail&&e.sizes.thumbnail.url?e.sizes.thumbnail:e).url,n=e.sizes?JSON.stringify(e.sizes):"";r.append('<div class="merchant-upload-image" data-sizes=\''+n+'\'><i class="merchant-upload-remove dashicons dashicons-no-alt"></i><img src="'+t+'" /></div>'),o.val(e.id).trigger("change"),i.find(".merchant-upload-button-drag-drop").hide(),i.find(".merchant-upload-remove").on("click",function(e){e.preventDefault(),m(this).parent().remove(),o.val("").trigger("change"),i.find(".merchant-upload-button-drag-drop").show()})}))})},l=(m(".merchant-module-page-setting-field-upload:not(.template)").each(function(){s(m(this))}),jQuery.each(["dragenter","dragover","dragleave","drop"],function(e,t){m(u).on(t,".merchant-upload-button-drag-drop",function(e){e.preventDefault(),e.stopPropagation()})}),m(u).on("dragenter",".merchant-upload-button-drag-drop",function(e){m(this).closest(".merchant-module-page-setting-field-upload").find(".merchant-upload-button").click()}),function(e){var t=e.find("select"),n=t.data("source"),a=h.merchant_admin_options,i={width:"100%",templateSelection:function(e){return e.text.replace(/&nbsp;-*\s*/g,"").trim()}};"post"!==n&&"product"!==n&&"user"!==n||(i.minimumInputLength=1,i.ajax={url:a.ajaxurl,dataType:"json",delay:250,cache:!0,data:function(e){return{action:"merchant_admin_options_select_ajax",nonce:a.ajaxnonce,term:e.term,source:n}},processResults:function(e,t){return e.success?{results:e.data}:{}}}),t.select2(i),e.find(".select2-selection--multiple").append('<span class="merchant-select2-clear"></span>')}),d=(m(".merchant-module-page-setting-field-select_ajax:not(.template)").each(function(){l(m(this))}),m(".merchant-module-page-settings-responsive").each(function(){var e=m(this),n=e.find(".merchant-module-page-settings-devices button"),a=e.find(".merchant-module-page-settings-device-container");n.on("click",function(e){e.preventDefault();var t=m(this).data("device");n.removeClass("active"),a.removeClass("active"),m(this).addClass("active"),a.each(function(){m(this).data("device")===t&&m(this).addClass("active")})})}),m(".merchant-animated-buttons").each(function(){var e,t,n=m(this).find("label"),a=m(".merchant-animation-demo");n.on("click",function(){a.removeClass("merchant-animation-"+e),a.removeClass("merchant-animation-"+t),e=m(this).find("input").attr("value"),setTimeout(function(){a.addClass("merchant-animation-"+e)},100),setTimeout(function(){a.removeClass("merchant-animation-"+e)},1e3)}),n.mouseover(function(){a.removeClass("merchant-animation-"+e),t=m(this).find("input").attr("value"),a.addClass("merchant-animation-"+t)}).mouseout(function(){a.removeClass("merchant-animation-"+t)})}),m(".merchant-notifications-sidebar")),e=(d.length&&(m(".merchant-notifications").on("click",function(e){e.preventDefault();var t=m(this),e=d.find(".merchant-notification:first-child .merchant-notification-date").data("raw-date");d.toggleClass("opened"),t.hasClass("read")||m.post(h.merchant.ajax_url,{action:"merchant_notifications_read",nonce:h.merchant.nonce,latest_notification_date:e},function(e){e.success&&setTimeout(function(){t.addClass("read")},2e3)})}),m(h).on("scroll",function(){60<h.pageYOffset&&(d.addClass("closing"),setTimeout(function(){d.removeClass("opened"),d.removeClass("closing")},300))}),m(".merchant-notifications-sidebar-close").on("click",function(e){e.preventDefault(),d.addClass("closing"),setTimeout(function(){d.removeClass("opened"),d.removeClass("closing")},300)})),m(".merchant-tabs-nav")),t=(e.length&&e.each(function(){var n=m(this).data("tab-wrapper-id");m(this).find(".merchant-tabs-nav-link").on("click",function(e){e.preventDefault();var e=m(this).closest(".merchant-tabs-nav").find(".merchant-tabs-nav-link"),t=m(this).data("tab-to"),e=(e.each(function(){m(this).closest(".merchant-tabs-nav-item").removeClass("active")}),m(this).closest(".merchant-tabs-nav-item").addClass("active"),m('.merchant-tab-content-wrapper[data-tab-wrapper-id="'+n+'"]'));e.find("> .merchant-tab-content").removeClass("active"),e.find('> .merchant-tab-content[data-tab-content-id="'+t+'"]').addClass("active")})}),m(".merchant-module-alert"));t.length&&t.find(".merchant-module-alert-close").on("click",function(e){e.preventDefault(),t.removeClass("merchant-show"),m(u).off("click.merchant-alert-close")})})})(jQuery,window,document),jQuery.fn.extend({getPath:function(){var c=[];return this.each(function(e,t){for(var n,a=jQuery(t);a.length;){var i=a.get(0);if(!(o=i.localName))break;var o=o.toLowerCase(),r=a.parent();1<r.children(o).length&&0<(e=r.children().index(i)+1)&&(o+=":nth-child("+e+")"),n=o+(n?" > "+n:""),a=r}c.push(n)}),c.join(",")}});
     1function _typeof(e){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}((m,u,p,f)=>{var v={},g=new URLSearchParams(u.location.search),b=g.get("module");function w(e){return"string"==typeof e&&!isNaN(e)&&!isNaN(parseFloat(e))}m(p).ready(function(){var e=m(".merchant-module-page-ajax-form"),n=m(".merchant-module-page-ajax-header"),a=(m(".merchant-module-save-button"),m(".merchant-module-page-content").on("change keypress change.merchant",function(e){m(e.target).hasClass("merchant-backup-file")||(m(this).is(".merchant-module-question-answer-textarea, .merchant-license-code-input")||v.show_save||(n.addClass("merchant-show"),n.removeClass("merchant-saving"),v.show_save=!0),s.initFlag())}),e.ajaxForm({beforeSubmit:function(){n.addClass("merchant-saving")},success:function(){var t;n.removeClass("merchant-show"),v.show_save=!1,m(".merchant-module-action").hasClass("merchant-enabled")||((t=m(".merchant-module-alert")).addClass("merchant-show"),m(p).off("click.merchant-alert-close"),m(p).on("click.merchant-alert-close",function(e){m(e.target).closest(".merchant-module-alert-wrapper").length||(t.removeClass("merchant-show"),m(p).off("click.merchant-alert-close"))})),m(p).trigger("save.merchant",[b])}}),m(".merchant-module-question-answer-button")),i=m(".merchant-module-question-answer-textarea");function r(){var e=m(p).find(".merchant-range");0!==e.length&&e.each(function(){var e=m(this),a=e.find(".merchant-range-input"),i=e.find(".merchant-range-number-input");a.on("change input merchant.range merchant-init.range",function(e){var t=m(this),e=("merchant"===e.type?i:t).val()||0,n=t.attr("min")||0,n=(e-n)/((t.attr("max")||1)-n)*100;m("body").hasClass("rtl")?t.css({background:"linear-gradient(to left, #3858E9 0%, #3858E9 "+n+"%, #ddd "+n+"%, #ddd 100%)"}):t.css({background:"linear-gradient(to right, #3858E9 0%, #3858E9 "+n+"%, #ddd "+n+"%, #ddd 100%)"}),a.val(e),i.val(e)}).trigger("merchant-init.range"),i.on("change input blur",function(){a.hasClass("merchant-range-input")&&a.val(m(this).val()).trigger("merchant.range")})})}i.on("input",function(){a.prop("disabled",""===m(this).val().trim())}),a.on("click",function(e){e.preventDefault();var t,e=i.val();e.trim()?(t=m(this),m(".merchant-module-question-answer-dropdown").removeClass("merchant-show"),m(".merchant-module-question-thank-you-dropdown").addClass("merchant-show"),u.wp.ajax.post("merchant_module_feedback",{subject:i.attr("data-subject"),message:e,module:t.closest(".merchant-module-action").find(".merchant-module-page-button-action-activate").data("module"),nonce:u.merchant.nonce})):alert("Please provide the required information.")}),m(".merchant-module-page-button-action-activate").on("click",function(e){if(e.preventDefault(),m(this).hasClass("merchant-module-deactivated-by-bp"))return!1;m(".merchant-module-question-list-dropdown").removeClass("merchant-show"),m(".merchant-module-question-answer-dropdown").removeClass("merchant-show"),m(".merchant-module-question-answer-form").removeClass("merchant-show"),m(".merchant-module-question-answer-title").removeClass("merchant-show"),m(".merchant-module-question-thank-you-dropdown").removeClass("merchant-show"),m(".merchant-module-question-answer-textarea").val(""),u.wp.ajax.post("merchant_module_activate",{module:m(this).data("module"),nonce:u.merchant.nonce}).done(function(){m("body").removeClass("merchant-module-disabled").addClass("merchant-module-enabled"),m(".merchant-module-action").addClass("merchant-enabled")})}),m(".merchant-module-page-button-action-deactivate").on("click",function(e){e.preventDefault(),u.wp.ajax.post("merchant_module_deactivate",{module:m(this).data("module"),nonce:u.merchant.nonce}).done(function(){m("body").removeClass("merchant-module-enabled").addClass("merchant-module-disabled"),m(".merchant-module-action").removeClass("merchant-enabled"),m(".merchant-module-question-list-dropdown").addClass("merchant-show")})}),m(".merchant-module-question-list-dropdown li").on("click",function(e){a.prop("disabled",""===i.val().trim());var t=m(this),n=t.data("answer-target"),n=m('[data-answer-title="'+n+'"]');n.length?(n.addClass("merchant-show").siblings().removeClass("merchant-show"),m(".merchant-module-question-answer-dropdown").addClass("merchant-show"),m(".merchant-module-question-answer-textarea").attr("data-subject",t.text().trim())):(m(".merchant-module-question-thank-you-dropdown").addClass("merchant-show"),m(".merchant-module-question-answer-dropdown").removeClass("merchant-show")),m(".merchant-module-question-answer-textarea").val(""),m(".merchant-module-question-list-dropdown").removeClass("merchant-show")}),m(".merchant-module-dropdown-close").on("click",function(e){e.preventDefault(),m(this).closest(".merchant-module-dropdown").removeClass("merchant-show")}),m(".merchant-module-page-button-deactivate").on("click",function(e){e.preventDefault();m(this);var t=m(".merchant-module-deactivate-dropdown");t.toggleClass("merchant-show"),m(p).off("click.merchant-close"),m(p).on("click.merchant-close",function(e){m(e.target).closest(".merchant-module-deactivate").length||(t.removeClass("merchant-show"),m(p).off("click.merchant-close"))})}),r(),m(p).on("click",".merchant-module-page-setting-field-hidden-desc-trigger",function(){var e=m(this),t=(e.toggleClass("expanded"),e.attr("data-show-text")),n=e.attr("data-hidden-text");m(this).find("span:first").text(e.text()===t?n:t),m(this).closest(".merchant-module-page-setting-field").find(".merchant-module-page-setting-field-hidden-desc").stop(!0,!0).slideToggle("fast")});({init:function(){this.events()},events:function(){m(p).on("click","#download-backup-button",this.download.bind(this)),m(p).on("click","#restore-backup-button",this.restore.bind(this)),m(p).on("change","#merchant-backup-file",this.removeBackupFile.bind(this))},download:function(e){var a=this,i=(e.preventDefault(),m(".merchant-module-page-setting-fields .backup-section")),o=(a.hideError(i),m(e.target).attr("data-module-id"));m.ajax({url:merchant_admin_options.ajaxurl,type:"GET",data:{action:"merchant_get_module_settings",nonce:merchant_admin_options.ajaxnonce,module_id:o},beforeSend:function(){a.showLoadingIndicator(i)},success:function(e){var t,n;e.success?(t=e.data,n="merchant-"+o+"-backup-"+(new Date).toISOString().slice(0,10)+"-"+(new Date).getHours()+"-"+(new Date).getMinutes()+"-"+(new Date).getSeconds()+".json",a.downloadJson(t,n)):a.displayError(e.data.message,i),a.hideLoadingIndicator(i)},error:function(e,t,n){a.displayError(n,i),a.hideLoadingIndicator(i)}})},restore:function(e){var t,a=this,i=(e.preventDefault(),m(".merchant-module-page-setting-fields .restore-section")),n=(a.hideError(i),m(e.target).attr("data-module-id")),e=m(".merchant-backup-file").prop("files")[0];e&&"application/json"===e.type?((t=new FileReader).onload=function(e){e=e.target.result;m.ajax({url:merchant_admin_options.ajaxurl,type:"POST",data:{action:"merchant_restore_module_settings",nonce:merchant_admin_options.ajaxnonce,module_id:n,module_settings:e},beforeSend:function(){a.showLoadingIndicator(i)},success:function(e){e.success?u.location.href=e.data.redirect_url:a.displayError(e.data.message,i),a.hideLoadingIndicator(i)},error:function(e,t,n){a.displayError(n,i),a.hideLoadingIndicator(i)}})},t.readAsText(e)):a.displayError(merchant_admin_options.invalid_file,i)},removeBackupFile:function(e){var t,n=m(e.target);n.length&&(e=m(".backup-file-remove"),0<(null==(t=n[0])?void 0:t.files.length)?e.show():e.hide(),e.on("click",function(){n.val(""),m(this).hide()}))},downloadJson:function(e,t){"object"===_typeof(e)&&(e=JSON.stringify(e));var e=new Blob([e],{type:"application/json"}),e=URL.createObjectURL(e),n=p.createElement("a");n.href=e,n.download=t,n.click(),URL.revokeObjectURL(e)},displayError:function(e,t){t.append('<div class="error-message"><p>'.concat(e,"</p></div>"))},hideError:function(e){e.find(".error-message").remove()},showLoadingIndicator:function(e){e.find(".merchant-loading-spinner").addClass("show")},hideLoadingIndicator:function(e){e.find(".merchant-loading-spinner").removeClass("show")}}).init();e={init:function(e){this.events()},events:function(){m(p).on("click",".merchant-flexible-content .merchant-toggle-switch .toggle-switch-label span",function(){var e=m(this).closest(".merchant-toggle-switch").find(".toggle-switch-checkbox");e.prop("checked",!e.prop("checked"))}).trigger("merchant.change")}};({init:function(){this.initiate_datepicker(),this.events()},initiate_datepicker:function(){var e=m(".merchant-module-page-setting-field .merchant-datetime-field");0!==e.length&&e.each(function(n){var a=m(this).find("input"),i={locale:JSON.parse(merchant_datepicker_locale),selectedDates:[a.val()?new Date(a.val()):""],onSelect:function(e){e.date;var t=e.formattedDate;void 0===t&&(e.datepicker.$el.value=""),a.trigger("change.merchant"),a.trigger("change.merchant-datepicker",[t,a,i,n])}},e=m(this).data("options"),e=(e.buttons=["clear"],e&&(e.minDate!==f&&"today"===e.minDate&&(e.minDate=new Date,e.timeZone!==f)&&""!==e.timeZone&&(e.minDate=new Date(e.minDate.toLocaleString("en-US",{timeZone:e.timeZone}))),i=Object.assign(i,e)),new AirDatepicker(a.getPath(),i));a.attr("readonly",!0),m(p).trigger("initiated.merchant-datepicker",[e,a,i,n])})},events:function(){var e=this;m(p).on("merchant-flexible-content-added",function(){e.initiate_datepicker()})}}).init();({init:function(e){this.events()},events:function(){var n=this;m(".merchant-sortable").each(function(){var e=m(this),t=e.find(".merchant-sortable-input");m(e.find("ul.merchant-sortable-list").first()).sortable({update:function(){t.val(n.sortableGetNewVal(e)).trigger("change.merchant")}}).disableSelection().find("li").each(function(){m(this).find("i.visibility").click(function(){m(this).toggleClass("dashicons-visibility-faint").parents("li:eq(0)").toggleClass("invisible")})}).click(function(){m(event.target).hasClass("dashicons-visibility")&&t.val(n.sortableGetNewVal(e)).trigger("change.merchant")})})},sortableGetNewVal:function(e){var e=m(e.find("li")),t=[];return _.each(e,function(e){m(e).hasClass("invisible")||t.push(m(e).data("value"))}),JSON.stringify(t)}}).init(),e.init(),m(p).on("merchant-flexible-content-added",function(e,t){t=t.find(".merchant-sortable-repeater-control").find(".merchant-sortable-repeater.sortable");c.makeFieldsSortable(t)});var o,c={init:function(e){var a=this;m(".merchant-sortable-repeater-control").each(function(){var e=JSON.parse(m(this).find(".merchant-sortable-repeater-input").val()),t=e.length;if(0<t&&(m(this).find(".repeater-input").val(e[0]),1<t))for(var n=1;n<t;++n)a.appendRow(m(this),e[n])}),this.events()},events:function(){var t=this;m(p).on("click",".merchant-sortable-repeater.sortable .customize-control-sortable-repeater-delete",function(e){e.preventDefault(),m(this).parent().slideUp("fast",function(){var e=m(this).parent().parent();m(this).remove(),t.getAllInputs(e)}),m(p).trigger("merchant-sortable-repeater-item-deleted")}),m(p).on("click",".customize-control-sortable-repeater-add",function(e){e.preventDefault(),t.appendRow(m(this).parent()),t.getAllInputs(m(this).parent())}),m(p).on("change",".merchant-sortable-repeater.sortable",function(){t.getAllInputs(m(this).parent())}),m(p).on("focusout",".merchant-sortable-repeater.sortable .repeater-input",function(){t.getAllInputs(m(this).parent())})},appendRow:function(e){var t='<div class="repeater" style="display:none"><input type="text" value="'+(1<arguments.length&&arguments[1]!==f?arguments[1]:"")+'" class="repeater-input" /><span class="dashicons dashicons-menu"></span><a class="customize-control-sortable-repeater-delete" href="#"><span class="dashicons dashicons-no-alt"></span></a></div>',t=(e.find(".sortable").append(t),e.find(".sortable").find(".repeater:last"));t.slideDown("slow",function(){m(this).find("input").focus()}),this.makeFieldsSortable(e.find(".sortable")),m(p).trigger("merchant-sortable-repeater-item-added",[t,e.find(".sortable")])},makeFieldsSortable:function(n){n.hasClass("disable-sorting")||n.sortable({update:function(e,t){c.getAllInputs(n.parent())}})},getAllInputs:function(e){var t=e.find(".repeater-input").map(function(){return m(this).val()}).toArray();t.length||t.push(""),e.find(".merchant-sortable-repeater-input").val(JSON.stringify(t)),e.find(".merchant-sortable-repeater-input").trigger("change"),e.find(".merchant-sortable-repeater-input").trigger("sortable.repeater.change")}},s=(c.init(),{init:function(){this.initAccordion(),this.initFlag()},initAccordion:function(){m(".merchant-group-field.has-accordion").each(function(){var e=m(this);e.accordion({collapsible:!0,header:"> .title-area",heightStyle:"content",active:!!e.hasClass("open")&&0})})},initFlag:function(){m(".merchant-group-field.has-flag").each(function(){var e=m(this),t=e.data("id"),t=e.find(".merchant-field-".concat(t,"_status select")),n=t.val(),t=t.find("option:selected").text();e.find(".field-status").removeClass("hidden active inactive").text(t).addClass(n)})}}),e={accordion:null,activePopupContainer:null,init:function(){this.initAccordion(),this.events(),this.makeSelectedReviewsSortable(m(".merchant-reviews-selector").not(".layouts .merchant-reviews-selector"))},events:function(){var n=this;m(p).on("input",".merchant-reviews-selector .products-search",n.ajaxSearch.bind(n)),m(p).on("change",'.merchant-reviews-selector .product-review input[type="checkbox"]',n.toggleReview.bind(n)),m(p).on("click",".merchant-reviews-selector .review-photo img",n.requestReviewImages.bind(n)),m(p).on("click",".review-photos-popup .overlay",n.dismissImagesGallery.bind(n)),m(p).on("click",".merchant-reviews-selector .product-reviews-load-more button",n.loadMoreReviews.bind(n)),m(p).on("click",".merchant-reviews-selector .popup-trigger",n.initPopUp.bind(n)),m(p).on("click",".merchant-reviews-selector .popup-header .close, .merchant-reviews-selector > .overlay",n.dismissPopUp.bind(n)),m(p).on("click",".merchant-reviews-selector .product-review-delete",n.deleteSelectedReview.bind(n)),m(p).on("keyup",function(e){"Escape"!==e.key||n.dismissImagesGallery()||n.dismissPopUp(n)}),m(p).on("merchant-flexible-content-added",function(e,t){n.makeSelectedReviewsSortable(),n.initAccordion()})},makeSelectedReviewsSortable:function(){var e=0<arguments.length&&arguments[0]!==f?arguments[0]:m(p).find(".merchant-reviews-selector").not(".layouts .merchant-reviews-selector"),n=this;e.find(".selected-reviews .product-reviews").sortable({axis:"y",cursor:"move",helper:"original",handle:".product-review-move",cancel:"",placeholder:"placeholder",update:function(e,t){t=t.item.closest(".merchant-reviews-selector");n.saveModifications(t)},start:function(e,t){t.placeholder.height(t.item.height())}})},deleteSelectedReview:function(e){var e=m(e.target).closest(".product-review"),t=e.closest(".merchant-reviews-selector");e.remove(),this.saveModifications(t),this.updateSelectedReviewsCheckboxState(t),this.countSelectedReviewsInProduct(t)},ajaxSearch:function(e){var t=this,e=m(e.target),n=e.closest(".merchant-reviews-selector"),a=n.find(".popup-header");(0===e.val().length||3<=e.val().length)&&m.ajax({url:merchant_admin_options.ajaxurl,type:"POST",data:{action:"merchant_search_reviews",search:e.val(),nonce:merchant_admin_options.ajaxnonce},beforeSend:function(){a.addClass("loading"),t.destroyAccordion(n)},success:function(e){e.success?(a.removeClass("popup-error"),n.find(".products-search-results").html(e.data),t.initAccordion(n)):a.addClass("popup-error")},complete:function(){a.removeClass("loading")},error:function(){a.addClass("popup-error")}})},loadMoreReviews:function(e){var t=this,n=m(e.target).closest(".product-item"),e=n.find(".product-review").length;m.ajax({url:merchant_admin_options.ajaxurl,type:"POST",data:{action:"merchant_load_more_reviews",product_id:n.attr("data-id"),offset:e,nonce:merchant_admin_options.ajaxnonce},beforeSend:function(){n.addClass("loading")},success:function(e){e.success&&(n.find(".product-reviews .reviews-wrapper").append(e.data.reviews),""===e.data.load_more&&t.hideLoadMoreButton(n),t.updateSelectedReviewsCheckboxState(n.closest(".merchant-reviews-selector")),t.countSelectedReviewsInProduct(n.closest(".merchant-reviews-selector")))},complete:function(){n.removeClass("loading")}})},hideLoadMoreButton:function(e){e.find(".product-reviews-load-more").remove()},initPopUp:function(e){var e=m(e.target).closest(".merchant-reviews-selector"),t=e.find(".selector-popup"),n=e.find(".overlay");t.addClass("active"),n.addClass("active"),this.activePopupContainer=e},dismissPopUp:function(){var e,t=this.activePopupContainer;null!==t&&(e=t.find(".selector-popup"),t=t.find(".overlay"),e.removeClass("active"),t.removeClass("active"),this.activePopupContainer=null)},initAccordion:function(){var e=0<arguments.length&&arguments[0]!==f?arguments[0]:m(p).find(".merchant-reviews-selector"),t=this;e.each(function(){var n=m(this).find(".popup-content .product-item.product-item-has-reviews");n.each(function(){n.accordion({collapsible:!0,heightStyle:"content",icons:!1,active:!!n.hasClass("opened")&&0,activate:function(e,t){t.newPanel.length?t.newPanel.parent().addClass("opened"):n.removeClass("opened")}})}),n.find("a").on("click",function(e){e.stopPropagation()}),t.updateSelectedReviewsCheckboxState(m(this)),t.countSelectedReviewsInProduct(m(this))})},destroyAccordion:function(e){e.find(".selector-popup .product-item.product-item-has-reviews").each(function(){m(this).hasClass("ui-accordion")&&m(this).accordion("destroy")})},toggleReview:function(e){var t=this,n=m(e.target).prop("checked"),a=m(e.target).closest(".merchant-reviews-selector"),e=m(e.target).closest(".product-review"),i=e.attr("data-id"),o=a.find(".selected-reviews .product-reviews"),i=o.find('.product-review[data-id="'.concat(i,'"]'));n?0===i.length&&(n=e.clone(),o.append(n),t.makeSelectedReviewsSortable()):i.remove(),setTimeout(function(){t.saveModifications(a)},150)},saveModifications:function(e){var t=e.find(".review-saved-ids"),n=e.find(".selected-reviews .product-reviews").find(".product-review"),a=[];n.each(function(){var e=m(this).attr("data-id");a.push(e)}),t.val(a.join(",")),t.trigger("change"),this.updateSelectedReviewsCheckboxState(e),this.countSelectedReviewsInProduct(e)},updateSelectedReviewsCheckboxState:function(n){var e=n.find(".selector-popup"),t=n.find(".review-saved-ids"),e=e.find(".product-review"),a=t.val().split(",");e.each(function(){var e=m(this).attr("data-id"),t=n.find('.product-review[data-id="'.concat(e,'"] input[type="checkbox"]'));a.includes(e)?t.prop("checked",!0):t.prop("checked",!1)})},countSelectedReviewsInProduct:function(e){var t=e.find(".selector-popup .product-item"),n=e.find(".review-saved-ids").val().split(",");t.each(function(){var t=0,e=m(this);e.find(".product-review").each(function(){var e=m(this).attr("data-id");n.includes(e)&&t++}),e.find(".selected-reviews-count .counter").text(t)})},requestReviewImages:function(e){var t=m(e.target).closest(".product-review"),n=m(e.target),e=t.attr("data-id");m.ajax({url:merchant_admin_options.ajaxurl,type:"POST",data:{action:"merchant_get_review_images",review_id:e,nonce:merchant_admin_options.ajaxnonce},beforeSend:function(){n.addClass("loading")},success:function(e){e.success&&(m("body").append(e.data),setTimeout(function(){m("body").find(".review-photos-popup").addClass("active")},300))},complete:function(){n.removeClass("loading")}})},dismissImagesGallery:function(){var e=m("body").find(".review-photos-popup");return!!e.length&&(e.removeClass("active"),setTimeout(function(){e.remove()},300),!0)}};({init:function(e){var i=this;m(".merchant-flexible-content-control").each(function(){var e=m(this).hasClass("has-accordion"),n=m(this).find(".merchant-flexible-content"),t=g.get("campaign_id"),a=0;t&&n.find("input.flexible-id").each(function(e){if(m(this).val()===t)return a=e,!1}),e?n.accordion({active:a,collapsible:!0,header:function(e){return e.find(".layout__inner > .layout-header")},heightStyle:"content"}).sortable({axis:"y",cursor:"move",helper:"original",handle:".customize-control-flexible-content-move",stop:function(e,t){n.trigger("merchant.sorted"),i.refreshNumbers(n),n.accordion("refresh")}}):n.sortable({axis:"y",cursor:"move",helper:"original",handle:".customize-control-flexible-content-move",stop:function(e,t){n.trigger("merchant.sorted"),i.refreshNumbers(n),n.accordion("refresh")}})}),this.updateLayoutTitle(),this.updateDiscountPercentMaxVal(),this.events()},updateLayoutTitle:function(){m(".merchant-flexible-content .layout").each(function(){var e,t=m(this).find(".layout-title[data-title-field]");t.length&&((e=m(this).find(".layout-body .merchant-field-"+t.data("title-field")+" input")).on("change keyup",function(){t.text(m(this).val())}),t.text(e.val()))})},updateDiscountPercentMaxVal:function(){m(".merchant-flexible-content .layout").each(function(){var e=m(this),t=e.find('.merchant-module-page-setting-field[data-id="discount_type"]'),n=e.find('.merchant-module-page-setting-field[data-id="discount_value"]'),e=(n=(n=n.length?n:e.find('.merchant-module-page-setting-field[data-id="discount"]')).length?n:e.find('.merchant-module-page-setting-field[data-id="discount_amount"]'),t.find("input:checked").val());"percentage_discount"===e||"percentage"===e?n.find("input").attr("max",100):n.find("input").removeAttr("max")}),m(".merchant-module-page-setting-fields")},generateUUID:function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){var t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)})},events:function(){var o=this;function n(e){e&&e.length&&e.siblings().find(".layout-actions__inner").slideUp(300)}m(p).on("change",'.merchant-module-page-setting-field[data-id="discount_type"] input',function(){o.updateDiscountPercentMaxVal()}),m(p).on("change","select",function(){var t=m(this).val(),n=m(this).prop("multiple");m(this).find("option").each(function(){var e=m(this).val(),e=n?t.includes(e):e===t;m(this).attr("selected",e)})}),m(".customize-control-flexible-content-add-button").click(function(e){e.preventDefault(),e.stopImmediatePropagation(),1===m(this).parent().find(".customize-control-flexible-content-add-list a").length?m(this).parent().find(".customize-control-flexible-content-add-list a").trigger("click"):m(this).parent().find(".customize-control-flexible-content-add-list").toggleClass("active")}),m(p).on("click",".customize-control-flexible-content-add",function(e){e.preventDefault(),e.stopImmediatePropagation();var e=m(".merchant-flexible-content-control[data-id="+m(this).data("id")+"]"),t=e.find(".layouts"),n=m(this).data("layout"),t=t.find(".layout[data-type="+n+"]").clone(!0),n=e.find(".merchant-flexible-content"),a=n.find(".layout"),e=o.generateUUID(),e=(t.find("input, select, textarea").each(function(){m(this).data("name")&&m(this).attr("name",m(this).data("name").replace("0",a.length)),m(this).is(":checkbox, :radio")&&m(this).attr("checked")&&m(this).prop("checked",!0)}),t.attr("data-layout-id",e),t.find(".layout-count").text(a.length+1),t.find(".flexible-id").val(e),n.append(t),n.removeClass("empty"),m(this).parent().removeClass("active"),t.find(".merchant-module-page-setting-field-upload").length&&l(t.find(".merchant-module-page-setting-field-upload")),t.find(".merchant-module-page-setting-field-select_ajax").length&&d(t.find(".merchant-module-page-setting-field-select_ajax")),m(this).closest(".merchant-flexible-content-control"));e.hasClass("has-accordion")&&(e.find(".merchant-flexible-content").accordion("refresh"),e.find(".merchant-flexible-content").accordion("option","active",-1)),s.init(),m(p).trigger("merchant-flexible-content-added",[t]),r(),o.updateLayoutTitle(),o.updateDiscountPercentMaxVal()}),m(p).on("click",".customize-control-flexible-content-duplicate",function(e){e.preventDefault(),e.stopImmediatePropagation();var t,a,e=m(this),n=e.closest(".merchant-flexible-content-control[data-id="+e.data("id")+"]"),i=null==n?void 0:n.find(".merchant-flexible-content");n.length&&i.length&&(e=e.closest(".layout")).length&&(e.find(".layout-actions__inner").hide(),t=e.clone(),i.find(".layout"),a=e.find(".layout-count").text(),t.find("input, select, textarea").each(function(){var e,t=m(this),n=t.attr("name");n&&(e=n.split("[")[0],n=n.match(/\[(.*?)\]/g))&&1<n.length&&(n[1]="["+a+"]",e="".concat(e).concat(n.join("")),t.attr("name",e))}),t.find("select").each(function(){m(this).hasClass("select2-hidden-accessible")&&(m(this).removeClass("select2-hidden-accessible").removeAttr("data-live-search").removeAttr("data-select2-id").removeAttr("aria-hidden").removeAttr("tabindex"),m(this).nextAll(".select2-container").remove(),m(this).select2())}),t.find(".layout-body").removeAttr("style"),t.hide(),t.insertAfter(e),t.fadeIn(),t.find(".merchant-module-page-setting-field-upload").length&&l(t.find(".merchant-module-page-setting-field-upload")),t.find(".merchant-module-page-setting-field-select_ajax").length&&d(t.find(".merchant-module-page-setting-field-select_ajax")),o.refreshNumbers(i),m(p).trigger("merchant-flexible-content-added",[t]),n.hasClass("has-accordion")&&i.accordion("refresh"),o.updateLayoutTitle(),s.init())}),m(p).on("click",".customize-control-flexible-content-delete",function(e){e.preventDefault();var e=m(this).closest(".layout"),t=e.parent(),t=(e.remove(),0===t.find(".layout").length&&t.addClass("empty"),o.refreshNumbers(t),m(p).trigger("merchant-flexible-content-deleted",[e]),m(this).closest(".merchant-flexible-content-control"));t.hasClass("has-accordion")&&t.find(".merchant-flexible-content").accordion("refresh"),m(p).trigger("change.merchant")}),m(p).on("click",".layout-actions__toggle",function(e){e.preventDefault(),n(m(this).closest(".layout")),m(this).closest(".layout-actions").find(".layout-actions__inner").stop().slideToggle(300)}),m(p).on("click",".layout-header",function(){n(m(this).closest(".layout"))}),m(p).on("merchant-flexible-content-added",function(e,t){n(t)})},refreshNumbers:function(e){e.find(".layout").each(function(e){var t=m(this).find(".layout-count").text(),n=parseInt(t)-1;m(this).find(".layout-count").text(e+1),m(this).find("input, select, textarea").each(function(){m(this).attr("name")&&m(this).attr("name",m(this).attr("name").replace("["+n+"]","[*refreshed*"+e+"]"))})}),e.find(".layout").each(function(e){m(this).find("input, select, textarea").each(function(){var e=m(this).attr("name");e&&m(this).attr("name",e.replace("*refreshed*",""))})}),e.parent().find("input").trigger("change.merchant")}}).init(),s.init(),e.init(),m(p).on("keyup",".merchant-module-page-setting-field-products_selector .merchant-search-field",function(){clearTimeout(o);var e,t,n,a=[],i=(!m(this).closest('[data-id="excluded_products"]').length||"categories"!==(t=(e=m(this).closest(".layout")).find(".merchant-field-rules_to_apply select").val()||e.find(".merchant-field-rules_to_display select").val()||e.find(".merchant-field-display_rules select").val())&&"by_category"!==t||(a=e.find(".merchant-field-category_slugs select").val()||e.find(".merchant-field-product_cats select").val()),m(this).closest(".merchant-products-search-container"));""!==m(this).val()?(i.find(".merchant-searching").addClass("active"),n={action:"merchant_admin_products_search",nonce:merchant_admin_options.ajaxnonce,keyword:m(this).val(),product_types:m(this).data("allowed-types"),ids:i.find(".merchant-selected-products").val(),categories:a},o=setTimeout(function(){m.post(merchant_admin_options.ajaxurl,n,function(e){var t=i.find(".merchant-selections-products-preview");t.show(),t.html(e),i.find(".merchant-searching").removeClass("active")})},250)):i.find(".merchant-selections-products-preview").html("").hide()}),m(p).on("click touch",".merchant-module-page-setting-field-products_selector .merchant-selections-products-preview li",function(){var e=m(this).closest(".merchant-products-search-container"),t=e.find(".merchant-selected-products"),n=t.val(),a="multiple"===e.data("multiple");0<e.find(".merchant-selected-products-preview ul li").length&&!a&&(e.find(".merchant-selected-products-preview ul li").remove(),t.val("").change()),m(this).children(".remove").attr("aria-label","Remove").html("×"),e.find(".merchant-selected-products-preview ul").append(m(this)),e.find(".merchant-selections-products-preview").html("").hide(),e.find(".merchant-search-field").val("").change(),""===n?t.val(m(this).data("id")):(a?((e=n.split(",")).push(m(this).data("id")),t.val(e.join(","))):t.val(m(this).data("id"))).change()}),m(p).on("click touch",".merchant-selected-products-preview .remove",function(){var e=m(this);if(confirm(merchant_admin_options.product_delete_confirmation_message)){var t=e.closest(".merchant-products-search-container").find(".merchant-selected-products"),n=e.parent().data("id"),a=(e.parent().remove(),t.val().split(","));if(0<a.length)for(var i in a)parseInt(a[i])===parseInt(n)&&a.splice(i,1);t.val(a.join(",")).change(),t.trigger("change.merchant")}}),m(p).on("merchant-admin-check-fields merchant-flexible-content-added",function(){m(".merchant-module-page-setting-field").each(function(){var e=m(this);if(e.data("condition")&&e.data("condition").length){var t=e.data("condition"),n=m(this).closest(".layout-body").find('input[name*="'+t[0]+'"],select[name*="'+t[0]+'"]');if((n=n.length?n:m('input[name="merchant['+t[0]+']"],select[name="merchant['+t[0]+']"]')).length){var a,i=!1;switch(t[1]){case"==":"radio"!==n.attr("type")&&"checkbox"!==n.attr("type")||(a=n.parent().find("input:checked")).length&&a.val()===t[2]&&(i=!0),n.is("select")&&n.val()==t[2]&&(i=!0);break;case"any":"radio"!==n.attr("type")&&"checkbox"!==n.attr("type")||(a=n.parent().find("input:checked")).length&&t[2].split("|").includes(a.val())&&(i=!0),n.is("select")&&t[2].split("|").includes(n.val())&&(i=!0)}i?e.removeClass("merchant-hide").addClass("merchant-show"):e.removeClass("merchant-show").addClass("merchant-hide")}}})}).trigger("merchant.change"),m(p).on("merchant-admin-check-fields merchant-flexible-content-added change keyup",function(){m(p).find(".merchant-module-page-setting-field").each(function(){var e=m(this);e.data("conditions")&&(function e(t){var n=1<arguments.length&&arguments[1]!==f&&arguments[1];var a=!1;if("relation"in t){var i=t.relation.toUpperCase();if("OR"===i)for(var o=0;o<t.terms.length;o++){var r=t.terms[o];if(a=e(r,n))return!0}else if("AND"===i){for(var c=0,s=0;s<t.terms.length;s++){var l=t.terms[s];e(l,n)&&c++}c===t.terms.length&&(a=!0)}}else{var d,i="",h=(i="terms"in t?t.terms[0]:t,m('input[name="merchant['+i.field+']"],select[name="merchant['+i.field+']"]')),u=(h.length||0<(d=n.closest(".layout-body")).length&&(h=d.find(".merchant-field-"+i.field).find("input, select")),(h=(h=h.length?h:m('input[name="merchant['+i.field+'][]"],select[name="merchant['+i.field+'][]"]')).length?h:m(".merchant-group-fields-container").find(".merchant-field-"+i.field+' input[name*="'+i.field+'"],.merchant-field-'+i.field+' select[name*="'+i.field+'"]')).val());"checkbox"===h.attr("type")&&(u=h.is(":checked")),"radio"===h.attr("type")&&(u=h.filter(":checked").val()),"checkbox"===h.attr("type")&&1<h.length&&(u=[],h.each(function(){m(this).is(":checked")&&u.push(m(this).val())})),w(u)&&(u=Number(u)),Array.isArray(i.value)&&(i.value=i.value.map(function(e){return w(e)?Number(e):e})),("==="===i.operator&&u===i.value||"!=="===i.operator&&u!==i.value||">"===i.operator&&u>i.value||"<"===i.operator&&u<i.value||">="===i.operator&&u>=i.value||"<="===i.operator&&u<=i.value||"in"===i.operator&&i.value.includes(u)||"!in"===i.operator&&!i.value.includes(u)||"contains"===i.operator&&Array.isArray(u)&&u.includes(i.value)||"!contains"===i.operator&&Array.isArray(u)&&!u.includes(i.value))&&(a=!0)}return a}(e.data("conditions"),e)?e.removeClass("merchant-hide").addClass("merchant-show"):e.removeClass("merchant-show").addClass("merchant-hide"))})}).trigger("merchant.change"),m(p).on("change",".merchant-module-page-setting-field",function(){m(p).trigger("merchant-admin-check-fields")}).trigger("merchant.change"),m(p).trigger("merchant-admin-check-fields"),m(p).on("merchant-admin-check-color-fields merchant-flexible-content-added",function(){m(".merchant-color").each(function(){var n,e=m(this),a=e.find(".merchant-color-picker"),i=e.find(".merchant-color-input"),o=!1;a.off("click").on("click",function(e){e.preventDefault(),e.stopPropagation();var t=m("body,html");t.addClass("merchant-height-auto"),o?n.setColor(i.val()):((n=new Pickr({el:a.get(0),container:"body",theme:"merchant",appClass:"merchant-pcr-app",default:i.val()||a.data("default-color")||"#212121",swatches:["#000000","#F44336","#E91E63","#673AB7","#03A9F4","#8BC34A","#FFEB3B","#FFC107","#FFFFFF"],sliders:"h",useAsButton:!0,components:{hue:!0,preview:!0,opacity:!0,interaction:{input:!0,clear:!0}},i18n:{"btn:clear":"Default"}})).on("change",function(e){e=(1===e.a?(n.setColorRepresentation("HEX"),e.toHEXA()):(n.setColorRepresentation("RGBA"),e.toRGBA())).toString(0);a.css({"background-color":e}),i.val()!==e&&i.val(e).trigger("change.merchant"),m(p).trigger("merchant-color-picker-updated",[e,i])}),n.on("clear",function(){var e=a.data("default-color");e?n.setColor(e):(a.css({"background-color":"white"}),i.val(""))}),n.on("hide",function(){t.removeClass("merchant-height-auto")}),a.data("pickr",n),setTimeout(function(){n.show()},200),o=!0)}),i.on("change keyup",function(){var e=m(this).val();a.css({"background-color":e})})})}),m(p).trigger("merchant-admin-check-color-fields");({init:function(){this.events()},events:function(){var l=this;m(p).on("click",".merchant-create-page-control-button",function(e){e.preventDefault();var t=m(this),n=t.parent().find(".merchant-create-page-control-create-message"),a=t.parent().find(".merchant-create-page-control-success-message"),e=(t.text(),t.data("creating-text")),i=(t.data("created-text"),t.data("page-title")),o=t.data("page-meta-key"),r=t.data("page-meta-value"),c=t.data("option-name"),s=t.data("nonce");if(!i)return!1;m(this).text(e),m(this).attr("disabled",!0),m.ajax({type:"post",url:ajaxurl,data:{action:"merchant_create_page_control",page_title:i,page_meta_key:o,page_meta_value:r,option_name:c,nonce:s},success:function(e){l.ajaxResponseHandler(e,t,a,n)}})})},ajaxResponseHandler:function(e,t,n,a){"success"===e.status&&(e=n.find("a").attr("href").replace("?post=&","?post="+e.page_id+"&"),n.find("a").attr("href",e),n.css("display","block"),a.remove(),t.remove())}}).init(),m(".merchant-module-page-setting-field-gallery").each(function(){var a,i=m(this),e=i.find(".merchant-gallery-button"),o=i.find(".merchant-gallery-input"),r=i.find(".merchant-gallery-images"),t=i.find(".merchant-gallery-remove");r.sortable({helper:"original",update:function(e,t){var n=[];r.find(".merchant-gallery-image").each(function(){n.push(m(this).data("item-id"))}),o.val(n.join(",")).trigger("change")}});t.on("click",function(e){e.preventDefault(),m(this).parent().remove();var t=[];r.find(".merchant-gallery-image").each(function(){t.push(m(this).data("item-id"))}),o.val(t.join(",")).trigger("change")}),e.on("click",function(e){m(this);var t=o.val(),n=t?"edit":"add";e.preventDefault(),void 0!==u.wp&&u.wp.media&&u.wp.media.gallery&&("add"==n?(a=u.wp.media({library:{type:"image"},frame:"post",state:"gallery",multiple:!0})).open():a=u.wp.media.gallery.edit('[gallery ids="'+t+'"]'),a.on("update",function(e){r.empty();e=e.models.map(function(e){var e=e.toJSON(),t=(e.sizes&&e.sizes.thumbnail&&e.sizes.thumbnail.url?e.sizes.thumbnail:e).url;return r.append('<div class="merchant-gallery-image" data-item-id="'+e.id+'"><i class="merchant-gallery-remove dashicons dashicons-no-alt"></i><img src="'+t+'" /></div>'),e.id});o.val(e.join(",")).trigger("change"),i.find(".merchant-gallery-remove").on("click",function(e){e.preventDefault(),m(this).parent().remove();var t=[];r.find(".merchant-gallery-image").each(function(){t.push(m(this).data("item-id"))}),o.val(t.join(",")).trigger("change")})}))})});var l=function(e){var a,i=e,e=i.find(".merchant-upload-button"),o=i.find(".merchant-upload-input"),r=i.find(".merchant-upload-wrapper");i.find(".merchant-upload-remove").on("click",function(e){e.preventDefault(),m(this).parent().remove(),o.val("").trigger("change")}),e.on("click",function(e){e.preventDefault(),void 0!==u.wp&&u.wp.media&&((a=a||u.wp.media({library:{type:"image"}})).open(),a.on("select",function(){r.empty();var e=a.state().get("selection").first().attributes,t=(e.sizes&&e.sizes.thumbnail&&e.sizes.thumbnail.url?e.sizes.thumbnail:e).url,n=e.sizes?JSON.stringify(e.sizes):"";r.append('<div class="merchant-upload-image" data-sizes=\''+n+'\'><i class="merchant-upload-remove dashicons dashicons-no-alt"></i><img src="'+t+'" /></div>'),o.val(e.id).trigger("change"),i.find(".merchant-upload-button-drag-drop").hide(),i.find(".merchant-upload-remove").on("click",function(e){e.preventDefault(),m(this).parent().remove(),o.val("").trigger("change"),i.find(".merchant-upload-button-drag-drop").show()})}))})},d=(m(".merchant-module-page-setting-field-upload:not(.template)").each(function(){l(m(this))}),jQuery.each(["dragenter","dragover","dragleave","drop"],function(e,t){m(p).on(t,".merchant-upload-button-drag-drop",function(e){e.preventDefault(),e.stopPropagation()})}),m(p).on("dragenter",".merchant-upload-button-drag-drop",function(e){m(this).closest(".merchant-module-page-setting-field-upload").find(".merchant-upload-button").click()}),function(e){var t=e.find("select"),n=t.data("source"),a=u.merchant_admin_options,i={width:"100%",templateSelection:function(e){return e.text.replace(/&nbsp;-*\s*/g,"").trim()}};"post"!==n&&"product"!==n&&"user"!==n||(i.minimumInputLength=1,i.ajax={url:a.ajaxurl,dataType:"json",delay:250,cache:!0,data:function(e){return{action:"merchant_admin_options_select_ajax",nonce:a.ajaxnonce,term:e.term,source:n}},processResults:function(e,t){return e.success?{results:e.data}:{}}}),t.select2(i),e.find(".select2-selection--multiple").append('<span class="merchant-select2-clear"></span>')}),h=(m(".merchant-module-page-setting-field-select_ajax:not(.template)").each(function(){d(m(this))}),m(".merchant-module-page-settings-responsive").each(function(){var e=m(this),n=e.find(".merchant-module-page-settings-devices button"),a=e.find(".merchant-module-page-settings-device-container");n.on("click",function(e){e.preventDefault();var t=m(this).data("device");n.removeClass("active"),a.removeClass("active"),m(this).addClass("active"),a.each(function(){m(this).data("device")===t&&m(this).addClass("active")})})}),m(".merchant-animated-buttons").each(function(){var e,t,n=m(this).find("label"),a=m(".merchant-animation-demo");n.on("click",function(){a.removeClass("merchant-animation-"+e),a.removeClass("merchant-animation-"+t),e=m(this).find("input").attr("value"),setTimeout(function(){a.addClass("merchant-animation-"+e)},100),setTimeout(function(){a.removeClass("merchant-animation-"+e)},1e3)}),n.mouseover(function(){a.removeClass("merchant-animation-"+e),t=m(this).find("input").attr("value"),a.addClass("merchant-animation-"+t)}).mouseout(function(){a.removeClass("merchant-animation-"+t)})}),m(".merchant-notifications-sidebar")),e=(h.length&&(m(".merchant-notifications").on("click",function(e){e.preventDefault();var t=m(this),e=h.find(".merchant-notification:first-child .merchant-notification-date").data("raw-date");h.toggleClass("opened"),t.hasClass("read")||m.post(u.merchant.ajax_url,{action:"merchant_notifications_read",nonce:u.merchant.nonce,latest_notification_date:e},function(e){e.success&&setTimeout(function(){t.addClass("read")},2e3)})}),m(".merchant-notification-content").each(function(){var e=m(this),t=(e.find("span.changelog-fixed").each(function(){m(this).closest("li").remove()}),e.find("li")),n=e.find("li.hidden");t.length===n.length&&e.closest(".merchant-notification").remove()}),m(u).on("scroll",function(){60<u.pageYOffset&&(h.addClass("closing"),setTimeout(function(){h.removeClass("opened"),h.removeClass("closing")},300))}),m(".merchant-notifications-sidebar-close").on("click",function(e){e.preventDefault(),h.addClass("closing"),setTimeout(function(){h.removeClass("opened"),h.removeClass("closing")},300)})),m(".merchant-tabs-nav")),t=(e.length&&e.each(function(){var n=m(this).data("tab-wrapper-id");m(this).find(".merchant-tabs-nav-link").on("click",function(e){e.preventDefault();var e=m(this).closest(".merchant-tabs-nav").find(".merchant-tabs-nav-link"),t=m(this).data("tab-to"),e=(e.each(function(){m(this).closest(".merchant-tabs-nav-item").removeClass("active")}),m(this).closest(".merchant-tabs-nav-item").addClass("active"),m('.merchant-tab-content-wrapper[data-tab-wrapper-id="'+n+'"]'));e.find("> .merchant-tab-content").removeClass("active"),e.find('> .merchant-tab-content[data-tab-content-id="'+t+'"]').addClass("active")})}),m(".merchant-module-alert"));t.length&&t.find(".merchant-module-alert-close").on("click",function(e){e.preventDefault(),t.removeClass("merchant-show"),m(p).off("click.merchant-alert-close")})})})(jQuery,window,document),jQuery.fn.extend({getPath:function(){var c=[];return this.each(function(e,t){for(var n,a=jQuery(t);a.length;){var i=a.get(0);if(!(o=i.localName))break;var o=o.toLowerCase(),r=a.parent();1<r.children(o).length&&0<(e=r.children().index(i)+1)&&(o+=":nth-child("+e+")"),n=o+(n?" > "+n:""),a=r}c.push(n)}),c.join(",")}});
  • merchant/trunk/assets/js/admin/merchant-preview.js

    r3287369 r3403526  
    408408      return inputText.replace(search, replacementValue);
    409409    };
     410    $(document).on('change', function () {
     411      return updateElements();
     412    });
    410413  });
    411414})(jQuery, window, document);
  • merchant/trunk/assets/js/admin/merchant-preview.min.js

    r3198417 r3403526  
    1 function _typeof(e){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function _slicedToArray(e,t){return _arrayWithHoles(e)||_iterableToArrayLimit(e,t)||_unsupportedIterableToArray(e,t)||_nonIterableRest()}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _iterableToArrayLimit(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,a,o,i,s=[],c=!0,l=!1;try{if(o=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=o.call(r)).done)&&(s.push(n.value),s.length!==t);c=!0);}catch(e){l=!0,a=e}finally{try{if(!c&&null!=r.return&&(i=r.return(),Object(i)!==i))return}finally{if(l)throw a}}return s}}function _arrayWithHoles(e){if(Array.isArray(e))return e}function _createForOfIteratorHelper(e,t){var r,n,a,o,i="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(i)return a=!(n=!0),{s:function(){i=i.call(e)},n:function(){var e=i.next();return n=e.done,e},e:function(e){a=!0,r=e},f:function(){try{n||null==i.return||i.return()}finally{if(a)throw r}}};if(Array.isArray(e)||(i=_unsupportedIterableToArray(e))||t&&e&&"number"==typeof e.length)return i&&(e=i),o=0,{s:t=function(){},n:function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}},e:function(e){throw e},f:t};throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _unsupportedIterableToArray(e,t){var r;if(e)return"string"==typeof e?_arrayLikeToArray(e,t):"Map"===(r="Object"===(r={}.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:r)||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?_arrayLikeToArray(e,t):void 0}function _arrayLikeToArray(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}((H,L)=>{H(L).ready(function(){function r(){if(C(I.css))for(var e in I.css)(t=>{var e,r;I.css.hasOwnProperty(t)&&(e=L.querySelectorAll(I.css[t].selector),r=H('[name="merchant['+I.css[t].setting+']"]').val()+I.css[t].unit,"radio"===H('[name="merchant['+I.css[t].setting+']"]').attr("type")&&(r=H('[name="merchant['+I.css[t].setting+']"]:checked').val()+I.css[t].unit),e.forEach(function(e){e.style.setProperty(I.css[t].variable,r)}))})(e);if(C(I.text))for(var t in I.text){var r;I.text.hasOwnProperty(t)&&(r=H('[name="merchant['+I.text[t].setting+']"]').val(),I.text[t].hasOwnProperty("replacements")&&(r=j(r,I.text[t])),H(I.text[t].selector).html(r))}if(C(I.attributes))for(var n in I.attributes){var a;I.attributes.hasOwnProperty(n)&&(a=(a="radio"===(a=H('[name="merchant['+I.attributes[n].setting+']"]')).attr("type")?H('[name="merchant['+I.attributes[n].setting+']"]:checked'):a).val(),I.attributes[n].hasOwnProperty("replacements")&&(a=j(a,I.attributes[n])),H(I.attributes[n].selector).attr(I.attributes[n].attribute,a))}if(C(I.classes))for(var o in I.classes)if(I.classes.hasOwnProperty(o)){if(I.classes[o].hasOwnProperty("remove")){var i,s=_createForOfIteratorHelper(I.classes[o].remove);try{for(s.s();!(i=s.n()).done;){var c=i.value;H(I.classes[o].selector).removeClass(c)}}catch(e){s.e(e)}finally{s.f()}}var l=H('[name="merchant['+I.classes[o].setting+']"]'),f=l.attr("type");"radio"===f&&(l=H('[name="merchant['+I.classes[o].setting+']"]:checked')),"checkbox"===f?l.is(":checked")?H(I.classes[o].selector).addClass(I.classes[o].add):H(I.classes[o].selector).removeClass(I.classes[o].add):(f=l.val(),I.classes[o].hasOwnProperty("add")?H(I.classes[o].selector).toggleClass(I.classes[o].add):H(I.classes[o].selector).addClass(f))}if(C(I.icons))for(var p in I.icons){var u,h;I.icons.hasOwnProperty(p)&&(h=(u=H('[name="merchant['+I.icons[p].setting+']"]:checked')).parent().find("figure img").attr("src"),p=H(I.icons[p].selector),"none"===u.val()?p.hide():(p.show(),p.attr("src",h)))}if(C(I.svg_icons))for(var m in I.svg_icons){var d,y;I.svg_icons.hasOwnProperty(m)&&(d=H('[name="merchant['+I.svg_icons[m].setting+']"]:checked'),y=I.svg_icons[m].icons_lib[d.val()],m=H(I.svg_icons[m].selector),"none"===d.val()?m.hide():(m.show(),m.html(y)))}if(C(I.repeater_content))for(var v in I.repeater_content)if(I.repeater_content.hasOwnProperty(v)){var g=H('[name="merchant['+I.repeater_content[v].setting+']"]'),b=g.val()?JSON.parse(g.val()):[],_=H(I.repeater_content[v].selector);if(b.length){var x,w=_createForOfIteratorHelper(b.entries());try{for(w.s();!(x=w.n()).done;){var O=_slicedToArray(x.value,2),A=O[0],T=O[1];_.length&&_.eq(A).html(T)}}catch(e){w.e(e)}finally{w.f()}if(_.length>b.length)for(var k=b.length;k<_.length;k++)_.eq(k).parent().remove();if(_.length<b.length)for(var P=_.length;P<b.length;P++)_.eq(0).parent().clone().appendTo(_.eq(0).parent().parent())}}if(C(I.flexible_content))for(var S in I.flexible_content)(i=>{var s=H(I.flexible_content[i].selector),e=s.children(),c=e.eq(0),t=H(".merchant-flexible-content-control[data-id="+I.flexible_content[i].setting+"]").find(".merchant-flexible-content").children();e.each(function(){H(this).hasClass("flexible-content-template")||H(this).remove()}),t.each(function(){var e,t=c.clone(),r=H(this).data("type");for(e in I.flexible_content[i].variables[r]){var n=I.flexible_content[i].variables[r][e],n=H(this).find(".merchant-module-page-setting-field[data-id="+n+"]"),a=n.data("type"),o=n.find("input").val();"text"===a&&t.html(t.html().replace(e,o)),"upload"===a&&void 0!==(o=n.find(".merchant-upload-image img").prop("outerHTML"))&&t.html(t.html().replace(e,o)),"choices"===a&&(o=n.find("input:checked"),n.find(".merchant-svg").length)&&void 0!==(a=o.parent().find("svg").prop("outerHTML"))&&t.html(t.html().replace(e,a)),t.html(t.html().replace(e,"")).removeClass("flexible-content-template").appendTo(s)}})})(S)}function e(e){var t=e.attr("type");"text"!==t&&"TEXTAREA"!==e.prop("tagName")||e.on("keyup input",r),"number"===t&&(e.on("keyup input",r),e.parent().find("input[type=range]").length)&&e.parent().find("input[type=range]").on("input change",r),"radio"===t&&e.on("input",r),"checkbox"!==t&&!e.is("select")||e.on("change",r),e.hasClass("merchant-sortable-repeater-input")&&e.on("change",r),e.hasClass("merchant-upload-input")&&e.on("change",r)}var I=merchantPreviewManipulators,C=function(e){return void 0!==e&&0<Object.keys(e).length};if(void 0!==I){if(C(I.css))for(var t in I.css)e(H('[name="merchant['+I.css[t].setting+']"]'));if(C(I.text))for(var n in I.text)e(H('[name="merchant['+I.text[n].setting+']"]'));if(C(I.attributes))for(var a in I.attributes)e(H('[name="merchant['+I.attributes[a].setting+']"]'));if(C(I.classes))for(var o in I.classes)e(H('[name="merchant['+I.classes[o].setting+']"]'));if(C(I.icons))for(var i in I.icons)e(H('[name="merchant['+I.icons[i].setting+']"]'));if(C(I.svg_icons))for(var s in I.svg_icons)e(H('[name="merchant['+I.svg_icons[s].setting+']"]'));if(C(I.repeater_content))for(var c in I.repeater_content)e(H('[name="merchant['+I.repeater_content[c].setting+']"]'));if(C(I.flexible_content))for(var l in I.flexible_content){l=H(".merchant-flexible-content-control[data-id="+I.flexible_content[l].setting+"]");e(l.find("input")),l.find(".customize-control-flexible-content-delete").on("click",r),l.on("merchant.sorted",r)}if(C(I.update))for(var f in I.update)e(H('[name="merchant['+I.update[f].setting+']"]'));for(var p=0,u=[".pcr-color-palette",".pcr-swatches button",".pcr-color-chooser",".pcr-color-opacity"];p<u.length;p++){var h=u[p];H(L).on("click",h,r)}}var j=function(e,t){var r,n=t.replacements[0],a=t.replacements[1],o=_createForOfIteratorHelper(n.entries());try{for(o.s();!(r=o.n()).done;){var i=_slicedToArray(r.value,2),s=i[0],c=i[1],l=a[s];if("string"==typeof l&&(e=e.replace(c,l)),"object"===_typeof(l))if(l.hasOwnProperty("conditions")){var f,p=H('[name="merchant['+l.setting+']"]');for(f in l.conditions)l.conditions.hasOwnProperty(f)&&p.val()===f&&("string"==typeof l.conditions[f]&&(e=e.replace(c,l.conditions[f])),"object"===_typeof(l.conditions[f]))&&(e=m(e,c,l.conditions[f]))}else e=m(e,c,l)}}catch(e){o.e(e)}finally{o.f()}return e},m=function(e,t,r){var n=H('input[name="merchant['+r.setting+']"]').val();return r.hasOwnProperty("format")&&(n=r.format.replace("{string}",n)),e.replace(t,n)}})})(jQuery,(window,document));
     1function _typeof(e){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function _slicedToArray(e,t){return _arrayWithHoles(e)||_iterableToArrayLimit(e,t)||_unsupportedIterableToArray(e,t)||_nonIterableRest()}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _iterableToArrayLimit(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,a,o,i,s=[],c=!0,l=!1;try{if(o=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=o.call(r)).done)&&(s.push(n.value),s.length!==t);c=!0);}catch(e){l=!0,a=e}finally{try{if(!c&&null!=r.return&&(i=r.return(),Object(i)!==i))return}finally{if(l)throw a}}return s}}function _arrayWithHoles(e){if(Array.isArray(e))return e}function _createForOfIteratorHelper(e,t){var r,n,a,o,i="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(i)return a=!(n=!0),{s:function(){i=i.call(e)},n:function(){var e=i.next();return n=e.done,e},e:function(e){a=!0,r=e},f:function(){try{n||null==i.return||i.return()}finally{if(a)throw r}}};if(Array.isArray(e)||(i=_unsupportedIterableToArray(e))||t&&e&&"number"==typeof e.length)return i&&(e=i),o=0,{s:t=function(){},n:function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}},e:function(e){throw e},f:t};throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _unsupportedIterableToArray(e,t){var r;if(e)return"string"==typeof e?_arrayLikeToArray(e,t):"Map"===(r="Object"===(r={}.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:r)||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?_arrayLikeToArray(e,t):void 0}function _arrayLikeToArray(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}((H,L)=>{H(L).ready(function(){function r(){if(C(I.css))for(var e in I.css)(t=>{var e,r;I.css.hasOwnProperty(t)&&(e=L.querySelectorAll(I.css[t].selector),r=H('[name="merchant['+I.css[t].setting+']"]').val()+I.css[t].unit,"radio"===H('[name="merchant['+I.css[t].setting+']"]').attr("type")&&(r=H('[name="merchant['+I.css[t].setting+']"]:checked').val()+I.css[t].unit),e.forEach(function(e){e.style.setProperty(I.css[t].variable,r)}))})(e);if(C(I.text))for(var t in I.text){var r;I.text.hasOwnProperty(t)&&(r=H('[name="merchant['+I.text[t].setting+']"]').val(),I.text[t].hasOwnProperty("replacements")&&(r=j(r,I.text[t])),H(I.text[t].selector).html(r))}if(C(I.attributes))for(var n in I.attributes){var a;I.attributes.hasOwnProperty(n)&&(a=(a="radio"===(a=H('[name="merchant['+I.attributes[n].setting+']"]')).attr("type")?H('[name="merchant['+I.attributes[n].setting+']"]:checked'):a).val(),I.attributes[n].hasOwnProperty("replacements")&&(a=j(a,I.attributes[n])),H(I.attributes[n].selector).attr(I.attributes[n].attribute,a))}if(C(I.classes))for(var o in I.classes)if(I.classes.hasOwnProperty(o)){if(I.classes[o].hasOwnProperty("remove")){var i,s=_createForOfIteratorHelper(I.classes[o].remove);try{for(s.s();!(i=s.n()).done;){var c=i.value;H(I.classes[o].selector).removeClass(c)}}catch(e){s.e(e)}finally{s.f()}}var l=H('[name="merchant['+I.classes[o].setting+']"]'),f=l.attr("type");"radio"===f&&(l=H('[name="merchant['+I.classes[o].setting+']"]:checked')),"checkbox"===f?l.is(":checked")?H(I.classes[o].selector).addClass(I.classes[o].add):H(I.classes[o].selector).removeClass(I.classes[o].add):(f=l.val(),I.classes[o].hasOwnProperty("add")?H(I.classes[o].selector).toggleClass(I.classes[o].add):H(I.classes[o].selector).addClass(f))}if(C(I.icons))for(var p in I.icons){var h,u;I.icons.hasOwnProperty(p)&&(u=(h=H('[name="merchant['+I.icons[p].setting+']"]:checked')).parent().find("figure img").attr("src"),p=H(I.icons[p].selector),"none"===h.val()?p.hide():(p.show(),p.attr("src",u)))}if(C(I.svg_icons))for(var m in I.svg_icons){var d,y;I.svg_icons.hasOwnProperty(m)&&(d=H('[name="merchant['+I.svg_icons[m].setting+']"]:checked'),y=I.svg_icons[m].icons_lib[d.val()],m=H(I.svg_icons[m].selector),"none"===d.val()?m.hide():(m.show(),m.html(y)))}if(C(I.repeater_content))for(var v in I.repeater_content)if(I.repeater_content.hasOwnProperty(v)){var g=H('[name="merchant['+I.repeater_content[v].setting+']"]'),b=g.val()?JSON.parse(g.val()):[],_=H(I.repeater_content[v].selector);if(b.length){var x,w=_createForOfIteratorHelper(b.entries());try{for(w.s();!(x=w.n()).done;){var O=_slicedToArray(x.value,2),A=O[0],T=O[1];_.length&&_.eq(A).html(T)}}catch(e){w.e(e)}finally{w.f()}if(_.length>b.length)for(var k=b.length;k<_.length;k++)_.eq(k).parent().remove();if(_.length<b.length)for(var P=_.length;P<b.length;P++)_.eq(0).parent().clone().appendTo(_.eq(0).parent().parent())}}if(C(I.flexible_content))for(var S in I.flexible_content)(i=>{var s=H(I.flexible_content[i].selector),e=s.children(),c=e.eq(0),t=H(".merchant-flexible-content-control[data-id="+I.flexible_content[i].setting+"]").find(".merchant-flexible-content").children();e.each(function(){H(this).hasClass("flexible-content-template")||H(this).remove()}),t.each(function(){var e,t=c.clone(),r=H(this).data("type");for(e in I.flexible_content[i].variables[r]){var n=I.flexible_content[i].variables[r][e],n=H(this).find(".merchant-module-page-setting-field[data-id="+n+"]"),a=n.data("type"),o=n.find("input").val();"text"===a&&t.html(t.html().replace(e,o)),"upload"===a&&void 0!==(o=n.find(".merchant-upload-image img").prop("outerHTML"))&&t.html(t.html().replace(e,o)),"choices"===a&&(o=n.find("input:checked"),n.find(".merchant-svg").length)&&void 0!==(a=o.parent().find("svg").prop("outerHTML"))&&t.html(t.html().replace(e,a)),t.html(t.html().replace(e,"")).removeClass("flexible-content-template").appendTo(s)}})})(S)}function e(e){var t=e.attr("type");"text"!==t&&"TEXTAREA"!==e.prop("tagName")||e.on("keyup input",r),"number"===t&&(e.on("keyup input",r),e.parent().find("input[type=range]").length)&&e.parent().find("input[type=range]").on("input change",r),"radio"===t&&e.on("input",r),"checkbox"!==t&&!e.is("select")||e.on("change",r),e.hasClass("merchant-sortable-repeater-input")&&e.on("change",r),e.hasClass("merchant-upload-input")&&e.on("change",r)}var I=merchantPreviewManipulators,C=function(e){return void 0!==e&&0<Object.keys(e).length};if(void 0!==I){if(C(I.css))for(var t in I.css)e(H('[name="merchant['+I.css[t].setting+']"]'));if(C(I.text))for(var n in I.text)e(H('[name="merchant['+I.text[n].setting+']"]'));if(C(I.attributes))for(var a in I.attributes)e(H('[name="merchant['+I.attributes[a].setting+']"]'));if(C(I.classes))for(var o in I.classes)e(H('[name="merchant['+I.classes[o].setting+']"]'));if(C(I.icons))for(var i in I.icons)e(H('[name="merchant['+I.icons[i].setting+']"]'));if(C(I.svg_icons))for(var s in I.svg_icons)e(H('[name="merchant['+I.svg_icons[s].setting+']"]'));if(C(I.repeater_content))for(var c in I.repeater_content)e(H('[name="merchant['+I.repeater_content[c].setting+']"]'));if(C(I.flexible_content))for(var l in I.flexible_content){l=H(".merchant-flexible-content-control[data-id="+I.flexible_content[l].setting+"]");e(l.find("input")),l.find(".customize-control-flexible-content-delete").on("click",r),l.on("merchant.sorted",r)}if(C(I.update))for(var f in I.update)e(H('[name="merchant['+I.update[f].setting+']"]'));for(var p=0,h=[".pcr-color-palette",".pcr-swatches button",".pcr-color-chooser",".pcr-color-opacity"];p<h.length;p++){var u=h[p];H(L).on("click",u,r)}}var j=function(e,t){var r,n=t.replacements[0],a=t.replacements[1],o=_createForOfIteratorHelper(n.entries());try{for(o.s();!(r=o.n()).done;){var i=_slicedToArray(r.value,2),s=i[0],c=i[1],l=a[s];if("string"==typeof l&&(e=e.replace(c,l)),"object"===_typeof(l))if(l.hasOwnProperty("conditions")){var f,p=H('[name="merchant['+l.setting+']"]');for(f in l.conditions)l.conditions.hasOwnProperty(f)&&p.val()===f&&("string"==typeof l.conditions[f]&&(e=e.replace(c,l.conditions[f])),"object"===_typeof(l.conditions[f]))&&(e=m(e,c,l.conditions[f]))}else e=m(e,c,l)}}catch(e){o.e(e)}finally{o.f()}return e},m=function(e,t,r){var n=H('input[name="merchant['+r.setting+']"]').val();return r.hasOwnProperty("format")&&(n=r.format.replace("{string}",n)),e.replace(t,n)};H(L).on("change",r)})})(jQuery,(window,document));
  • merchant/trunk/assets/js/modules/address-autocomplete/admin/preview.js

    r3013093 r3403526  
    11"use strict";
    22
     3function _regenerator() { /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */ var e, t, r = "function" == typeof Symbol ? Symbol : {}, n = r.iterator || "@@iterator", o = r.toStringTag || "@@toStringTag"; function i(r, n, o, i) { var c = n && n.prototype instanceof Generator ? n : Generator, u = Object.create(c.prototype); return _regeneratorDefine2(u, "_invoke", function (r, n, o) { var i, c, u, f = 0, p = o || [], y = !1, G = { p: 0, n: 0, v: e, a: d, f: d.bind(e, 4), d: function d(t, r) { return i = t, c = 0, u = e, G.n = r, a; } }; function d(r, n) { for (c = r, u = n, t = 0; !y && f && !o && t < p.length; t++) { var o, i = p[t], d = G.p, l = i[2]; r > 3 ? (o = l === n) && (u = i[(c = i[4]) ? 5 : (c = 3, 3)], i[4] = i[5] = e) : i[0] <= d && ((o = r < 2 && d < i[1]) ? (c = 0, G.v = n, G.n = i[1]) : d < l && (o = r < 3 || i[0] > n || n > l) && (i[4] = r, i[5] = n, G.n = l, c = 0)); } if (o || r > 1) return a; throw y = !0, n; } return function (o, p, l) { if (f > 1) throw TypeError("Generator is already running"); for (y && 1 === p && d(p, l), c = p, u = l; (t = c < 2 ? e : u) || !y;) { i || (c ? c < 3 ? (c > 1 && (G.n = -1), d(c, u)) : G.n = u : G.v = u); try { if (f = 2, i) { if (c || (o = "next"), t = i[o]) { if (!(t = t.call(i, u))) throw TypeError("iterator result is not an object"); if (!t.done) return t; u = t.value, c < 2 && (c = 0); } else 1 === c && (t = i.return) && t.call(i), c < 2 && (u = TypeError("The iterator does not provide a '" + o + "' method"), c = 1); i = e; } else if ((t = (y = G.n < 0) ? u : r.call(n, G)) !== a) break; } catch (t) { i = e, c = 1, u = t; } finally { f = 1; } } return { value: t, done: y }; }; }(r, o, i), !0), u; } var a = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} t = Object.getPrototypeOf; var c = [][n] ? t(t([][n]())) : (_regeneratorDefine2(t = {}, n, function () { return this; }), t), u = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(c); function f(e) { return Object.setPrototypeOf ? Object.setPrototypeOf(e, GeneratorFunctionPrototype) : (e.__proto__ = GeneratorFunctionPrototype, _regeneratorDefine2(e, o, "GeneratorFunction")), e.prototype = Object.create(u), e; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, _regeneratorDefine2(u, "constructor", GeneratorFunctionPrototype), _regeneratorDefine2(GeneratorFunctionPrototype, "constructor", GeneratorFunction), GeneratorFunction.displayName = "GeneratorFunction", _regeneratorDefine2(GeneratorFunctionPrototype, o, "GeneratorFunction"), _regeneratorDefine2(u), _regeneratorDefine2(u, o, "Generator"), _regeneratorDefine2(u, n, function () { return this; }), _regeneratorDefine2(u, "toString", function () { return "[object Generator]"; }), (_regenerator = function _regenerator() { return { w: i, m: f }; })(); }
     4function _regeneratorDefine2(e, r, n, t) { var i = Object.defineProperty; try { i({}, "", {}); } catch (e) { i = 0; } _regeneratorDefine2 = function _regeneratorDefine(e, r, n, t) { function o(r, n) { _regeneratorDefine2(e, r, function (e) { return this._invoke(r, n, e); }); } r ? i ? i(e, r, { value: n, enumerable: !t, configurable: !t, writable: !t }) : e[r] = n : (o("next", 0), o("throw", 1), o("return", 2)); }, _regeneratorDefine2(e, r, n, t); }
     5function asyncGeneratorStep(n, t, e, r, o, a, c) { try { var i = n[a](c), u = i.value; } catch (n) { return void e(n); } i.done ? t(u) : Promise.resolve(u).then(r, o); }
     6function _asyncToGenerator(n) { return function () { var t = this, e = arguments; return new Promise(function (r, o) { var a = n.apply(t, e); function _next(n) { asyncGeneratorStep(a, r, o, _next, _throw, "next", n); } function _throw(n) { asyncGeneratorStep(a, r, o, _next, _throw, "throw", n); } _next(void 0); }); }; }
    37(function ($) {
    48  'use strict';
    59
    6   var apiKeyInput = $('.merchant-module-page-setting-field[data-id="api_key"] input');
    7   var addressInput = $('#merchant-address-autocomplete');
    8 
    9   /**
    10    * Check if the API key is valid and activate Autocomplete
    11    */
    12   function activateAutocompleteIfNeeded() {
    13     var apiKey = apiKeyInput.val();
    14     if (apiKey && validateApiKey(apiKey)) {
    15       loadGoogleMapsScript(apiKey);
    16     } else {
    17       deactivateAutocomplete();
     10  var addressAutocompletePreview = {
     11    // Cache DOM elements
     12    $apiKeyInput: null,
     13    $addressInput: null,
     14    // Store autocomplete instance
     15    placeAutocompleteElement: null,
     16    // Store bootstrap script reference
     17    bootstrapScript: null,
     18    // Configuration
     19    config: {
     20      debug: false,
     21      apiKeyLength: 39,
     22      retryAttempts: 3,
     23      retryDelay: 1000,
     24      scriptLoadTimeout: 5000
     25    },
     26    /**
     27     * Initialize the preview autocomplete
     28     */
     29    init: function init() {
     30      var _this = this;
     31      // Cache DOM elements
     32      this.$apiKeyInput = $('.merchant-module-page-setting-field[data-id="api_key"] input');
     33      this.$addressInput = $('#merchant-address-autocomplete');
     34
     35      // Validate required elements exist
     36      if (!this.$apiKeyInput.length || !this.$addressInput.length) {
     37        this.handleError('Required DOM elements not found', 'warning');
     38        return;
     39      }
     40
     41      // Trigger activation on page load
     42      this.activateAutocompleteIfNeeded();
     43
     44      // Handle changes to the API key input with debouncing
     45      var debounceTimer;
     46      this.$apiKeyInput.on('input', function () {
     47        clearTimeout(debounceTimer);
     48        debounceTimer = setTimeout(function () {
     49          _this.activateAutocompleteIfNeeded();
     50        }, 500);
     51      });
     52      this.log('Preview autocomplete initialized');
     53    },
     54    /**
     55     * Check if the API key is valid and activate Autocomplete
     56     */
     57    activateAutocompleteIfNeeded: function activateAutocompleteIfNeeded() {
     58      var apiKey = this.$apiKeyInput.val();
     59      if (apiKey && this.validateApiKey(apiKey)) {
     60        this.loadGoogleMapsScript(apiKey);
     61      } else {
     62        this.deactivateAutocomplete();
     63      }
     64    },
     65    /**
     66     * Validate API key format
     67     * @param {string} apiKey - The API key to validate
     68     * @returns {boolean}
     69     */
     70    validateApiKey: function validateApiKey(apiKey) {
     71      if (typeof apiKey !== 'string') {
     72        return false;
     73      }
     74
     75      // Basic length check
     76      if (apiKey.length !== this.config.apiKeyLength) {
     77        this.log("Invalid API key length: ".concat(apiKey.length, ", expected: ").concat(this.config.apiKeyLength), 'warning');
     78        return false;
     79      }
     80
     81      // Check for valid characters (alphanumeric, hyphens, underscores)
     82      var validPattern = /^[A-Za-z0-9_-]+$/;
     83      if (!validPattern.test(apiKey)) {
     84        this.log('API key contains invalid characters', 'warning');
     85        return false;
     86      }
     87      return true;
     88    },
     89    /**
     90     * Load the Google Maps script using the inline bootstrap loader
     91     * @param {string} apiKey - The Google Maps API key
     92     */
     93    loadGoogleMapsScript: function loadGoogleMapsScript(apiKey) {
     94      // Deactivate any existing instance first
     95      this.deactivateAutocomplete();
     96      try {
     97        var _window$google;
     98        // Check if Google Maps is already loaded
     99        if ((_window$google = window.google) !== null && _window$google !== void 0 && (_window$google = _window$google.maps) !== null && _window$google !== void 0 && _window$google.importLibrary) {
     100          this.log('Google Maps already loaded, initializing autocomplete');
     101          this.initializeAutocomplete();
     102          return;
     103        }
     104
     105        // Inject the inline bootstrap loader
     106        this.bootstrapScript = document.createElement('script');
     107        this.bootstrapScript.textContent = this.getBootstrapLoaderScript(apiKey);
     108        this.bootstrapScript.setAttribute('data-merchant-maps-loader', 'true');
     109        document.head.appendChild(this.bootstrapScript);
     110
     111        // Initialize autocomplete with timeout protection
     112        this.initializeAutocompleteWithTimeout();
     113        this.log('Google Maps script injected');
     114      } catch (error) {
     115        this.handleError('Failed to load Google Maps script', 'error', error);
     116        this.deactivateAutocomplete();
     117      }
     118    },
     119    /**
     120     * Get the Google Maps bootstrap loader script
     121     * @param {string} apiKey - The API key
     122     * @returns {string} Bootstrap loader script
     123     */
     124    getBootstrapLoaderScript: function getBootstrapLoaderScript(apiKey) {
     125      // Sanitize API key
     126      var sanitizedKey = this.sanitizeValue(apiKey);
     127      return "\n\t\t\t\t(g=>{var h,a,k,p=\"The Google Maps JavaScript API\",c=\"google\",l=\"importLibrary\",q=\"__ib__\",m=document,b=window;b=b[c]||(b[c]={});var d=b.maps||(b.maps={}),r=new Set,e=new URLSearchParams,u=()=>h||(h=new Promise(async(f,n)=>{await (a=m.createElement(\"script\"));e.set(\"libraries\",[...r]+\"\");for(k in g)e.set(k.replace(/[A-Z]/g,t=>\"_\"+t[0].toLowerCase()),g[k]);e.set(\"callback\",c+\".maps.\"+q);a.src=`https://maps.${c}apis.com/maps/api/js?`+e;d[q]=f;a.onerror=()=>h=n(Error(p+\" could not load.\"));a.nonce=m.querySelector(\"script[nonce]\")?.nonce||\"\";m.head.append(a)}));d[l]?console.warn(p+\" only loads once. Ignoring:\",g):d[l]=(f,...n)=>r.add(f)&&u().then(()=>d[l](f,...n))})({\n\t\t\t\t\tkey: \"".concat(sanitizedKey, "\",\n\t\t\t\t\tv: \"weekly\"\n\t\t\t\t});\n\t\t\t");
     128    },
     129    /**
     130     * Initialize autocomplete with timeout protection
     131     */
     132    initializeAutocompleteWithTimeout: function initializeAutocompleteWithTimeout() {
     133      var _this2 = this;
     134      var timeout = setTimeout(function () {
     135        _this2.handleError('Google Maps script load timeout', 'error');
     136        _this2.deactivateAutocomplete();
     137      }, this.config.scriptLoadTimeout);
     138      this.initializeAutocomplete().then(function () {
     139        clearTimeout(timeout);
     140      }).catch(function (error) {
     141        clearTimeout(timeout);
     142        _this2.handleError('Failed to initialize autocomplete', 'error', error);
     143        _this2.deactivateAutocomplete();
     144      });
     145    },
     146    /**
     147     * Initialize the PlaceAutocompleteElement
     148     * @returns {Promise<void>}
     149     */
     150    initializeAutocomplete: function () {
     151      var _initializeAutocomplete = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee2() {
     152        var _this3 = this;
     153        var attempt,
     154          _yield$google$maps$im,
     155          PlaceAutocompleteElement,
     156          _args2 = arguments,
     157          _t;
     158        return _regenerator().w(function (_context2) {
     159          while (1) switch (_context2.p = _context2.n) {
     160            case 0:
     161              attempt = _args2.length > 0 && _args2[0] !== undefined ? _args2[0] : 1;
     162              _context2.p = 1;
     163              _context2.n = 2;
     164              return this.waitForGoogleMaps();
     165            case 2:
     166              _context2.n = 3;
     167              return google.maps.importLibrary('places');
     168            case 3:
     169              _yield$google$maps$im = _context2.v;
     170              PlaceAutocompleteElement = _yield$google$maps$im.PlaceAutocompleteElement;
     171              // Create the new PlaceAutocompleteElement
     172              this.placeAutocompleteElement = new PlaceAutocompleteElement();
     173
     174              // Copy styling from original input
     175              if (this.$addressInput.attr('class')) {
     176                this.placeAutocompleteElement.className = this.$addressInput.attr('class');
     177              }
     178
     179              // Hide the original input field
     180              this.$addressInput.hide();
     181
     182              // Insert the autocomplete element after the hidden input
     183              this.$addressInput.after(this.placeAutocompleteElement);
     184
     185              // Listen for place selection
     186              this.placeAutocompleteElement.addEventListener('gmp-select', /*#__PURE__*/function () {
     187                var _ref = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee(event) {
     188                  return _regenerator().w(function (_context) {
     189                    while (1) switch (_context.n) {
     190                      case 0:
     191                        _context.n = 1;
     192                        return _this3.handlePlaceSelection(event.placePrediction);
     193                      case 1:
     194                        return _context.a(2);
     195                    }
     196                  }, _callee);
     197                }));
     198                return function (_x) {
     199                  return _ref.apply(this, arguments);
     200                };
     201              }());
     202              this.log('Autocomplete element initialized successfully');
     203              _context2.n = 7;
     204              break;
     205            case 4:
     206              _context2.p = 4;
     207              _t = _context2.v;
     208              if (!(attempt < this.config.retryAttempts)) {
     209                _context2.n = 6;
     210                break;
     211              }
     212              this.log("Retry attempt ".concat(attempt + 1, " to initialize autocomplete"));
     213              _context2.n = 5;
     214              return this.delay(this.config.retryDelay);
     215            case 5:
     216              return _context2.a(2, this.initializeAutocomplete(attempt + 1));
     217            case 6:
     218              throw _t;
     219            case 7:
     220              return _context2.a(2);
     221          }
     222        }, _callee2, this, [[1, 4]]);
     223      }));
     224      function initializeAutocomplete() {
     225        return _initializeAutocomplete.apply(this, arguments);
     226      }
     227      return initializeAutocomplete;
     228    }(),
     229    /**
     230     * Wait for Google Maps to be available
     231     * @returns {Promise<void>}
     232     */
     233    waitForGoogleMaps: function waitForGoogleMaps() {
     234      return new Promise(function (resolve, reject) {
     235        var maxAttempts = 50;
     236        var attempts = 0;
     237        var _checkGoogleMaps = function checkGoogleMaps() {
     238          var _window$google2;
     239          if ((_window$google2 = window.google) !== null && _window$google2 !== void 0 && (_window$google2 = _window$google2.maps) !== null && _window$google2 !== void 0 && _window$google2.importLibrary) {
     240            resolve();
     241          } else if (attempts >= maxAttempts) {
     242            reject(new Error('Google Maps failed to load'));
     243          } else {
     244            attempts++;
     245            setTimeout(_checkGoogleMaps, 100);
     246          }
     247        };
     248        _checkGoogleMaps();
     249      });
     250    },
     251    /**
     252     * Handle place selection from autocomplete
     253     * @param {Object} placePrediction - Place prediction object
     254     */
     255    handlePlaceSelection: function () {
     256      var _handlePlaceSelection = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee3(placePrediction) {
     257        var place, formattedAddress, _t2;
     258        return _regenerator().w(function (_context3) {
     259          while (1) switch (_context3.p = _context3.n) {
     260            case 0:
     261              _context3.p = 0;
     262              // Disable input during processing
     263              this.setLoadingState(true);
     264              place = placePrediction.toPlace(); // Fetch the fields you need
     265              _context3.n = 1;
     266              return place.fetchFields({
     267                fields: ['displayName', 'formattedAddress', 'location', 'addressComponents']
     268              });
     269            case 1:
     270              // Sanitize and update the hidden input
     271              formattedAddress = this.sanitizeValue(place.formattedAddress || '');
     272              this.$addressInput.val(formattedAddress);
     273
     274              // Trigger change event
     275              this.$addressInput.trigger('change');
     276              this.log('Selected place:', place.toJSON());
     277              _context3.n = 3;
     278              break;
     279            case 2:
     280              _context3.p = 2;
     281              _t2 = _context3.v;
     282              this.handleError('Error fetching place details', 'error', _t2);
     283            case 3:
     284              _context3.p = 3;
     285              this.setLoadingState(false);
     286              return _context3.f(3);
     287            case 4:
     288              return _context3.a(2);
     289          }
     290        }, _callee3, this, [[0, 2, 3, 4]]);
     291      }));
     292      function handlePlaceSelection(_x2) {
     293        return _handlePlaceSelection.apply(this, arguments);
     294      }
     295      return handlePlaceSelection;
     296    }(),
     297    /**
     298     * Set loading state
     299     * @param {boolean} isLoading - Loading state
     300     */
     301    setLoadingState: function setLoadingState(isLoading) {
     302      if (this.placeAutocompleteElement) {
     303        if (isLoading) {
     304          this.placeAutocompleteElement.classList.add('loading');
     305        } else {
     306          this.placeAutocompleteElement.classList.remove('loading');
     307        }
     308      }
     309    },
     310    /**
     311     * Sanitize input value to prevent XSS
     312     * @param {string} value - Value to sanitize
     313     * @returns {string} Sanitized value
     314     */
     315    sanitizeValue: function sanitizeValue(value) {
     316      if (typeof value !== 'string') {
     317        return '';
     318      }
     319      return $('<div>').text(value).html();
     320    },
     321    /**
     322     * Deactivate and clean up autocomplete
     323     */
     324    deactivateAutocomplete: function deactivateAutocomplete() {
     325      // Remove the PlaceAutocompleteElement
     326      if (this.placeAutocompleteElement) {
     327        try {
     328          this.placeAutocompleteElement.remove();
     329        } catch (error) {
     330          this.log('Error removing autocomplete element', 'warning');
     331        }
     332        this.placeAutocompleteElement = null;
     333      }
     334
     335      // Clean up Google Maps scripts
     336      this.cleanupGoogleMapsScripts();
     337
     338      // Reset address field
     339      this.resetAddressField();
     340      this.log('Autocomplete deactivated');
     341    },
     342    /**
     343     * Clean up Google Maps scripts from DOM
     344     */
     345    cleanupGoogleMapsScripts: function cleanupGoogleMapsScripts() {
     346      try {
     347        var _window$google3;
     348        // Remove Google Maps from window
     349        if ((_window$google3 = window.google) !== null && _window$google3 !== void 0 && _window$google3.maps) {
     350          delete window.google;
     351        }
     352
     353        // Remove all Google Maps related scripts
     354        document.querySelectorAll('script').forEach(function (script) {
     355          if (script.src.includes('googleapis.com/maps') || script.src.includes('maps.gstatic.com') || script.textContent.includes('importLibrary') || script.getAttribute('data-merchant-maps-loader')) {
     356            script.remove();
     357          }
     358        });
     359        this.bootstrapScript = null;
     360        this.log('Google Maps scripts cleaned up');
     361      } catch (error) {
     362        this.handleError('Error cleaning up scripts', 'warning', error);
     363      }
     364    },
     365    /**
     366     * Reset the address input field to default state
     367     */
     368    resetAddressField: function resetAddressField() {
     369      if (this.$addressInput && this.$addressInput.length) {
     370        this.$addressInput.val('');
     371        this.$addressInput.show();
     372        this.$addressInput.removeClass('loading');
     373      }
     374    },
     375    /**
     376     * Handle errors with different severity levels
     377     * @param {string} message - Error message
     378     * @param {string} severity - Error severity (critical, error, warning)
     379     * @param {Error} error - Original error object
     380     */
     381    handleError: function handleError(message) {
     382      var severity = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'error';
     383      var error = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;
     384      var fullMessage = error ? "".concat(message, ": ").concat(error.message) : message;
     385      if (severity === 'critical' || severity === 'error') {
     386        console.error("[AddressAutocompletePreview] ".concat(fullMessage), error);
     387      } else {
     388        console.warn("[AddressAutocompletePreview] ".concat(fullMessage));
     389      }
     390      this.log(fullMessage, severity);
     391    },
     392    /**
     393     * Debug logging
     394     * @param {*} message - Log message
     395     * @param {string} level - Log level
     396     */
     397    log: function log(message) {
     398      var level = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'log';
     399      if (this.config.debug && typeof console !== 'undefined') {
     400        var timestamp = new Date().toISOString();
     401        console[level]("[AddressAutocompletePreview ".concat(timestamp, "]"), message);
     402      }
     403    },
     404    /**
     405     * Delay helper for retry logic
     406     * @param {number} ms - Milliseconds to delay
     407     * @returns {Promise}
     408     */
     409    delay: function delay(ms) {
     410      return new Promise(function (resolve) {
     411        return setTimeout(resolve, ms);
     412      });
    18413    }
    19   }
    20 
    21   // Trigger activation on page load
    22   activateAutocompleteIfNeeded();
    23 
    24   // Handle changes to the API key input
    25   apiKeyInput.on('input', activateAutocompleteIfNeeded);
    26 
    27   /**
    28    * Load the Google Maps script
    29    * @param apiKey
    30    */
    31   function loadGoogleMapsScript(apiKey) {
    32     deactivateAutocomplete();
    33     var scriptURL = "https://maps.googleapis.com/maps/api/js?key=".concat(apiKey, "&libraries=places");
    34     $.getScript(scriptURL, function () {
    35       // Create Google Places Autocomplete instance
    36       new google.maps.places.Autocomplete(addressInput.get(0), {
    37         types: ['geocode']
    38       });
    39     });
    40   }
    41 
    42   /**
    43    * Check the API key length is valid
    44    * @param apiKey
    45    * @returns {boolean}
    46    */
    47   function validateApiKey(apiKey) {
    48     return apiKey.length === 39;
    49   }
    50 
    51   /**
    52    * Disable Autocomplete for the address input.
    53    */
    54   function deactivateAutocomplete() {
    55     var _window$google;
    56     if ((_window$google = window.google) !== null && _window$google !== void 0 && _window$google.maps) {
    57       delete google.maps;
    58       document.querySelectorAll("script").forEach(function (script) {
    59         if (script.src.includes("googleapis.com/maps") || script.src.includes("maps.gstatic.com")) {
    60           script.remove();
    61         }
    62       });
    63       resetAddressField();
    64     }
    65   }
    66 
    67   /**
    68    * Reset the address input field
    69    */
    70   function resetAddressField() {
    71     addressInput.val('');
    72     addressInput.css({
    73       'background-image': 'none'
    74     });
    75     addressInput.attr('disabled', false);
    76     addressInput.attr('placeholder', merchant_admin_address_autocomplete.field_placeholder);
     414  };
     415
     416  // Initialize when DOM is ready
     417  $(document).ready(function () {
     418    addressAutocompletePreview.init();
     419  });
     420
     421  // Cleanup on page unload
     422  $(window).on('beforeunload', function () {
     423    addressAutocompletePreview.deactivateAutocomplete();
     424  });
     425
     426  // Expose to global scope for debugging (optional)
     427  if (addressAutocompletePreview.config.debug) {
     428    window.addressAutocompletePreview = addressAutocompletePreview;
    77429  }
    78430})(jQuery);
  • merchant/trunk/assets/js/modules/address-autocomplete/admin/preview.min.js

    r3198417 r3403526  
    1 (a=>{var o=a('.merchant-module-page-setting-field[data-id="api_key"] input'),t=a("#merchant-address-autocomplete");function e(){var e=o.val();e&&39===e.length?(e=e,c(),e="https://maps.googleapis.com/maps/api/js?key=".concat(e,"&libraries=places"),a.getScript(e,function(){new google.maps.places.Autocomplete(t.get(0),{types:["geocode"]})})):c()}function c(){var e;null!=(e=window.google)&&e.maps&&(delete google.maps,document.querySelectorAll("script").forEach(function(e){(e.src.includes("googleapis.com/maps")||e.src.includes("maps.gstatic.com"))&&e.remove()}),t.val(""),t.css({"background-image":"none"}),t.attr("disabled",!1),t.attr("placeholder",merchant_admin_address_autocomplete.field_placeholder))}e(),o.on("input",e)})(jQuery);
     1function _regenerator(){var m,e="function"==typeof Symbol?Symbol:{},t=e.iterator||"@@iterator",n=e.toStringTag||"@@toStringTag";function r(e,t,n,r){var o,i,a,c,s,l,u,p,d,t=t&&t.prototype instanceof f?t:f,t=Object.create(t.prototype);return _regeneratorDefine2(t,"_invoke",(o=e,i=n,u=r||[],p=!1,d={p:l=0,n:0,v:m,a:h,f:h.bind(m,4),d:function(e,t){return a=e,c=0,s=m,d.n=t,g}},function(e,t,n){if(1<l)throw TypeError("Generator is already running");for(p&&1===t&&h(t,n),c=t,s=n;(y=c<2?m:s)||!p;){a||(c?c<3?(1<c&&(d.n=-1),h(c,s)):d.n=s:d.v=s);try{if(l=2,a){if(y=a[e=c?e:"next"]){if(!(y=y.call(a,s)))throw TypeError("iterator result is not an object");if(!y.done)return y;s=y.value,c<2&&(c=0)}else 1===c&&(y=a.return)&&y.call(a),c<2&&(s=TypeError("The iterator does not provide a '"+e+"' method"),c=1);a=m}else if((y=(p=d.n<0)?s:o.call(i,d))!==g)break}catch(e){a=m,c=1,s=e}finally{l=1}}return{value:y,done:p}}),!0),t;function h(e,t){for(c=e,s=t,y=0;!p&&l&&!n&&y<u.length;y++){var n,r=u[y],o=d.p,i=r[2];3<e?(n=i===t)&&(s=r[(c=r[4])?5:c=3],r[4]=r[5]=m):r[0]<=o&&((n=e<2&&o<r[1])?(c=0,d.v=t,d.n=r[1]):o<i&&(n=e<3||r[0]>t||i<t)&&(r[4]=e,r[5]=t,d.n=i,c=0))}if(n||1<e)return g;throw p=!0,t}}var g={};function f(){}function o(){}function i(){}var y=Object.getPrototypeOf,e=[][t]?y(y([][t]())):(_regeneratorDefine2(y={},t,function(){return this}),y),a=i.prototype=f.prototype=Object.create(e);function c(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,i):(e.__proto__=i,_regeneratorDefine2(e,n,"GeneratorFunction")),e.prototype=Object.create(a),e}return _regeneratorDefine2(a,"constructor",o.prototype=i),_regeneratorDefine2(i,"constructor",o),_regeneratorDefine2(i,n,o.displayName="GeneratorFunction"),_regeneratorDefine2(a),_regeneratorDefine2(a,n,"Generator"),_regeneratorDefine2(a,t,function(){return this}),_regeneratorDefine2(a,"toString",function(){return"[object Generator]"}),(_regenerator=function(){return{w:r,m:c}})()}function _regeneratorDefine2(e,t,n,r){var i=Object.defineProperty;try{i({},"",{})}catch(e){i=0}(_regeneratorDefine2=function(e,t,n,r){function o(t,n){_regeneratorDefine2(e,t,function(e){return this._invoke(t,n,e)})}t?i?i(e,t,{value:n,enumerable:!r,configurable:!r,writable:!r}):e[t]=n:(o("next",0),o("throw",1),o("return",2))})(e,t,n,r)}function asyncGeneratorStep(e,t,n,r,o,i,a){try{var c=e[i](a),s=c.value}catch(e){return void n(e)}c.done?t(s):Promise.resolve(s).then(r,o)}function _asyncToGenerator(c){return function(){var e=this,a=arguments;return new Promise(function(t,n){var r=c.apply(e,a);function o(e){asyncGeneratorStep(r,t,n,o,i,"next",e)}function i(e){asyncGeneratorStep(r,t,n,o,i,"throw",e)}o(void 0)})}}(n=>{var t,e,r={$apiKeyInput:null,$addressInput:null,placeAutocompleteElement:null,bootstrapScript:null,config:{debug:!1,apiKeyLength:39,retryAttempts:3,retryDelay:1e3,scriptLoadTimeout:5e3},init:function(){var e,t=this;this.$apiKeyInput=n('.merchant-module-page-setting-field[data-id="api_key"] input'),this.$addressInput=n("#merchant-address-autocomplete"),this.$apiKeyInput.length&&this.$addressInput.length?(this.activateAutocompleteIfNeeded(),this.$apiKeyInput.on("input",function(){clearTimeout(e),e=setTimeout(function(){t.activateAutocompleteIfNeeded()},500)}),this.log("Preview autocomplete initialized")):this.handleError("Required DOM elements not found","warning")},activateAutocompleteIfNeeded:function(){var e=this.$apiKeyInput.val();e&&this.validateApiKey(e)?this.loadGoogleMapsScript(e):this.deactivateAutocomplete()},validateApiKey:function(e){return"string"==typeof e&&(e.length!==this.config.apiKeyLength?(this.log("Invalid API key length: ".concat(e.length,", expected: ").concat(this.config.apiKeyLength),"warning"),!1):!!/^[A-Za-z0-9_-]+$/.test(e)||(this.log("API key contains invalid characters","warning"),!1))},loadGoogleMapsScript:function(e){this.deactivateAutocomplete();try{var t;null!=(t=window.google)&&null!=(t=t.maps)&&t.importLibrary?(this.log("Google Maps already loaded, initializing autocomplete"),this.initializeAutocomplete()):(this.bootstrapScript=document.createElement("script"),this.bootstrapScript.textContent=this.getBootstrapLoaderScript(e),this.bootstrapScript.setAttribute("data-merchant-maps-loader","true"),document.head.appendChild(this.bootstrapScript),this.initializeAutocompleteWithTimeout(),this.log("Google Maps script injected"))}catch(e){this.handleError("Failed to load Google Maps script","error",e),this.deactivateAutocomplete()}},getBootstrapLoaderScript:function(e){e=this.sanitizeValue(e);return'\n\t\t\t\t(g=>{var h,a,k,p="The Google Maps JavaScript API",c="google",l="importLibrary",q="__ib__",m=document,b=window;b=b[c]||(b[c]={});var d=b.maps||(b.maps={}),r=new Set,e=new URLSearchParams,u=()=>h||(h=new Promise(async(f,n)=>{await (a=m.createElement("script"));e.set("libraries",[...r]+"");for(k in g)e.set(k.replace(/[A-Z]/g,t=>"_"+t[0].toLowerCase()),g[k]);e.set("callback",c+".maps."+q);a.src=`https://maps.${c}apis.com/maps/api/js?`+e;d[q]=f;a.onerror=()=>h=n(Error(p+" could not load."));a.nonce=m.querySelector("script[nonce]")?.nonce||"";m.head.append(a)}));d[l]?console.warn(p+" only loads once. Ignoring:",g):d[l]=(f,...n)=>r.add(f)&&u().then(()=>d[l](f,...n))})({\n\t\t\t\t\tkey: "'.concat(e,'",\n\t\t\t\t\tv: "weekly"\n\t\t\t\t});\n\t\t\t')},initializeAutocompleteWithTimeout:function(){var t=this,n=setTimeout(function(){t.handleError("Google Maps script load timeout","error"),t.deactivateAutocomplete()},this.config.scriptLoadTimeout);this.initializeAutocomplete().then(function(){clearTimeout(n)}).catch(function(e){clearTimeout(n),t.handleError("Failed to initialize autocomplete","error",e),t.deactivateAutocomplete()})},initializeAutocomplete:(e=_asyncToGenerator(_regenerator().m(function e(){var t,n,r,o=this,i=arguments;return _regenerator().w(function(e){for(;;)switch(e.p=e.n){case 0:return t=0<i.length&&void 0!==i[0]?i[0]:1,e.p=1,e.n=2,this.waitForGoogleMaps();case 2:return e.n=3,google.maps.importLibrary("places");case 3:n=e.v,n=n.PlaceAutocompleteElement,this.placeAutocompleteElement=new n,this.$addressInput.attr("class")&&(this.placeAutocompleteElement.className=this.$addressInput.attr("class")),this.$addressInput.hide(),this.$addressInput.after(this.placeAutocompleteElement),this.placeAutocompleteElement.addEventListener("gmp-select",(()=>{var t=_asyncToGenerator(_regenerator().m(function e(t){return _regenerator().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,o.handlePlaceSelection(t.placePrediction);case 1:return e.a(2)}},e)}));return function(e){return t.apply(this,arguments)}})()),this.log("Autocomplete element initialized successfully"),e.n=7;break;case 4:if(e.p=4,r=e.v,t<this.config.retryAttempts)return this.log("Retry attempt ".concat(t+1," to initialize autocomplete")),e.n=5,this.delay(this.config.retryDelay);e.n=6;break;case 5:return e.a(2,this.initializeAutocomplete(t+1));case 6:throw r;case 7:return e.a(2)}},e,this,[[1,4]])})),function(){return e.apply(this,arguments)}),waitForGoogleMaps:function(){return new Promise(function(t,n){function r(){var e;null!=(e=window.google)&&null!=(e=e.maps)&&e.importLibrary?t():50<=o?n(new Error("Google Maps failed to load")):(o++,setTimeout(r,100))}var o=0;r()})},handlePlaceSelection:(t=_asyncToGenerator(_regenerator().m(function e(t){var n,r;return _regenerator().w(function(e){for(;;)switch(e.p=e.n){case 0:return e.p=0,this.setLoadingState(!0),n=t.toPlace(),e.n=1,n.fetchFields({fields:["displayName","formattedAddress","location","addressComponents"]});case 1:r=this.sanitizeValue(n.formattedAddress||""),this.$addressInput.val(r),this.$addressInput.trigger("change"),this.log("Selected place:",n.toJSON()),e.n=3;break;case 2:e.p=2,r=e.v,this.handleError("Error fetching place details","error",r);case 3:return e.p=3,this.setLoadingState(!1),e.f(3);case 4:return e.a(2)}},e,this,[[0,2,3,4]])})),function(e){return t.apply(this,arguments)}),setLoadingState:function(e){this.placeAutocompleteElement&&(e?this.placeAutocompleteElement.classList.add("loading"):this.placeAutocompleteElement.classList.remove("loading"))},sanitizeValue:function(e){return"string"!=typeof e?"":n("<div>").text(e).html()},deactivateAutocomplete:function(){if(this.placeAutocompleteElement){try{this.placeAutocompleteElement.remove()}catch(e){this.log("Error removing autocomplete element","warning")}this.placeAutocompleteElement=null}this.cleanupGoogleMapsScripts(),this.resetAddressField(),this.log("Autocomplete deactivated")},cleanupGoogleMapsScripts:function(){try{var e;null!=(e=window.google)&&e.maps&&delete window.google,document.querySelectorAll("script").forEach(function(e){(e.src.includes("googleapis.com/maps")||e.src.includes("maps.gstatic.com")||e.textContent.includes("importLibrary")||e.getAttribute("data-merchant-maps-loader"))&&e.remove()}),this.bootstrapScript=null,this.log("Google Maps scripts cleaned up")}catch(e){this.handleError("Error cleaning up scripts","warning",e)}},resetAddressField:function(){this.$addressInput&&this.$addressInput.length&&(this.$addressInput.val(""),this.$addressInput.show(),this.$addressInput.removeClass("loading"))},handleError:function(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:"error",n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null,e=n?"".concat(e,": ").concat(n.message):e;"critical"===t||"error"===t?console.error("[AddressAutocompletePreview] ".concat(e),n):console.warn("[AddressAutocompletePreview] ".concat(e)),this.log(e,t)},log:function(e){var t,n=1<arguments.length&&void 0!==arguments[1]?arguments[1]:"log";this.config.debug&&"undefined"!=typeof console&&(t=(new Date).toISOString(),console[n]("[AddressAutocompletePreview ".concat(t,"]"),e))},delay:function(t){return new Promise(function(e){return setTimeout(e,t)})}};n(document).ready(function(){r.init()}),n(window).on("beforeunload",function(){r.deactivateAutocomplete()}),r.config.debug&&(window.addressAutocompletePreview=r)})(jQuery);
  • merchant/trunk/assets/js/modules/product-labels/admin/preview.js

    r3198417 r3403526  
    191191    initPreview();
    192192  });
    193   $(document).on('change.merchant keyup', function () {
     193  $(document).on('change.merchant keyup change', function () {
    194194    initPreview();
    195195  });
     
    204204      customImageEl = layout.find('.merchant-field-label_image_shape_custom input[type="hidden"]'),
    205205      customImage = customImageEl.val(),
    206       marginX = layout.find('.merchant-field-margin_x input').val(),
    207       marginXEl = layout.find('.merchant-field-margin_x'),
    208       marginY = layout.find('.merchant-field-margin_y input').val(),
     206      positionX = layout.find('.merchant-field-position_x input').val() || 10,
     207      positionY = layout.find('.merchant-field-position_y input').val() || 10,
     208      positionAnchor = layout.find('.merchant-field-position_anchor select').val() || 'top-left',
    209209      labelWidth = layout.find('.merchant-field-label_width input').val(),
    210210      labelHeight = layout.find('.merchant-field-label_height input').val(),
     
    213213      borderRadius = layout.find('.merchant-field-shape_radius input').val(),
    214214      fontSize = layout.find('.merchant-field-font_size input').val(),
    215       fontStyle = layout.find('.merchant-field-font_style select').val(),
    216       position = layout.find('.merchant-field-label_position select').val();
     215      fontStyle = layout.find('.merchant-field-font_style select').val();
    217216    var labelPreview = $('.merchant-product-labels-preview').find('.merchant-product-labels');
    218     var classes = "merchant-product-labels__regular position-".concat(position, " merchant-product-labels__").concat(labelType);
     217    var classes = "merchant-product-labels__regular position-absolute merchant-product-labels__".concat(labelType);
    219218    classes += labelType === 'text' ? " merchant-product-labels__".concat(textShape) : '';
    220219    var labelClassPattern = /\bmerchant-product-labels__\S+/g;
     220
     221    // Build CSS based on anchor point and position values
    221222    var css = {
    222       'top': marginY + 'px',
    223       'left': position === 'top-left' ? marginX + 'px' : '',
    224       'right': position === 'top-right' ? marginX + 'px' : ''
     223      'top': positionY + 'px'
    225224    };
     225
     226    // Handle horizontal positioning based on anchor point
     227    if (positionAnchor === 'top-right') {
     228      css['right'] = positionX + 'px';
     229      css['left'] = '';
     230    } else {
     231      // top-left (default)
     232      css['left'] = positionX + 'px';
     233      css['right'] = '';
     234    }
    226235    if (labelType === 'text') {
    227236      css['width'] = labelWidth + 'px';
     
    250259      };
    251260      css = _objectSpread(_objectSpread({}, css), fontStyles[fontStyle]);
     261
     262      // Apply rotation for shapes 5 and 6 based on anchor point
     263      if (textShape === 'text-shape-5' || textShape === 'text-shape-6') {
     264        if (positionAnchor === 'top-right') {
     265          // Invert rotation for top-right anchor (use -45deg instead of 45deg)
     266          if (textShape === 'text-shape-5') {
     267            css['transform'] = 'rotate(45deg) translate(50%, 50%)';
     268            css['transform-origin'] = 'right';
     269          } else if (textShape === 'text-shape-6') {
     270            css['transform'] = 'rotate(45deg) translate(50%, 25%)';
     271            css['transform-origin'] = 'right';
     272          }
     273        } else {
     274          // top-left (default)
     275          if (textShape === 'text-shape-5') {
     276            css['transform'] = 'rotate(-45deg) translate(-50%, 50%)';
     277            css['transform-origin'] = 'left';
     278          } else if (textShape === 'text-shape-6') {
     279            css['transform'] = 'rotate(-45deg) translate(-50%, 25%)';
     280            css['transform-origin'] = 'left';
     281          }
     282        }
     283      } else {
     284        css['transform'] = 'none';
     285        css['transform-origin'] = 'none';
     286      }
    252287      var currency = labelPreview.attr('data-currency');
    253288
     
    258293      labelPreview.css(css).removeClass(function (index, className) {
    259294        return (className.match(labelClassPattern) || []).join(' ');
    260       }).removeClass('position-top-right position-top-left').addClass(classes).find('span').css({
     295      }).removeClass('position-top-right position-top-left position-absolute').addClass(classes).find('span').css({
    261296        width: '',
    262297        height: ''
     
    269304      css['font-size'] = '';
    270305      css['border-radius'] = '';
     306      css['transform'] = 'none';
     307      css['transform-origin'] = 'none';
    271308      var img = customImage ? customImageEl.closest('.merchant-field-label_image_shape_custom').find('.merchant-upload-image img').clone() : imageShapeEl.closest('label').find('img').clone();
    272309
     
    274311      labelPreview.css(css).removeClass(function (index, className) {
    275312        return (className.match(labelClassPattern) || []).join(' ');
    276       }).removeClass('position-top-right position-top-left').addClass(classes).find('span').css({
     313      }).removeClass('position-top-right position-top-left position-absolute').addClass(classes).find('span').css({
    277314        width: labelWidth + 'px',
    278315        height: labelHeight + 'px'
     
    282319      layout.find('.merchant-upload-button-drag-drop').toggle(!customImage);
    283320    }
    284 
    285     // Change Margin X label
    286     marginXEl.closest('.layout-field').find('.merchant-module-page-setting-field-title').text(position === 'top-left' ? 'Margin left' : 'Margin right');
    287321  }
    288322  $(document).on('change input change.merchant', '.merchant-module-page-setting-box', function (e) {
  • merchant/trunk/assets/js/modules/product-labels/admin/preview.min.js

    r3198417 r3403526  
    1 function _typeof(e){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function _slicedToArray(e,t){return _arrayWithHoles(e)||_iterableToArrayLimit(e,t)||_unsupportedIterableToArray(e,t)||_nonIterableRest()}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _unsupportedIterableToArray(e,t){var i;if(e)return"string"==typeof e?_arrayLikeToArray(e,t):"Map"===(i="Object"===(i={}.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:i)||"Set"===i?Array.from(e):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?_arrayLikeToArray(e,t):void 0}function _arrayLikeToArray(e,t){(null==t||t>e.length)&&(t=e.length);for(var i=0,a=Array(t);i<t;i++)a[i]=e[i];return a}function _iterableToArrayLimit(e,t){var i=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=i){var a,r,n,o,l=[],c=!0,h=!1;try{if(n=(i=i.call(e)).next,0===t){if(Object(i)!==i)return;c=!1}else for(;!(c=(a=n.call(i)).done)&&(l.push(a.value),l.length!==t);c=!0);}catch(e){h=!0,r=e}finally{try{if(!c&&null!=i.return&&(o=i.return(),Object(o)!==o))return}finally{if(h)throw r}}return l}}function _arrayWithHoles(e){if(Array.isArray(e))return e}function ownKeys(t,e){var i,a=Object.keys(t);return Object.getOwnPropertySymbols&&(i=Object.getOwnPropertySymbols(t),e&&(i=i.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),a.push.apply(a,i)),a}function _objectSpread(t){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?ownKeys(Object(i),!0).forEach(function(e){_defineProperty(t,e,i[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):ownKeys(Object(i)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))})}return t}function _defineProperty(e,t,i){return(t=_toPropertyKey(t))in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}function _toPropertyKey(e){e=_toPrimitive(e,"string");return"symbol"==_typeof(e)?e:e+""}function _toPrimitive(e,t){if("object"!=_typeof(e)||!e)return e;var i=e[Symbol.toPrimitive];if(void 0===i)return("string"===t?String:Number)(e);i=i.call(e,t||"default");if("object"!=_typeof(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}(w=>{var d={text:{"text-shape-1":{width:100,height:32,borderRadius:5,marginX:10,marginY:10},"text-shape-2":{width:100,height:32,borderRadius:5,marginX:10,marginY:10},"text-shape-3":{width:125,height:32,borderRadius:5,marginX:10,marginY:10},"text-shape-4":{width:125,height:32,borderRadius:5,marginX:10,marginY:10},"text-shape-5":{width:140,height:32,borderRadius:0,marginX:25,marginY:10,disableInShortCode:!0},"text-shape-6":{width:140,height:32,borderRadius:0,marginX:25,marginY:10,disableInShortCode:!0},"text-shape-7":{width:90,height:90,borderRadius:5,marginX:10,marginY:10},"text-shape-8":{width:100,height:100,borderRadius:50,marginX:10,marginY:10}},image:{"image-shape-1":{width:45,height:45},"image-shape-2":{width:45,height:25},"image-shape-3":{width:45,height:15},"image-shape-4":{width:45,height:25},"image-shape-5":{width:45,height:15},"image-shape-6":{width:38,height:45},"image-shape-7":{width:45,height:30},"image-shape-8":{width:45,height:15},"image-shape-9":{width:45,height:27},"image-shape-10":{width:38,height:45},"image-shape-11":{width:45,height:12},"image-shape-12":{width:45,height:15},"image-shape-13":{width:45,height:32},"image-shape-14":{width:42,height:45},"image-shape-15":{width:45,height:10},"image-shape-16":{width:45,height:32},"image-shape-17":{width:45,height:14},"image-shape-18":{width:38,height:45},"image-shape-19":{width:45,height:30},"image-shape-20":{width:45,height:28},"image-shape-21":{width:38,height:45},"image-shape-22":{width:45,height:45},"image-shape-23":{width:45,height:35},"image-shape-24":{width:45,height:45}}};function i(){var e=w(".merchant-flexible-content-control.product-labels-style").find(".layout.active"),t=e.find(".merchant-field-label input").val(),i=e.find(".merchant-field-label_type input:checked").val(),a=e.find(".merchant-choices-label_text_shape input:checked").val(),r=e.find(".merchant-choices-label_image_shape input:checked"),n=(r.val(),e.find('.merchant-field-label_image_shape_custom input[type="hidden"]')),o=n.val(),l=e.find(".merchant-field-margin_x input").val(),c=e.find(".merchant-field-margin_x"),h=e.find(".merchant-field-margin_y input").val(),d=e.find(".merchant-field-label_width input").val(),s=e.find(".merchant-field-label_height input").val(),u=e.find(".merchant-field-background_color input").val(),p=e.find(".merchant-field-text_color input").val(),m=e.find(".merchant-field-shape_radius input").val(),f=e.find(".merchant-field-font_size input").val(),g=e.find(".merchant-field-font_style select").val(),b=e.find(".merchant-field-label_position select").val(),y=w(".merchant-product-labels-preview").find(".merchant-product-labels"),v="merchant-product-labels__regular position-".concat(b," merchant-product-labels__").concat(i),_=(v+="text"===i?" merchant-product-labels__".concat(a):"",/\bmerchant-product-labels__\S+/g),a={top:h+"px",left:"top-left"===b?l+"px":"",right:"top-right"===b?l+"px":""};"text"===i?(a.width=d+"px",a.height=s+"px",a["background-color"]=u,a.color=p,a["font-size"]=f+"px",a["border-radius"]=m+"px",a=_objectSpread(_objectSpread({},a),{normal:{"font-style":"","font-weight":""},italic:{"font-style":"italic","font-weight":""},bold:{"font-style":"","font-weight":"bold"},bold_italic:{"font-style":"italic","font-weight":"bold"}}[g]),h=y.attr("data-currency"),t=t.replace(/{sale}/g,"50%").replace(/{sale_amount}/g,"".concat(h,"50")).replace(/{inventory}/g,"In stock").replace(/{inventory_quantity}/g,19),y.css(a).removeClass(function(e,t){return(t.match(_)||[]).join(" ")}).removeClass("position-top-right position-top-left").addClass(v).find("span").css({width:"",height:""}).text(t.trim())):(a.width="",a.height="",a["background-color"]="",a.color="",a["font-size"]="",a["border-radius"]="",l=(o?n.closest(".merchant-field-label_image_shape_custom").find(".merchant-upload-image img"):r.closest("label").find("img")).clone(),y.css(a).removeClass(function(e,t){return(t.match(_)||[]).join(" ")}).removeClass("position-top-right position-top-left").addClass(v).find("span").css({width:d+"px",height:s+"px"}).html(l),e.find(".merchant-upload-button-drag-drop").toggle(!o)),c.closest(".layout-field").find(".merchant-module-page-setting-field-title").text("top-left"===b?"Margin left":"Margin right")}function e(r){var n="data-previous";w(".merchant-flexible-content-control.product-labels-style .layout .merchant-choices-label_text_shape").each(function(){var a=w(this).find("input");a.each(function(){var e=w(this),t=e.val(),i=null==(i=d.text[t])?void 0:i.disableInShortCode;r?i&&(e.is(":checked")&&(e.attr(n,t).prop("checked",!1),a.filter('input[value="text-shape-1"]').prop("checked",!0),o("text","text-shape-1",a.filter('input[value="text-shape-1"]'))),e.attr("disabled",!0)):(e.attr(n)&&(a.filter('input[value="text-shape-1"]').prop("checked",!1),a.filter('input[value="'.concat(t,'"]')).prop("checked",!0),e.removeAttr(n),o("text",t,a.filter('input[value="'.concat(t,'"]')))),e.attr("disabled",!1))})})}w(document).on("click",".merchant-flexible-content-control.product-labels-style .layout",function(){var e=w(this);e.closest(".merchant-flexible-content-control.product-labels-style").find(".layout").removeClass("active"),e.addClass("active"),i()}),w(document).on("merchant-flexible-content-added",function(e,t){w(".merchant-flexible-content-control.product-labels-style").find(".layout").removeClass("active"),t.addClass("active"),i()}),w(document).on("merchant-product-labels-reload-product-preview",function(e){i()}),w(document).on("change.merchant keyup",function(){i()}),w(document).on("change input change.merchant",".merchant-module-page-setting-box",function(e){w(document).trigger("merchant-product-labels-reload-product-preview")}),w(document).on("click",".merchant-flexible-content-control.product-labels-style .layout",function(e){w(".merchant-flexible-content-control.product-labels-style .layout").removeClass("active"),w(this).addClass("active"),w(document).trigger("merchant-product-labels-reload-product-preview")}),w(document).on("merchant-flexible-content-deleted",function(e,t){t.hasClass("active")&&(w(".merchant-flexible-content-control.product-labels-style .merchant-flexible-content .layout:first-child").addClass("active"),w(document).trigger("merchant-product-labels-reload-product-preview"))}),w(".merchant-flexible-content-control.product-labels-style .merchant-flexible-content .layout:first-child").addClass("active"),w(document).trigger("merchant-product-labels-reload-product-preview"),w(document).on("change",".merchant-field-label_type input",function(){var e=w(this).val(),t=w(this).closest(".layout").find("text"===e?".merchant-choices-label_text_shape input:checked":".merchant-choices-label_image_shape input:checked").val();o(e,t,w(this))}),w(document).on("change",".merchant-choices-label_text_shape input",function(){var e=w(this).closest(".layout").find(".merchant-choices-label_text_shape input:checked").val();o("text",e,w(this))}),w(document).on("change",".merchant-choices-label_image_shape input",function(){var e=w(this).closest(".layout").find(".merchant-choices-label_image_shape input:checked").val();o("image",e,w(this))}),w(document).on("save.merchant",function(e,t){"product-labels"===t&&w(".merchant-choices-label_text_shape input").each(function(){w(this).removeAttr("data-previous")})}),e(w(".merchant-field-use_shortcode input").is(":checked")),w(document).on("change",".merchant-field-use_shortcode input",function(){e(w(this).is(":checked"))});var o=function(e,t,i){var a=i.closest(".layout"),r=a.find(".merchant-field-label_type input:checked").val();if("image"===r&&(a.find('.merchant-field-label_image_shape_custom input[type="hidden"]').val()&&i.closest(".merchant-choices-label_image_shape").length))return;for(var n=0,o=Object.entries({"merchant-field-label_width":"width","merchant-field-label_height":"height","merchant-field-shape_radius":"borderRadius","merchant-field-margin_x":"marginX","merchant-field-margin_y":"marginY"});n<o.length;n++){var l=_slicedToArray(o[n],2),c=l[0],h=null==(h=d[e][t])?void 0:h[l[1]];!h&&0!==h||a.find(".".concat(c," input")).val(h).attr("value",h).trigger("input").trigger("change")}}})(jQuery);
     1function _typeof(e){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function _slicedToArray(e,t){return _arrayWithHoles(e)||_iterableToArrayLimit(e,t)||_unsupportedIterableToArray(e,t)||_nonIterableRest()}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _unsupportedIterableToArray(e,t){var i;if(e)return"string"==typeof e?_arrayLikeToArray(e,t):"Map"===(i="Object"===(i={}.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:i)||"Set"===i?Array.from(e):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?_arrayLikeToArray(e,t):void 0}function _arrayLikeToArray(e,t){(null==t||t>e.length)&&(t=e.length);for(var i=0,a=Array(t);i<t;i++)a[i]=e[i];return a}function _iterableToArrayLimit(e,t){var i=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=i){var a,r,n,o,l=[],c=!0,h=!1;try{if(n=(i=i.call(e)).next,0===t){if(Object(i)!==i)return;c=!1}else for(;!(c=(a=n.call(i)).done)&&(l.push(a.value),l.length!==t);c=!0);}catch(e){h=!0,r=e}finally{try{if(!c&&null!=i.return&&(o=i.return(),Object(o)!==o))return}finally{if(h)throw r}}return l}}function _arrayWithHoles(e){if(Array.isArray(e))return e}function ownKeys(t,e){var i,a=Object.keys(t);return Object.getOwnPropertySymbols&&(i=Object.getOwnPropertySymbols(t),e&&(i=i.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),a.push.apply(a,i)),a}function _objectSpread(t){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?ownKeys(Object(i),!0).forEach(function(e){_defineProperty(t,e,i[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):ownKeys(Object(i)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))})}return t}function _defineProperty(e,t,i){return(t=_toPropertyKey(t))in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}function _toPropertyKey(e){e=_toPrimitive(e,"string");return"symbol"==_typeof(e)?e:e+""}function _toPrimitive(e,t){if("object"!=_typeof(e)||!e)return e;var i=e[Symbol.toPrimitive];if(void 0===i)return("string"===t?String:Number)(e);i=i.call(e,t||"default");if("object"!=_typeof(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}(_=>{var s={text:{"text-shape-1":{width:100,height:32,borderRadius:5,marginX:10,marginY:10},"text-shape-2":{width:100,height:32,borderRadius:5,marginX:10,marginY:10},"text-shape-3":{width:125,height:32,borderRadius:5,marginX:10,marginY:10},"text-shape-4":{width:125,height:32,borderRadius:5,marginX:10,marginY:10},"text-shape-5":{width:140,height:32,borderRadius:0,marginX:25,marginY:10,disableInShortCode:!0},"text-shape-6":{width:140,height:32,borderRadius:0,marginX:25,marginY:10,disableInShortCode:!0},"text-shape-7":{width:90,height:90,borderRadius:5,marginX:10,marginY:10},"text-shape-8":{width:100,height:100,borderRadius:50,marginX:10,marginY:10}},image:{"image-shape-1":{width:45,height:45},"image-shape-2":{width:45,height:25},"image-shape-3":{width:45,height:15},"image-shape-4":{width:45,height:25},"image-shape-5":{width:45,height:15},"image-shape-6":{width:38,height:45},"image-shape-7":{width:45,height:30},"image-shape-8":{width:45,height:15},"image-shape-9":{width:45,height:27},"image-shape-10":{width:38,height:45},"image-shape-11":{width:45,height:12},"image-shape-12":{width:45,height:15},"image-shape-13":{width:45,height:32},"image-shape-14":{width:42,height:45},"image-shape-15":{width:45,height:10},"image-shape-16":{width:45,height:32},"image-shape-17":{width:45,height:14},"image-shape-18":{width:38,height:45},"image-shape-19":{width:45,height:30},"image-shape-20":{width:45,height:28},"image-shape-21":{width:38,height:45},"image-shape-22":{width:45,height:45},"image-shape-23":{width:45,height:35},"image-shape-24":{width:45,height:45}}};function i(){var e=_(".merchant-flexible-content-control.product-labels-style").find(".layout.active"),t=e.find(".merchant-field-label input").val(),i=e.find(".merchant-field-label_type input:checked").val(),a=e.find(".merchant-choices-label_text_shape input:checked").val(),r=e.find(".merchant-choices-label_image_shape input:checked"),n=(r.val(),e.find('.merchant-field-label_image_shape_custom input[type="hidden"]')),o=n.val(),l=e.find(".merchant-field-position_x input").val()||10,c=e.find(".merchant-field-position_y input").val()||10,h=e.find(".merchant-field-position_anchor select").val()||"top-left",s=e.find(".merchant-field-label_width input").val(),d=e.find(".merchant-field-label_height input").val(),p=e.find(".merchant-field-background_color input").val(),u=e.find(".merchant-field-text_color input").val(),m=e.find(".merchant-field-shape_radius input").val(),f=e.find(".merchant-field-font_size input").val(),g=e.find(".merchant-field-font_style select").val(),b=_(".merchant-product-labels-preview").find(".merchant-product-labels"),y="merchant-product-labels__regular position-absolute merchant-product-labels__".concat(i),v=(y+="text"===i?" merchant-product-labels__".concat(a):"",/\bmerchant-product-labels__\S+/g),c={top:c+"px"};"top-right"===h?(c.right=l+"px",c.left=""):(c.left=l+"px",c.right=""),"text"===i?(c.width=s+"px",c.height=d+"px",c["background-color"]=p,c.color=u,c["font-size"]=f+"px",c["border-radius"]=m+"px",c=_objectSpread(_objectSpread({},c),{normal:{"font-style":"","font-weight":""},italic:{"font-style":"italic","font-weight":""},bold:{"font-style":"","font-weight":"bold"},bold_italic:{"font-style":"italic","font-weight":"bold"}}[g]),"text-shape-5"===a||"text-shape-6"===a?"top-right"===h?"text-shape-5"===a?(c.transform="rotate(45deg) translate(50%, 50%)",c["transform-origin"]="right"):"text-shape-6"===a&&(c.transform="rotate(45deg) translate(50%, 25%)",c["transform-origin"]="right"):"text-shape-5"===a?(c.transform="rotate(-45deg) translate(-50%, 50%)",c["transform-origin"]="left"):"text-shape-6"===a&&(c.transform="rotate(-45deg) translate(-50%, 25%)",c["transform-origin"]="left"):(c.transform="none",c["transform-origin"]="none"),l=b.attr("data-currency"),t=t.replace(/{sale}/g,"50%").replace(/{sale_amount}/g,"".concat(l,"50")).replace(/{inventory}/g,"In stock").replace(/{inventory_quantity}/g,19),b.css(c).removeClass(function(e,t){return(t.match(v)||[]).join(" ")}).removeClass("position-top-right position-top-left position-absolute").addClass(y).find("span").css({width:"",height:""}).text(t.trim())):(c.width="",c.height="",c["background-color"]="",c.color="",c["font-size"]="",c["border-radius"]="",c.transform="none",c["transform-origin"]="none",i=(o?n.closest(".merchant-field-label_image_shape_custom").find(".merchant-upload-image img"):r.closest("label").find("img")).clone(),b.css(c).removeClass(function(e,t){return(t.match(v)||[]).join(" ")}).removeClass("position-top-right position-top-left position-absolute").addClass(y).find("span").css({width:s+"px",height:d+"px"}).html(i),e.find(".merchant-upload-button-drag-drop").toggle(!o))}function e(r){var n="data-previous";_(".merchant-flexible-content-control.product-labels-style .layout .merchant-choices-label_text_shape").each(function(){var a=_(this).find("input");a.each(function(){var e=_(this),t=e.val(),i=null==(i=s.text[t])?void 0:i.disableInShortCode;r?i&&(e.is(":checked")&&(e.attr(n,t).prop("checked",!1),a.filter('input[value="text-shape-1"]').prop("checked",!0),o("text","text-shape-1",a.filter('input[value="text-shape-1"]'))),e.attr("disabled",!0)):(e.attr(n)&&(a.filter('input[value="text-shape-1"]').prop("checked",!1),a.filter('input[value="'.concat(t,'"]')).prop("checked",!0),e.removeAttr(n),o("text",t,a.filter('input[value="'.concat(t,'"]')))),e.attr("disabled",!1))})})}_(document).on("click",".merchant-flexible-content-control.product-labels-style .layout",function(){var e=_(this);e.closest(".merchant-flexible-content-control.product-labels-style").find(".layout").removeClass("active"),e.addClass("active"),i()}),_(document).on("merchant-flexible-content-added",function(e,t){_(".merchant-flexible-content-control.product-labels-style").find(".layout").removeClass("active"),t.addClass("active"),i()}),_(document).on("merchant-product-labels-reload-product-preview",function(e){i()}),_(document).on("change.merchant keyup change",function(){i()}),_(document).on("change input change.merchant",".merchant-module-page-setting-box",function(e){_(document).trigger("merchant-product-labels-reload-product-preview")}),_(document).on("click",".merchant-flexible-content-control.product-labels-style .layout",function(e){_(".merchant-flexible-content-control.product-labels-style .layout").removeClass("active"),_(this).addClass("active"),_(document).trigger("merchant-product-labels-reload-product-preview")}),_(document).on("merchant-flexible-content-deleted",function(e,t){t.hasClass("active")&&(_(".merchant-flexible-content-control.product-labels-style .merchant-flexible-content .layout:first-child").addClass("active"),_(document).trigger("merchant-product-labels-reload-product-preview"))}),_(".merchant-flexible-content-control.product-labels-style .merchant-flexible-content .layout:first-child").addClass("active"),_(document).trigger("merchant-product-labels-reload-product-preview"),_(document).on("change",".merchant-field-label_type input",function(){var e=_(this).val(),t=_(this).closest(".layout").find("text"===e?".merchant-choices-label_text_shape input:checked":".merchant-choices-label_image_shape input:checked").val();o(e,t,_(this))}),_(document).on("change",".merchant-choices-label_text_shape input",function(){var e=_(this).closest(".layout").find(".merchant-choices-label_text_shape input:checked").val();o("text",e,_(this))}),_(document).on("change",".merchant-choices-label_image_shape input",function(){var e=_(this).closest(".layout").find(".merchant-choices-label_image_shape input:checked").val();o("image",e,_(this))}),_(document).on("save.merchant",function(e,t){"product-labels"===t&&_(".merchant-choices-label_text_shape input").each(function(){_(this).removeAttr("data-previous")})}),e(_(".merchant-field-use_shortcode input").is(":checked")),_(document).on("change",".merchant-field-use_shortcode input",function(){e(_(this).is(":checked"))});var o=function(e,t,i){var a=i.closest(".layout"),r=a.find(".merchant-field-label_type input:checked").val();if("image"===r&&(a.find('.merchant-field-label_image_shape_custom input[type="hidden"]').val()&&i.closest(".merchant-choices-label_image_shape").length))return;for(var n=0,o=Object.entries({"merchant-field-label_width":"width","merchant-field-label_height":"height","merchant-field-shape_radius":"borderRadius","merchant-field-margin_x":"marginX","merchant-field-margin_y":"marginY"});n<o.length;n++){var l=_slicedToArray(o[n],2),c=l[0],h=null==(h=s[e][t])?void 0:h[l[1]];!h&&0!==h||a.find(".".concat(c," input")).val(h).attr("value",h).trigger("input").trigger("change")}}})(jQuery);
  • merchant/trunk/inc/modules/buy-now/admin/options.php

    r3128843 r3403526  
    8080
    8181        array(
     82            'id'        => 'button-size',
     83            'type'      => 'select',
     84            'title'     => esc_html__( 'Button size', 'merchant' ),
     85            'options'   => array(
     86                'small'  => esc_html__( 'Small', 'merchant' ),
     87                'medium' => esc_html__( 'Medium', 'merchant' ),
     88                'large'  => esc_html__( 'Large', 'merchant' ),
     89                'custom' => esc_html__( 'Custom', 'merchant' ),
     90            ),
     91            'default'   => 'medium',
     92            'condition' => array( 'customize-button', '==', '1' ),
     93        ),
     94
     95        array(
    8296            'id'      => 'font-size',
    8397            'type'    => 'range',
     
    92106
    93107        array(
     108            'id'      => 'margin-top',
     109            'type'    => 'range',
     110            'title'   => esc_html__( 'Margin top', 'merchant' ),
     111            'min'     => 0,
     112            'max'     => 100,
     113            'step'    => 1,
     114            'default' => 10,
     115            'unit'    => 'px',
     116            'conditions' => array(
     117                'terms'    => array(
     118                    array(
     119                        'field'    => 'customize-button',
     120                        'operator' => '===',
     121                        'value'    => true,
     122                    ),
     123                ),
     124            ),
     125        ),
     126
     127        array(
     128            'id'      => 'margin-bottom',
     129            'type'    => 'range',
     130            'title'   => esc_html__( 'Margin bottom', 'merchant' ),
     131            'min'     => 0,
     132            'max'     => 100,
     133            'step'    => 1,
     134            'default' => 10,
     135            'unit'    => 'px',
     136            'conditions' => array(
     137                'terms'    => array(
     138                    array(
     139                        'field'    => 'customize-button',
     140                        'operator' => '===',
     141                        'value'    => true,
     142                    ),
     143                ),
     144            ),
     145        ),
     146
     147        array(
    94148            'id'      => 'padding_top_bottom',
    95149            'type'    => 'range',
     
    100154            'default' => 12,
    101155            'unit'    => 'px',
    102             'condition' => array( 'customize-button', '==', '1' ),
     156            'conditions' => array(
     157                'terms'    => array(
     158                    array(
     159                        'field'    => 'customize-button',
     160                        'operator' => '===',
     161                        'value'    => true,
     162                    ),
     163                ),
     164            ),
    103165        ),
    104166
     
    112174            'default' => 24,
    113175            'unit'    => 'px',
    114             'condition' => array( 'customize-button', '==', '1' ),
     176            'conditions' => array(
     177                'terms'    => array(
     178                    array(
     179                        'field'    => 'customize-button',
     180                        'operator' => '===',
     181                        'value'    => true,
     182                    ),
     183                ),
     184            ),
    115185        ),
    116186
  • merchant/trunk/inc/modules/buy-now/class-buy-now.php

    r3389952 r3403526  
    143143            wp_enqueue_style( 'merchant-' . self::MODULE_ID, MERCHANT_URI . 'assets/css/modules/' . self::MODULE_ID . '/buy-now.min.css', array(), MERCHANT_VERSION );
    144144            wp_enqueue_style( 'merchant-admin-' . self::MODULE_ID, MERCHANT_URI . 'assets/css/modules/' . self::MODULE_ID . '/admin/preview.min.css', array(), MERCHANT_VERSION );
     145            wp_enqueue_script('merchant-admin-' . self::MODULE_ID, MERCHANT_URI . 'assets/js/modules/' . self::MODULE_ID . '/admin/preview.min.js', array( 'jquery' ), MERCHANT_VERSION, true );
    145146        }
    146147    }
     
    182183            // Display Customizer.
    183184            $preview->set_class( 'customize-button', '.merchant-buy-now-button', array(), 'merchant-custom-buy-now-button' );
     185
     186            // Margin Top.
     187            $preview->set_css( 'margin-top', '.merchant-buy-now-button', '--mrc-buy-now-margin-top', 'px' );
     188
     189            // Margin Bottom.
     190            $preview->set_css( 'margin-bottom', '.merchant-buy-now-button', '--mrc-buy-now-margin-bottom', 'px' );
     191
     192            // Padding CSS variables.
     193            $preview->set_css( 'padding_top_bottom', '.merchant-buy-now-button', '--mrc-buy-now-padding-top-bottom', 'px' );
     194            $preview->set_css( 'padding_left_right', '.merchant-buy-now-button', '--mrc-buy-now-padding-left-right', 'px' );
    184195        }
    185196
     
    493504        $css .= Merchant_Custom_CSS::get_variable_css( self::MODULE_ID, 'font-size', 16, '.merchant-buy-now-button', '--mrc-buy-now-font-size', 'px' );
    494505
    495         // Padding Top/Bottom.
     506        // Padding CSS variables (always use custom padding values)
    496507        $css .= Merchant_Custom_CSS::get_variable_css( self::MODULE_ID, 'padding_top_bottom', 13, '.merchant-buy-now-button', '--mrc-buy-now-padding-top-bottom', 'px' );
    497508
    498509        // Padding Left/Right.
    499510        $css .= Merchant_Custom_CSS::get_variable_css( self::MODULE_ID, 'padding_left_right', 24, '.merchant-buy-now-button', '--mrc-buy-now-padding-left-right', 'px' );
     511
     512        // Margin Top.
     513        $css .= Merchant_Custom_CSS::get_variable_css( self::MODULE_ID, 'margin-top', 10, '.merchant-buy-now-button', '--mrc-buy-now-margin-top', 'px' );
     514
     515        // Margin Bottom.
     516        $css .= Merchant_Custom_CSS::get_variable_css( self::MODULE_ID, 'margin-bottom', 10, '.merchant-buy-now-button', '--mrc-buy-now-margin-bottom', 'px' );
    500517
    501518        // Border radius.
  • merchant/trunk/inc/modules/product-labels/admin/options.php

    r3379075 r3403526  
    77    exit; // Exit if accessed directly
    88}
    9 
    10 $position       = Merchant_Admin_Options::get( Merchant_Product_Labels::MODULE_ID, 'label_position',  'top-left' );
    11 $margin_y_label = ( $position === 'top-left' || $position === 'top-right' ) ? esc_html__( 'Margin Top', 'merchant' ) : esc_html__( 'Margin Bottom', 'merchant' );
    12 $margin_x_label = ( $position === 'top-left' || $position === 'bottom-left' ) ? esc_html__( 'Margin Left', 'merchant' ) : esc_html__( 'Margin Right', 'merchant' );
    139
    1410$text_shapes  = array();
     
    148144
    149145                        array(
    150                             'id'      => 'label_position',
     146                            'id'      => 'position_anchor',
    151147                            'type'    => 'select',
    152                             'title'   => esc_html__( 'Position', 'merchant' ),
     148                            'title'   => esc_html__( 'Anchor Point', 'merchant' ),
     149                            'desc'    => esc_html__( 'Which point of the label to use as the anchor for positioning.', 'merchant' ),
    153150                            'options' => array(
    154                                 'top-left'  => esc_html__( 'Top left', 'merchant' ),
    155                                 'top-right' => esc_html__( 'Top right', 'merchant' ),
     151                                'top-left'  => esc_html__( 'Top Left', 'merchant' ),
     152                                'top-right' => esc_html__( 'Top Right', 'merchant' ),
    156153                            ),
    157154                            'default' => 'top-left',
     
    159156
    160157                        array(
    161                             'id'      => 'margin_y',
     158                            'id'      => 'position_x',
    162159                            'type'    => 'range',
    163                             'title'   => $margin_y_label,
    164                             'min'     => 0,
    165                             'max'     => 250,
     160                            'title'   => esc_html__( 'Horizontal Position (X)', 'merchant' ),
     161                            'desc'    => esc_html__( 'Horizontal position from left edge.', 'merchant' ),
     162                            'min'     => -300,
     163                            'max'     => 300,
    166164                            'step'    => 1,
    167                             'default' => 10,
     165                            'default' => 0,
    168166                            'unit'    => 'px',
    169167                        ),
    170168
    171                         array(
    172                             'id'      => 'margin_x',
    173                             'type'    => 'range',
    174                             'title'   => $margin_x_label,
    175                             'min'     => 0,
    176                             'max'     => 250,
    177                             'step'    => 1,
    178                             'default' => 10,
    179                             'unit'    => 'px',
    180                         ),
    181 
    182                         array(
     169                    array(
     170                        'id'      => 'position_y',
     171                        'type'    => 'range',
     172                        'title'   => esc_html__( 'Vertical Position (Y)', 'merchant' ),
     173                        'desc'    => esc_html__( 'Vertical position from top edge.', 'merchant' ),
     174                        'min'     => -300,
     175                        'max'     => 300,
     176                        'step'    => 1,
     177                        'default' => 0,
     178                        'unit'    => 'px',
     179                    ),
     180
     181                    array(
    183182                            'id'        => 'label_width',
    184183                            'type'      => 'range',
     
    525524                ),
    526525            ),
     526        ),
     527        array(
     528            'id'      => 'multiple_labels',
     529            'type'    => 'switcher',
     530            'title'   => __( 'Use multiple labels', 'merchant' ),
     531            'desc'   => __( 'Enable this to display multiple labels assigned to the product when multiple labels are available.', 'merchant' ),
     532            'default' => 0,
    527533        ),
    528534    ),
  • merchant/trunk/inc/modules/product-labels/class-product-labels.php

    r3379075 r3403526  
    677677     */
    678678    public function get_labels( $product, $context = 'both' ) {
    679         $settings            = $this->get_module_settings();
    680         $product_labels_html = '';
    681 
     679        $settings = $this->get_module_settings();
    682680        $is_shortcode = $settings['use_shortcode'] ?? false;
     681        $multiple_labels = isset( $settings['multiple_labels'] ) ? $settings['multiple_labels'] : false;
    683682
    684683        if ( isset( $settings['labels'] ) ) {
    685684            $labels = $settings['labels'];
     685            $matching_labels = array();
     686
     687            // Collect all matching labels
    686688            foreach ( $labels as $label ) {
    687689                if ( isset( $label['campaign_status'] ) && $label['campaign_status'] === 'inactive' ) {
     
    689691                }
    690692
    691                 if ( ! isset( $label['show_pages'] ) ) {
    692                     $label['show_pages'] = array( 'homepage', 'single', 'archive' );
    693                 }
    694 
    695                 if ( ! isset( $label['show_devices'] ) ) {
    696                     $label['show_devices'] = array( 'desktop', 'mobile' );
    697                 }
     693                if ( ! isset( $label['show_pages'] ) ) {
     694                    $label['show_pages'] = array( 'homepage', 'single', 'archive' );
     695                }
     696
     697                if ( ! isset( $label['show_devices'] ) ) {
     698                    $label['show_devices'] = array( 'desktop', 'mobile' );
     699                }
    698700
    699701                if ( ! $this->show_label( $label, $context ) ) {
     
    707709
    708710                $display_rule = $label['display_rules'] ?? 'products_on_sale';
     711                $should_display = false;
     712
    709713                switch ( $display_rule ) {
    710714                    case 'featured_products':
    711                         if ( $this->is_featured( $product ) ) {
    712                             $product_labels_html .= $this->label( $label );
    713                         }
     715                        $should_display = $this->is_featured( $product );
    714716                        break;
    715717
    716718                    case 'products_on_sale':
    717                         if ( $this->is_on_sale( $product ) ) {
    718                             $product_labels_html .= $this->label( $label );
    719                         }
     719                        $should_display = $this->is_on_sale( $product );
    720720                        break;
    721721
    722                     case 'by_category':
     722                    case 'by_category':
    723723                    case 'by_tags':
    724724                    case 'by_brands':
    725                         $taxonomy = $display_rule === 'by_category' ? 'product_cat' : ( $display_rule === 'by_tags' ? 'product_tag' : 'product_brand' );
    726                         $slugs    = $display_rule === 'by_category' ? ( $label['product_cats'] ?? array() ) : ( $display_rule === 'by_tags' ? ( $label['product_tags'] ?? array() ) : ( $label['product_brands'] ?? array() ) );
    727                         foreach ( $slugs as $slug ) {
    728                             if ( has_term( $slug, $taxonomy, $product->get_id() ) ) {
    729                                 $product_labels_html .= $this->label( $label );
    730                                 break;
    731                             }
    732                         }
     725                        // Map display rules to their corresponding taxonomy and slug array
     726                        $taxonomy_map = array(
     727                                'by_category' => array(
     728                                        'taxonomy' => 'product_cat',
     729                                        'slugs'    => $label['product_cats'] ?? array(),
     730                                ),
     731                                'by_tags'     => array(
     732                                        'taxonomy' => 'product_tag',
     733                                        'slugs'    => $label['product_tags'] ?? array(),
     734                                ),
     735                                'by_brands'   => array(
     736                                        'taxonomy' => 'product_brand',
     737                                        'slugs'    => $label['product_brands'] ?? array(),
     738                                ),
     739                        );
     740
     741                        $taxonomy = $taxonomy_map[ $display_rule ]['taxonomy'];
     742                        $slugs    = $taxonomy_map[ $display_rule ]['slugs'];
     743
     744                        foreach ( $slugs as $slug ) {
     745                            if ( has_term( $slug, $taxonomy, $product->get_id() ) ) {
     746                                $should_display = true;
     747                                break;
     748                            }
     749                        }
     750                        break;
     751
     752                    case 'out_of_stock':
     753                        $should_display = $this->is_out_of_stock( $product );
    733754                        break;
    734755
    735                     case 'out_of_stock':
    736                         if ( $this->is_out_of_stock( $product ) ) {
    737                             $product_labels_html .= $this->label( $label );
    738                         }
     756                    case 'pre-order':
     757                        $should_display = $this->is_pre_order( $product );
    739758                        break;
    740759
    741                     case 'pre-order':
    742                         if ( $this->is_pre_order( $product ) ) {
    743                             $product_labels_html .= $this->label( $label );
    744                         }
    745                         break;
    746 
    747760                    case 'new_products':
    748                         if ( isset( $label['new_products_days'] ) && $this->is_new( $product, $label['new_products_days'] ) ) {
    749                             $product_labels_html .= $this->label( $label );
     761                        if ( isset( $label['new_products_days'] ) ) {
     762                            $should_display = $this->is_new( $product, $label['new_products_days'] );
    750763                        }
    751764                        break;
     
    755768                        $product_ids = ! is_array( $product_ids ) ? explode( ',', $product_ids ) : $product_ids;
    756769                        $product_ids = array_map( 'intval', $product_ids );
    757 
    758                         if ( in_array( $product->get_id(), $product_ids, true ) ) {
    759                             $product_labels_html .= $this->label( $label );
    760                         }
     770                        $should_display = in_array( $product->get_id(), $product_ids, true );
    761771                        break;
    762772
    763773                    case 'all_products':
    764                         $product_labels_html .= $this->label( $label );
     774                        $should_display = true;
    765775                        break;
    766776                }
    767777
    768                 if ( $product_labels_html ) {
     778                if ( $should_display ) {
     779                    // Process sale data for this label
    769780                    $sale_data = $this->is_on_sale( $product ) ? $this->get_product_sale_data( $product, $label ) : array();
    770 
    771                     $sale_amount     = ! empty( $sale_data['amount'] ) ? wc_price( $sale_data['amount'] ) : '';
     781                    $sale_amount     = ! empty( $sale_data['amount'] ) ? wc_price( $sale_data['amount'] ) : '';
    772782                    $sale_percentage = ! empty( $sale_data['percentage'] ) ? $sale_data['percentage'] . '%' : '';
    773 
    774                     $inventory     = $product->is_in_stock() ? esc_html__( 'In stock', 'merchant' ) : esc_html__( 'Sold out', 'merchant' );
     783                    $inventory     = $product->is_in_stock() ? esc_html__( 'In stock', 'merchant' ) : esc_html__( 'Sold out', 'merchant' );
    775784                    $inventory_qty = $product->get_stock_quantity();
    776785
    777                     // Replace {shortcodes} by real values.
    778                     $product_labels_html = str_replace(
    779                         array(
    780                             '{sale}',
    781                             '{sale_amount}',
    782                             '{inventory}',
    783                             '{inventory_quantity}',
    784                         ),
     786                    // Get label HTML
     787                    $label_html = $this->label( $label );
     788
     789                    // Replace {shortcodes} by real values for this label
     790                    $label_html = str_replace(
     791                        array(
     792                            '{sale}',
     793                            '{sale_amount}',
     794                            '{inventory}',
     795                            '{inventory_quantity}',
     796                        ),
    785797                        array(
    786798                            $sale_percentage,
     
    788800                            $inventory,
    789801                            $inventory_qty,
    790                         ),
    791                         $product_labels_html
    792                     );
    793 
    794                     $label_type     = $label['label_type'] ?? 'text';
    795                     $label_position = $label['label_position'] ?? 'top-left';
    796 
    797                     $styles = $this->get_shape_based_styles( $label );
    798 
    799                     $device_visibility_classes = '';
    800 
    801                     if ( isset( $label['show_devices'] ) ) {
    802                         foreach ( $label['show_devices'] as $device ) {
    803                             $device_visibility_classes .= ' show-on-' . $device;
    804                         }
     802                        ),
     803                        $label_html
     804                    );
     805
     806                    $matching_labels[] = array(
     807                        'label'      => $label,
     808                        'html'       => $label_html,
     809                    );
     810
     811                    // If multiple labels is disabled, return after first match (backward compatibility)
     812                    if ( ! $multiple_labels ) {
     813                        break;
    805814                    }
    806 
    807                     $classes  = 'merchant-product-labels';
    808                     $classes .= ' merchant-product-labels__' . ( ( $is_shortcode && $context === 'single' ) ? 'shortcode' : 'regular' );
    809                     $classes .= ' position-' . $label_position;
    810                     $classes .= ' merchant-product-labels__' . $label_type;
    811                     $classes .= $label_type === 'text' ? ' merchant-product-labels__' . $label['label_text_shape'] ?? 'text-shape-1' : '';
    812                     $classes .= $device_visibility_classes;
    813 
    814                     return '<div class="' . esc_attr( $classes ) . '" style="' . merchant_array_to_css( $styles ) . '">' . $product_labels_html . '</div>';
    815                 }
    816             }
     815                }
     816            }
     817
     818            // If no matching labels, return empty
     819            if ( empty( $matching_labels ) ) {
     820                return '';
     821            }
     822
     823            // If single label mode or only one label, use old structure for backward compatibility
     824            if ( ! $multiple_labels || count( $matching_labels ) === 1 ) {
     825                $label_data = $matching_labels[0];
     826                $label = $label_data['label'];
     827                $label_html = $label_data['html'];
     828
     829                $label_type = $label['label_type'] ?? 'text';
     830
     831                $styles = $this->get_shape_based_styles( $label );
     832
     833                $device_visibility_classes = '';
     834                if ( isset( $label['show_devices'] ) ) {
     835                    foreach ( $label['show_devices'] as $device ) {
     836                        $device_visibility_classes .= ' show-on-' . $device;
     837                    }
     838                }
     839
     840                $classes  = 'merchant-product-labels';
     841                $classes .= ' merchant-product-labels__' . ( ( $is_shortcode && $context === 'single' ) ? 'shortcode' : 'regular' );
     842                $classes .= ' position-absolute';
     843                $classes .= ' merchant-product-labels__' . $label_type;
     844                $classes .= $label_type === 'text' ? ' merchant-product-labels__' . ( $label['label_text_shape'] ?? 'text-shape-1' ) : '';
     845                $classes .= $device_visibility_classes;
     846
     847                return '<div class="' . esc_attr( $classes ) . '" style="' . merchant_array_to_css( $styles ) . '">' . $label_html . '</div>';
     848            }
     849
     850            // Multiple labels mode - position each label individually
     851            $output = '';
     852            $device_visibility_classes = '';
     853           
     854            foreach ( $matching_labels as $label_data ) {
     855                $label = $label_data['label'];
     856                $label_html = $label_data['html'];
     857
     858                $label_type = $label['label_type'] ?? 'text';
     859                $label_shape_class = '';
     860                if ( $label_type === 'text' ) {
     861                    $label_shape_class = ' merchant-product-labels__' . ( $label['label_text_shape'] ?? 'text-shape-1' );
     862                }
     863
     864                // Get device visibility classes from first label (for main container)
     865                if ( empty( $device_visibility_classes ) && isset( $label['show_devices'] ) ) {
     866                    foreach ( $label['show_devices'] as $device ) {
     867                        $device_visibility_classes .= ' show-on-' . $device;
     868                    }
     869                }
     870
     871                // Get all styles for this label (including positioning)
     872                $label_styles = $this->get_shape_based_styles( $label );
     873
     874                $label_classes = 'merchant-product-labels__label-wrapper';
     875                $label_classes .= ' merchant-product-labels__' . $label_type;
     876                $label_classes .= $label_shape_class;
     877                $label_classes .= $label['position_anchor'] === 'top-right' ? ' position-top-right' : ' position-top-left';
     878
     879                $output .= '<div class="' . esc_attr( $label_classes ) . '" style="' . merchant_array_to_css( $label_styles ) . '">' . $label_html . '</div>';
     880            }
     881
     882            // Wrap all labels in main container
     883            $main_classes = 'merchant-product-labels';
     884            $main_classes .= ' merchant-product-labels__' . ( ( $is_shortcode && $context === 'single' ) ? 'shortcode' : 'regular' );
     885            $main_classes .= ' merchant-product-labels--multiple';
     886            $main_classes .= $device_visibility_classes;
     887
     888            return '<div class="' . esc_attr( $main_classes ) . '">' . $output . '</div>';
    817889        } else {
    818890            // legacy mode support.
     
    831903     */
    832904    public function get_shape_based_styles( $label ) {
    833         $styles           = array();
    834 
    835         if ( ! is_array( $label ) || empty( $label ) ) {
    836             return $styles;
    837         }
    838 
    839         $label_position = $label['label_position'] ?? 'top-left';
    840         $label_type     = $label['label_type'] ?? 'text';
    841         $label_shape    = $label['label_text_shape'] ?? 'text-shape-1';
     905        $styles = array();
     906
     907        if ( ! is_array( $label ) || empty( $label ) ) {
     908            return $styles;
     909        }
     910
     911        $label_type  = $label['label_type'] ?? 'text';
     912        $label_shape = $label['label_text_shape'] ?? 'text-shape-1';
    842913
    843914        $styles['margin']  = 0;
     
    851922            $font_style = $label['font_style'] ?? 'normal';
    852923
    853             if ( strpos( $font_style, 'bold' ) !== false ) {
     924            if ( strpos( $font_style, 'bold' ) !== false ) {
    854925                $styles['font-weight'] = 'bold';
    855926            }
     
    864935        }
    865936
    866         $styles['top']= ( $label['margin_y'] ?? 10 ) . 'px';
    867         $styles[ ( $label_position === 'top-left' ) ? 'left' : 'right' ] = ( $label['margin_x'] ?? 10 ) . 'px';
    868 
    869         return $styles;
    870     }
     937        // Always use absolute positioning
     938        $x = $label['position_x'] ?? 10;
     939        $y = $label['position_y'] ?? 10;
     940        $x_unit = $label['position_x_unit'] ?? 'px';
     941        $anchor = $label['position_anchor'] ?? 'top-left';
     942
     943        $styles['top'] = $y . 'px';
     944
     945        // Handle anchor point - use left or right based on anchor
     946        if ( $anchor === 'top-right' ) {
     947            $styles['right'] = $x . $x_unit;
     948        } else {
     949            // top-left (default)
     950            $styles['left'] = $x . $x_unit;
     951        }
     952
     953        // Apply rotation for shapes 5 and 6 based on anchor point
     954        if ( $label_type === 'text' && in_array( $label_shape, array( 'text-shape-5', 'text-shape-6' ), true ) ) {
     955            $is_top_right = ( $anchor === 'top-right' );
     956
     957            if ( $label_shape === 'text-shape-5' ) {
     958                $rotation = $is_top_right ? '45deg' : '-45deg';
     959                $translateX = $is_top_right ? '50%' : '-50%';
     960                $translateY = '50%';
     961                $origin = $is_top_right ? 'right' : 'left';
     962            } else { // text-shape-6
     963                $rotation = $is_top_right ? '45deg' : '-45deg';
     964                $translateX = $is_top_right ? '50%' : '-50%';
     965                $translateY = '25%';
     966                $origin = $is_top_right ? 'right' : 'left';
     967            }
     968
     969            $styles['transform'] = "rotate({$rotation}) translate({$translateX}, {$translateY})";
     970            $styles['transform-origin'] = $origin;
     971        }
     972
     973
     974        return $styles;
     975    }
    871976
    872977    /**
  • merchant/trunk/languages/merchant.pot

    r3389952 r3403526  
    99"Language-Team: aThemes <[email protected]>\n"
    1010"Last-Translator: aThemes <[email protected]>\n"
    11 "POT-Creation-Date: 2025-11-04 19:59+0000\n"
     11"POT-Creation-Date: 2025-11-26 15:45+0000\n"
    1212"Report-Msgid-Bugs-To: https://athemes.com/contact/\n"
    1313"X-Poedit-Basepath: ..\n"
     
    1818"Plural-Forms: nplurals=2; plural=(n != 1);\n"
    1919
    20 #: admin/class-merchant-admin-loader.php:144, inc/class-merchant-loader.php:249, admin/classes/class-merchant-admin-menu.php:281, admin/classes/class-merchant-admin-menu.php:282, admin/classes/class-merchant-admin-menu.php:372, admin/classes/class-merchant-admin-menu.php:375, inc/modules/address-autocomplete/admin/options.php:27, inc/modules/agree-to-terms-checkbox/admin/options.php:28, inc/modules/auto-external-links/admin/options.php:16, inc/modules/buy-now/admin/options.php:14, inc/modules/cart-count-favicon/admin/options.php:16, inc/modules/cart-reserved-timer/admin/options.php:30, inc/modules/checkout/admin/options.php:27, inc/modules/clear-cart/admin/options.php:16, inc/modules/cookie-banner/admin/options.php:14, inc/modules/countdown-timer/admin/options.php:14, inc/modules/inactive-tab-message/admin/options.php:16, inc/modules/login-popup/admin/options.php:15, inc/modules/payment-logos/admin/options.php:33, inc/modules/product-audio/admin/options.php:15, inc/modules/product-brand-image/admin/options.php:15, inc/modules/product-labels/admin/options.php:48, inc/modules/product-navigation-links/admin/options.php:16, inc/modules/product-swatches/admin/options.php:17, inc/modules/product-video/admin/options.php:15, inc/modules/quick-social-links/admin/options.php:16, inc/modules/quick-view/admin/options.php:17, inc/modules/real-time-search/admin/options.php:14, inc/modules/reasons-to-buy/admin/options.php:14, inc/modules/recently-viewed-products/admin/options.php:15, inc/modules/size-chart/admin/options.php:15, inc/modules/spending-goal/admin/options.php:15, inc/modules/sticky-add-to-cart/admin/options.php:15, inc/modules/stock-scarcity/admin/options.php:16, inc/modules/trust-badges/admin/options.php:45
     20#: admin/class-merchant-admin-loader.php:144, inc/class-merchant-loader.php:249, admin/classes/class-merchant-admin-menu.php:281, admin/classes/class-merchant-admin-menu.php:282, admin/classes/class-merchant-admin-menu.php:372, admin/classes/class-merchant-admin-menu.php:375, inc/modules/address-autocomplete/admin/options.php:27, inc/modules/agree-to-terms-checkbox/admin/options.php:28, inc/modules/auto-external-links/admin/options.php:16, inc/modules/buy-now/admin/options.php:14, inc/modules/cart-count-favicon/admin/options.php:16, inc/modules/cart-reserved-timer/admin/options.php:30, inc/modules/checkout/admin/options.php:27, inc/modules/clear-cart/admin/options.php:16, inc/modules/cookie-banner/admin/options.php:14, inc/modules/countdown-timer/admin/options.php:14, inc/modules/inactive-tab-message/admin/options.php:16, inc/modules/login-popup/admin/options.php:15, inc/modules/payment-logos/admin/options.php:33, inc/modules/product-audio/admin/options.php:15, inc/modules/product-brand-image/admin/options.php:15, inc/modules/product-labels/admin/options.php:44, inc/modules/product-navigation-links/admin/options.php:16, inc/modules/product-swatches/admin/options.php:17, inc/modules/product-video/admin/options.php:15, inc/modules/quick-social-links/admin/options.php:16, inc/modules/quick-view/admin/options.php:17, inc/modules/real-time-search/admin/options.php:14, inc/modules/reasons-to-buy/admin/options.php:14, inc/modules/recently-viewed-products/admin/options.php:15, inc/modules/size-chart/admin/options.php:15, inc/modules/spending-goal/admin/options.php:15, inc/modules/sticky-add-to-cart/admin/options.php:15, inc/modules/stock-scarcity/admin/options.php:16, inc/modules/trust-badges/admin/options.php:45
    2121msgid "Settings"
    2222msgstr ""
     
    518518msgstr ""
    519519
    520 #: admin/classes/class-merchant-admin-modules.php:517, inc/modules/buy-now/class-buy-now.php:50, inc/modules/buy-now/class-buy-now.php:360, inc/modules/buy-now/class-buy-now.php:453, inc/modules/quick-view/class-quick-view.php:679, inc/modules/buy-now/admin/options.php:22
     520#: admin/classes/class-merchant-admin-modules.php:517, inc/modules/buy-now/class-buy-now.php:50, inc/modules/buy-now/class-buy-now.php:371, inc/modules/buy-now/class-buy-now.php:464, inc/modules/quick-view/class-quick-view.php:679, inc/modules/buy-now/admin/options.php:22
    521521msgid "Buy Now"
    522522msgstr ""
     
    914914msgstr ""
    915915
    916 #: admin/classes/class-merchant-admin-options.php:2764, admin/pages/page-campaigns.php:90, inc/modules/buy-x-get-y/admin/options.php:33, inc/modules/complementary-products/admin/options.php:34, inc/modules/free-gifts/admin/options.php:33, inc/modules/frequently-bought-together/admin/options.php:33, inc/modules/pre-orders/admin/options.php:41, inc/modules/product-labels/admin/options.php:67, inc/modules/reasons-to-buy/admin/options.php:33, inc/modules/storewide-sale/admin/options.php:33, inc/modules/volume-discounts/admin/options.php:33
     916#: admin/classes/class-merchant-admin-options.php:2764, admin/pages/page-campaigns.php:90, inc/modules/buy-x-get-y/admin/options.php:33, inc/modules/complementary-products/admin/options.php:34, inc/modules/free-gifts/admin/options.php:33, inc/modules/frequently-bought-together/admin/options.php:33, inc/modules/pre-orders/admin/options.php:41, inc/modules/product-labels/admin/options.php:63, inc/modules/reasons-to-buy/admin/options.php:33, inc/modules/storewide-sale/admin/options.php:33, inc/modules/volume-discounts/admin/options.php:33
    917917msgid "Status"
    918918msgstr ""
    919919
    920 #: admin/classes/class-merchant-admin-options.php:2766, admin/pages/page-settings.php:106, inc/modules/buy-x-get-y/admin/options.php:36, inc/modules/complementary-products/admin/options.php:37, inc/modules/free-gifts/admin/options.php:36, inc/modules/frequently-bought-together/admin/options.php:36, inc/modules/pre-orders/admin/options.php:44, inc/modules/product-labels/admin/options.php:70, inc/modules/reasons-to-buy/admin/options.php:36, inc/modules/storewide-sale/admin/options.php:36, inc/modules/volume-discounts/admin/options.php:36
     920#: admin/classes/class-merchant-admin-options.php:2766, admin/pages/page-settings.php:106, inc/modules/buy-x-get-y/admin/options.php:36, inc/modules/complementary-products/admin/options.php:37, inc/modules/free-gifts/admin/options.php:36, inc/modules/frequently-bought-together/admin/options.php:36, inc/modules/pre-orders/admin/options.php:44, inc/modules/product-labels/admin/options.php:66, inc/modules/reasons-to-buy/admin/options.php:36, inc/modules/storewide-sale/admin/options.php:36, inc/modules/volume-discounts/admin/options.php:36
    921921msgid "Inactive"
    922922msgstr ""
    923923
    924 #: admin/classes/class-merchant-admin-options.php:2767, admin/pages/page-settings.php:98, inc/modules/buy-x-get-y/admin/options.php:35, inc/modules/complementary-products/admin/options.php:36, inc/modules/free-gifts/admin/options.php:35, inc/modules/frequently-bought-together/admin/options.php:35, inc/modules/pre-orders/admin/options.php:43, inc/modules/product-labels/admin/options.php:69, inc/modules/reasons-to-buy/admin/options.php:35, inc/modules/storewide-sale/admin/options.php:35, inc/modules/volume-discounts/admin/options.php:35
     924#: admin/classes/class-merchant-admin-options.php:2767, admin/pages/page-settings.php:98, inc/modules/buy-x-get-y/admin/options.php:35, inc/modules/complementary-products/admin/options.php:36, inc/modules/free-gifts/admin/options.php:35, inc/modules/frequently-bought-together/admin/options.php:35, inc/modules/pre-orders/admin/options.php:43, inc/modules/product-labels/admin/options.php:65, inc/modules/reasons-to-buy/admin/options.php:35, inc/modules/storewide-sale/admin/options.php:35, inc/modules/volume-discounts/admin/options.php:35
    925925msgid "Active"
    926926msgstr ""
     
    18121812msgstr ""
    18131813
    1814 #: inc/modules/buy-now/class-buy-now.php:305
     1814#: inc/modules/buy-now/class-buy-now.php:316
    18151815msgid "Please choose the quantity of items you wish to add to your cart&hellip;"
    18161816msgstr ""
     
    22532253msgstr ""
    22542254
    2255 #: inc/modules/product-labels/class-product-labels.php:61, inc/modules/product-labels/admin/options.php:106, inc/modules/product-labels/admin/options.php:523
     2255#: inc/modules/product-labels/class-product-labels.php:61, inc/modules/product-labels/admin/options.php:102, inc/modules/product-labels/admin/options.php:522
    22562256msgid "SALE"
    22572257msgstr ""
     
    22692269msgstr ""
    22702270
    2271 #: inc/modules/product-labels/class-product-labels.php:774
     2271#: inc/modules/product-labels/class-product-labels.php:783
    22722272msgid "In stock"
    22732273msgstr ""
    22742274
    2275 #: inc/modules/product-labels/class-product-labels.php:774
     2275#: inc/modules/product-labels/class-product-labels.php:783
    22762276msgid "Sold out"
    22772277msgstr ""
     
    23212321msgstr ""
    23222322
    2323 #: inc/modules/product-swatches/class-product-swatches.php:324, inc/modules/product-labels/admin/options.php:94
     2323#: inc/modules/product-swatches/class-product-swatches.php:324, inc/modules/product-labels/admin/options.php:90
    23242324msgid "Image"
    23252325msgstr ""
     
    24692469msgstr ""
    24702470
    2471 #: inc/modules/real-time-search/class-real-time-search.php:412, inc/modules/added-to-cart-popup/admin/options.php:309, inc/modules/buy-x-get-y/admin/options.php:71, inc/modules/complementary-products/admin/options.php:71, inc/modules/free-gifts/admin/options.php:72, inc/modules/frequently-bought-together/admin/options.php:71, inc/modules/pre-orders/admin/options.php:79, inc/modules/product-labels/admin/options.php:279, inc/modules/reasons-to-buy/admin/options.php:74, inc/modules/size-chart/admin/options.php:30, inc/modules/storewide-sale/admin/options.php:71, inc/modules/volume-discounts/admin/options.php:80
     2471#: inc/modules/real-time-search/class-real-time-search.php:412, inc/modules/added-to-cart-popup/admin/options.php:309, inc/modules/buy-x-get-y/admin/options.php:71, inc/modules/complementary-products/admin/options.php:71, inc/modules/free-gifts/admin/options.php:72, inc/modules/frequently-bought-together/admin/options.php:71, inc/modules/pre-orders/admin/options.php:79, inc/modules/product-labels/admin/options.php:278, inc/modules/reasons-to-buy/admin/options.php:74, inc/modules/size-chart/admin/options.php:30, inc/modules/storewide-sale/admin/options.php:71, inc/modules/volume-discounts/admin/options.php:80
    24722472msgid "Categories"
    24732473msgstr ""
     
    25332533msgstr ""
    25342534
    2535 #: inc/modules/side-cart/class-side-cart.php:162, inc/modules/buy-x-get-y/admin/options.php:51, inc/modules/complementary-products/admin/options.php:52, inc/modules/free-gifts/admin/options.php:51, inc/modules/frequently-bought-together/admin/options.php:51, inc/modules/pre-orders/admin/options.php:60, inc/modules/product-labels/admin/options.php:30, inc/modules/reasons-to-buy/admin/options.php:53, inc/modules/storewide-sale/admin/options.php:52, inc/modules/volume-discounts/admin/options.php:51
     2535#: inc/modules/side-cart/class-side-cart.php:162, inc/modules/buy-x-get-y/admin/options.php:51, inc/modules/complementary-products/admin/options.php:52, inc/modules/free-gifts/admin/options.php:51, inc/modules/frequently-bought-together/admin/options.php:51, inc/modules/pre-orders/admin/options.php:60, inc/modules/product-labels/admin/options.php:26, inc/modules/reasons-to-buy/admin/options.php:53, inc/modules/storewide-sale/admin/options.php:52, inc/modules/volume-discounts/admin/options.php:51
    25362536msgid "All Products"
    25372537msgstr ""
     
    31243124msgstr ""
    31253125
    3126 #: inc/modules/added-to-cart-popup/admin/options.php:270, inc/modules/buy-x-get-y/admin/options.php:52, inc/modules/complementary-products/admin/options.php:53, inc/modules/free-gifts/admin/options.php:52, inc/modules/frequently-bought-together/admin/options.php:52, inc/modules/pre-orders/admin/options.php:61, inc/modules/product-labels/admin/options.php:31, inc/modules/reasons-to-buy/admin/options.php:54, inc/modules/storewide-sale/admin/options.php:53, inc/modules/volume-discounts/admin/options.php:52
     3126#: inc/modules/added-to-cart-popup/admin/options.php:270, inc/modules/buy-x-get-y/admin/options.php:52, inc/modules/complementary-products/admin/options.php:53, inc/modules/free-gifts/admin/options.php:52, inc/modules/frequently-bought-together/admin/options.php:52, inc/modules/pre-orders/admin/options.php:61, inc/modules/product-labels/admin/options.php:27, inc/modules/reasons-to-buy/admin/options.php:54, inc/modules/storewide-sale/admin/options.php:53, inc/modules/volume-discounts/admin/options.php:52
    31273127msgid "Specific Products"
    31283128msgstr ""
    31293129
    3130 #: inc/modules/added-to-cart-popup/admin/options.php:271, inc/modules/buy-x-get-y/admin/options.php:53, inc/modules/complementary-products/admin/options.php:54, inc/modules/free-gifts/admin/options.php:53, inc/modules/frequently-bought-together/admin/options.php:53, inc/modules/pre-orders/admin/options.php:62, inc/modules/product-labels/admin/options.php:32, inc/modules/reasons-to-buy/admin/options.php:55, inc/modules/storewide-sale/admin/options.php:54, inc/modules/volume-discounts/admin/options.php:53
     3130#: inc/modules/added-to-cart-popup/admin/options.php:271, inc/modules/buy-x-get-y/admin/options.php:53, inc/modules/complementary-products/admin/options.php:54, inc/modules/free-gifts/admin/options.php:53, inc/modules/frequently-bought-together/admin/options.php:53, inc/modules/pre-orders/admin/options.php:62, inc/modules/product-labels/admin/options.php:28, inc/modules/reasons-to-buy/admin/options.php:55, inc/modules/storewide-sale/admin/options.php:54, inc/modules/volume-discounts/admin/options.php:53
    31313131msgid "Specific Categories"
    31323132msgstr ""
     
    31363136msgstr ""
    31373137
    3138 #: inc/modules/added-to-cart-popup/admin/options.php:313, inc/modules/buy-x-get-y/admin/options.php:75, inc/modules/buy-x-get-y/admin/options.php:169, inc/modules/complementary-products/admin/options.php:75, inc/modules/complementary-products/admin/options.php:167, inc/modules/free-gifts/admin/options.php:76, inc/modules/free-gifts/admin/options.php:170, inc/modules/frequently-bought-together/admin/options.php:75, inc/modules/frequently-bought-together/admin/options.php:170, inc/modules/pre-orders/admin/options.php:83, inc/modules/pre-orders/admin/options.php:178, inc/modules/product-labels/admin/options.php:283, inc/modules/product-labels/admin/options.php:388, inc/modules/reasons-to-buy/admin/options.php:78, inc/modules/reasons-to-buy/admin/options.php:171, inc/modules/side-cart/admin/options.php:224, inc/modules/side-cart/admin/options.php:357, inc/modules/size-chart/admin/options.php:34, inc/modules/spending-goal/admin/options.php:98, inc/modules/spending-goal/admin/options.php:143, inc/modules/storewide-sale/admin/options.php:75, inc/modules/storewide-sale/admin/options.php:167, inc/modules/volume-discounts/admin/options.php:84, inc/modules/volume-discounts/admin/options.php:224, inc/modules/wishlist/admin/options.php:115, inc/modules/wishlist/admin/options.php:160
     3138#: inc/modules/added-to-cart-popup/admin/options.php:313, inc/modules/buy-x-get-y/admin/options.php:75, inc/modules/buy-x-get-y/admin/options.php:169, inc/modules/complementary-products/admin/options.php:75, inc/modules/complementary-products/admin/options.php:167, inc/modules/free-gifts/admin/options.php:76, inc/modules/free-gifts/admin/options.php:170, inc/modules/frequently-bought-together/admin/options.php:75, inc/modules/frequently-bought-together/admin/options.php:170, inc/modules/pre-orders/admin/options.php:83, inc/modules/pre-orders/admin/options.php:178, inc/modules/product-labels/admin/options.php:282, inc/modules/product-labels/admin/options.php:387, inc/modules/reasons-to-buy/admin/options.php:78, inc/modules/reasons-to-buy/admin/options.php:171, inc/modules/side-cart/admin/options.php:224, inc/modules/side-cart/admin/options.php:357, inc/modules/size-chart/admin/options.php:34, inc/modules/spending-goal/admin/options.php:98, inc/modules/spending-goal/admin/options.php:143, inc/modules/storewide-sale/admin/options.php:75, inc/modules/storewide-sale/admin/options.php:167, inc/modules/volume-discounts/admin/options.php:84, inc/modules/volume-discounts/admin/options.php:224, inc/modules/wishlist/admin/options.php:115, inc/modules/wishlist/admin/options.php:160
    31393139msgid "Select categories"
    31403140msgstr ""
     
    31443144msgstr ""
    31453145
    3146 #: inc/modules/added-to-cart-popup/admin/options.php:334, inc/modules/free-gifts/admin/options.php:609, inc/modules/product-labels/admin/options.php:498, inc/modules/recently-viewed-products/admin/options.php:200, inc/modules/stock-scarcity/admin/options.php:28
     3146#: inc/modules/added-to-cart-popup/admin/options.php:334, inc/modules/free-gifts/admin/options.php:609, inc/modules/product-labels/admin/options.php:497, inc/modules/recently-viewed-products/admin/options.php:200, inc/modules/stock-scarcity/admin/options.php:28
    31473147msgid "Show on pages"
    31483148msgstr ""
    31493149
    3150 #: inc/modules/added-to-cart-popup/admin/options.php:336, inc/modules/free-gifts/admin/options.php:610, inc/modules/product-labels/admin/options.php:500
     3150#: inc/modules/added-to-cart-popup/admin/options.php:336, inc/modules/free-gifts/admin/options.php:610, inc/modules/product-labels/admin/options.php:499
    31513151msgid "Homepage"
    31523152msgstr ""
    31533153
    3154 #: inc/modules/added-to-cart-popup/admin/options.php:337, inc/modules/product-labels/admin/options.php:501, inc/modules/recently-viewed-products/admin/options.php:202
     3154#: inc/modules/added-to-cart-popup/admin/options.php:337, inc/modules/product-labels/admin/options.php:500, inc/modules/recently-viewed-products/admin/options.php:202
    31553155msgid "Product Single"
    31563156msgstr ""
    31573157
    3158 #: inc/modules/added-to-cart-popup/admin/options.php:338, inc/modules/product-labels/admin/options.php:502, inc/modules/stock-scarcity/admin/options.php:31
     3158#: inc/modules/added-to-cart-popup/admin/options.php:338, inc/modules/product-labels/admin/options.php:501, inc/modules/stock-scarcity/admin/options.php:31
    31593159msgid "Product Archive"
    31603160msgstr ""
    31613161
    3162 #: inc/modules/added-to-cart-popup/admin/options.php:346, inc/modules/product-labels/admin/options.php:510, inc/modules/side-cart/admin/options.php:113
     3162#: inc/modules/added-to-cart-popup/admin/options.php:346, inc/modules/product-labels/admin/options.php:509, inc/modules/side-cart/admin/options.php:113
    31633163msgid "Show on devices"
    31643164msgstr ""
    31653165
    3166 #: inc/modules/added-to-cart-popup/admin/options.php:348, inc/modules/product-labels/admin/options.php:512, inc/modules/side-cart/admin/options.php:115
     3166#: inc/modules/added-to-cart-popup/admin/options.php:348, inc/modules/product-labels/admin/options.php:511, inc/modules/side-cart/admin/options.php:115
    31673167msgid "Desktop"
    31683168msgstr ""
    31693169
    3170 #: inc/modules/added-to-cart-popup/admin/options.php:349, inc/modules/product-labels/admin/options.php:513, inc/modules/side-cart/admin/options.php:116
     3170#: inc/modules/added-to-cart-popup/admin/options.php:349, inc/modules/product-labels/admin/options.php:512, inc/modules/side-cart/admin/options.php:116
    31713171msgid "Mobile"
    31723172msgstr ""
     
    35723572msgstr ""
    35733573
    3574 #: inc/modules/advanced-reviews/admin/options.php:466, inc/modules/advanced-reviews/admin/options.php:590, inc/modules/advanced-reviews/admin/options.php:699, inc/modules/advanced-reviews/admin/options.php:786, inc/modules/buy-x-get-y/admin/options.php:517, inc/modules/buy-x-get-y/admin/options.php:533, inc/modules/buy-x-get-y/admin/options.php:647, inc/modules/buy-x-get-y/admin/options.php:663, inc/modules/buy-x-get-y/admin/options.php:711, inc/modules/buy-x-get-y/admin/options.php:726, inc/modules/buy-x-get-y/admin/options.php:760, inc/modules/buy-x-get-y/admin/options.php:788, inc/modules/free-shipping-progress-bar/admin/options.php:40, inc/modules/free-shipping-progress-bar/admin/options.php:56, inc/modules/frequently-bought-together/admin/options.php:577, inc/modules/frequently-bought-together/admin/options.php:675, inc/modules/frequently-bought-together/admin/options.php:744, inc/modules/frequently-bought-together/admin/options.php:778, inc/modules/frequently-bought-together/admin/options.php:806, inc/modules/frequently-bought-together/admin/options.php:823, inc/modules/login-popup/admin/options.php:47, inc/modules/product-labels/admin/options.php:107, inc/modules/volume-discounts/admin/options.php:529, inc/modules/volume-discounts/admin/options.php:543, inc/modules/volume-discounts/admin/options.php:701, inc/modules/volume-discounts/admin/options.php:750, inc/modules/volume-discounts/admin/options.php:766, inc/modules/volume-discounts/admin/options.php:801, inc/modules/volume-discounts/admin/options.php:830
     3574#: inc/modules/advanced-reviews/admin/options.php:466, inc/modules/advanced-reviews/admin/options.php:590, inc/modules/advanced-reviews/admin/options.php:699, inc/modules/advanced-reviews/admin/options.php:786, inc/modules/buy-x-get-y/admin/options.php:517, inc/modules/buy-x-get-y/admin/options.php:533, inc/modules/buy-x-get-y/admin/options.php:647, inc/modules/buy-x-get-y/admin/options.php:663, inc/modules/buy-x-get-y/admin/options.php:711, inc/modules/buy-x-get-y/admin/options.php:726, inc/modules/buy-x-get-y/admin/options.php:760, inc/modules/buy-x-get-y/admin/options.php:788, inc/modules/free-shipping-progress-bar/admin/options.php:40, inc/modules/free-shipping-progress-bar/admin/options.php:56, inc/modules/frequently-bought-together/admin/options.php:577, inc/modules/frequently-bought-together/admin/options.php:675, inc/modules/frequently-bought-together/admin/options.php:744, inc/modules/frequently-bought-together/admin/options.php:778, inc/modules/frequently-bought-together/admin/options.php:806, inc/modules/frequently-bought-together/admin/options.php:823, inc/modules/login-popup/admin/options.php:47, inc/modules/product-labels/admin/options.php:103, inc/modules/volume-discounts/admin/options.php:529, inc/modules/volume-discounts/admin/options.php:543, inc/modules/volume-discounts/admin/options.php:701, inc/modules/volume-discounts/admin/options.php:750, inc/modules/volume-discounts/admin/options.php:766, inc/modules/volume-discounts/admin/options.php:801, inc/modules/volume-discounts/admin/options.php:830
    35753575msgid "You can use these codes in the content."
    35763576msgstr ""
     
    38553855msgstr ""
    38563856
    3857 #: inc/modules/advanced-reviews/admin/options.php:1206, inc/modules/advanced-reviews/admin/options.php:1211, inc/modules/buy-x-get-y/admin/options.php:824, inc/modules/buy-x-get-y/admin/options.php:829, inc/modules/cart-reserved-timer/admin/options.php:103, inc/modules/cart-reserved-timer/admin/options.php:108, inc/modules/clear-cart/admin/options.php:315, inc/modules/clear-cart/admin/options.php:320, inc/modules/complementary-products/admin/options.php:814, inc/modules/complementary-products/admin/options.php:819, inc/modules/countdown-timer/admin/options.php:336, inc/modules/countdown-timer/admin/options.php:341, inc/modules/frequently-bought-together/admin/options.php:861, inc/modules/frequently-bought-together/admin/options.php:866, inc/modules/payment-logos/admin/options.php:125, inc/modules/payment-logos/admin/options.php:130, inc/modules/product-audio/admin/options.php:34, inc/modules/product-audio/admin/options.php:39, inc/modules/product-brand-image/admin/options.php:82, inc/modules/product-brand-image/admin/options.php:87, inc/modules/product-bundles/admin/options.php:158, inc/modules/product-bundles/admin/options.php:163, inc/modules/product-labels/admin/options.php:535, inc/modules/product-labels/admin/options.php:540, inc/modules/product-navigation-links/admin/options.php:144, inc/modules/product-navigation-links/admin/options.php:149, inc/modules/product-video/admin/options.php:52, inc/modules/product-video/admin/options.php:57, inc/modules/quick-social-links/admin/options.php:419, inc/modules/quick-social-links/admin/options.php:424, inc/modules/quick-view/admin/options.php:445, inc/modules/quick-view/admin/options.php:450, inc/modules/real-time-search/admin/options.php:112, inc/modules/real-time-search/admin/options.php:117, inc/modules/reasons-to-buy/admin/options.php:374, inc/modules/reasons-to-buy/admin/options.php:379, inc/modules/recently-viewed-products/admin/options.php:215, inc/modules/recently-viewed-products/admin/options.php:220, inc/modules/size-chart/admin/options.php:215, inc/modules/size-chart/admin/options.php:220, inc/modules/stock-scarcity/admin/options.php:188, inc/modules/stock-scarcity/admin/options.php:193, inc/modules/trust-badges/admin/options.php:144, inc/modules/trust-badges/admin/options.php:149, inc/modules/volume-discounts/admin/options.php:901, inc/modules/volume-discounts/admin/options.php:906, inc/modules/wait-list/admin/options.php:150, inc/modules/wait-list/admin/options.php:155, inc/modules/wishlist/admin/options.php:488, inc/modules/wishlist/admin/options.php:493
     3857#: inc/modules/advanced-reviews/admin/options.php:1206, inc/modules/advanced-reviews/admin/options.php:1211, inc/modules/buy-x-get-y/admin/options.php:824, inc/modules/buy-x-get-y/admin/options.php:829, inc/modules/cart-reserved-timer/admin/options.php:103, inc/modules/cart-reserved-timer/admin/options.php:108, inc/modules/clear-cart/admin/options.php:315, inc/modules/clear-cart/admin/options.php:320, inc/modules/complementary-products/admin/options.php:814, inc/modules/complementary-products/admin/options.php:819, inc/modules/countdown-timer/admin/options.php:336, inc/modules/countdown-timer/admin/options.php:341, inc/modules/frequently-bought-together/admin/options.php:861, inc/modules/frequently-bought-together/admin/options.php:866, inc/modules/payment-logos/admin/options.php:125, inc/modules/payment-logos/admin/options.php:130, inc/modules/product-audio/admin/options.php:34, inc/modules/product-audio/admin/options.php:39, inc/modules/product-brand-image/admin/options.php:82, inc/modules/product-brand-image/admin/options.php:87, inc/modules/product-bundles/admin/options.php:158, inc/modules/product-bundles/admin/options.php:163, inc/modules/product-labels/admin/options.php:541, inc/modules/product-labels/admin/options.php:546, inc/modules/product-navigation-links/admin/options.php:144, inc/modules/product-navigation-links/admin/options.php:149, inc/modules/product-video/admin/options.php:52, inc/modules/product-video/admin/options.php:57, inc/modules/quick-social-links/admin/options.php:419, inc/modules/quick-social-links/admin/options.php:424, inc/modules/quick-view/admin/options.php:445, inc/modules/quick-view/admin/options.php:450, inc/modules/real-time-search/admin/options.php:112, inc/modules/real-time-search/admin/options.php:117, inc/modules/reasons-to-buy/admin/options.php:374, inc/modules/reasons-to-buy/admin/options.php:379, inc/modules/recently-viewed-products/admin/options.php:215, inc/modules/recently-viewed-products/admin/options.php:220, inc/modules/size-chart/admin/options.php:215, inc/modules/size-chart/admin/options.php:220, inc/modules/stock-scarcity/admin/options.php:188, inc/modules/stock-scarcity/admin/options.php:193, inc/modules/trust-badges/admin/options.php:144, inc/modules/trust-badges/admin/options.php:149, inc/modules/volume-discounts/admin/options.php:901, inc/modules/volume-discounts/admin/options.php:906, inc/modules/wait-list/admin/options.php:150, inc/modules/wait-list/admin/options.php:155, inc/modules/wishlist/admin/options.php:488, inc/modules/wishlist/admin/options.php:493
    38583858msgid "Use shortcode"
    38593859msgstr ""
    38603860
    3861 #: inc/modules/advanced-reviews/admin/options.php:1217, inc/modules/buy-x-get-y/admin/options.php:835, inc/modules/cart-reserved-timer/admin/options.php:114, inc/modules/complementary-products/admin/options.php:825, inc/modules/countdown-timer/admin/options.php:347, inc/modules/frequently-bought-together/admin/options.php:872, inc/modules/payment-logos/admin/options.php:136, inc/modules/product-audio/admin/options.php:45, inc/modules/product-brand-image/admin/options.php:93, inc/modules/product-bundles/admin/options.php:169, inc/modules/product-labels/admin/options.php:546, inc/modules/product-navigation-links/admin/options.php:155, inc/modules/product-video/admin/options.php:63, inc/modules/reasons-to-buy/admin/options.php:385, inc/modules/recently-viewed-products/admin/options.php:226, inc/modules/size-chart/admin/options.php:226, inc/modules/stock-scarcity/admin/options.php:199, inc/modules/trust-badges/admin/options.php:155, inc/modules/volume-discounts/admin/options.php:912, inc/modules/wait-list/admin/options.php:161, inc/modules/wishlist/admin/options.php:499
     3861#: inc/modules/advanced-reviews/admin/options.php:1217, inc/modules/buy-x-get-y/admin/options.php:835, inc/modules/cart-reserved-timer/admin/options.php:114, inc/modules/complementary-products/admin/options.php:825, inc/modules/countdown-timer/admin/options.php:347, inc/modules/frequently-bought-together/admin/options.php:872, inc/modules/payment-logos/admin/options.php:136, inc/modules/product-audio/admin/options.php:45, inc/modules/product-brand-image/admin/options.php:93, inc/modules/product-bundles/admin/options.php:169, inc/modules/product-labels/admin/options.php:552, inc/modules/product-navigation-links/admin/options.php:155, inc/modules/product-video/admin/options.php:63, inc/modules/reasons-to-buy/admin/options.php:385, inc/modules/recently-viewed-products/admin/options.php:226, inc/modules/size-chart/admin/options.php:226, inc/modules/stock-scarcity/admin/options.php:199, inc/modules/trust-badges/admin/options.php:155, inc/modules/volume-discounts/admin/options.php:912, inc/modules/wait-list/admin/options.php:161, inc/modules/wishlist/admin/options.php:499
    38623862msgid "If you are using a page builder or a theme that supports shortcodes, then you can output the module using the shortcode above. This might be useful if, for example, you find that you want to control the position of the module output more precisely than with the module settings. Note that the shortcodes can only be used on single product pages."
    38633863msgstr ""
    38643864
    3865 #: inc/modules/advanced-reviews/admin/options.php:1223, inc/modules/buy-x-get-y/admin/options.php:841, inc/modules/cart-reserved-timer/admin/options.php:119, inc/modules/clear-cart/admin/options.php:333, inc/modules/complementary-products/admin/options.php:831, inc/modules/countdown-timer/admin/options.php:352, inc/modules/free-shipping-progress-bar/admin/options.php:595, inc/modules/free-shipping-progress-bar/admin/options.php:770, inc/modules/free-shipping-progress-bar/admin/options.php:879, inc/modules/frequently-bought-together/admin/options.php:878, inc/modules/payment-logos/admin/options.php:141, inc/modules/product-audio/admin/options.php:50, inc/modules/product-brand-image/admin/options.php:98, inc/modules/product-bundles/admin/options.php:175, inc/modules/product-labels/admin/options.php:551, inc/modules/product-navigation-links/admin/options.php:160, inc/modules/product-video/admin/options.php:68, inc/modules/quick-social-links/admin/options.php:435, inc/modules/quick-view/admin/options.php:461, inc/modules/real-time-search/admin/options.php:128, inc/modules/reasons-to-buy/admin/options.php:390, inc/modules/recently-viewed-products/admin/options.php:231, inc/modules/size-chart/admin/options.php:231, inc/modules/stock-scarcity/admin/options.php:207, inc/modules/trust-badges/admin/options.php:160, inc/modules/volume-discounts/admin/options.php:918, inc/modules/wait-list/admin/options.php:166, inc/modules/wishlist/admin/options.php:504
     3865#: inc/modules/advanced-reviews/admin/options.php:1223, inc/modules/buy-x-get-y/admin/options.php:841, inc/modules/cart-reserved-timer/admin/options.php:119, inc/modules/clear-cart/admin/options.php:333, inc/modules/complementary-products/admin/options.php:831, inc/modules/countdown-timer/admin/options.php:352, inc/modules/free-shipping-progress-bar/admin/options.php:595, inc/modules/free-shipping-progress-bar/admin/options.php:770, inc/modules/free-shipping-progress-bar/admin/options.php:879, inc/modules/frequently-bought-together/admin/options.php:878, inc/modules/payment-logos/admin/options.php:141, inc/modules/product-audio/admin/options.php:50, inc/modules/product-brand-image/admin/options.php:98, inc/modules/product-bundles/admin/options.php:175, inc/modules/product-labels/admin/options.php:557, inc/modules/product-navigation-links/admin/options.php:160, inc/modules/product-video/admin/options.php:68, inc/modules/quick-social-links/admin/options.php:435, inc/modules/quick-view/admin/options.php:461, inc/modules/real-time-search/admin/options.php:128, inc/modules/reasons-to-buy/admin/options.php:390, inc/modules/recently-viewed-products/admin/options.php:231, inc/modules/size-chart/admin/options.php:231, inc/modules/stock-scarcity/admin/options.php:207, inc/modules/trust-badges/admin/options.php:160, inc/modules/volume-discounts/admin/options.php:918, inc/modules/wait-list/admin/options.php:166, inc/modules/wishlist/admin/options.php:504
    38663866msgid "Shortcode text"
    38673867msgstr ""
     
    39273927msgstr ""
    39283928
    3929 #: inc/modules/buy-now/admin/options.php:84, inc/modules/buy-x-get-y/admin/options.php:568, inc/modules/clear-cart/admin/options.php:301, inc/modules/payment-logos/admin/options.php:59, inc/modules/product-labels/admin/options.php:226, inc/modules/trust-badges/admin/options.php:71
     3929#: inc/modules/buy-now/admin/options.php:84
     3930msgid "Button size"
     3931msgstr ""
     3932
     3933#: inc/modules/buy-now/admin/options.php:86
     3934msgid "Small"
     3935msgstr ""
     3936
     3937#: inc/modules/buy-now/admin/options.php:87
     3938msgid "Medium"
     3939msgstr ""
     3940
     3941#: inc/modules/buy-now/admin/options.php:88
     3942msgid "Large"
     3943msgstr ""
     3944
     3945#: inc/modules/buy-now/admin/options.php:89, inc/modules/clear-cart/admin/options.php:80, inc/modules/recent-sales-notifications/admin/options.php:570
     3946msgid "Custom"
     3947msgstr ""
     3948
     3949#: inc/modules/buy-now/admin/options.php:98, inc/modules/buy-x-get-y/admin/options.php:568, inc/modules/clear-cart/admin/options.php:301, inc/modules/payment-logos/admin/options.php:59, inc/modules/product-labels/admin/options.php:225, inc/modules/trust-badges/admin/options.php:71
    39303950msgid "Font size"
    39313951msgstr ""
    39323952
    3933 #: inc/modules/buy-now/admin/options.php:96, inc/modules/clear-cart/admin/options.php:231
     3953#: inc/modules/buy-now/admin/options.php:110, inc/modules/payment-logos/admin/options.php:77, inc/modules/product-brand-image/admin/options.php:34, inc/modules/product-navigation-links/admin/options.php:119, inc/modules/trust-badges/admin/options.php:96
     3954msgid "Margin top"
     3955msgstr ""
     3956
     3957#: inc/modules/buy-now/admin/options.php:130, inc/modules/payment-logos/admin/options.php:88, inc/modules/product-brand-image/admin/options.php:45, inc/modules/product-navigation-links/admin/options.php:130, inc/modules/trust-badges/admin/options.php:107
     3958msgid "Margin bottom"
     3959msgstr ""
     3960
     3961#: inc/modules/buy-now/admin/options.php:150, inc/modules/clear-cart/admin/options.php:231
    39343962msgid "Padding Top/Bottom"
    39353963msgstr ""
    39363964
    3937 #: inc/modules/buy-now/admin/options.php:108, inc/modules/clear-cart/admin/options.php:243
     3965#: inc/modules/buy-now/admin/options.php:170, inc/modules/clear-cart/admin/options.php:243
    39383966msgid "Padding Left/Right"
    39393967msgstr ""
    39403968
    3941 #: inc/modules/buy-now/admin/options.php:120, inc/modules/complementary-products/admin/options.php:789, inc/modules/product-swatches/admin/options.php:108, inc/modules/product-swatches/admin/options.php:169, inc/modules/product-swatches/admin/options.php:258, inc/modules/product-swatches/admin/options.php:349, inc/modules/product-swatches/admin/options.php:453, inc/modules/product-swatches/admin/options.php:564, inc/modules/product-swatches/admin/options.php:653, inc/modules/product-swatches/admin/options.php:744, inc/modules/quick-social-links/admin/options.php:74, inc/modules/scroll-to-top-button/admin/options.php:199, inc/modules/side-cart/admin/options.php:552
     3969#: inc/modules/buy-now/admin/options.php:190, inc/modules/complementary-products/admin/options.php:789, inc/modules/product-swatches/admin/options.php:108, inc/modules/product-swatches/admin/options.php:169, inc/modules/product-swatches/admin/options.php:258, inc/modules/product-swatches/admin/options.php:349, inc/modules/product-swatches/admin/options.php:453, inc/modules/product-swatches/admin/options.php:564, inc/modules/product-swatches/admin/options.php:653, inc/modules/product-swatches/admin/options.php:744, inc/modules/quick-social-links/admin/options.php:74, inc/modules/scroll-to-top-button/admin/options.php:199, inc/modules/side-cart/admin/options.php:552
    39423970msgid "Border radius"
    39433971msgstr ""
    39443972
    3945 #: inc/modules/buy-now/admin/options.php:135, inc/modules/countdown-timer/admin/options.php:155, inc/modules/side-cart/admin/options.php:15
     3973#: inc/modules/buy-now/admin/options.php:205, inc/modules/countdown-timer/admin/options.php:155, inc/modules/side-cart/admin/options.php:15
    39463974msgid "Display Settings"
    39473975msgstr ""
    39483976
    3949 #: inc/modules/buy-now/admin/options.php:141
     3977#: inc/modules/buy-now/admin/options.php:211
    39503978msgid "Show on product archive"
    39513979msgstr ""
    39523980
    3953 #: inc/modules/buy-now/admin/options.php:147
     3981#: inc/modules/buy-now/admin/options.php:217
    39543982msgid "Show on single product page"
    39553983msgstr ""
    39563984
    3957 #: inc/modules/buy-now/admin/options.php:153
     3985#: inc/modules/buy-now/admin/options.php:223
    39583986msgid "Show on upsell and related products"
    39593987msgstr ""
    39603988
    3961 #: inc/modules/buy-now/admin/options.php:161, inc/modules/stock-scarcity/admin/options.php:67
     3989#: inc/modules/buy-now/admin/options.php:231, inc/modules/stock-scarcity/admin/options.php:67
    39623990msgid "Loading position and priority on shop archive"
    39633991msgstr ""
    39643992
    3965 #: inc/modules/buy-now/admin/options.php:163, inc/modules/stock-scarcity/admin/options.php:69
     3993#: inc/modules/buy-now/admin/options.php:233, inc/modules/stock-scarcity/admin/options.php:69
    39663994msgid "Before shop loop item"
    39673995msgstr ""
    39683996
    3969 #: inc/modules/buy-now/admin/options.php:164, inc/modules/stock-scarcity/admin/options.php:70
     3997#: inc/modules/buy-now/admin/options.php:234, inc/modules/stock-scarcity/admin/options.php:70
    39703998msgid "Before shop loop item title"
    39713999msgstr ""
    39724000
    3973 #: inc/modules/buy-now/admin/options.php:165, inc/modules/stock-scarcity/admin/options.php:71
     4001#: inc/modules/buy-now/admin/options.php:235, inc/modules/stock-scarcity/admin/options.php:71
    39744002msgid "Shop loop item title"
    39754003msgstr ""
    39764004
    3977 #: inc/modules/buy-now/admin/options.php:166, inc/modules/stock-scarcity/admin/options.php:72
     4005#: inc/modules/buy-now/admin/options.php:236, inc/modules/stock-scarcity/admin/options.php:72
    39784006msgid "After shop loop item title"
    39794007msgstr ""
    39804008
    3981 #: inc/modules/buy-now/admin/options.php:167, inc/modules/stock-scarcity/admin/options.php:73
     4009#: inc/modules/buy-now/admin/options.php:237, inc/modules/stock-scarcity/admin/options.php:73
    39824010msgid "After shop loop item"
    39834011msgstr ""
    39844012
    3985 #: inc/modules/buy-now/admin/options.php:182
     4013#: inc/modules/buy-now/admin/options.php:252
    39864014msgid "This is a developer level feature. The buy now button module is \"hooked\" into a specific location on the shop archive pages. Themes and other plugins might also add additional elements to the same location. By modifying the loading postiion and priority, you have the ability to customize the placement of this element on that particular location. A lower number = a higher priority, so the module will appear higher on the page."
    39874015msgstr ""
    39884016
    3989 #: inc/modules/buy-now/admin/options.php:189, inc/modules/stock-scarcity/admin/options.php:40
     4017#: inc/modules/buy-now/admin/options.php:259, inc/modules/stock-scarcity/admin/options.php:40
    39904018msgid "Loading position and priority on single product"
    39914019msgstr ""
    39924020
    3993 #: inc/modules/buy-now/admin/options.php:191, inc/modules/stock-scarcity/admin/options.php:42
     4021#: inc/modules/buy-now/admin/options.php:261, inc/modules/stock-scarcity/admin/options.php:42
    39944022msgid "Before add to cart button"
    39954023msgstr ""
    39964024
    3997 #: inc/modules/buy-now/admin/options.php:192, inc/modules/stock-scarcity/admin/options.php:43
     4025#: inc/modules/buy-now/admin/options.php:262, inc/modules/stock-scarcity/admin/options.php:43
    39984026msgid "After add to cart button"
    39994027msgstr ""
    40004028
    4001 #: inc/modules/buy-now/admin/options.php:193, inc/modules/stock-scarcity/admin/options.php:44
     4029#: inc/modules/buy-now/admin/options.php:263, inc/modules/stock-scarcity/admin/options.php:44
    40024030msgid "Before add to cart quantity"
    40034031msgstr ""
    40044032
    4005 #: inc/modules/buy-now/admin/options.php:194, inc/modules/stock-scarcity/admin/options.php:45
     4033#: inc/modules/buy-now/admin/options.php:264, inc/modules/stock-scarcity/admin/options.php:45
    40064034msgid "After add to cart quantity"
    40074035msgstr ""
    40084036
    4009 #: inc/modules/buy-now/admin/options.php:209
     4037#: inc/modules/buy-now/admin/options.php:279
    40104038msgid "This is a developer level feature. The buy now button module is \"hooked\" into a specific location on the single product pages. Themes and other plugins might also add additional elements to the same location. By modifying the loading postiion and priority, you have the ability to customize the placement of this element on that particular location. A lower number = a higher priority, so the module will appear higher on the page."
    40114039msgstr ""
     
    40274055msgstr ""
    40284056
    4029 #: inc/modules/buy-x-get-y/admin/options.php:54, inc/modules/complementary-products/admin/options.php:55, inc/modules/free-gifts/admin/options.php:54, inc/modules/frequently-bought-together/admin/options.php:54, inc/modules/pre-orders/admin/options.php:63, inc/modules/product-labels/admin/options.php:33, inc/modules/reasons-to-buy/admin/options.php:56, inc/modules/storewide-sale/admin/options.php:55, inc/modules/volume-discounts/admin/options.php:54
     4057#: inc/modules/buy-x-get-y/admin/options.php:54, inc/modules/complementary-products/admin/options.php:55, inc/modules/free-gifts/admin/options.php:54, inc/modules/frequently-bought-together/admin/options.php:54, inc/modules/pre-orders/admin/options.php:63, inc/modules/product-labels/admin/options.php:29, inc/modules/reasons-to-buy/admin/options.php:56, inc/modules/storewide-sale/admin/options.php:55, inc/modules/volume-discounts/admin/options.php:54
    40304058msgid "Specific Tags"
    40314059msgstr ""
    40324060
    4033 #: inc/modules/buy-x-get-y/admin/options.php:55, inc/modules/complementary-products/admin/options.php:56, inc/modules/free-gifts/admin/options.php:55, inc/modules/frequently-bought-together/admin/options.php:55, inc/modules/pre-orders/admin/options.php:64, inc/modules/product-labels/admin/options.php:34, inc/modules/reasons-to-buy/admin/options.php:57, inc/modules/storewide-sale/admin/options.php:56, inc/modules/volume-discounts/admin/options.php:55
     4061#: inc/modules/buy-x-get-y/admin/options.php:55, inc/modules/complementary-products/admin/options.php:56, inc/modules/free-gifts/admin/options.php:55, inc/modules/frequently-bought-together/admin/options.php:55, inc/modules/pre-orders/admin/options.php:64, inc/modules/product-labels/admin/options.php:30, inc/modules/reasons-to-buy/admin/options.php:57, inc/modules/storewide-sale/admin/options.php:56, inc/modules/volume-discounts/admin/options.php:55
    40344062msgid "Specific Brands"
    40354063msgstr ""
     
    40474075msgstr ""
    40484076
    4049 #: inc/modules/buy-x-get-y/admin/options.php:82, inc/modules/complementary-products/admin/options.php:83, inc/modules/free-gifts/admin/options.php:84, inc/modules/frequently-bought-together/admin/options.php:83, inc/modules/pre-orders/admin/options.php:90, inc/modules/product-labels/admin/options.php:291, inc/modules/reasons-to-buy/admin/options.php:86, inc/modules/storewide-sale/admin/options.php:83, inc/modules/volume-discounts/admin/options.php:140
     4077#: inc/modules/buy-x-get-y/admin/options.php:82, inc/modules/complementary-products/admin/options.php:83, inc/modules/free-gifts/admin/options.php:84, inc/modules/frequently-bought-together/admin/options.php:83, inc/modules/pre-orders/admin/options.php:90, inc/modules/product-labels/admin/options.php:290, inc/modules/reasons-to-buy/admin/options.php:86, inc/modules/storewide-sale/admin/options.php:83, inc/modules/volume-discounts/admin/options.php:140
    40504078msgid "Tags"
    40514079msgstr ""
    40524080
    4053 #: inc/modules/buy-x-get-y/admin/options.php:86, inc/modules/buy-x-get-y/admin/options.php:212, inc/modules/complementary-products/admin/options.php:87, inc/modules/complementary-products/admin/options.php:210, inc/modules/free-gifts/admin/options.php:88, inc/modules/free-gifts/admin/options.php:214, inc/modules/frequently-bought-together/admin/options.php:87, inc/modules/frequently-bought-together/admin/options.php:213, inc/modules/pre-orders/admin/options.php:94, inc/modules/pre-orders/admin/options.php:222, inc/modules/product-labels/admin/options.php:295, inc/modules/product-labels/admin/options.php:432, inc/modules/reasons-to-buy/admin/options.php:90, inc/modules/reasons-to-buy/admin/options.php:214, inc/modules/storewide-sale/admin/options.php:87, inc/modules/storewide-sale/admin/options.php:210, inc/modules/volume-discounts/admin/options.php:144, inc/modules/volume-discounts/admin/options.php:267
     4081#: inc/modules/buy-x-get-y/admin/options.php:86, inc/modules/buy-x-get-y/admin/options.php:212, inc/modules/complementary-products/admin/options.php:87, inc/modules/complementary-products/admin/options.php:210, inc/modules/free-gifts/admin/options.php:88, inc/modules/free-gifts/admin/options.php:214, inc/modules/frequently-bought-together/admin/options.php:87, inc/modules/frequently-bought-together/admin/options.php:213, inc/modules/pre-orders/admin/options.php:94, inc/modules/pre-orders/admin/options.php:222, inc/modules/product-labels/admin/options.php:294, inc/modules/product-labels/admin/options.php:431, inc/modules/reasons-to-buy/admin/options.php:90, inc/modules/reasons-to-buy/admin/options.php:214, inc/modules/storewide-sale/admin/options.php:87, inc/modules/storewide-sale/admin/options.php:210, inc/modules/volume-discounts/admin/options.php:144, inc/modules/volume-discounts/admin/options.php:267
    40544082msgid "Select tags"
    40554083msgstr ""
     
    40594087msgstr ""
    40604088
    4061 #: inc/modules/buy-x-get-y/admin/options.php:93, inc/modules/complementary-products/admin/options.php:94, inc/modules/free-gifts/admin/options.php:95, inc/modules/frequently-bought-together/admin/options.php:94, inc/modules/pre-orders/admin/options.php:101, inc/modules/product-labels/admin/options.php:303, inc/modules/reasons-to-buy/admin/options.php:97, inc/modules/storewide-sale/admin/options.php:94, inc/modules/volume-discounts/admin/options.php:151
     4089#: inc/modules/buy-x-get-y/admin/options.php:93, inc/modules/complementary-products/admin/options.php:94, inc/modules/free-gifts/admin/options.php:95, inc/modules/frequently-bought-together/admin/options.php:94, inc/modules/pre-orders/admin/options.php:101, inc/modules/product-labels/admin/options.php:302, inc/modules/reasons-to-buy/admin/options.php:97, inc/modules/storewide-sale/admin/options.php:94, inc/modules/volume-discounts/admin/options.php:151
    40624090msgid "Brands"
    40634091msgstr ""
    40644092
    4065 #: inc/modules/buy-x-get-y/admin/options.php:97, inc/modules/buy-x-get-y/admin/options.php:255, inc/modules/complementary-products/admin/options.php:98, inc/modules/complementary-products/admin/options.php:253, inc/modules/free-gifts/admin/options.php:99, inc/modules/free-gifts/admin/options.php:258, inc/modules/frequently-bought-together/admin/options.php:98, inc/modules/frequently-bought-together/admin/options.php:256, inc/modules/pre-orders/admin/options.php:105, inc/modules/pre-orders/admin/options.php:266, inc/modules/product-labels/admin/options.php:307, inc/modules/product-labels/admin/options.php:476, inc/modules/reasons-to-buy/admin/options.php:101, inc/modules/reasons-to-buy/admin/options.php:257, inc/modules/storewide-sale/admin/options.php:98, inc/modules/storewide-sale/admin/options.php:253, inc/modules/volume-discounts/admin/options.php:155, inc/modules/volume-discounts/admin/options.php:310
     4093#: inc/modules/buy-x-get-y/admin/options.php:97, inc/modules/buy-x-get-y/admin/options.php:255, inc/modules/complementary-products/admin/options.php:98, inc/modules/complementary-products/admin/options.php:253, inc/modules/free-gifts/admin/options.php:99, inc/modules/free-gifts/admin/options.php:258, inc/modules/frequently-bought-together/admin/options.php:98, inc/modules/frequently-bought-together/admin/options.php:256, inc/modules/pre-orders/admin/options.php:105, inc/modules/pre-orders/admin/options.php:266, inc/modules/product-labels/admin/options.php:306, inc/modules/product-labels/admin/options.php:475, inc/modules/reasons-to-buy/admin/options.php:101, inc/modules/reasons-to-buy/admin/options.php:257, inc/modules/storewide-sale/admin/options.php:98, inc/modules/storewide-sale/admin/options.php:253, inc/modules/volume-discounts/admin/options.php:155, inc/modules/volume-discounts/admin/options.php:310
    40664094msgid "Select brands"
    40674095msgstr ""
     
    40754103msgstr ""
    40764104
    4077 #: inc/modules/buy-x-get-y/admin/options.php:125, inc/modules/free-gifts/admin/options.php:107, inc/modules/frequently-bought-together/admin/options.php:126, inc/modules/product-labels/admin/options.php:324, inc/modules/spending-goal/admin/options.php:122, inc/modules/storewide-sale/admin/options.php:123, inc/modules/volume-discounts/admin/options.php:180, inc/modules/wishlist/admin/options.php:139
     4105#: inc/modules/buy-x-get-y/admin/options.php:125, inc/modules/free-gifts/admin/options.php:107, inc/modules/frequently-bought-together/admin/options.php:126, inc/modules/product-labels/admin/options.php:323, inc/modules/spending-goal/admin/options.php:122, inc/modules/storewide-sale/admin/options.php:123, inc/modules/volume-discounts/admin/options.php:180, inc/modules/wishlist/admin/options.php:139
    40784106msgid "Exclude Products"
    40794107msgstr ""
     
    40874115msgstr ""
    40884116
    4089 #: inc/modules/buy-x-get-y/admin/options.php:165, inc/modules/complementary-products/admin/options.php:163, inc/modules/free-gifts/admin/options.php:166, inc/modules/frequently-bought-together/admin/options.php:166, inc/modules/pre-orders/admin/options.php:174, inc/modules/product-labels/admin/options.php:384, inc/modules/reasons-to-buy/admin/options.php:167, inc/modules/storewide-sale/admin/options.php:163, inc/modules/volume-discounts/admin/options.php:220
     4117#: inc/modules/buy-x-get-y/admin/options.php:165, inc/modules/complementary-products/admin/options.php:163, inc/modules/free-gifts/admin/options.php:166, inc/modules/frequently-bought-together/admin/options.php:166, inc/modules/pre-orders/admin/options.php:174, inc/modules/product-labels/admin/options.php:383, inc/modules/reasons-to-buy/admin/options.php:167, inc/modules/storewide-sale/admin/options.php:163, inc/modules/volume-discounts/admin/options.php:220
    40904118msgid "Excluded Categories List"
    40914119msgstr ""
     
    40994127msgstr ""
    41004128
    4101 #: inc/modules/buy-x-get-y/admin/options.php:208, inc/modules/complementary-products/admin/options.php:206, inc/modules/free-gifts/admin/options.php:210, inc/modules/frequently-bought-together/admin/options.php:209, inc/modules/pre-orders/admin/options.php:218, inc/modules/product-labels/admin/options.php:428, inc/modules/reasons-to-buy/admin/options.php:210, inc/modules/storewide-sale/admin/options.php:206, inc/modules/volume-discounts/admin/options.php:263
     4129#: inc/modules/buy-x-get-y/admin/options.php:208, inc/modules/complementary-products/admin/options.php:206, inc/modules/free-gifts/admin/options.php:210, inc/modules/frequently-bought-together/admin/options.php:209, inc/modules/pre-orders/admin/options.php:218, inc/modules/product-labels/admin/options.php:427, inc/modules/reasons-to-buy/admin/options.php:210, inc/modules/storewide-sale/admin/options.php:206, inc/modules/volume-discounts/admin/options.php:263
    41024130msgid "Excluded Tags List"
    41034131msgstr ""
     
    41074135msgstr ""
    41084136
    4109 #: inc/modules/buy-x-get-y/admin/options.php:234, inc/modules/complementary-products/admin/options.php:232, inc/modules/free-gifts/admin/options.php:236, inc/modules/frequently-bought-together/admin/options.php:235, inc/modules/product-labels/admin/options.php:454, inc/modules/reasons-to-buy/admin/options.php:236
     4137#: inc/modules/buy-x-get-y/admin/options.php:234, inc/modules/complementary-products/admin/options.php:232, inc/modules/free-gifts/admin/options.php:236, inc/modules/frequently-bought-together/admin/options.php:235, inc/modules/product-labels/admin/options.php:453, inc/modules/reasons-to-buy/admin/options.php:236
    41104138msgid "Exclude Brands"
    41114139msgstr ""
    41124140
    4113 #: inc/modules/buy-x-get-y/admin/options.php:251, inc/modules/complementary-products/admin/options.php:249, inc/modules/free-gifts/admin/options.php:254, inc/modules/frequently-bought-together/admin/options.php:252, inc/modules/pre-orders/admin/options.php:262, inc/modules/product-labels/admin/options.php:472, inc/modules/reasons-to-buy/admin/options.php:253, inc/modules/storewide-sale/admin/options.php:249, inc/modules/volume-discounts/admin/options.php:306
     4141#: inc/modules/buy-x-get-y/admin/options.php:251, inc/modules/complementary-products/admin/options.php:249, inc/modules/free-gifts/admin/options.php:254, inc/modules/frequently-bought-together/admin/options.php:252, inc/modules/pre-orders/admin/options.php:262, inc/modules/product-labels/admin/options.php:471, inc/modules/reasons-to-buy/admin/options.php:253, inc/modules/storewide-sale/admin/options.php:249, inc/modules/volume-discounts/admin/options.php:306
    41144142msgid "Excluded Brands List"
    41154143msgstr ""
     
    42774305msgstr ""
    42784306
    4279 #: inc/modules/buy-x-get-y/admin/options.php:559, inc/modules/product-labels/admin/options.php:240, inc/modules/stock-scarcity/admin/options.php:157, inc/modules/volume-discounts/admin/options.php:608
     4307#: inc/modules/buy-x-get-y/admin/options.php:559, inc/modules/product-labels/admin/options.php:239, inc/modules/stock-scarcity/admin/options.php:157, inc/modules/volume-discounts/admin/options.php:608
    42804308msgid "Normal"
    42814309msgstr ""
    42824310
    4283 #: inc/modules/buy-x-get-y/admin/options.php:560, inc/modules/product-labels/admin/options.php:242, inc/modules/stock-scarcity/admin/options.php:158, inc/modules/volume-discounts/admin/options.php:609
     4311#: inc/modules/buy-x-get-y/admin/options.php:560, inc/modules/product-labels/admin/options.php:241, inc/modules/stock-scarcity/admin/options.php:158, inc/modules/volume-discounts/admin/options.php:609
    42844312msgid "Bold"
    42854313msgstr ""
     
    44174445msgstr ""
    44184446
    4419 #: inc/modules/cart-count-favicon/admin/options.php:36, inc/modules/product-labels/admin/options.php:154
     4447#: inc/modules/cart-count-favicon/admin/options.php:36
    44204448msgid "Top left"
    44214449msgstr ""
    44224450
    4423 #: inc/modules/cart-count-favicon/admin/options.php:37, inc/modules/product-labels/admin/options.php:155
     4451#: inc/modules/cart-count-favicon/admin/options.php:37
    44244452msgid "Top right"
    44254453msgstr ""
     
    44334461msgstr ""
    44344462
    4435 #: inc/modules/cart-count-favicon/admin/options.php:47, inc/modules/login-popup/admin/options.php:200, inc/modules/product-labels/admin/options.php:206, inc/modules/product-swatches/admin/options.php:92, inc/modules/product-swatches/admin/options.php:151, inc/modules/product-swatches/admin/options.php:409, inc/modules/product-swatches/admin/options.php:514, inc/modules/quick-social-links/admin/options.php:67, inc/modules/recent-sales-notifications/admin/options.php:645, inc/modules/scroll-to-top-button/admin/options.php:256, inc/modules/side-cart/admin/options.php:572, inc/modules/size-chart/admin/options.php:120, inc/modules/sticky-add-to-cart/admin/options.php:172, inc/modules/volume-discounts/admin/options.php:631
     4463#: inc/modules/cart-count-favicon/admin/options.php:47, inc/modules/login-popup/admin/options.php:200, inc/modules/product-labels/admin/options.php:205, inc/modules/product-swatches/admin/options.php:92, inc/modules/product-swatches/admin/options.php:151, inc/modules/product-swatches/admin/options.php:409, inc/modules/product-swatches/admin/options.php:514, inc/modules/quick-social-links/admin/options.php:67, inc/modules/recent-sales-notifications/admin/options.php:645, inc/modules/scroll-to-top-button/admin/options.php:256, inc/modules/side-cart/admin/options.php:572, inc/modules/size-chart/admin/options.php:120, inc/modules/sticky-add-to-cart/admin/options.php:172, inc/modules/volume-discounts/admin/options.php:631
    44364464msgid "Background color"
    44374465msgstr ""
     
    45944622msgstr ""
    45954623
    4596 #: inc/modules/clear-cart/admin/options.php:80, inc/modules/recent-sales-notifications/admin/options.php:570
    4597 msgid "Custom"
    4598 msgstr ""
    4599 
    46004624#: inc/modules/clear-cart/admin/options.php:88
    46014625msgid "Custom Redirect URL"
     
    46064630msgstr ""
    46074631
    4608 #: inc/modules/clear-cart/admin/options.php:114, inc/modules/clear-cart/admin/options.php:134, inc/modules/clear-cart/admin/options.php:156, inc/modules/free-gifts/admin/options.php:585, inc/modules/free-shipping-progress-bar/admin/options.php:220, inc/modules/free-shipping-progress-bar/admin/options.php:545, inc/modules/free-shipping-progress-bar/admin/options.php:643, inc/modules/free-shipping-progress-bar/admin/options.php:688, inc/modules/free-shipping-progress-bar/admin/options.php:791, inc/modules/free-shipping-progress-bar/admin/options.php:900, inc/modules/product-labels/admin/options.php:152, inc/modules/scroll-to-top-button/admin/options.php:64, inc/modules/side-cart/admin/options.php:516, inc/modules/sticky-add-to-cart/admin/options.php:23
     4632#: inc/modules/clear-cart/admin/options.php:114, inc/modules/clear-cart/admin/options.php:134, inc/modules/clear-cart/admin/options.php:156, inc/modules/free-gifts/admin/options.php:585, inc/modules/free-shipping-progress-bar/admin/options.php:220, inc/modules/free-shipping-progress-bar/admin/options.php:545, inc/modules/free-shipping-progress-bar/admin/options.php:643, inc/modules/free-shipping-progress-bar/admin/options.php:688, inc/modules/free-shipping-progress-bar/admin/options.php:791, inc/modules/free-shipping-progress-bar/admin/options.php:900, inc/modules/scroll-to-top-button/admin/options.php:64, inc/modules/side-cart/admin/options.php:516, inc/modules/sticky-add-to-cart/admin/options.php:23
    46094633msgid "Position"
    46104634msgstr ""
     
    46624686msgstr ""
    46634687
    4664 #: inc/modules/clear-cart/admin/options.php:199, inc/modules/product-labels/admin/options.php:89, inc/modules/quick-view/admin/options.php:26
     4688#: inc/modules/clear-cart/admin/options.php:199, inc/modules/product-labels/admin/options.php:85, inc/modules/quick-view/admin/options.php:26
    46654689msgid "Text"
    46664690msgstr ""
     
    47304754msgstr ""
    47314755
    4732 #: inc/modules/complementary-products/admin/options.php:123, inc/modules/free-gifts/admin/options.php:125, inc/modules/pre-orders/admin/options.php:132, inc/modules/product-labels/admin/options.php:342, inc/modules/reasons-to-buy/admin/options.php:126
     4756#: inc/modules/complementary-products/admin/options.php:123, inc/modules/free-gifts/admin/options.php:125, inc/modules/pre-orders/admin/options.php:132, inc/modules/product-labels/admin/options.php:341, inc/modules/reasons-to-buy/admin/options.php:126
    47334757msgid "Excluded Products List"
    47344758msgstr ""
     
    51405164msgstr ""
    51415165
    5142 #: inc/modules/free-gifts/admin/options.php:148, inc/modules/product-labels/admin/options.php:366, inc/modules/spending-goal/admin/options.php:139, inc/modules/wishlist/admin/options.php:156
     5166#: inc/modules/free-gifts/admin/options.php:148, inc/modules/product-labels/admin/options.php:365, inc/modules/spending-goal/admin/options.php:139, inc/modules/wishlist/admin/options.php:156
    51435167msgid "Exclude Categories"
    51445168msgstr ""
     
    51525176msgstr ""
    51535177
    5154 #: inc/modules/free-gifts/admin/options.php:192, inc/modules/product-labels/admin/options.php:410
     5178#: inc/modules/free-gifts/admin/options.php:192, inc/modules/product-labels/admin/options.php:409
    51555179msgid "Exclude Tags"
    51565180msgstr ""
     
    53145338msgstr ""
    53155339
    5316 #: inc/modules/free-gifts/admin/options.php:587, inc/modules/recent-sales-notifications/admin/options.php:498
     5340#: inc/modules/free-gifts/admin/options.php:587, inc/modules/product-labels/admin/options.php:152, inc/modules/recent-sales-notifications/admin/options.php:498
    53175341msgid "Top Right"
    53185342msgstr ""
    53195343
    5320 #: inc/modules/free-gifts/admin/options.php:588, inc/modules/recent-sales-notifications/admin/options.php:499
     5344#: inc/modules/free-gifts/admin/options.php:588, inc/modules/product-labels/admin/options.php:151, inc/modules/recent-sales-notifications/admin/options.php:499
    53215345msgid "Top Left"
    53225346msgstr ""
     
    60116035msgstr ""
    60126036
    6013 #: inc/modules/payment-logos/admin/options.php:77, inc/modules/product-brand-image/admin/options.php:34, inc/modules/product-navigation-links/admin/options.php:119, inc/modules/trust-badges/admin/options.php:96
    6014 msgid "Margin top"
    6015 msgstr ""
    6016 
    6017 #: inc/modules/payment-logos/admin/options.php:88, inc/modules/product-brand-image/admin/options.php:45, inc/modules/product-navigation-links/admin/options.php:130, inc/modules/trust-badges/admin/options.php:107
    6018 msgid "Margin bottom"
    6019 msgstr ""
    6020 
    60216037#: inc/modules/payment-logos/admin/options.php:99, inc/modules/product-brand-image/admin/options.php:56, inc/modules/trust-badges/admin/options.php:118
    60226038msgid "Image max width"
     
    63106326msgstr ""
    63116327
    6312 #: inc/modules/product-labels/admin/options.php:11
    6313 msgid "Margin Top"
    6314 msgstr ""
    6315 
    6316 #: inc/modules/product-labels/admin/options.php:11
    6317 msgid "Margin Bottom"
    6318 msgstr ""
    6319 
    6320 #: inc/modules/product-labels/admin/options.php:12
    6321 msgid "Margin Left"
    6322 msgstr ""
    6323 
    6324 #: inc/modules/product-labels/admin/options.php:12
    6325 msgid "Margin Right"
    6326 msgstr ""
    6327 
    6328 #: inc/modules/product-labels/admin/options.php:26
     6328#: inc/modules/product-labels/admin/options.php:22
    63296329msgid "Featured Products"
    63306330msgstr ""
    63316331
    6332 #: inc/modules/product-labels/admin/options.php:27
     6332#: inc/modules/product-labels/admin/options.php:23
    63336333msgid "Products on Sale"
    63346334msgstr ""
    63356335
    6336 #: inc/modules/product-labels/admin/options.php:28
     6336#: inc/modules/product-labels/admin/options.php:24
    63376337msgid "New Products"
    63386338msgstr ""
    63396339
    6340 #: inc/modules/product-labels/admin/options.php:29
     6340#: inc/modules/product-labels/admin/options.php:25
    63416341msgid "Out of Stock Products"
    63426342msgstr ""
    63436343
    6344 #: inc/modules/product-labels/admin/options.php:58
     6344#: inc/modules/product-labels/admin/options.php:54
    63456345msgid "Add New Label"
    63466346msgstr ""
    63476347
    6348 #: inc/modules/product-labels/admin/options.php:61, inc/modules/product-labels/admin/options.php:79
     6348#: inc/modules/product-labels/admin/options.php:57, inc/modules/product-labels/admin/options.php:75
    63496349msgid "Product label"
    63506350msgstr ""
    63516351
    6352 #: inc/modules/product-labels/admin/options.php:76
     6352#: inc/modules/product-labels/admin/options.php:72
    63536353msgid "Label name"
    63546354msgstr ""
    63556355
    6356 #: inc/modules/product-labels/admin/options.php:77
     6356#: inc/modules/product-labels/admin/options.php:73
    63576357msgid "Internal label name. This is not visible to customers."
    63586358msgstr ""
    63596359
    6360 #: inc/modules/product-labels/admin/options.php:90
     6360#: inc/modules/product-labels/admin/options.php:86
    63616361msgid "Add text label"
    63626362msgstr ""
    63636363
    6364 #: inc/modules/product-labels/admin/options.php:95
     6364#: inc/modules/product-labels/admin/options.php:91
    63656365msgid "Add image label"
    63666366msgstr ""
    63676367
    6368 #: inc/modules/product-labels/admin/options.php:104
     6368#: inc/modules/product-labels/admin/options.php:100
    63696369msgid "Label content"
    63706370msgstr ""
    63716371
    63726372#. translators: %1$s: Discount percentage, %2$s: Discount amount, %3$s: In Stock, %4$s: Total quantity
    6373 #: inc/modules/product-labels/admin/options.php:110
     6373#: inc/modules/product-labels/admin/options.php:106
    63746374msgid "<strong>%1$s:</strong> to show discount percentage<br><strong>%2$s:</strong> to show discount amount<br><strong>%3$s:</strong> to show In Stock, Sold Out<br><strong>%4$s:</strong> to show total quantity in inventory"
    63756375msgstr ""
    63766376
    6377 #: inc/modules/product-labels/admin/options.php:125
     6377#: inc/modules/product-labels/admin/options.php:121
    63786378msgid "Label shape"
    63796379msgstr ""
    63806380
    6381 #: inc/modules/product-labels/admin/options.php:134
     6381#: inc/modules/product-labels/admin/options.php:130
    63826382msgid "Image label"
    63836383msgstr ""
    63846384
    6385 #: inc/modules/product-labels/admin/options.php:144
     6385#: inc/modules/product-labels/admin/options.php:140
    63866386msgid "Upload custom image label"
    63876387msgstr ""
    63886388
    6389 #: inc/modules/product-labels/admin/options.php:145, inc/modules/recent-sales-notifications/admin/options.php:629
     6389#: inc/modules/product-labels/admin/options.php:141, inc/modules/recent-sales-notifications/admin/options.php:629
    63906390msgid "Click to upload or drag and drop"
    63916391msgstr ""
    63926392
    6393 #: inc/modules/product-labels/admin/options.php:185
     6393#: inc/modules/product-labels/admin/options.php:148
     6394msgid "Anchor Point"
     6395msgstr ""
     6396
     6397#: inc/modules/product-labels/admin/options.php:149
     6398msgid "Which point of the label to use as the anchor for positioning."
     6399msgstr ""
     6400
     6401#: inc/modules/product-labels/admin/options.php:160
     6402msgid "Horizontal Position (X)"
     6403msgstr ""
     6404
     6405#: inc/modules/product-labels/admin/options.php:161
     6406msgid "Horizontal position from left edge."
     6407msgstr ""
     6408
     6409#: inc/modules/product-labels/admin/options.php:172
     6410msgid "Vertical Position (Y)"
     6411msgstr ""
     6412
     6413#: inc/modules/product-labels/admin/options.php:173
     6414msgid "Vertical position from top edge."
     6415msgstr ""
     6416
     6417#: inc/modules/product-labels/admin/options.php:184
    63946418msgid "Label width"
    63956419msgstr ""
    63966420
    6397 #: inc/modules/product-labels/admin/options.php:195
     6421#: inc/modules/product-labels/admin/options.php:194
    63986422msgid "Label height"
    63996423msgstr ""
    64006424
    6401 #: inc/modules/product-labels/admin/options.php:214
     6425#: inc/modules/product-labels/admin/options.php:213
    64026426msgid "Shape radius"
    64036427msgstr ""
    64046428
    6405 #: inc/modules/product-labels/admin/options.php:238
     6429#: inc/modules/product-labels/admin/options.php:237
    64066430msgid "Font style"
    64076431msgstr ""
    64086432
    6409 #: inc/modules/product-labels/admin/options.php:241
     6433#: inc/modules/product-labels/admin/options.php:240
    64106434msgid "Italic"
    64116435msgstr ""
    64126436
    6413 #: inc/modules/product-labels/admin/options.php:243
     6437#: inc/modules/product-labels/admin/options.php:242
    64146438msgid "Bold Italic"
    64156439msgstr ""
    64166440
    6417 #: inc/modules/product-labels/admin/options.php:252
     6441#: inc/modules/product-labels/admin/options.php:251
    64186442msgid "Font color"
    64196443msgstr ""
    64206444
    6421 #: inc/modules/product-labels/admin/options.php:260
     6445#: inc/modules/product-labels/admin/options.php:259
    64226446msgid "Product trigger"
    64236447msgstr ""
    64246448
     6449#: inc/modules/product-labels/admin/options.php:269
     6450msgid "How long counts as new"
     6451msgstr ""
     6452
    64256453#: inc/modules/product-labels/admin/options.php:270
    6426 msgid "How long counts as new"
    6427 msgstr ""
    6428 
    6429 #: inc/modules/product-labels/admin/options.php:271
    64306454msgid "Set the number of days the product will be marked as ‘New’ after it has been created"
    64316455msgstr ""
    64326456
    6433 #: inc/modules/product-labels/admin/options.php:284
     6457#: inc/modules/product-labels/admin/options.php:283
    64346458msgid "Select the product categories that will show the label."
    64356459msgstr ""
    64366460
    6437 #: inc/modules/product-labels/admin/options.php:296
     6461#: inc/modules/product-labels/admin/options.php:295
    64386462msgid "Select the product tags that will show the label."
    64396463msgstr ""
    64406464
    6441 #: inc/modules/product-labels/admin/options.php:308
     6465#: inc/modules/product-labels/admin/options.php:307
    64426466msgid "Select the product brands that will show the label."
    64436467msgstr ""
    64446468
    6445 #: inc/modules/product-labels/admin/options.php:316
     6469#: inc/modules/product-labels/admin/options.php:315
    64466470msgid "Select the products that will show the label."
    64476471msgstr ""
    64486472
    6449 #: inc/modules/product-labels/admin/options.php:325
     6473#: inc/modules/product-labels/admin/options.php:324
    64506474msgid "Exclude specific products from this label."
    64516475msgstr ""
    64526476
    6453 #: inc/modules/product-labels/admin/options.php:343
     6477#: inc/modules/product-labels/admin/options.php:342
    64546478msgid "Exclude products from this label."
    64556479msgstr ""
    64566480
    6457 #: inc/modules/product-labels/admin/options.php:367
     6481#: inc/modules/product-labels/admin/options.php:366
    64586482msgid "Exclude specific categories from this label."
    64596483msgstr ""
    64606484
    6461 #: inc/modules/product-labels/admin/options.php:389
     6485#: inc/modules/product-labels/admin/options.php:388
    64626486msgid "Exclude categories from this label."
    64636487msgstr ""
    64646488
    6465 #: inc/modules/product-labels/admin/options.php:411
     6489#: inc/modules/product-labels/admin/options.php:410
    64666490msgid "Exclude specific tags from this label."
    64676491msgstr ""
    64686492
    6469 #: inc/modules/product-labels/admin/options.php:433
     6493#: inc/modules/product-labels/admin/options.php:432
    64706494msgid "Exclude tags from this label."
    64716495msgstr ""
    64726496
    6473 #: inc/modules/product-labels/admin/options.php:455
     6497#: inc/modules/product-labels/admin/options.php:454
    64746498msgid "Exclude specific brands from this label."
    64756499msgstr ""
    64766500
    6477 #: inc/modules/product-labels/admin/options.php:477
     6501#: inc/modules/product-labels/admin/options.php:476
    64786502msgid "Exclude brands from this label."
     6503msgstr ""
     6504
     6505#: inc/modules/product-labels/admin/options.php:530
     6506msgid "Use multiple labels"
     6507msgstr ""
     6508
     6509#: inc/modules/product-labels/admin/options.php:531
     6510msgid "Enable this to display multiple labels assigned to the product when multiple labels are available."
    64796511msgstr ""
    64806512
  • merchant/trunk/merchant.php

    r3389952 r3403526  
    44 * Plugin URI:  https://athemes.com/merchant
    55 * Description: All-in-one WooCommerce plugin for pre-orders, product labels, buy now, quick view, discount rules and more.
    6  * Version:     2.1.9
     6 * Version:     2.2.0
    77 * Author:      aThemes
    88 * Author URI:  https://athemes.com
     
    2525
    2626// Merchant constants.
    27 define( 'MERCHANT_VERSION', '2.1.9' );
     27define( 'MERCHANT_VERSION', '2.2.0' );
    2828define( 'MERCHANT_DB_VERSION', '1.1.0' ); // Update only when the database structure changes. In inc/classes/class-merchant-db-tables.php
    2929define( 'MERCHANT_FILE', __FILE__ );
  • merchant/trunk/readme.txt

    r3389952 r3403526  
    44Tested up to: 6.8
    55Requires PHP: 7.3
    6 Stable tag: 2.1.9
     6Stable tag: 2.2.0
    77Contributors: aThemes
    88License: GPLv3 or later
     
    219219
    220220== Changelog ==
     221= 2.2.0 =
     222* Added - Product Labels: Added support to display multiple labels on product images
     223* Added - Buy Now: Added button size and margin controls for the “Buy Now” button
     224
    221225= 2.1.9 =
    222226* Added - Pre-Orders and Buy Now: Added logic to hide the “Buy Now” button for products marked as pre-order
Note: See TracChangeset for help on using the changeset viewer.