Version Description
- Added section to control the attribute type directly in the plugin settings panel
- Added feature to show the swatch images on shop/archive pages
- Added feature to disable the swatches by product
- Fixed the swatch styles
- Minor fix bugs
Download this release
Release Info
Developer | themealien |
Plugin | Variation Swatches for WooCommerce |
Version | 2.1.0 |
Comparing to | |
See all releases |
Code changes from version 2.0.22 to 2.1.0
- assets/css/admin.css +78 -11
- assets/css/admin.css.map +1 -1
- assets/css/admin.scss +88 -10
- assets/css/frontend.css +195 -113
- assets/css/frontend.css.map +1 -1
- assets/css/frontend.scss +263 -241
- assets/js/admin.js +75 -5
- assets/js/frontend.js +168 -126
- includes/class-admin.php +176 -4
- includes/class-frontend.php +52 -28
- includes/class-menu-page.php +94 -2
- includes/class-setting-fields-manager.php +75 -9
- includes/class-setting-fields-renderer.php +1 -1
- includes/class-variation-swatches.php +16 -2
- readme.txt +13 -6
- templates/admin/welcome-popup-version-2_0_0.php +0 -18
- templates/admin/welcome-popup.php +27 -0
- variation-swatches-for-woocommerce.php +2 -2
assets/css/admin.css
CHANGED
@@ -379,7 +379,7 @@ input.font-size-input {
|
|
379 |
align-items: center;
|
380 |
padding-bottom: 20px;
|
381 |
border-bottom: 1px solid #F3F3F3;
|
382 |
-
|
383 |
}
|
384 |
.variation-switcher-item.hidden {
|
385 |
display: none;
|
@@ -596,10 +596,10 @@ button.accor-tab-btn.active-at-btn {
|
|
596 |
content: "";
|
597 |
position: absolute;
|
598 |
display: none;
|
599 |
-
left:
|
600 |
top: 3px;
|
601 |
-
width:
|
602 |
-
height:
|
603 |
border: solid white;
|
604 |
border-width: 0 3px 3px 0;
|
605 |
-webkit-transform: rotate(45deg);
|
@@ -1027,7 +1027,7 @@ p.vmch-text a:focus {
|
|
1027 |
}
|
1028 |
|
1029 |
.wcvs-welcome-popup {
|
1030 |
-
max-width:
|
1031 |
margin-top: calc(50vh - 250px);
|
1032 |
}
|
1033 |
.wcvs-welcome-popup .popup-logo {
|
@@ -1036,6 +1036,9 @@ p.vmch-text a:focus {
|
|
1036 |
.wcvs-welcome-popup .popup-logo img {
|
1037 |
max-width: 250px;
|
1038 |
}
|
|
|
|
|
|
|
1039 |
.wcvs-welcome-popup .popup-iframe {
|
1040 |
position: relative;
|
1041 |
padding-bottom: 56.25%;
|
@@ -1049,14 +1052,12 @@ p.vmch-text a:focus {
|
|
1049 |
width: 100%;
|
1050 |
height: 100%;
|
1051 |
}
|
1052 |
-
|
1053 |
-
|
1054 |
-
margin-left: calc(50vw - 500px);
|
1055 |
-
}
|
1056 |
}
|
1057 |
-
@media screen and (
|
1058 |
.wcvs-welcome-popup {
|
1059 |
-
margin-left: calc(50vw -
|
1060 |
}
|
1061 |
}
|
1062 |
@media screen and (max-width: 782px) {
|
@@ -1137,6 +1138,72 @@ p.vmch-text a:focus {
|
|
1137 |
border: 1px solid #5d6367;
|
1138 |
}
|
1139 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1140 |
@media (max-width: 486px) {
|
1141 |
.variation-header-wrap, .thd-theme-dashboard-wrap {
|
1142 |
margin-right: 10px;
|
379 |
align-items: center;
|
380 |
padding-bottom: 20px;
|
381 |
border-bottom: 1px solid #F3F3F3;
|
382 |
+
padding-top: 20px;
|
383 |
}
|
384 |
.variation-switcher-item.hidden {
|
385 |
display: none;
|
596 |
content: "";
|
597 |
position: absolute;
|
598 |
display: none;
|
599 |
+
left: 7px;
|
600 |
top: 3px;
|
601 |
+
width: 4px;
|
602 |
+
height: 9px;
|
603 |
border: solid white;
|
604 |
border-width: 0 3px 3px 0;
|
605 |
-webkit-transform: rotate(45deg);
|
1027 |
}
|
1028 |
|
1029 |
.wcvs-welcome-popup {
|
1030 |
+
max-width: 450px;
|
1031 |
margin-top: calc(50vh - 250px);
|
1032 |
}
|
1033 |
.wcvs-welcome-popup .popup-logo {
|
1036 |
.wcvs-welcome-popup .popup-logo img {
|
1037 |
max-width: 250px;
|
1038 |
}
|
1039 |
+
.wcvs-welcome-popup .popup-title {
|
1040 |
+
font-size: 1.8em;
|
1041 |
+
}
|
1042 |
.wcvs-welcome-popup .popup-iframe {
|
1043 |
position: relative;
|
1044 |
padding-bottom: 56.25%;
|
1052 |
width: 100%;
|
1053 |
height: 100%;
|
1054 |
}
|
1055 |
+
.wcvs-welcome-popup .popup-inner-content p {
|
1056 |
+
font-size: 1.3em;
|
|
|
|
|
1057 |
}
|
1058 |
+
@media screen and (min-width: 961px) {
|
1059 |
.wcvs-welcome-popup {
|
1060 |
+
margin-left: calc(50vw - 450px);
|
1061 |
}
|
1062 |
}
|
1063 |
@media screen and (max-width: 782px) {
|
1138 |
border: 1px solid #5d6367;
|
1139 |
}
|
1140 |
|
1141 |
+
.configure-items-link {
|
1142 |
+
float: left;
|
1143 |
+
}
|
1144 |
+
|
1145 |
+
#woocommerce-coupon-data ul.wc-tabs li.variation-swatches_options a::before,
|
1146 |
+
#woocommerce-product-data ul.wc-tabs li.variation-swatches_options a::before,
|
1147 |
+
.woocommerce ul.wc-tabs li.variation-swatches_options a::before {
|
1148 |
+
content: "\f11c";
|
1149 |
+
}
|
1150 |
+
|
1151 |
+
.ajax-to-update,
|
1152 |
+
.main-ajax-trigger {
|
1153 |
+
position: relative;
|
1154 |
+
}
|
1155 |
+
.ajax-to-update.saving:after,
|
1156 |
+
.main-ajax-trigger.saving:after {
|
1157 |
+
content: "";
|
1158 |
+
position: absolute;
|
1159 |
+
top: 0;
|
1160 |
+
left: 0;
|
1161 |
+
width: 100%;
|
1162 |
+
height: 100%;
|
1163 |
+
background: rgba(204, 204, 204, 0.87);
|
1164 |
+
}
|
1165 |
+
.ajax-to-update.saving:before,
|
1166 |
+
.main-ajax-trigger.saving:before {
|
1167 |
+
content: "";
|
1168 |
+
display: block;
|
1169 |
+
position: absolute;
|
1170 |
+
left: 48%;
|
1171 |
+
top: 40%;
|
1172 |
+
width: 20px;
|
1173 |
+
height: 20px;
|
1174 |
+
z-index: 9;
|
1175 |
+
border-style: solid;
|
1176 |
+
border-color: #008060;
|
1177 |
+
border-top-color: transparent;
|
1178 |
+
border-width: 4px;
|
1179 |
+
border-radius: 50%;
|
1180 |
+
-webkit-animation: spin 0.8s linear infinite;
|
1181 |
+
animation: spin 0.8s linear infinite;
|
1182 |
+
}
|
1183 |
+
|
1184 |
+
@-webkit-keyframes spin {
|
1185 |
+
from {
|
1186 |
+
-webkit-transform: rotate(0deg);
|
1187 |
+
}
|
1188 |
+
to {
|
1189 |
+
-webkit-transform: rotate(360deg);
|
1190 |
+
}
|
1191 |
+
}
|
1192 |
+
@keyframes spin {
|
1193 |
+
from {
|
1194 |
+
transform: rotate(0deg);
|
1195 |
+
}
|
1196 |
+
to {
|
1197 |
+
transform: rotate(360deg);
|
1198 |
+
}
|
1199 |
+
}
|
1200 |
+
@media screen and (min-width: 600px) {
|
1201 |
+
.pro-feature-popup {
|
1202 |
+
width: 450px;
|
1203 |
+
margin-left: calc(50vw - 350px);
|
1204 |
+
margin-top: calc(50vh - 150px);
|
1205 |
+
}
|
1206 |
+
}
|
1207 |
@media (max-width: 486px) {
|
1208 |
.variation-header-wrap, .thd-theme-dashboard-wrap {
|
1209 |
margin-right: 10px;
|
assets/css/admin.css.map
CHANGED
@@ -1 +1 @@
|
|
1 |
-
{"version":3,"sourceRoot":"","sources":["admin.scss"],"names":[],"mappings":";AACE;EACE;;;AAIJ;EACE;EACA;EACA;EACA;EACA;EACA;;;AAGF;EACE;EACA;;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;EACE;;;AAIJ;EACE;;;AAGF;EACE;EACA;;;AAGF;EACE;EACA;EACA;;;AAGF;EACE;;AAEA;EACE;;AAIA;EACE;;AAGF;EACE;;;AAKN;AAEA;EACE;;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;AAGF;EACE;EACA;;AAEA;EACE;EACA;EACA;;;AAIJ;EACE;EACA;EACA;AAEA;EACA;EACA;EACA;EACA;;AAEA;EACE;EACA;EACA;EACA;EACA;EACA;;AAEA;EASE;;AARA;EACE;EACA;EACA;EACA;EACA;;;AAQR;EACE;IACE;IACA;;;EAGF;IACE;IACA;IACA;;;EAGF;IACE;IACA;IACA;;;EAGF;IACE;;;AAIJ;EACE;IACE;;;AAIJ;EACE;IACE;;;AAIJ;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;AAGF;EACE;EACA;EACA;;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;;;AAGF;EACE;EACA;EACA;EACA;EACA;;;AAGF;EACE;EACA;EACA;EACA;EACA;;;AAGF;AAAA;AAAA;AAIA;EACE;EACA;EACA;;;AAIA;EACE;EACA;EACA;;AAGF;EACE;EACA;;AAGF;EACE;;;AAKF;EACE;EACA;;AAGF;EACE;EACA;EACA;EACA;EACA;;AAGF;EACE;EACA;EACA;EACA;;AAGF;EACE;EACA;EACA;;AAGF;EACE;EACA;EACA;EACA;EACA;;AAEA;EACE;EACA;;AAIJ;EACE;EACA;EACA;;AAGF;EACE;EACA;;AAIA;EACE;EACA;EACA;EACA;;AAGF;EACE;EACA;EACA;EACA;;;AAKN;EACE;IACE;IACA;IACA;IACA;;;AAIJ;EAEI;IACE;IACA;IACA;IACA;;EAGF;IACE;IACA;IACA;IACA;;EAEA;IACE;;;AAMR;EACE;EACA;EACA;EACA;;;AAGF;EACE;EACA;EACA;;;AAGF;EACE;;;AAGF;EACE;;;AAGF;EACE;EACA;;;AAIA;EACE;;AAGF;EACE;;;AAIJ;EACE;EACA;EACA;EACA;EACA;EACA;;;AAGF;EACE;EACA;EACA;EACA;;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;AAGF;EACE;EACA;EACA;;;AAIA;EACE;;AAGF;EACE;;;AAIJ;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;EACE;;AAGF;EACE;EACA;EACA;;AAGF;EACE;EACA;;AAEA;AAAA;EAEE;;AAGF;AAAA;EAEE;;AAGF;EACE;EACA;EACA;;AAEA;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAKN;EACE;EACA;;AAEA;EACE;;AAGF;EACE;;;AAKN;EACE;;;AAGF;EACE;EACA;EACA;;;AAGF;EACE;EACA;;;AAGF;AAEA;EACE;EACA;EACA;EACA;;AAEA;EACE;EACA;EACA;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAKF;EACE;;AAGF;EACE;;AAGF;EACE;EACA;EACA;;AAIJ;EACE;;AAEA;EACE;;;AAKN;AAEA;AAEA;AAEA;EACE;EACA;EACA;;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;EACE;EACA;;;AAIJ;EACE;;AAEA;EACE;;;AAIJ;EACE;;AAEA;EACE;;AAGF;EACE;;AAGF;EACE;;;AAIJ;EACE;EACA;;;AAGF;EACE;EACA;EACA;;AAEA;EACE;;;AAIJ;EACE;;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;EACE;EACA;EACA;EACA;EACA;;AAEA;EACE;;AAEA;EACE;;AAKN;EACE;EACA;EACA;EACA;EACA;EACA;;AAEA;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAIJ;EACE;;;AAIJ;EACE;;AAEA;EACE;EACA;;AAGF;EACE;;;AAIJ;EACE;EACA;EACA;EACA;;;AAGF;EACE;;;AAGF;EACE;;AAEA;EACE;EACA;EACA;EACA;EACA;;AAOE;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAGF;EACE;;AAKF;EACE;;AAKF;EACE;;;AAMR;EACE;EACA;EACA;;;AAGF;EACE;;;AAGF;EACE;IACE;;;AAKF;EACE;;AAGF;EACE;;;AAIJ;EACE;EACA;EACA;EACA;EACA;;;AAGF;EACE;;;AAGF;EACE;EACA;EACA;EACA;;;AAGF;EACE;EACA;EACA;EACA;EACA;;;AAIA;EACE;;AAEA;EACE;EACA;;AAIJ;EACE;EACA;EACA;EACA;EACA;EACA;EACA;;;AAIJ;EACE;IACE;;;AAIJ;EACE;IACE;IACA;;;EAGF;IACE;;;AAIJ;EACE;IACE;;EAEA;IACE;IACA;;;EAIJ;IACE;;;EAGF;IACE;;;EAGF;IACE;;;AAIJ;EACE;;;AAIA;EACE;EACA;;AAGF;EACE;;;AAIJ;EACE;IACE;IACA;;;AAIJ;EACE;;;AAGF;EACE;;;AAGF;EACE;;;AAGF;EACE;EACA;EACA;EACA;EACA;;;AAGF;AAGE;EACE;EACA;;AAGF;EACE;EACA;EACA;;AAGF;EACE;EACA;;AAEA;EACE;;AAIJ;EACE;EACA;;AAGF;EACE;;AAGF;EACE;EACA;;AAGF;EACE;EACA;EACA;;AAGF;EACE;;AAEA;EACE;;AAKF;EACE;EACA;EACA;EACA;EACA;;AAGF;EACE;;AAGF;EACE;EACA;EACA;;AAIJ;EACE;EACA;EACA;;AAIA;EACE;EACA;EACA;;;AAKN;EAEI;IACE;IACA;IACA;IACA;;EAGF;IACE;IACA;IACA;IACA;;;AAMJ;EACE;;AAGF;EACE;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;;AAGF;EACE;EACA;EACA;EACA;;AAGF;EACE;EACA;EACA;EACA;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;;AAGF;EACE;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAGF;EACE;EACA;EACA;EACA;EACA;;AAEA;EACE;EACA;;AAIJ;EACE;;;AAIJ;EACE;;;AAGF;EACE;EACA;;AAEA;EACE;EACA;;;AAIJ;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAGE;EACE;EACA;EACA;EACA;EACA;;AAEA;EACE;EACA;EACA;EACA;;AAIA;EACE;;;AAQV;EACE;EACA;;AAGE;EACE;;AAEA;EACE;;AAIJ;EACE;EACA;EACA;EACA;;AAEA;EACE;EACA;EACA;EACA;EACA;;
|
1 |
+
{"version":3,"sourceRoot":"","sources":["admin.scss"],"names":[],"mappings":";AACE;EACE;;;AAIJ;EACE;EACA;EACA;EACA;EACA;EACA;;;AAGF;EACE;EACA;;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;EACE;;;AAIJ;EACE;;;AAGF;EACE;EACA;;;AAGF;EACE;EACA;EACA;;;AAGF;EACE;;AAEA;EACE;;AAIA;EACE;;AAGF;EACE;;;AAKN;AAEA;EACE;;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;AAGF;EACE;EACA;;AAEA;EACE;EACA;EACA;;;AAIJ;EACE;EACA;EACA;AAEA;EACA;EACA;EACA;EACA;;AAEA;EACE;EACA;EACA;EACA;EACA;EACA;;AAEA;EASE;;AARA;EACE;EACA;EACA;EACA;EACA;;;AAQR;EACE;IACE;IACA;;;EAGF;IACE;IACA;IACA;;;EAGF;IACE;IACA;IACA;;;EAGF;IACE;;;AAIJ;EACE;IACE;;;AAIJ;EACE;IACE;;;AAIJ;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;AAGF;EACE;EACA;EACA;;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;;;AAGF;EACE;EACA;EACA;EACA;EACA;;;AAGF;EACE;EACA;EACA;EACA;EACA;;;AAGF;AAAA;AAAA;AAIA;EACE;EACA;EACA;;;AAIA;EACE;EACA;EACA;;AAGF;EACE;EACA;;AAGF;EACE;;;AAKF;EACE;EACA;;AAGF;EACE;EACA;EACA;EACA;EACA;;AAGF;EACE;EACA;EACA;EACA;;AAGF;EACE;EACA;EACA;;AAGF;EACE;EACA;EACA;EACA;EACA;;AAEA;EACE;EACA;;AAIJ;EACE;EACA;EACA;;AAGF;EACE;EACA;;AAIA;EACE;EACA;EACA;EACA;;AAGF;EACE;EACA;EACA;EACA;;;AAKN;EACE;IACE;IACA;IACA;IACA;;;AAIJ;EAEI;IACE;IACA;IACA;IACA;;EAGF;IACE;IACA;IACA;IACA;;EAEA;IACE;;;AAMR;EACE;EACA;EACA;EACA;;;AAGF;EACE;EACA;EACA;;;AAGF;EACE;;;AAGF;EACE;;;AAGF;EACE;EACA;;;AAIA;EACE;;AAGF;EACE;;;AAIJ;EACE;EACA;EACA;EACA;EACA;EACA;;;AAGF;EACE;EACA;EACA;EACA;;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;AAGF;EACE;EACA;EACA;;;AAIA;EACE;;AAGF;EACE;;;AAIJ;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;EACE;;AAGF;EACE;EACA;EACA;;AAGF;EACE;EACA;;AAEA;AAAA;EAEE;;AAGF;AAAA;EAEE;;AAGF;EACE;EACA;EACA;;AAEA;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAKN;EACE;EACA;;AAEA;EACE;;AAGF;EACE;;;AAKN;EACE;;;AAGF;EACE;EACA;EACA;;;AAGF;EACE;EACA;;;AAGF;AAEA;EACE;EACA;EACA;EACA;;AAEA;EACE;EACA;EACA;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAKF;EACE;;AAGF;EACE;;AAGF;EACE;EACA;EACA;;AAIJ;EACE;;AAEA;EACE;;;AAKN;AAEA;AAEA;AAEA;EACE;EACA;EACA;;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;EACE;EACA;;;AAIJ;EACE;;AAEA;EACE;;;AAIJ;EACE;;AAEA;EACE;;AAGF;EACE;;AAGF;EACE;;;AAIJ;EACE;EACA;;;AAGF;EACE;EACA;EACA;;AAEA;EACE;;;AAIJ;EACE;;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;EACE;EACA;EACA;EACA;EACA;;AAEA;EACE;;AAEA;EACE;;AAKN;EACE;EACA;EACA;EACA;EACA;EACA;;AAEA;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAIJ;EACE;;;AAIJ;EACE;;AAEA;EACE;EACA;;AAGF;EACE;;;AAIJ;EACE;EACA;EACA;EACA;;;AAGF;EACE;;;AAGF;EACE;;AAEA;EACE;EACA;EACA;EACA;EACA;;AAOE;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAGF;EACE;;AAKF;EACE;;AAKF;EACE;;;AAMR;EACE;EACA;EACA;;;AAGF;EACE;;;AAGF;EACE;IACE;;;AAKF;EACE;;AAGF;EACE;;;AAIJ;EACE;EACA;EACA;EACA;EACA;;;AAGF;EACE;;;AAGF;EACE;EACA;EACA;EACA;;;AAGF;EACE;EACA;EACA;EACA;EACA;;;AAIA;EACE;;AAEA;EACE;EACA;;AAIJ;EACE;EACA;EACA;EACA;EACA;EACA;EACA;;;AAIJ;EACE;IACE;;;AAIJ;EACE;IACE;IACA;;;EAGF;IACE;;;AAIJ;EACE;IACE;;EAEA;IACE;IACA;;;EAIJ;IACE;;;EAGF;IACE;;;EAGF;IACE;;;AAIJ;EACE;;;AAIA;EACE;EACA;;AAGF;EACE;;;AAIJ;EACE;IACE;IACA;;;AAIJ;EACE;;;AAGF;EACE;;;AAGF;EACE;;;AAGF;EACE;EACA;EACA;EACA;EACA;;;AAGF;AAGE;EACE;EACA;;AAGF;EACE;EACA;EACA;;AAGF;EACE;EACA;;AAEA;EACE;;AAIJ;EACE;EACA;;AAGF;EACE;;AAGF;EACE;EACA;;AAGF;EACE;EACA;EACA;;AAGF;EACE;;AAEA;EACE;;AAKF;EACE;EACA;EACA;EACA;EACA;;AAGF;EACE;;AAGF;EACE;EACA;EACA;;AAIJ;EACE;EACA;EACA;;AAIA;EACE;EACA;EACA;;;AAKN;EAEI;IACE;IACA;IACA;IACA;;EAGF;IACE;IACA;IACA;IACA;;;AAMJ;EACE;;AAGF;EACE;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;;AAGF;EACE;EACA;EACA;EACA;;AAGF;EACE;EACA;EACA;EACA;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;;AAGF;EACE;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAGF;EACE;EACA;EACA;EACA;EACA;;AAEA;EACE;EACA;;AAIJ;EACE;;;AAIJ;EACE;;;AAGF;EACE;EACA;;AAEA;EACE;EACA;;;AAIJ;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAGE;EACE;EACA;EACA;EACA;EACA;;AAEA;EACE;EACA;EACA;EACA;;AAIA;EACE;;;AAQV;EACE;EACA;;AAGE;EACE;;AAEA;EACE;;AAIJ;EACE;;AAGF;EACE;EACA;EACA;EACA;;AAEA;EACE;EACA;EACA;EACA;EACA;;AAMF;EACE;;AAMN;EAzCF;IA0CI;;;AAGF;EA7CF;IA8CI;IACA;;;AAGF;EAlDF;IAmDI;IACA;;;;AAQE;EACE;;AAIJ;EACE;;AAGF;EACE;EACA;EACA;;AAGF;EACE;EACA;;AAGF;EACE;;AAGF;EACE;;AAGF;EACE;EACA;EACA;;AAIA;EACE;EACA;;AAGF;EACE;;AAON;EAnDF;IAoDI;IACA;IACA;;;AAEF;EAxDF;IAyDI;IACA;;;;AAIJ;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;AAKE;EACE;EACA;EACA;;;AAKN;EACE;;;AAGF;AAAA;AAAA;EAGE;;;AAGF;AAAA;EAEE;;AAGE;AAAA;EACE;EACA;EACA;EACA;EACA;EACA;EACA;;AAGF;AAAA;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;AAKN;EACE;IACE;;EAEF;IACE;;;AAIJ;EACE;IACE;;EAEF;IACE;;;AAIJ;EAEE;IACE;IACA;IACA;;;AAIJ;EACE;IACE;;;EAGF;IACE;IACA;;;EAIA;IACE;IACA;;EAGF;IACE;;;AAKN;AAEA;EACE;IACE;;EAEF;IACE;;;AAIJ;EACE;IACE;;EAEF;IACE","file":"admin.css"}
|
assets/css/admin.scss
CHANGED
@@ -425,7 +425,7 @@ input.font-size-input {
|
|
425 |
align-items: center;
|
426 |
padding-bottom: 20px;
|
427 |
border-bottom: 1px solid #F3F3F3;
|
428 |
-
|
429 |
|
430 |
&.hidden {
|
431 |
display: none;
|
@@ -675,10 +675,10 @@ button.accor-tab-btn {
|
|
675 |
content: "";
|
676 |
position: absolute;
|
677 |
display: none;
|
678 |
-
left:
|
679 |
top: 3px;
|
680 |
-
width:
|
681 |
-
height:
|
682 |
border: solid white;
|
683 |
border-width: 0 3px 3px 0;
|
684 |
-webkit-transform: rotate(45deg);
|
@@ -1190,7 +1190,7 @@ p.vmch-text a {
|
|
1190 |
}
|
1191 |
|
1192 |
.wcvs-welcome-popup {
|
1193 |
-
max-width:
|
1194 |
margin-top: calc(50vh - 250px);
|
1195 |
|
1196 |
.popup {
|
@@ -1202,6 +1202,10 @@ p.vmch-text a {
|
|
1202 |
}
|
1203 |
}
|
1204 |
|
|
|
|
|
|
|
|
|
1205 |
&-iframe {
|
1206 |
position: relative;
|
1207 |
padding-bottom: 56.25%;
|
@@ -1218,14 +1222,16 @@ p.vmch-text a {
|
|
1218 |
|
1219 |
}
|
1220 |
|
1221 |
-
|
|
|
|
|
|
|
|
|
1222 |
|
1223 |
-
@media screen and (min-width: 961px) {
|
1224 |
-
margin-left: calc(50vw - 500px);
|
1225 |
}
|
1226 |
|
1227 |
-
@media screen and (
|
1228 |
-
margin-left: calc(50vw -
|
1229 |
}
|
1230 |
|
1231 |
@media screen and (max-width: 782px) {
|
@@ -1324,6 +1330,78 @@ p.vmch-text a {
|
|
1324 |
}
|
1325 |
}
|
1326 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1327 |
@media (max-width: 486px) {
|
1328 |
.variation-header-wrap, .thd-theme-dashboard-wrap {
|
1329 |
margin-right: 10px;
|
425 |
align-items: center;
|
426 |
padding-bottom: 20px;
|
427 |
border-bottom: 1px solid #F3F3F3;
|
428 |
+
padding-top: 20px;
|
429 |
|
430 |
&.hidden {
|
431 |
display: none;
|
675 |
content: "";
|
676 |
position: absolute;
|
677 |
display: none;
|
678 |
+
left: 7px;
|
679 |
top: 3px;
|
680 |
+
width: 4px;
|
681 |
+
height: 9px;
|
682 |
border: solid white;
|
683 |
border-width: 0 3px 3px 0;
|
684 |
-webkit-transform: rotate(45deg);
|
1190 |
}
|
1191 |
|
1192 |
.wcvs-welcome-popup {
|
1193 |
+
max-width: 450px;
|
1194 |
margin-top: calc(50vh - 250px);
|
1195 |
|
1196 |
.popup {
|
1202 |
}
|
1203 |
}
|
1204 |
|
1205 |
+
&-title {
|
1206 |
+
font-size: 1.8em;
|
1207 |
+
}
|
1208 |
+
|
1209 |
&-iframe {
|
1210 |
position: relative;
|
1211 |
padding-bottom: 56.25%;
|
1222 |
|
1223 |
}
|
1224 |
|
1225 |
+
&-inner-content {
|
1226 |
+
p {
|
1227 |
+
font-size: 1.3em;
|
1228 |
+
}
|
1229 |
+
}
|
1230 |
|
|
|
|
|
1231 |
}
|
1232 |
|
1233 |
+
@media screen and (min-width: 961px) {
|
1234 |
+
margin-left: calc(50vw - 450px);
|
1235 |
}
|
1236 |
|
1237 |
@media screen and (max-width: 782px) {
|
1330 |
}
|
1331 |
}
|
1332 |
|
1333 |
+
.configure-items-link {
|
1334 |
+
float: left;
|
1335 |
+
}
|
1336 |
+
|
1337 |
+
#woocommerce-coupon-data ul.wc-tabs li.variation-swatches_options a::before,
|
1338 |
+
#woocommerce-product-data ul.wc-tabs li.variation-swatches_options a::before,
|
1339 |
+
.woocommerce ul.wc-tabs li.variation-swatches_options a::before {
|
1340 |
+
content: "\f11c";
|
1341 |
+
}
|
1342 |
+
|
1343 |
+
.ajax-to-update,
|
1344 |
+
.main-ajax-trigger {
|
1345 |
+
position: relative;
|
1346 |
+
|
1347 |
+
&.saving {
|
1348 |
+
&:after {
|
1349 |
+
content: "";
|
1350 |
+
position: absolute;
|
1351 |
+
top: 0;
|
1352 |
+
left: 0;
|
1353 |
+
width: 100%;
|
1354 |
+
height: 100%;
|
1355 |
+
background: rgba(204, 204, 204, 0.87);
|
1356 |
+
}
|
1357 |
+
|
1358 |
+
&:before {
|
1359 |
+
content: "";
|
1360 |
+
display: block;
|
1361 |
+
position: absolute;
|
1362 |
+
left: 48%;
|
1363 |
+
top: 40%;
|
1364 |
+
width: 20px;
|
1365 |
+
height: 20px;
|
1366 |
+
z-index: 9;
|
1367 |
+
border-style: solid;
|
1368 |
+
border-color: #008060;
|
1369 |
+
border-top-color: transparent;
|
1370 |
+
border-width: 4px;
|
1371 |
+
border-radius: 50%;
|
1372 |
+
-webkit-animation: spin .8s linear infinite;
|
1373 |
+
animation: spin .8s linear infinite;
|
1374 |
+
}
|
1375 |
+
}
|
1376 |
+
}
|
1377 |
+
|
1378 |
+
@-webkit-keyframes spin {
|
1379 |
+
from {
|
1380 |
+
-webkit-transform: rotate(0deg);
|
1381 |
+
}
|
1382 |
+
to {
|
1383 |
+
-webkit-transform: rotate(360deg);
|
1384 |
+
}
|
1385 |
+
}
|
1386 |
+
|
1387 |
+
@keyframes spin {
|
1388 |
+
from {
|
1389 |
+
transform: rotate(0deg);
|
1390 |
+
}
|
1391 |
+
to {
|
1392 |
+
transform: rotate(360deg);
|
1393 |
+
}
|
1394 |
+
}
|
1395 |
+
|
1396 |
+
@media screen and (min-width: 600px) {
|
1397 |
+
|
1398 |
+
.pro-feature-popup {
|
1399 |
+
width: 450px;
|
1400 |
+
margin-left: calc(50vw - 350px);
|
1401 |
+
margin-top: calc(50vh - 150px);
|
1402 |
+
}
|
1403 |
+
}
|
1404 |
+
|
1405 |
@media (max-width: 486px) {
|
1406 |
.variation-header-wrap, .thd-theme-dashboard-wrap {
|
1407 |
margin-right: 10px;
|
assets/css/frontend.css
CHANGED
@@ -3,19 +3,30 @@
|
|
3 |
visibility: hidden !important;
|
4 |
}
|
5 |
|
6 |
-
.woocommerce .
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7 |
padding: 5px;
|
8 |
display: inline-flex !important;
|
9 |
flex-wrap: wrap;
|
10 |
}
|
11 |
-
.woocommerce .tawcvs-swatches .swatch,
|
12 |
-
.woocommerce .tawcvs-swatches .swatch-show-more
|
|
|
|
|
13 |
-webkit-transition: all 0.3s;
|
14 |
-moz-transition: all 0.3s;
|
15 |
-o-transition: all 0.3s;
|
16 |
transition: all 0.3s;
|
17 |
-
width: 30px
|
18 |
-
height: 30px
|
19 |
line-height: 28px;
|
20 |
text-align: center;
|
21 |
cursor: pointer;
|
@@ -27,77 +38,166 @@
|
|
27 |
align-items: center;
|
28 |
justify-content: center;
|
29 |
}
|
30 |
-
.woocommerce .tawcvs-swatches .swatch.swatch
|
31 |
-
.woocommerce .tawcvs-swatches .swatch-show-more
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
32 |
min-width: max-content;
|
33 |
}
|
34 |
-
.woocommerce .tawcvs-swatches .swatch.swatch-
|
35 |
-
.woocommerce .tawcvs-swatches .swatch-show-more.swatch-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
36 |
-webkit-border-radius: 50% !important;
|
37 |
-moz-border-radius: 50% !important;
|
38 |
border-radius: 50% !important;
|
39 |
}
|
40 |
-
.woocommerce .tawcvs-swatches .swatch.swatch-shape-circle img,
|
41 |
-
.woocommerce .tawcvs-swatches .swatch-show-more.swatch-shape-circle img
|
|
|
|
|
42 |
-webkit-border-radius: 50%;
|
43 |
-moz-border-radius: 50%;
|
44 |
border-radius: 50%;
|
45 |
}
|
46 |
-
.woocommerce .tawcvs-swatches .swatch.swatch-shape-circle:before,
|
47 |
-
.woocommerce .tawcvs-swatches .swatch-show-more.swatch-shape-circle:before
|
|
|
|
|
48 |
border-radius: 50%;
|
49 |
}
|
50 |
-
.woocommerce .tawcvs-swatches .swatch.swatch-shape-rounded,
|
51 |
-
.woocommerce .tawcvs-swatches .swatch-show-more.swatch-shape-rounded
|
|
|
|
|
52 |
-webkit-border-radius: 8px;
|
53 |
-moz-border-radius: 8px;
|
54 |
border-radius: 8px;
|
55 |
}
|
56 |
-
.woocommerce .tawcvs-swatches .swatch.swatch-shape-rounded img,
|
57 |
-
.woocommerce .tawcvs-swatches .swatch-show-more.swatch-shape-rounded img
|
|
|
|
|
58 |
-webkit-border-radius: 8px;
|
59 |
-moz-border-radius: 8px;
|
60 |
border-radius: 8px;
|
61 |
}
|
62 |
-
.woocommerce .tawcvs-swatches .swatch.swatch-shape-rounded:before,
|
63 |
-
.woocommerce .tawcvs-swatches .swatch-show-more.swatch-shape-rounded:before
|
|
|
|
|
64 |
border-radius: 8px;
|
65 |
}
|
66 |
-
.woocommerce .tawcvs-swatches .swatch.swatch-shape-edge,
|
67 |
-
.woocommerce .tawcvs-swatches .swatch-show-more.swatch-shape-edge
|
|
|
|
|
68 |
-webkit-border-radius: 0;
|
69 |
-moz-border-radius: 0;
|
70 |
border-radius: 0;
|
71 |
}
|
72 |
-
.woocommerce .tawcvs-swatches .swatch.swatch-shape-edge img,
|
73 |
-
.woocommerce .tawcvs-swatches .swatch-show-more.swatch-shape-edge img
|
|
|
|
|
74 |
-webkit-border-radius: 0;
|
75 |
-moz-border-radius: 0;
|
76 |
border-radius: 0;
|
77 |
}
|
78 |
-
.woocommerce .tawcvs-swatches .swatch.swatch-shape-edge:before,
|
79 |
-
.woocommerce .tawcvs-swatches .swatch-show-more.swatch-shape-edge:before
|
|
|
|
|
80 |
border-radius: 0;
|
81 |
}
|
82 |
-
.woocommerce .tawcvs-swatches .swatch.disabled,
|
83 |
-
.woocommerce .tawcvs-swatches .swatch-show-more.disabled
|
|
|
|
|
84 |
cursor: default;
|
85 |
opacity: 0.4 !important;
|
86 |
}
|
87 |
-
.woocommerce .tawcvs-swatches .swatch.disabled .swatch__tooltip,
|
88 |
-
.woocommerce .tawcvs-swatches .swatch-show-more.disabled .swatch__tooltip
|
|
|
|
|
89 |
display: none;
|
90 |
}
|
91 |
-
.woocommerce .tawcvs-swatches .swatch:first-child,
|
92 |
-
.woocommerce .tawcvs-swatches .swatch-show-more:first-child
|
|
|
|
|
93 |
margin-left: 0;
|
94 |
}
|
95 |
-
.woocommerce .tawcvs-swatches .swatch:last-child,
|
96 |
-
.woocommerce .tawcvs-swatches .swatch-show-more:last-child
|
|
|
|
|
97 |
margin-right: 0;
|
98 |
}
|
99 |
-
.woocommerce .tawcvs-swatches .swatch:before,
|
100 |
-
.woocommerce .tawcvs-swatches .swatch-show-more:before
|
|
|
|
|
101 |
content: "";
|
102 |
position: absolute;
|
103 |
left: -4px;
|
@@ -106,47 +206,32 @@
|
|
106 |
bottom: -4px;
|
107 |
border: 1px solid #ddd;
|
108 |
}
|
109 |
-
.woocommerce .tawcvs-swatches .swatch.selected
|
110 |
-
.woocommerce .tawcvs-swatches .swatch-show-more.selected
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
.woocommerce .tawcvs-swatches .swatch-show-more.selected.swatch-label {
|
115 |
-
border-bottom: none !important;
|
116 |
}
|
117 |
-
.woocommerce .tawcvs-swatches .swatch
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
border-color: #333;
|
123 |
-
}
|
124 |
-
.woocommerce .tawcvs-swatches .swatch-color.selected:before {
|
125 |
-
-webkit-transform: translate(-50%, -50%) rotate(45deg);
|
126 |
-
-moz-transform: translate(-50%, -50%) rotate(45deg);
|
127 |
-
transform: translate(-50%, -50%) rotate(45deg);
|
128 |
-
content: "";
|
129 |
-
width: 6px;
|
130 |
-
height: 10px;
|
131 |
-
display: block;
|
132 |
-
border: solid #eee;
|
133 |
-
border-width: 0 2px 2px 0;
|
134 |
-
position: absolute;
|
135 |
-
top: 50%;
|
136 |
-
left: 50%;
|
137 |
-
margin: -2px -2px 0 0;
|
138 |
-
}
|
139 |
-
.woocommerce .tawcvs-swatches .swatch-label {
|
140 |
-
font-size: 14px;
|
141 |
-
background-color: #f1f1f1;
|
142 |
}
|
143 |
-
.woocommerce .tawcvs-swatches .swatch
|
144 |
-
|
|
|
|
|
|
|
145 |
}
|
146 |
-
.woocommerce .tawcvs-swatches .swatch-
|
147 |
-
|
|
|
|
|
|
|
148 |
}
|
149 |
-
.woocommerce .tawcvs-swatches .swatch__tooltip
|
|
|
150 |
-webkit-transform: translate(-50%, -100%);
|
151 |
-moz-transform: translate(-50%, -100%);
|
152 |
transform: translate(-50%, -100%);
|
@@ -176,7 +261,8 @@
|
|
176 |
white-space: normal;
|
177 |
min-width: max-content;
|
178 |
}
|
179 |
-
.woocommerce .tawcvs-swatches .swatch__tooltip:after
|
|
|
180 |
-webkit-transform: rotate(45deg);
|
181 |
-moz-transform: rotate(45deg);
|
182 |
transform: rotate(45deg);
|
@@ -189,65 +275,74 @@
|
|
189 |
left: 50%;
|
190 |
margin-left: -6px;
|
191 |
}
|
192 |
-
.woocommerce .tawcvs-swatches .swatch-item-wrapper
|
|
|
193 |
position: relative;
|
194 |
}
|
195 |
-
.woocommerce .tawcvs-swatches .swatch:hover + .swatch__tooltip
|
|
|
196 |
opacity: 1;
|
197 |
visibility: visible;
|
198 |
user-select: auto;
|
199 |
}
|
200 |
-
.woocommerce .tawcvs-swatches.oss-blur-with-cross .swatch.disabled
|
|
|
201 |
position: relative;
|
202 |
background: #33333357;
|
203 |
}
|
204 |
-
.woocommerce .tawcvs-swatches.oss-blur-with-cross .swatch.disabled img
|
|
|
205 |
opacity: 0.5;
|
206 |
}
|
207 |
-
.woocommerce .tawcvs-swatches.oss-blur-with-cross .swatch.disabled:after
|
|
|
208 |
content: "";
|
209 |
position: absolute;
|
210 |
top: 0;
|
211 |
right: 0;
|
212 |
bottom: 0;
|
213 |
left: 0;
|
|
|
|
|
|
|
|
|
214 |
background: linear-gradient(to top left, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0) calc(50% - 0.8px), black 50%, rgba(0, 0, 0, 0) calc(50% + 0.8px), rgba(0, 0, 0, 0) 100%), linear-gradient(to top right, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0) calc(50% - 0.8px), black 50%, rgba(0, 0, 0, 0) calc(50% + 0.8px), rgba(0, 0, 0, 0) 100%);
|
215 |
}
|
216 |
-
.woocommerce .tawcvs-swatches.oss-blur-with-cross .swatch.disabled.swatch-shape-
|
217 |
-
|
218 |
-
|
219 |
-
bottom: 4px;
|
220 |
-
left: 4px;
|
221 |
}
|
222 |
-
.woocommerce .tawcvs-swatches.oss-blur-with-cross .swatch.disabled.swatch-shape-
|
223 |
-
|
224 |
-
|
225 |
-
bottom: 2px;
|
226 |
-
left: 2px;
|
227 |
}
|
228 |
-
.woocommerce .tawcvs-swatches.oss-hide .swatch.disabled
|
|
|
229 |
display: none;
|
230 |
}
|
231 |
|
232 |
-
.swatch-align-left .variations
|
233 |
text-align: left;
|
234 |
}
|
235 |
-
.swatch-align-left .variations
|
236 |
text-align: left;
|
237 |
}
|
238 |
|
239 |
-
.swatch-align-center .variations
|
240 |
text-align: center;
|
241 |
}
|
242 |
-
.swatch-align-center .variations
|
243 |
text-align: center;
|
244 |
}
|
245 |
|
246 |
-
.related.products .swatch-align-center .variations
|
247 |
display: none;
|
248 |
}
|
249 |
|
250 |
-
.swatch-align-right .variations
|
|
|
|
|
|
|
251 |
text-align: right;
|
252 |
}
|
253 |
|
@@ -261,28 +356,15 @@
|
|
261 |
.woocommerce.theme-sober div.product form.cart.swatches-support .variations .variable {
|
262 |
width: 90%;
|
263 |
}
|
264 |
-
.woocommerce.theme-sober div.product form.cart.swatches-support .
|
265 |
-
|
266 |
}
|
267 |
.woocommerce.theme-sober div.product form.cart.swatches-support .tawcvs-swatches .swatch-item-wrapper .swatch-image {
|
268 |
-
width: 95%;
|
269 |
-
height: auto;
|
270 |
text-align: center;
|
271 |
}
|
272 |
-
|
273 |
-
|
274 |
-
|
275 |
-
}
|
276 |
-
}
|
277 |
-
@media (max-width: 992px) {
|
278 |
-
.woocommerce.theme-sober div.product form.cart.swatches-support .tawcvs-swatches .swatch-item-wrapper {
|
279 |
-
flex-basis: 25%;
|
280 |
-
}
|
281 |
-
}
|
282 |
-
@media (max-width: 768px) {
|
283 |
-
.woocommerce.theme-sober div.product form.cart.swatches-support .tawcvs-swatches .swatch-item-wrapper {
|
284 |
-
flex-basis: 33.333%;
|
285 |
-
}
|
286 |
}
|
287 |
|
288 |
/*# sourceMappingURL=frontend.css.map */
|
3 |
visibility: hidden !important;
|
4 |
}
|
5 |
|
6 |
+
.woocommerce div.product form.cart.swatches-support .variable:not(.type-select) .arrow,
|
7 |
+
.woocommerce.archive form.cart.swatches-support .variable:not(.type-select) .arrow {
|
8 |
+
display: none !important;
|
9 |
+
}
|
10 |
+
.woocommerce div.product form.cart.swatches-support .variable:not(.type-select) .line-hover:after,
|
11 |
+
.woocommerce.archive form.cart.swatches-support .variable:not(.type-select) .line-hover:after {
|
12 |
+
content: none;
|
13 |
+
}
|
14 |
+
.woocommerce div.product form.cart.swatches-support .tawcvs-swatches,
|
15 |
+
.woocommerce.archive form.cart.swatches-support .tawcvs-swatches {
|
16 |
padding: 5px;
|
17 |
display: inline-flex !important;
|
18 |
flex-wrap: wrap;
|
19 |
}
|
20 |
+
.woocommerce div.product form.cart.swatches-support .tawcvs-swatches .swatch,
|
21 |
+
.woocommerce div.product form.cart.swatches-support .tawcvs-swatches .swatch-show-more,
|
22 |
+
.woocommerce.archive form.cart.swatches-support .tawcvs-swatches .swatch,
|
23 |
+
.woocommerce.archive form.cart.swatches-support .tawcvs-swatches .swatch-show-more {
|
24 |
-webkit-transition: all 0.3s;
|
25 |
-moz-transition: all 0.3s;
|
26 |
-o-transition: all 0.3s;
|
27 |
transition: all 0.3s;
|
28 |
+
width: 30px;
|
29 |
+
height: 30px;
|
30 |
line-height: 28px;
|
31 |
text-align: center;
|
32 |
cursor: pointer;
|
38 |
align-items: center;
|
39 |
justify-content: center;
|
40 |
}
|
41 |
+
.woocommerce div.product form.cart.swatches-support .tawcvs-swatches .swatch:after, .woocommerce div.product form.cart.swatches-support .tawcvs-swatches .swatch:before,
|
42 |
+
.woocommerce div.product form.cart.swatches-support .tawcvs-swatches .swatch-show-more:after,
|
43 |
+
.woocommerce div.product form.cart.swatches-support .tawcvs-swatches .swatch-show-more:before,
|
44 |
+
.woocommerce.archive form.cart.swatches-support .tawcvs-swatches .swatch:after,
|
45 |
+
.woocommerce.archive form.cart.swatches-support .tawcvs-swatches .swatch:before,
|
46 |
+
.woocommerce.archive form.cart.swatches-support .tawcvs-swatches .swatch-show-more:after,
|
47 |
+
.woocommerce.archive form.cart.swatches-support .tawcvs-swatches .swatch-show-more:before {
|
48 |
+
display: block !important;
|
49 |
+
}
|
50 |
+
.woocommerce div.product form.cart.swatches-support .tawcvs-swatches .swatch.swatch-color,
|
51 |
+
.woocommerce div.product form.cart.swatches-support .tawcvs-swatches .swatch-show-more.swatch-color,
|
52 |
+
.woocommerce.archive form.cart.swatches-support .tawcvs-swatches .swatch.swatch-color,
|
53 |
+
.woocommerce.archive form.cart.swatches-support .tawcvs-swatches .swatch-show-more.swatch-color {
|
54 |
+
text-indent: -9999em;
|
55 |
+
border: 2px solid #ccc;
|
56 |
+
}
|
57 |
+
.woocommerce div.product form.cart.swatches-support .tawcvs-swatches .swatch.swatch-color.selected,
|
58 |
+
.woocommerce div.product form.cart.swatches-support .tawcvs-swatches .swatch-show-more.swatch-color.selected,
|
59 |
+
.woocommerce.archive form.cart.swatches-support .tawcvs-swatches .swatch.swatch-color.selected,
|
60 |
+
.woocommerce.archive form.cart.swatches-support .tawcvs-swatches .swatch-show-more.swatch-color.selected {
|
61 |
+
border-color: #333;
|
62 |
+
}
|
63 |
+
.woocommerce div.product form.cart.swatches-support .tawcvs-swatches .swatch.swatch-color.selected:before,
|
64 |
+
.woocommerce div.product form.cart.swatches-support .tawcvs-swatches .swatch-show-more.swatch-color.selected:before,
|
65 |
+
.woocommerce.archive form.cart.swatches-support .tawcvs-swatches .swatch.swatch-color.selected:before,
|
66 |
+
.woocommerce.archive form.cart.swatches-support .tawcvs-swatches .swatch-show-more.swatch-color.selected:before {
|
67 |
+
-webkit-transform: translate(-50%, -50%) rotate(45deg);
|
68 |
+
-moz-transform: translate(-50%, -50%) rotate(45deg);
|
69 |
+
transform: translate(-50%, -50%) rotate(45deg);
|
70 |
+
content: "";
|
71 |
+
width: 6px;
|
72 |
+
height: 10px;
|
73 |
+
display: block;
|
74 |
+
border: solid #eee;
|
75 |
+
border-width: 0 2px 2px 0;
|
76 |
+
position: absolute;
|
77 |
+
top: 50%;
|
78 |
+
left: 50%;
|
79 |
+
margin: -2px -2px 0 0;
|
80 |
+
}
|
81 |
+
.woocommerce div.product form.cart.swatches-support .tawcvs-swatches .swatch:not(.swatch-color),
|
82 |
+
.woocommerce div.product form.cart.swatches-support .tawcvs-swatches .swatch-show-more:not(.swatch-color),
|
83 |
+
.woocommerce.archive form.cart.swatches-support .tawcvs-swatches .swatch:not(.swatch-color),
|
84 |
+
.woocommerce.archive form.cart.swatches-support .tawcvs-swatches .swatch-show-more:not(.swatch-color) {
|
85 |
+
background-color: #f1f1f1;
|
86 |
+
}
|
87 |
+
.woocommerce div.product form.cart.swatches-support .tawcvs-swatches .swatch.swatch-label,
|
88 |
+
.woocommerce div.product form.cart.swatches-support .tawcvs-swatches .swatch-show-more.swatch-label,
|
89 |
+
.woocommerce.archive form.cart.swatches-support .tawcvs-swatches .swatch.swatch-label,
|
90 |
+
.woocommerce.archive form.cart.swatches-support .tawcvs-swatches .swatch-show-more.swatch-label {
|
91 |
+
font-size: 14px;
|
92 |
min-width: max-content;
|
93 |
}
|
94 |
+
.woocommerce div.product form.cart.swatches-support .tawcvs-swatches .swatch.swatch-image,
|
95 |
+
.woocommerce div.product form.cart.swatches-support .tawcvs-swatches .swatch-show-more.swatch-image,
|
96 |
+
.woocommerce.archive form.cart.swatches-support .tawcvs-swatches .swatch.swatch-image,
|
97 |
+
.woocommerce.archive form.cart.swatches-support .tawcvs-swatches .swatch-show-more.swatch-image {
|
98 |
+
font-size: 0;
|
99 |
+
}
|
100 |
+
.woocommerce div.product form.cart.swatches-support .tawcvs-swatches .swatch.swatch-image .swatch__tooltip,
|
101 |
+
.woocommerce div.product form.cart.swatches-support .tawcvs-swatches .swatch-show-more.swatch-image .swatch__tooltip,
|
102 |
+
.woocommerce.archive form.cart.swatches-support .tawcvs-swatches .swatch.swatch-image .swatch__tooltip,
|
103 |
+
.woocommerce.archive form.cart.swatches-support .tawcvs-swatches .swatch-show-more.swatch-image .swatch__tooltip {
|
104 |
+
font-size: 14px;
|
105 |
+
}
|
106 |
+
.woocommerce div.product form.cart.swatches-support .tawcvs-swatches .swatch.swatch-shape-circle,
|
107 |
+
.woocommerce div.product form.cart.swatches-support .tawcvs-swatches .swatch-show-more.swatch-shape-circle,
|
108 |
+
.woocommerce.archive form.cart.swatches-support .tawcvs-swatches .swatch.swatch-shape-circle,
|
109 |
+
.woocommerce.archive form.cart.swatches-support .tawcvs-swatches .swatch-show-more.swatch-shape-circle {
|
110 |
-webkit-border-radius: 50% !important;
|
111 |
-moz-border-radius: 50% !important;
|
112 |
border-radius: 50% !important;
|
113 |
}
|
114 |
+
.woocommerce div.product form.cart.swatches-support .tawcvs-swatches .swatch.swatch-shape-circle img,
|
115 |
+
.woocommerce div.product form.cart.swatches-support .tawcvs-swatches .swatch-show-more.swatch-shape-circle img,
|
116 |
+
.woocommerce.archive form.cart.swatches-support .tawcvs-swatches .swatch.swatch-shape-circle img,
|
117 |
+
.woocommerce.archive form.cart.swatches-support .tawcvs-swatches .swatch-show-more.swatch-shape-circle img {
|
118 |
-webkit-border-radius: 50%;
|
119 |
-moz-border-radius: 50%;
|
120 |
border-radius: 50%;
|
121 |
}
|
122 |
+
.woocommerce div.product form.cart.swatches-support .tawcvs-swatches .swatch.swatch-shape-circle:before,
|
123 |
+
.woocommerce div.product form.cart.swatches-support .tawcvs-swatches .swatch-show-more.swatch-shape-circle:before,
|
124 |
+
.woocommerce.archive form.cart.swatches-support .tawcvs-swatches .swatch.swatch-shape-circle:before,
|
125 |
+
.woocommerce.archive form.cart.swatches-support .tawcvs-swatches .swatch-show-more.swatch-shape-circle:before {
|
126 |
border-radius: 50%;
|
127 |
}
|
128 |
+
.woocommerce div.product form.cart.swatches-support .tawcvs-swatches .swatch.swatch-shape-rounded,
|
129 |
+
.woocommerce div.product form.cart.swatches-support .tawcvs-swatches .swatch-show-more.swatch-shape-rounded,
|
130 |
+
.woocommerce.archive form.cart.swatches-support .tawcvs-swatches .swatch.swatch-shape-rounded,
|
131 |
+
.woocommerce.archive form.cart.swatches-support .tawcvs-swatches .swatch-show-more.swatch-shape-rounded {
|
132 |
-webkit-border-radius: 8px;
|
133 |
-moz-border-radius: 8px;
|
134 |
border-radius: 8px;
|
135 |
}
|
136 |
+
.woocommerce div.product form.cart.swatches-support .tawcvs-swatches .swatch.swatch-shape-rounded img,
|
137 |
+
.woocommerce div.product form.cart.swatches-support .tawcvs-swatches .swatch-show-more.swatch-shape-rounded img,
|
138 |
+
.woocommerce.archive form.cart.swatches-support .tawcvs-swatches .swatch.swatch-shape-rounded img,
|
139 |
+
.woocommerce.archive form.cart.swatches-support .tawcvs-swatches .swatch-show-more.swatch-shape-rounded img {
|
140 |
-webkit-border-radius: 8px;
|
141 |
-moz-border-radius: 8px;
|
142 |
border-radius: 8px;
|
143 |
}
|
144 |
+
.woocommerce div.product form.cart.swatches-support .tawcvs-swatches .swatch.swatch-shape-rounded:before,
|
145 |
+
.woocommerce div.product form.cart.swatches-support .tawcvs-swatches .swatch-show-more.swatch-shape-rounded:before,
|
146 |
+
.woocommerce.archive form.cart.swatches-support .tawcvs-swatches .swatch.swatch-shape-rounded:before,
|
147 |
+
.woocommerce.archive form.cart.swatches-support .tawcvs-swatches .swatch-show-more.swatch-shape-rounded:before {
|
148 |
border-radius: 8px;
|
149 |
}
|
150 |
+
.woocommerce div.product form.cart.swatches-support .tawcvs-swatches .swatch.swatch-shape-edge,
|
151 |
+
.woocommerce div.product form.cart.swatches-support .tawcvs-swatches .swatch-show-more.swatch-shape-edge,
|
152 |
+
.woocommerce.archive form.cart.swatches-support .tawcvs-swatches .swatch.swatch-shape-edge,
|
153 |
+
.woocommerce.archive form.cart.swatches-support .tawcvs-swatches .swatch-show-more.swatch-shape-edge {
|
154 |
-webkit-border-radius: 0;
|
155 |
-moz-border-radius: 0;
|
156 |
border-radius: 0;
|
157 |
}
|
158 |
+
.woocommerce div.product form.cart.swatches-support .tawcvs-swatches .swatch.swatch-shape-edge img,
|
159 |
+
.woocommerce div.product form.cart.swatches-support .tawcvs-swatches .swatch-show-more.swatch-shape-edge img,
|
160 |
+
.woocommerce.archive form.cart.swatches-support .tawcvs-swatches .swatch.swatch-shape-edge img,
|
161 |
+
.woocommerce.archive form.cart.swatches-support .tawcvs-swatches .swatch-show-more.swatch-shape-edge img {
|
162 |
-webkit-border-radius: 0;
|
163 |
-moz-border-radius: 0;
|
164 |
border-radius: 0;
|
165 |
}
|
166 |
+
.woocommerce div.product form.cart.swatches-support .tawcvs-swatches .swatch.swatch-shape-edge:before,
|
167 |
+
.woocommerce div.product form.cart.swatches-support .tawcvs-swatches .swatch-show-more.swatch-shape-edge:before,
|
168 |
+
.woocommerce.archive form.cart.swatches-support .tawcvs-swatches .swatch.swatch-shape-edge:before,
|
169 |
+
.woocommerce.archive form.cart.swatches-support .tawcvs-swatches .swatch-show-more.swatch-shape-edge:before {
|
170 |
border-radius: 0;
|
171 |
}
|
172 |
+
.woocommerce div.product form.cart.swatches-support .tawcvs-swatches .swatch.disabled,
|
173 |
+
.woocommerce div.product form.cart.swatches-support .tawcvs-swatches .swatch-show-more.disabled,
|
174 |
+
.woocommerce.archive form.cart.swatches-support .tawcvs-swatches .swatch.disabled,
|
175 |
+
.woocommerce.archive form.cart.swatches-support .tawcvs-swatches .swatch-show-more.disabled {
|
176 |
cursor: default;
|
177 |
opacity: 0.4 !important;
|
178 |
}
|
179 |
+
.woocommerce div.product form.cart.swatches-support .tawcvs-swatches .swatch.disabled .swatch__tooltip,
|
180 |
+
.woocommerce div.product form.cart.swatches-support .tawcvs-swatches .swatch-show-more.disabled .swatch__tooltip,
|
181 |
+
.woocommerce.archive form.cart.swatches-support .tawcvs-swatches .swatch.disabled .swatch__tooltip,
|
182 |
+
.woocommerce.archive form.cart.swatches-support .tawcvs-swatches .swatch-show-more.disabled .swatch__tooltip {
|
183 |
display: none;
|
184 |
}
|
185 |
+
.woocommerce div.product form.cart.swatches-support .tawcvs-swatches .swatch:first-child,
|
186 |
+
.woocommerce div.product form.cart.swatches-support .tawcvs-swatches .swatch-show-more:first-child,
|
187 |
+
.woocommerce.archive form.cart.swatches-support .tawcvs-swatches .swatch:first-child,
|
188 |
+
.woocommerce.archive form.cart.swatches-support .tawcvs-swatches .swatch-show-more:first-child {
|
189 |
margin-left: 0;
|
190 |
}
|
191 |
+
.woocommerce div.product form.cart.swatches-support .tawcvs-swatches .swatch:last-child,
|
192 |
+
.woocommerce div.product form.cart.swatches-support .tawcvs-swatches .swatch-show-more:last-child,
|
193 |
+
.woocommerce.archive form.cart.swatches-support .tawcvs-swatches .swatch:last-child,
|
194 |
+
.woocommerce.archive form.cart.swatches-support .tawcvs-swatches .swatch-show-more:last-child {
|
195 |
margin-right: 0;
|
196 |
}
|
197 |
+
.woocommerce div.product form.cart.swatches-support .tawcvs-swatches .swatch:before,
|
198 |
+
.woocommerce div.product form.cart.swatches-support .tawcvs-swatches .swatch-show-more:before,
|
199 |
+
.woocommerce.archive form.cart.swatches-support .tawcvs-swatches .swatch:before,
|
200 |
+
.woocommerce.archive form.cart.swatches-support .tawcvs-swatches .swatch-show-more:before {
|
201 |
content: "";
|
202 |
position: absolute;
|
203 |
left: -4px;
|
206 |
bottom: -4px;
|
207 |
border: 1px solid #ddd;
|
208 |
}
|
209 |
+
.woocommerce div.product form.cart.swatches-support .tawcvs-swatches .swatch.selected,
|
210 |
+
.woocommerce div.product form.cart.swatches-support .tawcvs-swatches .swatch-show-more.selected,
|
211 |
+
.woocommerce.archive form.cart.swatches-support .tawcvs-swatches .swatch.selected,
|
212 |
+
.woocommerce.archive form.cart.swatches-support .tawcvs-swatches .swatch-show-more.selected {
|
213 |
+
border-color: transparent;
|
|
|
|
|
214 |
}
|
215 |
+
.woocommerce div.product form.cart.swatches-support .tawcvs-swatches .swatch.selected:before,
|
216 |
+
.woocommerce div.product form.cart.swatches-support .tawcvs-swatches .swatch-show-more.selected:before,
|
217 |
+
.woocommerce.archive form.cart.swatches-support .tawcvs-swatches .swatch.selected:before,
|
218 |
+
.woocommerce.archive form.cart.swatches-support .tawcvs-swatches .swatch-show-more.selected:before {
|
219 |
+
border-color: #674399;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
220 |
}
|
221 |
+
.woocommerce div.product form.cart.swatches-support .tawcvs-swatches .swatch.selected:after,
|
222 |
+
.woocommerce div.product form.cart.swatches-support .tawcvs-swatches .swatch-show-more.selected:after,
|
223 |
+
.woocommerce.archive form.cart.swatches-support .tawcvs-swatches .swatch.selected:after,
|
224 |
+
.woocommerce.archive form.cart.swatches-support .tawcvs-swatches .swatch-show-more.selected:after {
|
225 |
+
content: none;
|
226 |
}
|
227 |
+
.woocommerce div.product form.cart.swatches-support .tawcvs-swatches .swatch.selected.swatch-label,
|
228 |
+
.woocommerce div.product form.cart.swatches-support .tawcvs-swatches .swatch-show-more.selected.swatch-label,
|
229 |
+
.woocommerce.archive form.cart.swatches-support .tawcvs-swatches .swatch.selected.swatch-label,
|
230 |
+
.woocommerce.archive form.cart.swatches-support .tawcvs-swatches .swatch-show-more.selected.swatch-label {
|
231 |
+
border-bottom: none !important;
|
232 |
}
|
233 |
+
.woocommerce div.product form.cart.swatches-support .tawcvs-swatches .swatch__tooltip,
|
234 |
+
.woocommerce.archive form.cart.swatches-support .tawcvs-swatches .swatch__tooltip {
|
235 |
-webkit-transform: translate(-50%, -100%);
|
236 |
-moz-transform: translate(-50%, -100%);
|
237 |
transform: translate(-50%, -100%);
|
261 |
white-space: normal;
|
262 |
min-width: max-content;
|
263 |
}
|
264 |
+
.woocommerce div.product form.cart.swatches-support .tawcvs-swatches .swatch__tooltip:after,
|
265 |
+
.woocommerce.archive form.cart.swatches-support .tawcvs-swatches .swatch__tooltip:after {
|
266 |
-webkit-transform: rotate(45deg);
|
267 |
-moz-transform: rotate(45deg);
|
268 |
transform: rotate(45deg);
|
275 |
left: 50%;
|
276 |
margin-left: -6px;
|
277 |
}
|
278 |
+
.woocommerce div.product form.cart.swatches-support .tawcvs-swatches .swatch-item-wrapper,
|
279 |
+
.woocommerce.archive form.cart.swatches-support .tawcvs-swatches .swatch-item-wrapper {
|
280 |
position: relative;
|
281 |
}
|
282 |
+
.woocommerce div.product form.cart.swatches-support .tawcvs-swatches .swatch:hover + .swatch__tooltip,
|
283 |
+
.woocommerce.archive form.cart.swatches-support .tawcvs-swatches .swatch:hover + .swatch__tooltip {
|
284 |
opacity: 1;
|
285 |
visibility: visible;
|
286 |
user-select: auto;
|
287 |
}
|
288 |
+
.woocommerce div.product form.cart.swatches-support .tawcvs-swatches.oss-blur-with-cross .swatch.disabled,
|
289 |
+
.woocommerce.archive form.cart.swatches-support .tawcvs-swatches.oss-blur-with-cross .swatch.disabled {
|
290 |
position: relative;
|
291 |
background: #33333357;
|
292 |
}
|
293 |
+
.woocommerce div.product form.cart.swatches-support .tawcvs-swatches.oss-blur-with-cross .swatch.disabled img,
|
294 |
+
.woocommerce.archive form.cart.swatches-support .tawcvs-swatches.oss-blur-with-cross .swatch.disabled img {
|
295 |
opacity: 0.5;
|
296 |
}
|
297 |
+
.woocommerce div.product form.cart.swatches-support .tawcvs-swatches.oss-blur-with-cross .swatch.disabled:after,
|
298 |
+
.woocommerce.archive form.cart.swatches-support .tawcvs-swatches.oss-blur-with-cross .swatch.disabled:after {
|
299 |
content: "";
|
300 |
position: absolute;
|
301 |
top: 0;
|
302 |
right: 0;
|
303 |
bottom: 0;
|
304 |
left: 0;
|
305 |
+
width: 100%;
|
306 |
+
height: 100%;
|
307 |
+
border: none;
|
308 |
+
border-radius: 0;
|
309 |
background: linear-gradient(to top left, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0) calc(50% - 0.8px), black 50%, rgba(0, 0, 0, 0) calc(50% + 0.8px), rgba(0, 0, 0, 0) 100%), linear-gradient(to top right, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0) calc(50% - 0.8px), black 50%, rgba(0, 0, 0, 0) calc(50% + 0.8px), rgba(0, 0, 0, 0) 100%);
|
310 |
}
|
311 |
+
.woocommerce div.product form.cart.swatches-support .tawcvs-swatches.oss-blur-with-cross .swatch.disabled.swatch-shape-rounded:after,
|
312 |
+
.woocommerce.archive form.cart.swatches-support .tawcvs-swatches.oss-blur-with-cross .swatch.disabled.swatch-shape-rounded:after {
|
313 |
+
border-radius: 8px;
|
|
|
|
|
314 |
}
|
315 |
+
.woocommerce div.product form.cart.swatches-support .tawcvs-swatches.oss-blur-with-cross .swatch.disabled.swatch-shape-circle:after,
|
316 |
+
.woocommerce.archive form.cart.swatches-support .tawcvs-swatches.oss-blur-with-cross .swatch.disabled.swatch-shape-circle:after {
|
317 |
+
border-radius: 50%;
|
|
|
|
|
318 |
}
|
319 |
+
.woocommerce div.product form.cart.swatches-support .tawcvs-swatches.oss-hide .swatch.disabled,
|
320 |
+
.woocommerce.archive form.cart.swatches-support .tawcvs-swatches.oss-hide .swatch.disabled {
|
321 |
display: none;
|
322 |
}
|
323 |
|
324 |
+
.swatch-align-left .variations {
|
325 |
text-align: left;
|
326 |
}
|
327 |
+
.swatch-align-left .variations img, .swatch-align-left .variations select, .swatch-align-left .variations .value {
|
328 |
text-align: left;
|
329 |
}
|
330 |
|
331 |
+
.swatch-align-center .variations {
|
332 |
text-align: center;
|
333 |
}
|
334 |
+
.swatch-align-center .variations img, .swatch-align-center .variations select, .swatch-align-center .variations .value {
|
335 |
text-align: center;
|
336 |
}
|
337 |
|
338 |
+
.related.products .swatch-align-center .variations .label {
|
339 |
display: none;
|
340 |
}
|
341 |
|
342 |
+
.swatch-align-right .variations {
|
343 |
+
text-align: right;
|
344 |
+
}
|
345 |
+
.swatch-align-right .variations img, .swatch-align-right .variations select, .swatch-align-right .variations .value {
|
346 |
text-align: right;
|
347 |
}
|
348 |
|
356 |
.woocommerce.theme-sober div.product form.cart.swatches-support .variations .variable {
|
357 |
width: 90%;
|
358 |
}
|
359 |
+
.woocommerce.theme-sober div.product form.cart.swatches-support .line-hover {
|
360 |
+
cursor: default;
|
361 |
}
|
362 |
.woocommerce.theme-sober div.product form.cart.swatches-support .tawcvs-swatches .swatch-item-wrapper .swatch-image {
|
|
|
|
|
363 |
text-align: center;
|
364 |
}
|
365 |
+
.woocommerce.theme-sober div.product form.cart.swatches-support .tawcvs-swatches .swatch-item-wrapper .swatch-image img {
|
366 |
+
width: 100%;
|
367 |
+
height: auto;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
368 |
}
|
369 |
|
370 |
/*# sourceMappingURL=frontend.css.map */
|
assets/css/frontend.css.map
CHANGED
@@ -1 +1 @@
|
|
1 |
-
{"version":3,"sourceRoot":"","sources":["frontend.scss"],"names":[],"mappings":"AAAA;EACE;EACA;;;AAGF;EACE;EACA;EACA;;AAEA;AAAA;EAEE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;AAAA;
|
1 |
+
{"version":3,"sourceRoot":"","sources":["frontend.scss"],"names":[],"mappings":"AAAA;EACE;EACA;;;AAOI;AAAA;EACE;;AAGF;AAAA;EACE;;AAIJ;AAAA;EACE;EACA;EACA;;AAEA;AAAA;AAAA;AAAA;EAEE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;EAEE;;AAGF;AAAA;AAAA;AAAA;EACE;EACA;;AAEA;AAAA;AAAA;AAAA;EACE;;AAEA;AAAA;AAAA;AAAA;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAKN;AAAA;AAAA;AAAA;EACE;;AAGF;AAAA;AAAA;AAAA;EACE;EACA;;AAGF;AAAA;AAAA;AAAA;EACE;;AAEA;AAAA;AAAA;AAAA;EACE;;AAIJ;AAAA;AAAA;AAAA;EACE;EACA;EACA;;AAEA;AAAA;AAAA;AAAA;EACE;EACA;EACA;;AAGF;AAAA;AAAA;AAAA;EACE;;AAIJ;AAAA;AAAA;AAAA;EACE;EACA;EACA;;AAEA;AAAA;AAAA;AAAA;EACE;EACA;EACA;;AAGF;AAAA;AAAA;AAAA;EACE;;AAIJ;AAAA;AAAA;AAAA;EACE;EACA;EACA;;AAEA;AAAA;AAAA;AAAA;EACE;EACA;EACA;;AAGF;AAAA;AAAA;AAAA;EACE;;AAIJ;AAAA;AAAA;AAAA;EACE;EACA;;AAEA;AAAA;AAAA;AAAA;EACE;;AAIJ;AAAA;AAAA;AAAA;EACE;;AAGF;AAAA;AAAA;AAAA;EACE;;AAGF;AAAA;AAAA;AAAA;EACE;EACA;EACA;EACA;EACA;EACA;EACA;;AAGF;AAAA;AAAA;AAAA;EACE;;AAEA;AAAA;AAAA;AAAA;EACE;;AAGF;AAAA;AAAA;AAAA;EACE;;AAGF;AAAA;AAAA;AAAA;EACE;;AAKN;AAAA;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;AAAA;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAIJ;AAAA;EACE;;AAGF;AAAA;EACE;EACA;EACA;;AAIA;AAAA;EACE;EACA;;AAEA;AAAA;EACE;;AAGF;AAAA;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAeA;AAAA;EACE;;AAKF;AAAA;EACE;;AAON;AAAA;EACE;;;AAOV;EACE;;AAEA;EACE;;;AAIJ;EACE;;AAEA;EACE;;;AAKF;EACE;;;AAIJ;EACE;;AAEA;EACE;;;AAIJ;EACE;;;AAGF;AAAA;AAAA;AAIE;EACE;;AAGF;EACE;;AAKA;EAME;;AALA;EACE;EACA","file":"frontend.css"}
|
assets/css/frontend.scss
CHANGED
@@ -3,294 +3,320 @@
|
|
3 |
visibility: hidden !important;
|
4 |
}
|
5 |
|
6 |
-
.woocommerce .
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
.swatch-show-more {
|
13 |
-
-webkit-transition: all 0.3s;
|
14 |
-
-moz-transition: all 0.3s;
|
15 |
-
-o-transition: all 0.3s;
|
16 |
-
transition: all 0.3s;
|
17 |
-
width: 30px !important;
|
18 |
-
height: 30px !important;
|
19 |
-
line-height: 28px;
|
20 |
-
text-align: center;
|
21 |
-
cursor: pointer;
|
22 |
-
position: relative;
|
23 |
-
white-space: nowrap;
|
24 |
-
margin: 0 10px;
|
25 |
-
padding: 2px 5px;
|
26 |
-
display: inline-flex;
|
27 |
-
align-items: center;
|
28 |
-
justify-content: center;
|
29 |
-
|
30 |
-
&.swatch-label {
|
31 |
-
min-width: max-content;
|
32 |
-
}
|
33 |
-
|
34 |
-
&.swatch-shape-circle {
|
35 |
-
-webkit-border-radius: 50% !important;
|
36 |
-
-moz-border-radius: 50% !important;
|
37 |
-
border-radius: 50% !important;
|
38 |
-
|
39 |
-
img {
|
40 |
-
-webkit-border-radius: 50%;
|
41 |
-
-moz-border-radius: 50%;
|
42 |
-
border-radius: 50%;
|
43 |
}
|
44 |
|
45 |
-
|
46 |
-
|
47 |
}
|
48 |
}
|
49 |
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
54 |
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
60 |
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
}
|
65 |
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
|
71 |
-
|
72 |
-
|
73 |
-
-moz-border-radius: 0;
|
74 |
-
border-radius: 0;
|
75 |
-
}
|
76 |
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
|
82 |
-
|
83 |
-
|
84 |
-
|
|
|
85 |
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
|
|
90 |
|
91 |
-
|
92 |
-
|
93 |
-
|
|
|
94 |
|
95 |
-
|
96 |
-
|
97 |
-
|
|
|
98 |
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
right: -4px;
|
105 |
-
bottom: -4px;
|
106 |
-
border: 1px solid #ddd;
|
107 |
-
}
|
108 |
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
}
|
119 |
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
border-color: #333;
|
126 |
-
|
127 |
-
&:before {
|
128 |
-
-webkit-transform: translate(-50%, -50%) rotate(45deg);
|
129 |
-
-moz-transform: translate(-50%, -50%) rotate(45deg);
|
130 |
-
transform: translate(-50%, -50%) rotate(45deg);
|
131 |
-
content: "";
|
132 |
-
width: 6px;
|
133 |
-
height: 10px;
|
134 |
-
display: block;
|
135 |
-
border: solid #eee;
|
136 |
-
border-width: 0 2px 2px 0;
|
137 |
-
position: absolute;
|
138 |
-
top: 50%;
|
139 |
-
left: 50%;
|
140 |
-
margin: -2px -2px 0 0;
|
141 |
-
}
|
142 |
-
}
|
143 |
-
}
|
144 |
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
|
150 |
-
|
151 |
-
|
|
|
152 |
|
153 |
-
|
154 |
-
|
155 |
-
|
156 |
-
|
157 |
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
-
transform: translate(-50%, -100%);
|
162 |
-
-webkit-transition: all 0.3s;
|
163 |
-
-moz-transition: all 0.3s;
|
164 |
-
-o-transition: all 0.3s;
|
165 |
-
transition: all 0.3s;
|
166 |
-
-webkit-border-radius: 3px;
|
167 |
-
-moz-border-radius: 3px;
|
168 |
-
border-radius: 3px;
|
169 |
-
position: absolute;
|
170 |
-
left: 50%;
|
171 |
-
top: 0;
|
172 |
-
background: #333;
|
173 |
-
z-index: 2;
|
174 |
-
color: #fff;
|
175 |
-
margin: -15px 0 0 0;
|
176 |
-
padding: 5px 10px;
|
177 |
-
text-indent: initial;
|
178 |
-
font-size: 14px;
|
179 |
-
font-weight: 500;
|
180 |
-
opacity: 0;
|
181 |
-
visibility: hidden;
|
182 |
-
user-select: none;
|
183 |
-
display: inline-block;
|
184 |
-
word-break: break-all;
|
185 |
-
white-space: normal;
|
186 |
-
min-width: max-content;
|
187 |
-
|
188 |
-
&:after {
|
189 |
-
-webkit-transform: rotate(45deg);
|
190 |
-
-moz-transform: rotate(45deg);
|
191 |
-
transform: rotate(45deg);
|
192 |
-
content: "";
|
193 |
-
position: absolute;
|
194 |
-
width: 12px;
|
195 |
-
height: 12px;
|
196 |
-
background: #333;
|
197 |
-
bottom: -4px;
|
198 |
-
left: 50%;
|
199 |
-
margin-left: -6px;
|
200 |
-
}
|
201 |
-
}
|
202 |
|
203 |
-
|
204 |
-
|
205 |
-
|
206 |
|
207 |
-
|
208 |
-
|
209 |
-
|
210 |
-
|
211 |
-
|
|
|
|
|
|
|
|
|
212 |
|
213 |
-
|
214 |
-
|
215 |
-
position: relative;
|
216 |
-
background: #33333357;
|
217 |
|
218 |
-
|
219 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
220 |
}
|
221 |
|
222 |
-
|
223 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
224 |
position: absolute;
|
|
|
225 |
top: 0;
|
226 |
-
|
227 |
-
|
228 |
-
|
229 |
-
|
230 |
-
|
231 |
-
|
232 |
-
|
233 |
-
|
234 |
-
|
235 |
-
|
236 |
-
|
237 |
-
|
238 |
-
|
239 |
-
|
240 |
-
|
241 |
-
}
|
242 |
|
243 |
-
&.swatch-shape-circle {
|
244 |
&:after {
|
245 |
-
|
246 |
-
|
247 |
-
|
248 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
249 |
}
|
250 |
}
|
251 |
|
252 |
-
|
253 |
-
|
254 |
-
|
255 |
-
|
256 |
-
|
257 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
258 |
}
|
259 |
}
|
260 |
-
}
|
261 |
-
}
|
262 |
|
263 |
-
|
264 |
-
|
265 |
-
|
|
|
|
|
266 |
}
|
267 |
}
|
268 |
}
|
269 |
|
270 |
-
.swatch-align-left .variations
|
271 |
text-align: left;
|
272 |
|
273 |
-
img, select {
|
274 |
text-align: left;
|
275 |
}
|
276 |
}
|
277 |
|
278 |
-
.swatch-align-center .variations
|
279 |
text-align: center;
|
280 |
|
281 |
-
img, select {
|
282 |
text-align: center;
|
283 |
}
|
284 |
}
|
285 |
|
286 |
.related.products {
|
287 |
-
.swatch-align-center .variations
|
288 |
display: none;
|
289 |
}
|
290 |
}
|
291 |
|
292 |
.swatch-align-right .variations {
|
293 |
-
|
|
|
|
|
294 |
text-align: right;
|
295 |
}
|
296 |
}
|
@@ -307,23 +333,19 @@
|
|
307 |
width: 90%;
|
308 |
}
|
309 |
|
|
|
|
|
|
|
|
|
310 |
.tawcvs-swatches .swatch-item-wrapper {
|
311 |
-
flex-basis: 33.333%;
|
312 |
|
313 |
.swatch-image {
|
314 |
-
|
315 |
-
|
316 |
-
|
317 |
-
|
318 |
|
319 |
-
|
320 |
-
flex-basis: 50%;
|
321 |
-
}
|
322 |
-
@media (max-width: 992px) {
|
323 |
-
flex-basis: 25%;
|
324 |
-
}
|
325 |
-
@media (max-width: 768px) {
|
326 |
-
flex-basis: 33.333%;
|
327 |
}
|
328 |
}
|
329 |
}
|
3 |
visibility: hidden !important;
|
4 |
}
|
5 |
|
6 |
+
.woocommerce div.product,
|
7 |
+
.woocommerce.archive {
|
8 |
+
form.cart.swatches-support {
|
9 |
+
.variable:not(.type-select) {
|
10 |
+
.arrow {
|
11 |
+
display: none !important;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
12 |
}
|
13 |
|
14 |
+
.line-hover:after {
|
15 |
+
content: none;
|
16 |
}
|
17 |
}
|
18 |
|
19 |
+
.tawcvs-swatches {
|
20 |
+
padding: 5px;
|
21 |
+
display: inline-flex !important;
|
22 |
+
flex-wrap: wrap;
|
23 |
+
|
24 |
+
.swatch,
|
25 |
+
.swatch-show-more {
|
26 |
+
-webkit-transition: all 0.3s;
|
27 |
+
-moz-transition: all 0.3s;
|
28 |
+
-o-transition: all 0.3s;
|
29 |
+
transition: all 0.3s;
|
30 |
+
width: 30px;
|
31 |
+
height: 30px;
|
32 |
+
line-height: 28px;
|
33 |
+
text-align: center;
|
34 |
+
cursor: pointer;
|
35 |
+
position: relative;
|
36 |
+
white-space: nowrap;
|
37 |
+
margin: 0 10px;
|
38 |
+
padding: 2px 5px;
|
39 |
+
display: inline-flex;
|
40 |
+
align-items: center;
|
41 |
+
justify-content: center;
|
42 |
+
|
43 |
+
&:after,
|
44 |
+
&:before {
|
45 |
+
display: block !important;
|
46 |
+
}
|
47 |
|
48 |
+
&.swatch-color {
|
49 |
+
text-indent: -9999em;
|
50 |
+
border: 2px solid #ccc;
|
51 |
+
|
52 |
+
&.selected {
|
53 |
+
border-color: #333;
|
54 |
+
|
55 |
+
&:before {
|
56 |
+
-webkit-transform: translate(-50%, -50%) rotate(45deg);
|
57 |
+
-moz-transform: translate(-50%, -50%) rotate(45deg);
|
58 |
+
transform: translate(-50%, -50%) rotate(45deg);
|
59 |
+
content: "";
|
60 |
+
width: 6px;
|
61 |
+
height: 10px;
|
62 |
+
display: block;
|
63 |
+
border: solid #eee;
|
64 |
+
border-width: 0 2px 2px 0;
|
65 |
+
position: absolute;
|
66 |
+
top: 50%;
|
67 |
+
left: 50%;
|
68 |
+
margin: -2px -2px 0 0;
|
69 |
+
}
|
70 |
+
}
|
71 |
+
}
|
72 |
|
73 |
+
&:not(.swatch-color){
|
74 |
+
background-color: #f1f1f1;
|
75 |
+
}
|
|
|
76 |
|
77 |
+
&.swatch-label {
|
78 |
+
font-size: 14px;
|
79 |
+
min-width: max-content;
|
80 |
+
}
|
81 |
|
82 |
+
&.swatch-image {
|
83 |
+
font-size: 0;
|
|
|
|
|
|
|
84 |
|
85 |
+
.swatch__tooltip {
|
86 |
+
font-size: 14px;
|
87 |
+
}
|
88 |
+
}
|
89 |
|
90 |
+
&.swatch-shape-circle {
|
91 |
+
-webkit-border-radius: 50% !important;
|
92 |
+
-moz-border-radius: 50% !important;
|
93 |
+
border-radius: 50% !important;
|
94 |
|
95 |
+
img {
|
96 |
+
-webkit-border-radius: 50%;
|
97 |
+
-moz-border-radius: 50%;
|
98 |
+
border-radius: 50%;
|
99 |
+
}
|
100 |
|
101 |
+
&:before {
|
102 |
+
border-radius: 50%;
|
103 |
+
}
|
104 |
+
}
|
105 |
|
106 |
+
&.swatch-shape-rounded {
|
107 |
+
-webkit-border-radius: 8px;
|
108 |
+
-moz-border-radius: 8px;
|
109 |
+
border-radius: 8px;
|
110 |
|
111 |
+
img {
|
112 |
+
-webkit-border-radius: 8px;
|
113 |
+
-moz-border-radius: 8px;
|
114 |
+
border-radius: 8px;
|
115 |
+
}
|
|
|
|
|
|
|
|
|
116 |
|
117 |
+
&:before {
|
118 |
+
border-radius: 8px;
|
119 |
+
}
|
120 |
+
}
|
121 |
|
122 |
+
&.swatch-shape-edge {
|
123 |
+
-webkit-border-radius: 0;
|
124 |
+
-moz-border-radius: 0;
|
125 |
+
border-radius: 0;
|
|
|
126 |
|
127 |
+
img {
|
128 |
+
-webkit-border-radius: 0;
|
129 |
+
-moz-border-radius: 0;
|
130 |
+
border-radius: 0;
|
131 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
132 |
|
133 |
+
&:before {
|
134 |
+
border-radius: 0;
|
135 |
+
}
|
136 |
+
}
|
137 |
|
138 |
+
&.disabled {
|
139 |
+
cursor: default;
|
140 |
+
opacity: 0.4 !important;
|
141 |
|
142 |
+
.swatch__tooltip {
|
143 |
+
display: none;
|
144 |
+
}
|
145 |
+
}
|
146 |
|
147 |
+
&:first-child {
|
148 |
+
margin-left: 0;
|
149 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
150 |
|
151 |
+
&:last-child {
|
152 |
+
margin-right: 0;
|
153 |
+
}
|
154 |
|
155 |
+
&:before {
|
156 |
+
content: '';
|
157 |
+
position: absolute;
|
158 |
+
left: -4px;
|
159 |
+
top: -4px;
|
160 |
+
right: -4px;
|
161 |
+
bottom: -4px;
|
162 |
+
border: 1px solid #ddd;
|
163 |
+
}
|
164 |
|
165 |
+
&.selected {
|
166 |
+
border-color: transparent;
|
|
|
|
|
167 |
|
168 |
+
&:before {
|
169 |
+
border-color: #674399;
|
170 |
+
}
|
171 |
+
|
172 |
+
&:after {
|
173 |
+
content: none;
|
174 |
+
}
|
175 |
+
|
176 |
+
&.swatch-label {
|
177 |
+
border-bottom: none !important;
|
178 |
+
}
|
179 |
+
}
|
180 |
}
|
181 |
|
182 |
+
.swatch__tooltip {
|
183 |
+
-webkit-transform: translate(-50%, -100%);
|
184 |
+
-moz-transform: translate(-50%, -100%);
|
185 |
+
transform: translate(-50%, -100%);
|
186 |
+
-webkit-transition: all 0.3s;
|
187 |
+
-moz-transition: all 0.3s;
|
188 |
+
-o-transition: all 0.3s;
|
189 |
+
transition: all 0.3s;
|
190 |
+
-webkit-border-radius: 3px;
|
191 |
+
-moz-border-radius: 3px;
|
192 |
+
border-radius: 3px;
|
193 |
position: absolute;
|
194 |
+
left: 50%;
|
195 |
top: 0;
|
196 |
+
background: #333;
|
197 |
+
z-index: 2;
|
198 |
+
color: #fff;
|
199 |
+
margin: -15px 0 0 0;
|
200 |
+
padding: 5px 10px;
|
201 |
+
text-indent: initial;
|
202 |
+
font-size: 14px;
|
203 |
+
font-weight: 500;
|
204 |
+
opacity: 0;
|
205 |
+
visibility: hidden;
|
206 |
+
user-select: none;
|
207 |
+
display: inline-block;
|
208 |
+
word-break: break-all;
|
209 |
+
white-space: normal;
|
210 |
+
min-width: max-content;
|
|
|
211 |
|
|
|
212 |
&:after {
|
213 |
+
-webkit-transform: rotate(45deg);
|
214 |
+
-moz-transform: rotate(45deg);
|
215 |
+
transform: rotate(45deg);
|
216 |
+
content: "";
|
217 |
+
position: absolute;
|
218 |
+
width: 12px;
|
219 |
+
height: 12px;
|
220 |
+
background: #333;
|
221 |
+
bottom: -4px;
|
222 |
+
left: 50%;
|
223 |
+
margin-left: -6px;
|
224 |
}
|
225 |
}
|
226 |
|
227 |
+
.swatch-item-wrapper {
|
228 |
+
position: relative;
|
229 |
+
}
|
230 |
+
|
231 |
+
.swatch:hover + .swatch__tooltip {
|
232 |
+
opacity: 1;
|
233 |
+
visibility: visible;
|
234 |
+
user-select: auto;
|
235 |
+
}
|
236 |
+
|
237 |
+
&.oss-blur-with-cross {
|
238 |
+
.swatch.disabled {
|
239 |
+
position: relative;
|
240 |
+
background: #33333357;
|
241 |
+
|
242 |
+
img {
|
243 |
+
opacity: 0.5;
|
244 |
+
}
|
245 |
+
|
246 |
+
&:after {
|
247 |
+
content: '';
|
248 |
+
position: absolute;
|
249 |
+
top: 0;
|
250 |
+
right: 0;
|
251 |
+
bottom: 0;
|
252 |
+
left: 0;
|
253 |
+
width: 100%;
|
254 |
+
height: 100%;
|
255 |
+
border: none;
|
256 |
+
border-radius: 0;
|
257 |
+
background: linear-gradient(to top left,
|
258 |
+
rgba(0, 0, 0, 0) 0%,
|
259 |
+
rgba(0, 0, 0, 0) calc(50% - 0.8px),
|
260 |
+
rgba(0, 0, 0, 1) 50%,
|
261 |
+
rgba(0, 0, 0, 0) calc(50% + 0.8px),
|
262 |
+
rgba(0, 0, 0, 0) 100%),
|
263 |
+
linear-gradient(to top right,
|
264 |
+
rgba(0, 0, 0, 0) 0%,
|
265 |
+
rgba(0, 0, 0, 0) calc(50% - 0.8px),
|
266 |
+
rgba(0, 0, 0, 1) 50%,
|
267 |
+
rgba(0, 0, 0, 0) calc(50% + 0.8px),
|
268 |
+
rgba(0, 0, 0, 0) 100%);
|
269 |
+
}
|
270 |
+
|
271 |
+
&.swatch-shape-rounded {
|
272 |
+
&:after {
|
273 |
+
border-radius: 8px;
|
274 |
+
}
|
275 |
+
}
|
276 |
+
|
277 |
+
&.swatch-shape-circle {
|
278 |
+
&:after {
|
279 |
+
border-radius: 50%;
|
280 |
+
}
|
281 |
+
}
|
282 |
}
|
283 |
}
|
|
|
|
|
284 |
|
285 |
+
&.oss-hide {
|
286 |
+
.swatch.disabled {
|
287 |
+
display: none;
|
288 |
+
}
|
289 |
+
}
|
290 |
}
|
291 |
}
|
292 |
}
|
293 |
|
294 |
+
.swatch-align-left .variations {
|
295 |
text-align: left;
|
296 |
|
297 |
+
img, select, .value {
|
298 |
text-align: left;
|
299 |
}
|
300 |
}
|
301 |
|
302 |
+
.swatch-align-center .variations {
|
303 |
text-align: center;
|
304 |
|
305 |
+
img, select, .value {
|
306 |
text-align: center;
|
307 |
}
|
308 |
}
|
309 |
|
310 |
.related.products {
|
311 |
+
.swatch-align-center .variations .label {
|
312 |
display: none;
|
313 |
}
|
314 |
}
|
315 |
|
316 |
.swatch-align-right .variations {
|
317 |
+
text-align: right;
|
318 |
+
|
319 |
+
img, select, .value {
|
320 |
text-align: right;
|
321 |
}
|
322 |
}
|
333 |
width: 90%;
|
334 |
}
|
335 |
|
336 |
+
.line-hover {
|
337 |
+
cursor: default;
|
338 |
+
}
|
339 |
+
|
340 |
.tawcvs-swatches .swatch-item-wrapper {
|
|
|
341 |
|
342 |
.swatch-image {
|
343 |
+
img {
|
344 |
+
width: 100%;
|
345 |
+
height: auto;
|
346 |
+
}
|
347 |
|
348 |
+
text-align: center;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
349 |
}
|
350 |
}
|
351 |
}
|
assets/js/admin.js
CHANGED
@@ -201,11 +201,6 @@ jQuery(document).ready(function ($) {
|
|
201 |
|
202 |
}
|
203 |
|
204 |
-
|
205 |
-
});
|
206 |
-
|
207 |
-
|
208 |
-
jQuery(document).ready(function ($) {
|
209 |
// accordion js
|
210 |
$('.variation-item-head').on('click', function () {
|
211 |
var $clickedHead = $(this);
|
@@ -272,15 +267,90 @@ jQuery(document).ready(function ($) {
|
|
272 |
conditionalFieldEle.trigger("change");
|
273 |
}
|
274 |
})
|
|
|
275 |
//Show the Pro features popup
|
276 |
$('#tawcvs-settings-wrap').on('click', '.wcvs-pro-item, .wcvs-pro-item *', function (e) {
|
277 |
e.preventDefault();
|
278 |
$('.wcvs-pro-feature-popup,.wcvs-popup-blur').show();
|
279 |
})
|
|
|
280 |
//Hide the Pro features popup when clicking on close button or outside the popup
|
281 |
$('.popup-close,.wcvs-popup-blur').on('click', function () {
|
282 |
$('.wcvs-popup,.wcvs-popup-blur').hide();
|
283 |
})
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
284 |
});
|
285 |
|
286 |
|
201 |
|
202 |
}
|
203 |
|
|
|
|
|
|
|
|
|
|
|
204 |
// accordion js
|
205 |
$('.variation-item-head').on('click', function () {
|
206 |
var $clickedHead = $(this);
|
267 |
conditionalFieldEle.trigger("change");
|
268 |
}
|
269 |
})
|
270 |
+
|
271 |
//Show the Pro features popup
|
272 |
$('#tawcvs-settings-wrap').on('click', '.wcvs-pro-item, .wcvs-pro-item *', function (e) {
|
273 |
e.preventDefault();
|
274 |
$('.wcvs-pro-feature-popup,.wcvs-popup-blur').show();
|
275 |
})
|
276 |
+
|
277 |
//Hide the Pro features popup when clicking on close button or outside the popup
|
278 |
$('.popup-close,.wcvs-popup-blur').on('click', function () {
|
279 |
$('.wcvs-popup,.wcvs-popup-blur').hide();
|
280 |
})
|
281 |
+
|
282 |
+
//Update the Product Attribute type when changing it in the Settings page
|
283 |
+
$('.ajax-to-update input[type="checkbox"]').change(function () {
|
284 |
+
let typeToUpdate = "select";
|
285 |
+
let configureLinkEle = $(this).parent().find(".configure-items-link");
|
286 |
+
let mainTriggerEle = $("#" + $(this).parents('.ajax-to-update').data("conditional"));
|
287 |
+
let ajaxData = {attribute: $(this).data("slug")};
|
288 |
+
|
289 |
+
if (!mainTriggerEle.length) {
|
290 |
+
return;
|
291 |
+
}
|
292 |
+
|
293 |
+
if (mainTriggerEle.is(":checked")) {
|
294 |
+
ajaxData[mainTriggerEle.attr("name")] = 1;
|
295 |
+
} else {
|
296 |
+
ajaxData[mainTriggerEle.attr("name")] = 0;
|
297 |
+
}
|
298 |
+
|
299 |
+
if (this.checked && mainTriggerEle.is(":checked")) {
|
300 |
+
typeToUpdate = $(this).data("type");
|
301 |
+
|
302 |
+
//Uncheck same attributes in other settings
|
303 |
+
$('.ajax-to-update input[type="checkbox"][data-slug="' + $(this).data("slug") + '"]:checked').not(this).each(function () {
|
304 |
+
$(this).prop("checked", false);
|
305 |
+
$(this).parent().find(".configure-items-link").addClass("hidden");
|
306 |
+
//Set the plugin setting to false for this field
|
307 |
+
ajaxData[$(this).attr("name")] = 0;
|
308 |
+
})
|
309 |
+
|
310 |
+
//Set the plugin setting to true
|
311 |
+
ajaxData[$(this).attr("name")] = 1;
|
312 |
+
|
313 |
+
} else {
|
314 |
+
configureLinkEle.addClass("hidden");
|
315 |
+
|
316 |
+
//Set the plugin setting to false
|
317 |
+
ajaxData[$(this).attr("name")] = 0;
|
318 |
+
}
|
319 |
+
|
320 |
+
ajaxData.typeToUpdate = typeToUpdate;
|
321 |
+
|
322 |
+
$(this).closest(".ajax-to-update").toggleClass("saving");
|
323 |
+
|
324 |
+
wp.ajax.send("update_product_attr_type", {
|
325 |
+
data: ajaxData,
|
326 |
+
success: function (response) {
|
327 |
+
if (response.success) {
|
328 |
+
if ("select" === typeToUpdate) {
|
329 |
+
configureLinkEle.addClass("hidden");
|
330 |
+
} else {
|
331 |
+
configureLinkEle.removeClass("hidden");
|
332 |
+
}
|
333 |
+
$(".main-ajax-trigger,.ajax-to-update").removeClass("saving");
|
334 |
+
}
|
335 |
+
}
|
336 |
+
});
|
337 |
+
});
|
338 |
+
|
339 |
+
//Sync all child attributes when toggle on/off the setting
|
340 |
+
$('.main-ajax-trigger input[type="checkbox"]').change(function () {
|
341 |
+
let mainTriggerEle = $(this).closest(".main-ajax-trigger");
|
342 |
+
|
343 |
+
mainTriggerEle.toggleClass("saving");
|
344 |
+
mainTriggerEle.next(".ajax-to-update").toggleClass("saving");
|
345 |
+
|
346 |
+
let childAttrs = $("div[data-conditional='" + $(this).attr("id") + "'] input[type='checkbox']:checked");
|
347 |
+
if (childAttrs.length) {
|
348 |
+
childAttrs.each(function () {
|
349 |
+
$(this).trigger("change");
|
350 |
+
})
|
351 |
+
}
|
352 |
+
});
|
353 |
+
|
354 |
});
|
355 |
|
356 |
|
assets/js/frontend.js
CHANGED
@@ -1,128 +1,170 @@
|
|
1 |
-
;(function (
|
2 |
-
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
.data("product_variations", $form.find(".tawcvs-available-product-variation").data("product_variations"))
|
14 |
.trigger('reload_product_variations')
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
;(function ($) {
|
2 |
+
'use strict';
|
3 |
+
|
4 |
+
/**
|
5 |
+
* @TODO Code a function that calculate available combination instead of use WC hooks
|
6 |
+
*/
|
7 |
+
$.fn.tawcvs_variation_swatches_form = function () {
|
8 |
+
return this.each(function () {
|
9 |
+
var $form = $(this);
|
10 |
+
|
11 |
+
$form
|
12 |
+
.addClass('swatches-support')
|
13 |
.data("product_variations", $form.find(".tawcvs-available-product-variation").data("product_variations"))
|
14 |
.trigger('reload_product_variations')
|
15 |
+
.on("found_variation", function (event, variation) {
|
16 |
+
change_variation_image_on_shop_page($form, variation);
|
17 |
+
})
|
18 |
+
.on("reset_image", function (event) {
|
19 |
+
change_variation_image_on_shop_page($form, false);
|
20 |
+
})
|
21 |
+
.on('click', '.swatch', function (e) {
|
22 |
+
e.preventDefault();
|
23 |
+
var $el = $(this),
|
24 |
+
$select = $el.closest('.value').find('select'),
|
25 |
+
value = $el.attr('data-value');
|
26 |
+
|
27 |
+
if ($el.hasClass('disabled')) {
|
28 |
+
return;
|
29 |
+
}
|
30 |
+
|
31 |
+
//Disabling other swatches, then resetting the select value to empty
|
32 |
+
$el.parents('.tawcvs-swatches').find(".swatch.selected").each(function () {
|
33 |
+
$(this).not($el).removeClass("selected");
|
34 |
+
$select.val('');
|
35 |
+
})
|
36 |
+
|
37 |
+
// For old WC
|
38 |
+
$select.trigger('focusin');
|
39 |
+
|
40 |
+
// Check if this combination is available
|
41 |
+
if (!$select.find('option[value="' + value + '"]').length) {
|
42 |
+
$el.siblings('.swatch').removeClass('selected');
|
43 |
+
$select.val('').change();
|
44 |
+
$form.trigger('tawcvs_no_matching_variations', [$el]);
|
45 |
+
return;
|
46 |
+
}
|
47 |
+
|
48 |
+
if ($el.hasClass('selected')) {
|
49 |
+
$select.val('');
|
50 |
+
$el.removeClass('selected');
|
51 |
+
} else {
|
52 |
+
$el.addClass('selected').siblings('.selected').removeClass('selected');
|
53 |
+
$select.val(value);
|
54 |
+
}
|
55 |
+
|
56 |
+
$select.change();
|
57 |
+
})
|
58 |
+
.on('click', '.reset_variations', function () {
|
59 |
+
$form.find('.swatch.selected').removeClass('selected');
|
60 |
+
$form.find('.swatch.disabled').removeClass('disabled');
|
61 |
+
})
|
62 |
+
.on('woocommerce_update_variation_values', function () {
|
63 |
+
setTimeout(function () {
|
64 |
+
$form.find('.variation-selector').each(function () {
|
65 |
+
var $variationSelector = $(this),
|
66 |
+
$options = $variationSelector.find('select').find('option'),
|
67 |
+
$selected = $options.filter(':selected'),
|
68 |
+
values = [];
|
69 |
+
|
70 |
+
$options.each(function (index, option) {
|
71 |
+
if (option.value !== '') {
|
72 |
+
values.push(option.value);
|
73 |
+
}
|
74 |
+
});
|
75 |
+
|
76 |
+
$variationSelector.closest('.value').find('.swatch').each(function () {
|
77 |
+
var $swatch = $(this),
|
78 |
+
value = $swatch.attr('data-value');
|
79 |
+
|
80 |
+
if (values.indexOf(value) > -1) {
|
81 |
+
$swatch.removeClass('disabled');
|
82 |
+
} else {
|
83 |
+
$swatch.addClass('disabled');
|
84 |
+
|
85 |
+
if ($selected.length && value === $selected.val()) {
|
86 |
+
$swatch.removeClass('selected');
|
87 |
+
}
|
88 |
+
}
|
89 |
+
});
|
90 |
+
});
|
91 |
+
}, 100);
|
92 |
+
})
|
93 |
+
.on('tawcvs_no_matching_variations', function () {
|
94 |
+
window.alert(wc_add_to_cart_variation_params.i18n_no_matching_variations_text);
|
95 |
+
});
|
96 |
+
});
|
97 |
+
};
|
98 |
+
|
99 |
+
//Tracking the reset_variations button on change visibility -> change the corresponding display state
|
100 |
+
function toggle_hidden_variation_btn() {
|
101 |
+
const resetVariationNodes = document.getElementsByClassName('reset_variations');
|
102 |
+
|
103 |
+
if (resetVariationNodes.length) {
|
104 |
+
|
105 |
+
Array.prototype.forEach.call(resetVariationNodes, function (resetVariationEle) {
|
106 |
+
|
107 |
+
let observer = new MutationObserver(function () {
|
108 |
+
|
109 |
+
if (resetVariationEle.style.visibility !== 'hidden') {
|
110 |
+
|
111 |
+
resetVariationEle.style.display = 'block';
|
112 |
+
|
113 |
+
} else {
|
114 |
+
|
115 |
+
resetVariationEle.style.display = 'none';
|
116 |
+
|
117 |
+
}
|
118 |
+
|
119 |
+
});
|
120 |
+
|
121 |
+
observer.observe(resetVariationEle, {attributes: true, childList: true});
|
122 |
+
|
123 |
+
})
|
124 |
+
|
125 |
+
}
|
126 |
+
}
|
127 |
+
|
128 |
+
function change_variation_image_on_shop_page($form, variation) {
|
129 |
+
var $product = $form.closest('.product'),
|
130 |
+
$product_img = $product.find('.woocommerce-LoopProduct-link img');
|
131 |
+
|
132 |
+
if (!$product_img.length) {
|
133 |
+
return false;
|
134 |
+
}
|
135 |
+
|
136 |
+
if (variation && variation.image && variation.image.src && variation.image.src.length > 1) {
|
137 |
+
$product_img.wc_set_variation_attr('src', variation.image.src);
|
138 |
+
$product_img.wc_set_variation_attr('height', variation.image.src_h);
|
139 |
+
$product_img.wc_set_variation_attr('width', variation.image.src_w);
|
140 |
+
$product_img.wc_set_variation_attr('srcset', variation.image.srcset);
|
141 |
+
$product_img.wc_set_variation_attr('sizes', variation.image.sizes);
|
142 |
+
$product_img.wc_set_variation_attr('title', variation.image.title);
|
143 |
+
$product_img.wc_set_variation_attr('data-caption', variation.image.caption);
|
144 |
+
$product_img.wc_set_variation_attr('alt', variation.image.alt);
|
145 |
+
$product_img.wc_set_variation_attr('data-src', variation.image.full_src);
|
146 |
+
$product_img.wc_set_variation_attr('data-large_image', variation.image.full_src);
|
147 |
+
$product_img.wc_set_variation_attr('data-large_image_width', variation.image.full_src_w);
|
148 |
+
$product_img.wc_set_variation_attr('data-large_image_height', variation.image.full_src_h);
|
149 |
+
} else {
|
150 |
+
$product_img.wc_reset_variation_attr('src');
|
151 |
+
$product_img.wc_reset_variation_attr('width');
|
152 |
+
$product_img.wc_reset_variation_attr('height');
|
153 |
+
$product_img.wc_reset_variation_attr('srcset');
|
154 |
+
$product_img.wc_reset_variation_attr('sizes');
|
155 |
+
$product_img.wc_reset_variation_attr('title');
|
156 |
+
$product_img.wc_reset_variation_attr('data-caption');
|
157 |
+
$product_img.wc_reset_variation_attr('alt');
|
158 |
+
$product_img.wc_reset_variation_attr('data-src');
|
159 |
+
$product_img.wc_reset_variation_attr('data-large_image');
|
160 |
+
$product_img.wc_reset_variation_attr('data-large_image_width');
|
161 |
+
$product_img.wc_reset_variation_attr('data-large_image_height');
|
162 |
+
}
|
163 |
+
}
|
164 |
+
|
165 |
+
$(function () {
|
166 |
+
$('.variations_form').tawcvs_variation_swatches_form();
|
167 |
+
$(document.body).trigger('tawcvs_initialized');
|
168 |
+
toggle_hidden_variation_btn();
|
169 |
+
});
|
170 |
+
})(jQuery);
|
includes/class-admin.php
CHANGED
@@ -11,7 +11,8 @@ class TA_WC_Variation_Swatches_Admin {
|
|
11 |
*/
|
12 |
protected static $instance = null;
|
13 |
|
14 |
-
private $
|
|
|
15 |
|
16 |
/**
|
17 |
* Main instance
|
@@ -34,6 +35,10 @@ class TA_WC_Variation_Swatches_Admin {
|
|
34 |
add_action( 'admin_init', array( $this, 'init_attribute_hooks' ) );
|
35 |
add_action( 'admin_print_scripts', array( $this, 'enqueue_scripts' ) );
|
36 |
|
|
|
|
|
|
|
|
|
37 |
// Restore attributes
|
38 |
add_action( 'admin_notices', array( $this, 'restore_attributes_notice' ) );
|
39 |
add_action( 'admin_init', array( $this, 'restore_attribute_types' ) );
|
@@ -41,6 +46,12 @@ class TA_WC_Variation_Swatches_Admin {
|
|
41 |
// Display attribute fields
|
42 |
add_action( 'tawcvs_product_attribute_field', array( $this, 'attribute_fields' ), 10, 4 );
|
43 |
|
|
|
|
|
|
|
|
|
|
|
|
|
44 |
add_filter( 'woosuite_core_module_settings_url', array(
|
45 |
$this,
|
46 |
'render_the_setting_url_in_core_plugin'
|
@@ -48,10 +59,115 @@ class TA_WC_Variation_Swatches_Admin {
|
|
48 |
|
49 |
include_once( dirname( __FILE__ ) . '/class-menu-page.php' );
|
50 |
new VSWC_Settings_Page();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
51 |
|
52 |
-
$
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
53 |
|
54 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
55 |
}
|
56 |
|
57 |
/**
|
@@ -335,7 +451,7 @@ class TA_WC_Variation_Swatches_Admin {
|
|
335 |
if ( isset( $_POST[ $type ] ) ) {
|
336 |
update_term_meta( $term_id, $type, sanitize_text_field( $_POST[ $type ] ) );
|
337 |
|
338 |
-
do_action('tawcvs_after_save_term_meta'
|
339 |
}
|
340 |
}
|
341 |
}
|
@@ -390,4 +506,60 @@ class TA_WC_Variation_Swatches_Admin {
|
|
390 |
break;
|
391 |
}
|
392 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
393 |
}
|
11 |
*/
|
12 |
protected static $instance = null;
|
13 |
|
14 |
+
private $option_name = 'woosuite_variation_swatches_option';
|
15 |
+
|
16 |
|
17 |
/**
|
18 |
* Main instance
|
35 |
add_action( 'admin_init', array( $this, 'init_attribute_hooks' ) );
|
36 |
add_action( 'admin_print_scripts', array( $this, 'enqueue_scripts' ) );
|
37 |
|
38 |
+
add_action( 'woocommerce_product_data_tabs', array( $this, 'add_custom_swatch_variation_tab' ) );
|
39 |
+
add_action( 'woocommerce_product_data_panels', array( $this, 'product_tab_variation_swatches_panel' ) );
|
40 |
+
add_action( 'woocommerce_process_product_meta', array( $this, 'save_custom_product_data' ) );
|
41 |
+
|
42 |
// Restore attributes
|
43 |
add_action( 'admin_notices', array( $this, 'restore_attributes_notice' ) );
|
44 |
add_action( 'admin_init', array( $this, 'restore_attribute_types' ) );
|
46 |
// Display attribute fields
|
47 |
add_action( 'tawcvs_product_attribute_field', array( $this, 'attribute_fields' ), 10, 4 );
|
48 |
|
49 |
+
add_action( 'wp_ajax_update_product_attr_type', array( $this, 'update_product_attr_type' ) );
|
50 |
+
|
51 |
+
|
52 |
+
add_action( 'woocommerce_attribute_added', array( $this, 'update_plugin_setting_on_added' ), 10, 2 );
|
53 |
+
add_action( 'woocommerce_attribute_updated', array( $this, 'update_plugin_setting_on_updated' ), 10, 3 );
|
54 |
+
|
55 |
add_filter( 'woosuite_core_module_settings_url', array(
|
56 |
$this,
|
57 |
'render_the_setting_url_in_core_plugin'
|
59 |
|
60 |
include_once( dirname( __FILE__ ) . '/class-menu-page.php' );
|
61 |
new VSWC_Settings_Page();
|
62 |
+
}
|
63 |
+
|
64 |
+
/**
|
65 |
+
* @param $id
|
66 |
+
* @param $data
|
67 |
+
*/
|
68 |
+
public function update_plugin_setting_on_added( $id, $data ) {
|
69 |
+
|
70 |
+
$this->sync_attribute_setting_to_plugin_settings( $data );
|
71 |
+
}
|
72 |
+
|
73 |
+
/**
|
74 |
+
* @param $id
|
75 |
+
* @param $data
|
76 |
+
* @param $old_slug
|
77 |
+
*/
|
78 |
+
public function update_plugin_setting_on_updated( $id, $data, $old_slug ) {
|
79 |
+
|
80 |
+
$latest_option = $this->get_latest_plugin_option();
|
81 |
+
|
82 |
+
//Remove the old slug from our plugin setting
|
83 |
+
if ( $data['attribute_name'] !== $old_slug && isset( $latest_option['general'] ) ) {
|
84 |
+
unset( $latest_option['general'][ 'color-swatches-attribute-' . $old_slug ] );
|
85 |
+
unset( $latest_option['general'][ 'image-swatches-attribute-' . $old_slug ] );
|
86 |
+
}
|
87 |
+
|
88 |
+
$this->sync_attribute_setting_to_plugin_settings( $data, $latest_option );
|
89 |
+
}
|
90 |
+
|
91 |
+
/**
|
92 |
+
* Function to sync the attribute type setting with the plugin setting
|
93 |
+
*
|
94 |
+
* @param $data
|
95 |
+
* @param array|bool $latest_option
|
96 |
+
*/
|
97 |
+
private function sync_attribute_setting_to_plugin_settings( $data, $latest_option = false ) {
|
98 |
+
if ( ! $latest_option ) {
|
99 |
+
$latest_option = $this->get_latest_plugin_option();
|
100 |
+
}
|
101 |
+
|
102 |
+
$generalSettings = isset( $latest_option['general'] ) ? $latest_option['general'] : array();
|
103 |
+
|
104 |
+
//Set new value
|
105 |
+
switch ( $data['attribute_type'] ) {
|
106 |
+
case 'image':
|
107 |
+
$generalSettings[ 'image-swatches-attribute-' . $data['attribute_name'] ] = '1';
|
108 |
+
$generalSettings[ 'color-swatches-attribute-' . $data['attribute_name'] ] = '0';
|
109 |
+
$generalSettings['enable-image-swatches'] = '1';
|
110 |
+
break;
|
111 |
+
case 'color':
|
112 |
+
$generalSettings[ 'image-swatches-attribute-' . $data['attribute_name'] ] = '0';
|
113 |
+
$generalSettings[ 'color-swatches-attribute-' . $data['attribute_name'] ] = '1';
|
114 |
+
$generalSettings['enable-color-swatches'] = '1';
|
115 |
+
break;
|
116 |
+
}
|
117 |
+
|
118 |
+
$latest_option['general'] = $generalSettings;
|
119 |
+
|
120 |
+
update_option( $this->option_name, $latest_option );
|
121 |
+
|
122 |
+
$this->remove_wc_attributes_cache();
|
123 |
+
}
|
124 |
+
|
125 |
+
/**
|
126 |
+
* Add the custom product tab for Variation swatches
|
127 |
+
*
|
128 |
+
* @param $product_data_tabs
|
129 |
+
*
|
130 |
+
* @return mixed
|
131 |
+
*/
|
132 |
+
public function add_custom_swatch_variation_tab( $product_data_tabs ) {
|
133 |
+
$product_data_tabs['variation-swatches'] = array(
|
134 |
+
'label' => __( 'Variation Swatches', 'wcvs' ),
|
135 |
+
'target' => 'variation_swatches_options',
|
136 |
+
'class' => array( 'show_if_variable' ),
|
137 |
+
'priority' => 61,
|
138 |
+
);
|
139 |
|
140 |
+
return $product_data_tabs;
|
141 |
+
}
|
142 |
+
|
143 |
+
/**
|
144 |
+
* Rendering the product data panel for Swatch Variation settings
|
145 |
+
*/
|
146 |
+
public function product_tab_variation_swatches_panel() { ?>
|
147 |
+
<div id="variation_swatches_options" class="panel woocommerce_options_panel">
|
148 |
+
<div class="options_group">
|
149 |
+
<?php
|
150 |
+
woocommerce_wp_checkbox( array(
|
151 |
+
'id' => 'variation_swatches_disabled',
|
152 |
+
'wrapper_class' => 'show_if_variable',
|
153 |
+
'label' => __( 'Disable Swatches', 'wcvs' ),
|
154 |
+
'default' => '0',
|
155 |
+
'desc_tip' => false,
|
156 |
+
'description' => __( 'Show the default dropdown selection instead of swatches settings', 'wcvs' )
|
157 |
+
) );
|
158 |
+
?>
|
159 |
+
</div>
|
160 |
+
</div>
|
161 |
+
<?php
|
162 |
+
}
|
163 |
|
164 |
+
/**
|
165 |
+
* Saving custom field of product data tab
|
166 |
+
*
|
167 |
+
* @param $post_id
|
168 |
+
*/
|
169 |
+
public function save_custom_product_data( $post_id ) {
|
170 |
+
update_post_meta( $post_id, 'variation_swatches_disabled', esc_attr( $_POST['variation_swatches_disabled'] ) );
|
171 |
}
|
172 |
|
173 |
/**
|
451 |
if ( isset( $_POST[ $type ] ) ) {
|
452 |
update_term_meta( $term_id, $type, sanitize_text_field( $_POST[ $type ] ) );
|
453 |
|
454 |
+
do_action( 'tawcvs_after_save_term_meta', $term_id, $type );
|
455 |
}
|
456 |
}
|
457 |
}
|
506 |
break;
|
507 |
}
|
508 |
}
|
509 |
+
|
510 |
+
/**
|
511 |
+
* Ajax callback to update the Product Attribute type
|
512 |
+
*/
|
513 |
+
public function update_product_attr_type() {
|
514 |
+
global $wpdb;
|
515 |
+
|
516 |
+
$latest_option = $this->get_latest_plugin_option();
|
517 |
+
|
518 |
+
$attribute_name = isset( $_POST['attribute'] ) ? sanitize_text_field( $_POST['attribute'] ) : '';
|
519 |
+
$type_to_update = isset( $_POST['typeToUpdate'] ) ? sanitize_text_field( $_POST['typeToUpdate'] ) : '';
|
520 |
+
|
521 |
+
if ( empty( $attribute_name ) || empty( $type_to_update ) ) {
|
522 |
+
wp_send_json_error( array( 'message' => 'Missing data', 'success' => false ), 200 );
|
523 |
+
}
|
524 |
+
|
525 |
+
//Setting the Product attribute to specified type
|
526 |
+
$result = $wpdb->update(
|
527 |
+
$wpdb->prefix . 'woocommerce_attribute_taxonomies',
|
528 |
+
array( 'attribute_type' => $type_to_update ),
|
529 |
+
array( 'attribute_name' => $attribute_name ),
|
530 |
+
array( '%s' ),
|
531 |
+
array( '%s' )
|
532 |
+
);
|
533 |
+
|
534 |
+
//Update the plugin settings also
|
535 |
+
$main_setting_arr = array_slice( $_POST, 1, 1, true );
|
536 |
+
|
537 |
+
update_option( $this->option_name, array_replace_recursive( $latest_option, $main_setting_arr ) );
|
538 |
+
|
539 |
+
$this->remove_wc_attributes_cache();
|
540 |
+
|
541 |
+
//Save the setting
|
542 |
+
if ( false !== $result ) {
|
543 |
+
wp_send_json_success( array( 'message' => 'Done with update', 'success' => true ), 200 );
|
544 |
+
}
|
545 |
+
|
546 |
+
wp_send_json_error( array( 'message' => 'Unexpected error', 'success' => false ), 200 );
|
547 |
+
|
548 |
+
}
|
549 |
+
|
550 |
+
/**
|
551 |
+
* Reset the WC cache to get the latest value
|
552 |
+
*/
|
553 |
+
private function remove_wc_attributes_cache() {
|
554 |
+
delete_transient( 'wc_attribute_taxonomies' );
|
555 |
+
}
|
556 |
+
|
557 |
+
/**
|
558 |
+
* Get the latest plugin option settings
|
559 |
+
*/
|
560 |
+
private function get_latest_plugin_option() {
|
561 |
+
$option = get_option( $this->option_name, array() );
|
562 |
+
|
563 |
+
return is_array( $option ) ? $option : array();
|
564 |
+
}
|
565 |
}
|
includes/class-frontend.php
CHANGED
@@ -48,7 +48,7 @@ class TA_WC_Variation_Swatches_Frontend {
|
|
48 |
$this->toolTipDesign = isset( $latest_option['design']['toolTipDesign'] ) ? $latest_option['design']['toolTipDesign'] : array();
|
49 |
|
50 |
|
51 |
-
if ( isset($this->archiveSettings['show-clear-link']) && ! $this->archiveSettings['show-clear-link'] ) {
|
52 |
add_filter( 'woocommerce_reset_variations_link', array(
|
53 |
$this,
|
54 |
'tawcvs_show_clear_link_on_variations_on_shop_page'
|
@@ -57,13 +57,41 @@ class TA_WC_Variation_Swatches_Frontend {
|
|
57 |
|
58 |
if ( isset( $this->archiveSettings['show-swatch'] )
|
59 |
&& $this->archiveSettings['show-swatch']
|
60 |
-
&& !
|
61 |
add_filter( 'woocommerce_loop_add_to_cart_link', array(
|
62 |
$this,
|
63 |
'display_variations_on_shop_page_before_add_to_cart_btn'
|
64 |
), 10, 3 );
|
65 |
}
|
66 |
add_action( 'wp_head', array( $this, 'apply_custom_design_styles' ) );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
67 |
}
|
68 |
|
69 |
/**
|
@@ -86,7 +114,7 @@ class TA_WC_Variation_Swatches_Frontend {
|
|
86 |
* Enqueue scripts and stylesheets
|
87 |
*/
|
88 |
public function enqueue_scripts() {
|
89 |
-
if ( isset($this->generalSettings['disable-plugin-stylesheet']) && ! $this->generalSettings['disable-plugin-stylesheet'] ) {
|
90 |
wp_enqueue_style( 'tawcvs-frontend', plugins_url( 'assets/css/frontend.css', TAWC_VS_PLUGIN_FILE ), array(), WCVS_PLUGIN_VERSION );
|
91 |
}
|
92 |
if ( is_shop() || is_product_category() || is_product_tag() ) {
|
@@ -106,8 +134,7 @@ class TA_WC_Variation_Swatches_Frontend {
|
|
106 |
public function get_swatch_html( $html, $args ) {
|
107 |
global $woocommerce_loop;
|
108 |
|
109 |
-
$
|
110 |
-
$attr = TA_WCVS()->get_tax_attribute( $args['attribute'] );
|
111 |
|
112 |
// Return if this is normal attribute
|
113 |
if ( empty( $attr ) || ! $args['product'] instanceof WC_Product_Variable ) {
|
@@ -123,32 +150,16 @@ class TA_WC_Variation_Swatches_Frontend {
|
|
123 |
$defined_limit = apply_filters( 'tawcvs_swatch_limit_number', 0 );
|
124 |
$out_of_stock_state = apply_filters( 'tawcvs_out_of_stock_state', '' );
|
125 |
|
|
|
|
|
|
|
|
|
126 |
|
127 |
if ( empty( $options ) && ! empty( $product ) && ! empty( $attribute_tax_name ) ) {
|
128 |
$attributes = $product->get_variation_attributes();
|
129 |
$options = $attributes[ $attribute_tax_name ];
|
130 |
}
|
131 |
|
132 |
-
$dropdown_to_label_setting = isset( $this->generalSettings['dropdown-to-label'] ) && $this->generalSettings['dropdown-to-label'];
|
133 |
-
|
134 |
-
// If the type isn't supported, and we turned on the setting to convert dropdown to label/image
|
135 |
-
// then we forced that type to the corresponding type
|
136 |
-
if ( ! array_key_exists( $attr->attribute_type, $supported_swatch_types ) ) {
|
137 |
-
|
138 |
-
if ( $dropdown_to_label_setting
|
139 |
-
&& isset( $this->generalSettings[ 'dropdown-to-label-attribute-' . $attr->attribute_name ] )
|
140 |
-
&& $this->generalSettings[ 'dropdown-to-label-attribute-' . $attr->attribute_name ] ) {
|
141 |
-
|
142 |
-
$attr->attribute_type = 'label';
|
143 |
-
|
144 |
-
} else {
|
145 |
-
|
146 |
-
$attr->attribute_type = '';
|
147 |
-
|
148 |
-
}
|
149 |
-
|
150 |
-
}
|
151 |
-
$attr->attribute_type = apply_filters( 'tawcvs_attribute_type', $attr->attribute_type, $attr, $supported_swatch_types );
|
152 |
|
153 |
if ( empty( $attr->attribute_type ) ) {
|
154 |
return $html;
|
@@ -168,6 +179,8 @@ class TA_WC_Variation_Swatches_Frontend {
|
|
168 |
//Check if we have the product variable for this attribute
|
169 |
if ( isset( $collected_variations[ $term->slug ] ) ) {
|
170 |
$args['variation_product'] = $collected_variations[ $term->slug ];
|
|
|
|
|
171 |
}
|
172 |
|
173 |
$swatches .= apply_filters( 'tawcvs_swatch_html', '', $term, $attr->attribute_type, $args );
|
@@ -191,6 +204,14 @@ class TA_WC_Variation_Swatches_Frontend {
|
|
191 |
return $html;
|
192 |
}
|
193 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
194 |
/**
|
195 |
* @param $product
|
196 |
* @param $defined_limit
|
@@ -361,7 +382,8 @@ class TA_WC_Variation_Swatches_Frontend {
|
|
361 |
$page = is_product() ? 'productDesign' : 'shopDesign';
|
362 |
?>
|
363 |
<style>
|
364 |
-
.tawcvs-swatches
|
|
|
365 |
margin-top: <?php echo isset($this->{$page}['wrm-top']) ? $this->{$page}['wrm-top'] : '0'; echo isset($this->{$page}['wrm-type']) ? $this->{$page}['wrm-type'] : 'px' ?>;
|
366 |
margin-right: <?php echo isset($this->{$page}['wrm-right']) ? $this->{$page}['wrm-right'] : '15'; echo isset($this->{$page}['wrm-type']) ? $this->{$page}['wrm-type'] : 'px' ?>;
|
367 |
margin-bottom: <?php echo isset($this->{$page}['wrm-bottom']) ? $this->{$page}['wrm-bottom'] : '15'; echo isset($this->{$page}['wrm-type']) ? $this->{$page}['wrm-type'] : 'px' ?>;
|
@@ -372,7 +394,8 @@ class TA_WC_Variation_Swatches_Frontend {
|
|
372 |
padding-left: <?php echo isset($this->{$page}['wrp-left']) ? $this->{$page}['wrp-left'] : '0'; echo isset($this->{$page}['wrp-type']) ? $this->{$page}['wrp-type'] : 'px' ?>;
|
373 |
}
|
374 |
|
375 |
-
.tawcvs-swatches .swatch-item-wrapper
|
|
|
376 |
<?php if($this->{$page}['item-font']):?> font-size: <?php echo isset($this->{$page}['text-font-size']) ? $this->{$page}['text-font-size'] : '12'; echo isset($this->{$page}['item-font-size-type']) ? $this->{$page}['item-font-size-type'] : 'px'; ?>;
|
377 |
<?php endif;?> margin-top: <?php echo isset($this->{$page}['mar-top']) ? $this->{$page}['mar-top'] : '0'; echo isset($this->{$page}['mar-type']) ? $this->{$page}['mar-type'] : 'px' ?> !important;
|
378 |
margin-right: <?php echo isset($this->{$page}['mar-right']) ? $this->{$page}['mar-right'] : '15'; echo isset($this->{$page}['mar-type']) ? $this->{$page}['mar-type'] : 'px' ?> !important;
|
@@ -385,7 +408,8 @@ class TA_WC_Variation_Swatches_Frontend {
|
|
385 |
}
|
386 |
|
387 |
/*tooltip*/
|
388 |
-
.tawcvs-swatches .swatch .swatch__tooltip
|
|
|
389 |
<?php if(isset($this->toolTipDesign['item-font']) && $this->toolTipDesign['item-font']):?> font-size: <?php echo isset($this->toolTipDesign['text-font-size']) ? $this->toolTipDesign['text-font-size'] : '14'; echo isset($this->toolTipDesign['item-font-size-type']) ? $this->toolTipDesign['item-font-size-type'] : 'px'; ?>;
|
390 |
<?php endif;?> width: <?php echo isset($this->toolTipDesign['width']) ? $this->toolTipDesign['width'] . 'px' : 'auto' ?>;
|
391 |
max-width: <?php echo isset($this->toolTipDesign['max-width']) ? $this->toolTipDesign['max-width'] .'px' : '100%' ?>;
|
48 |
$this->toolTipDesign = isset( $latest_option['design']['toolTipDesign'] ) ? $latest_option['design']['toolTipDesign'] : array();
|
49 |
|
50 |
|
51 |
+
if ( isset( $this->archiveSettings['show-clear-link'] ) && ! $this->archiveSettings['show-clear-link'] ) {
|
52 |
add_filter( 'woocommerce_reset_variations_link', array(
|
53 |
$this,
|
54 |
'tawcvs_show_clear_link_on_variations_on_shop_page'
|
57 |
|
58 |
if ( isset( $this->archiveSettings['show-swatch'] )
|
59 |
&& $this->archiveSettings['show-swatch']
|
60 |
+
&& ! TA_WC_Variation_Swatches::is_pro_addon_active() ) {
|
61 |
add_filter( 'woocommerce_loop_add_to_cart_link', array(
|
62 |
$this,
|
63 |
'display_variations_on_shop_page_before_add_to_cart_btn'
|
64 |
), 10, 3 );
|
65 |
}
|
66 |
add_action( 'wp_head', array( $this, 'apply_custom_design_styles' ) );
|
67 |
+
|
68 |
+
add_filter( 'tawcvs_tax_attributes', array( $this, 'get_updated_attribute_type' ), 10 );
|
69 |
+
}
|
70 |
+
|
71 |
+
public function get_updated_attribute_type( $attr ) {
|
72 |
+
$supported_swatch_types = TA_WCVS()->types;
|
73 |
+
$dropdown_to_label_setting = isset( $this->generalSettings['dropdown-to-label'] ) && $this->generalSettings['dropdown-to-label'];
|
74 |
+
|
75 |
+
// If the type isn't supported, and we turned on the setting to convert dropdown to label/image
|
76 |
+
// then we forced that type to the corresponding type
|
77 |
+
if ( ! array_key_exists( $attr->attribute_type, $supported_swatch_types ) ) {
|
78 |
+
|
79 |
+
if ( $dropdown_to_label_setting
|
80 |
+
&& isset( $this->generalSettings[ 'dropdown-to-label-attribute-' . $attr->attribute_name ] )
|
81 |
+
&& $this->generalSettings[ 'dropdown-to-label-attribute-' . $attr->attribute_name ] ) {
|
82 |
+
|
83 |
+
$attr->attribute_type = 'label';
|
84 |
+
|
85 |
+
} else {
|
86 |
+
//Default attribute type should be select
|
87 |
+
$attr->attribute_type = 'select';
|
88 |
+
|
89 |
+
}
|
90 |
+
|
91 |
+
}
|
92 |
+
$attr->attribute_type = apply_filters( 'tawcvs_attribute_type', $attr->attribute_type, $attr, $supported_swatch_types );
|
93 |
+
|
94 |
+
return $attr;
|
95 |
}
|
96 |
|
97 |
/**
|
114 |
* Enqueue scripts and stylesheets
|
115 |
*/
|
116 |
public function enqueue_scripts() {
|
117 |
+
if ( isset( $this->generalSettings['disable-plugin-stylesheet'] ) && ! $this->generalSettings['disable-plugin-stylesheet'] ) {
|
118 |
wp_enqueue_style( 'tawcvs-frontend', plugins_url( 'assets/css/frontend.css', TAWC_VS_PLUGIN_FILE ), array(), WCVS_PLUGIN_VERSION );
|
119 |
}
|
120 |
if ( is_shop() || is_product_category() || is_product_tag() ) {
|
134 |
public function get_swatch_html( $html, $args ) {
|
135 |
global $woocommerce_loop;
|
136 |
|
137 |
+
$attr = TA_WCVS()->get_tax_attribute( $args['attribute'] );
|
|
|
138 |
|
139 |
// Return if this is normal attribute
|
140 |
if ( empty( $attr ) || ! $args['product'] instanceof WC_Product_Variable ) {
|
150 |
$defined_limit = apply_filters( 'tawcvs_swatch_limit_number', 0 );
|
151 |
$out_of_stock_state = apply_filters( 'tawcvs_out_of_stock_state', '' );
|
152 |
|
153 |
+
//If this product has disabled the variation swatches
|
154 |
+
if ( $this->is_disabled_variation_swatches( $product ) ) {
|
155 |
+
return $html;
|
156 |
+
}
|
157 |
|
158 |
if ( empty( $options ) && ! empty( $product ) && ! empty( $attribute_tax_name ) ) {
|
159 |
$attributes = $product->get_variation_attributes();
|
160 |
$options = $attributes[ $attribute_tax_name ];
|
161 |
}
|
162 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
163 |
|
164 |
if ( empty( $attr->attribute_type ) ) {
|
165 |
return $html;
|
179 |
//Check if we have the product variable for this attribute
|
180 |
if ( isset( $collected_variations[ $term->slug ] ) ) {
|
181 |
$args['variation_product'] = $collected_variations[ $term->slug ];
|
182 |
+
} else {
|
183 |
+
unset( $args['variation_product'] );
|
184 |
}
|
185 |
|
186 |
$swatches .= apply_filters( 'tawcvs_swatch_html', '', $term, $attr->attribute_type, $args );
|
204 |
return $html;
|
205 |
}
|
206 |
|
207 |
+
private function is_disabled_variation_swatches( $product ) {
|
208 |
+
if ( ! $product instanceof WC_Product_Variable ) {
|
209 |
+
return false;
|
210 |
+
}
|
211 |
+
|
212 |
+
return 'yes' === get_post_meta( $product->get_id(), 'variation_swatches_disabled', true );
|
213 |
+
}
|
214 |
+
|
215 |
/**
|
216 |
* @param $product
|
217 |
* @param $defined_limit
|
382 |
$page = is_product() ? 'productDesign' : 'shopDesign';
|
383 |
?>
|
384 |
<style>
|
385 |
+
.woocommerce div.product form.cart.swatches-support .tawcvs-swatches,
|
386 |
+
.woocommerce.archive form.cart.swatches-support .tawcvs-swatches {
|
387 |
margin-top: <?php echo isset($this->{$page}['wrm-top']) ? $this->{$page}['wrm-top'] : '0'; echo isset($this->{$page}['wrm-type']) ? $this->{$page}['wrm-type'] : 'px' ?>;
|
388 |
margin-right: <?php echo isset($this->{$page}['wrm-right']) ? $this->{$page}['wrm-right'] : '15'; echo isset($this->{$page}['wrm-type']) ? $this->{$page}['wrm-type'] : 'px' ?>;
|
389 |
margin-bottom: <?php echo isset($this->{$page}['wrm-bottom']) ? $this->{$page}['wrm-bottom'] : '15'; echo isset($this->{$page}['wrm-type']) ? $this->{$page}['wrm-type'] : 'px' ?>;
|
394 |
padding-left: <?php echo isset($this->{$page}['wrp-left']) ? $this->{$page}['wrp-left'] : '0'; echo isset($this->{$page}['wrp-type']) ? $this->{$page}['wrp-type'] : 'px' ?>;
|
395 |
}
|
396 |
|
397 |
+
.woocommerce div.product form.cart.swatches-support .tawcvs-swatches .swatch-item-wrapper,
|
398 |
+
.woocommerce.archive form.cart.swatches-support .tawcvs-swatches .swatch-item-wrapper {
|
399 |
<?php if($this->{$page}['item-font']):?> font-size: <?php echo isset($this->{$page}['text-font-size']) ? $this->{$page}['text-font-size'] : '12'; echo isset($this->{$page}['item-font-size-type']) ? $this->{$page}['item-font-size-type'] : 'px'; ?>;
|
400 |
<?php endif;?> margin-top: <?php echo isset($this->{$page}['mar-top']) ? $this->{$page}['mar-top'] : '0'; echo isset($this->{$page}['mar-type']) ? $this->{$page}['mar-type'] : 'px' ?> !important;
|
401 |
margin-right: <?php echo isset($this->{$page}['mar-right']) ? $this->{$page}['mar-right'] : '15'; echo isset($this->{$page}['mar-type']) ? $this->{$page}['mar-type'] : 'px' ?> !important;
|
408 |
}
|
409 |
|
410 |
/*tooltip*/
|
411 |
+
.woocommerce div.product form.cart.swatches-support .tawcvs-swatches .swatch .swatch__tooltip,
|
412 |
+
.woocommerce.archive form.cart.swatches-support .tawcvs-swatches .swatch .swatch__tooltip {
|
413 |
<?php if(isset($this->toolTipDesign['item-font']) && $this->toolTipDesign['item-font']):?> font-size: <?php echo isset($this->toolTipDesign['text-font-size']) ? $this->toolTipDesign['text-font-size'] : '14'; echo isset($this->toolTipDesign['item-font-size-type']) ? $this->toolTipDesign['item-font-size-type'] : 'px'; ?>;
|
414 |
<?php endif;?> width: <?php echo isset($this->toolTipDesign['width']) ? $this->toolTipDesign['width'] . 'px' : 'auto' ?>;
|
415 |
max-width: <?php echo isset($this->toolTipDesign['max-width']) ? $this->toolTipDesign['max-width'] .'px' : '100%' ?>;
|
includes/class-menu-page.php
CHANGED
@@ -11,7 +11,7 @@ class VSWC_Settings_Page {
|
|
11 |
public function __construct() {
|
12 |
$this->upgrader_obj = new VSWC_Upgrader();
|
13 |
|
14 |
-
add_action( 'admin_menu', array( $this, 'handle_save_actions' ),5);
|
15 |
add_action( 'admin_menu', array( $this, 'admin_menu' ) );
|
16 |
|
17 |
add_action( 'admin_enqueue_scripts', array( $this, 'admin_scripts' ) );
|
@@ -75,7 +75,7 @@ class VSWC_Settings_Page {
|
|
75 |
TA_WC_Variation_Swatches::get_template( 'admin/setting-panel.php' );
|
76 |
TA_WC_Variation_Swatches::get_template( 'admin/pro-feature-popup.php' );
|
77 |
if ( $this->upgrader_obj->is_welcome_popup_should_be_shown() ) {
|
78 |
-
TA_WC_Variation_Swatches::get_template( 'admin/welcome-popup
|
79 |
}
|
80 |
}
|
81 |
|
@@ -98,6 +98,7 @@ class VSWC_Settings_Page {
|
|
98 |
if ( isset( $_POST['woosuite_saving_variation_settings'] ) ) {
|
99 |
unset( $_POST['woosuite_saving_variation_settings'] );
|
100 |
$this->save_post_data_to_db();
|
|
|
101 |
$_POST['woosuite_saved_variation_settings'] = true;
|
102 |
}
|
103 |
}
|
@@ -109,6 +110,97 @@ class VSWC_Settings_Page {
|
|
109 |
update_option( $this->option_name, $this->sanitize_post_data( $_POST ) );
|
110 |
}
|
111 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
112 |
private function sanitize_post_data( $post_data ) {
|
113 |
foreach ( $post_data as $section_id => $items ) {
|
114 |
foreach ( $items as $field_name => $field_value ) {
|
11 |
public function __construct() {
|
12 |
$this->upgrader_obj = new VSWC_Upgrader();
|
13 |
|
14 |
+
add_action( 'admin_menu', array( $this, 'handle_save_actions' ), 5 );
|
15 |
add_action( 'admin_menu', array( $this, 'admin_menu' ) );
|
16 |
|
17 |
add_action( 'admin_enqueue_scripts', array( $this, 'admin_scripts' ) );
|
75 |
TA_WC_Variation_Swatches::get_template( 'admin/setting-panel.php' );
|
76 |
TA_WC_Variation_Swatches::get_template( 'admin/pro-feature-popup.php' );
|
77 |
if ( $this->upgrader_obj->is_welcome_popup_should_be_shown() ) {
|
78 |
+
TA_WC_Variation_Swatches::get_template( 'admin/welcome-popup.php' );
|
79 |
}
|
80 |
}
|
81 |
|
98 |
if ( isset( $_POST['woosuite_saving_variation_settings'] ) ) {
|
99 |
unset( $_POST['woosuite_saving_variation_settings'] );
|
100 |
$this->save_post_data_to_db();
|
101 |
+
$this->syncing_up_color_image_swatches();
|
102 |
$_POST['woosuite_saved_variation_settings'] = true;
|
103 |
}
|
104 |
}
|
110 |
update_option( $this->option_name, $this->sanitize_post_data( $_POST ) );
|
111 |
}
|
112 |
|
113 |
+
/**
|
114 |
+
* Helper function to update the corresponding Color/Image swatches settings
|
115 |
+
*/
|
116 |
+
private function syncing_up_color_image_swatches() {
|
117 |
+
$latest_settings = get_option( $this->option_name, array() );
|
118 |
+
$general_settings = $latest_settings['general'];
|
119 |
+
|
120 |
+
$all_attrs = wc_get_attribute_taxonomies();
|
121 |
+
|
122 |
+
$this->update_attribute_by_type(
|
123 |
+
$general_settings,
|
124 |
+
$all_attrs,
|
125 |
+
'enable-color-swatches',
|
126 |
+
'color-swatches-attribute-',
|
127 |
+
'color'
|
128 |
+
);
|
129 |
+
$this->update_attribute_by_type(
|
130 |
+
$general_settings,
|
131 |
+
$all_attrs,
|
132 |
+
'enable-image-swatches',
|
133 |
+
'image-swatches-attribute-',
|
134 |
+
'image'
|
135 |
+
);
|
136 |
+
}
|
137 |
+
|
138 |
+
/**
|
139 |
+
*
|
140 |
+
* @param $general_settings
|
141 |
+
* @param $all_attrs
|
142 |
+
* @param $setting_key
|
143 |
+
* @param $attribute_key_prefix
|
144 |
+
* @param $attribute_type_name
|
145 |
+
*/
|
146 |
+
private function update_attribute_by_type( $general_settings, &$all_attrs, $setting_key, $attribute_key_prefix, $attribute_type_name ) {
|
147 |
+
|
148 |
+
if ( $general_settings[ $setting_key ] === '1' ) {
|
149 |
+
foreach ( $all_attrs as $index => $attr ) {
|
150 |
+
if ( $general_settings[ $attribute_key_prefix . $attr->attribute_name ] === '1' ) {
|
151 |
+
$this->update_product_attribute( $attribute_type_name, $attr->attribute_name );
|
152 |
+
|
153 |
+
//We don't want to check it in other type
|
154 |
+
unset( $all_attrs[ $index ] );
|
155 |
+
} else {
|
156 |
+
$this->update_product_attribute( 'select', $attr->attribute_name );
|
157 |
+
}
|
158 |
+
}
|
159 |
+
} else {
|
160 |
+
$this->update_product_attributes( $attribute_type_name, 'select' );
|
161 |
+
}
|
162 |
+
}
|
163 |
+
|
164 |
+
/**
|
165 |
+
* Update single product attribute type by the attribute name
|
166 |
+
*
|
167 |
+
* @param $attr_type
|
168 |
+
* @param $attr_name
|
169 |
+
*
|
170 |
+
* @return bool|int
|
171 |
+
*/
|
172 |
+
private function update_product_attribute( $attr_type, $attr_name ) {
|
173 |
+
global $wpdb;
|
174 |
+
|
175 |
+
return $wpdb->update(
|
176 |
+
$wpdb->prefix . 'woocommerce_attribute_taxonomies',
|
177 |
+
array( 'attribute_type' => $attr_type ),
|
178 |
+
array( 'attribute_name' => $attr_name ),
|
179 |
+
array( '%s' ),
|
180 |
+
array( '%s' )
|
181 |
+
);
|
182 |
+
}
|
183 |
+
|
184 |
+
/**
|
185 |
+
* Update all attributes type to new type
|
186 |
+
*
|
187 |
+
* @param $attr_old_type
|
188 |
+
* @param $attr_new_type
|
189 |
+
*
|
190 |
+
* @return bool|int
|
191 |
+
*/
|
192 |
+
private function update_product_attributes( $attr_old_type, $attr_new_type ) {
|
193 |
+
global $wpdb;
|
194 |
+
|
195 |
+
return $wpdb->update(
|
196 |
+
$wpdb->prefix . 'woocommerce_attribute_taxonomies',
|
197 |
+
array( 'attribute_type' => $attr_new_type ),
|
198 |
+
array( 'attribute_type' => $attr_old_type ),
|
199 |
+
array( '%s' ),
|
200 |
+
array( '%s' )
|
201 |
+
);
|
202 |
+
}
|
203 |
+
|
204 |
private function sanitize_post_data( $post_data ) {
|
205 |
foreach ( $post_data as $section_id => $items ) {
|
206 |
foreach ( $items as $field_name => $field_value ) {
|
includes/class-setting-fields-manager.php
CHANGED
@@ -67,6 +67,72 @@ if ( ! class_exists( 'VSWC_Setting_Fields_Manager' ) ) {
|
|
67 |
|
68 |
$settings_fields = array(
|
69 |
'general' => array(
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
70 |
array(
|
71 |
'title' => __( 'Auto Convert Dropdowns To Label', 'wcvs' ),
|
72 |
'fields' => array(
|
@@ -85,7 +151,7 @@ if ( ! class_exists( 'VSWC_Setting_Fields_Manager' ) ) {
|
|
85 |
array(
|
86 |
'id' => 'wcvs-selectbox-to-label',
|
87 |
'type' => 'html',
|
88 |
-
'html' => TA_WC_Variation_Swatches::get_product_attributes_as_checkbox( 'general', '','dropdown-to-label-attribute' )
|
89 |
)
|
90 |
),
|
91 |
'class' => 'indent',
|
@@ -159,8 +225,8 @@ if ( ! class_exists( 'VSWC_Setting_Fields_Manager' ) ) {
|
|
159 |
'priority' => 7
|
160 |
),
|
161 |
array(
|
162 |
-
'title'
|
163 |
-
'fields'
|
164 |
array(
|
165 |
'id' => 'wcvs-enable-dual-color',
|
166 |
'type' => 'checkbox',
|
@@ -168,8 +234,8 @@ if ( ! class_exists( 'VSWC_Setting_Fields_Manager' ) ) {
|
|
168 |
)
|
169 |
),
|
170 |
'is_pro_feature' => true,
|
171 |
-
'desc'
|
172 |
-
'priority'
|
173 |
),
|
174 |
array(
|
175 |
'title' => __( 'Out of Stock Behaviour', 'wcvs' ),
|
@@ -845,16 +911,16 @@ if ( ! class_exists( 'VSWC_Setting_Fields_Manager' ) ) {
|
|
845 |
),
|
846 |
'toolTipDesign' => array(
|
847 |
array(
|
848 |
-
'title'
|
849 |
-
'fields'
|
850 |
array(
|
851 |
'id' => 'wcvs-item-tooltip',
|
852 |
'type' => 'checkbox',
|
853 |
'name' => 'item-tooltip',
|
854 |
)
|
855 |
),
|
856 |
-
'is_pro_feature'=>true,
|
857 |
-
'priority'
|
858 |
),
|
859 |
array(
|
860 |
'title' => __( 'Tooltip Text font size', 'wcvs' ),
|
67 |
|
68 |
$settings_fields = array(
|
69 |
'general' => array(
|
70 |
+
array(
|
71 |
+
'title' => __( 'Enable Color Swatches', 'wcvs' ),
|
72 |
+
'fields' => array(
|
73 |
+
array(
|
74 |
+
'id' => 'wcvs-enable-color-swatches',
|
75 |
+
'type' => 'checkbox',
|
76 |
+
'name' => 'enable-color-swatches',
|
77 |
+
)
|
78 |
+
),
|
79 |
+
'class'=>'main-ajax-trigger',
|
80 |
+
'desc' => __( 'Enable the Color type for Product Attributes', 'wcvs' ),
|
81 |
+
'priority' => 1
|
82 |
+
),
|
83 |
+
array(
|
84 |
+
'title' => __( 'Select Attributes', 'wcvs' ),
|
85 |
+
'fields' => array(
|
86 |
+
array(
|
87 |
+
'id' => 'wcvs-color-swatches-attributes',
|
88 |
+
'type' => 'html',
|
89 |
+
'html' => TA_WC_Variation_Swatches::get_product_attributes_as_checkbox(
|
90 |
+
'general',
|
91 |
+
'',
|
92 |
+
'color-swatches-attribute',
|
93 |
+
true,
|
94 |
+
'color' )
|
95 |
+
)
|
96 |
+
),
|
97 |
+
'desc' => __( 'Which attributes you want to enable the Color type?', 'wcvs' ),
|
98 |
+
'class' => 'indent ajax-to-update',
|
99 |
+
'field_to_check' => 'wcvs-enable-color-swatches',
|
100 |
+
'show_if_checked' => true,
|
101 |
+
'priority' => 1
|
102 |
+
),
|
103 |
+
array(
|
104 |
+
'title' => __( 'Enable Image Swatches', 'wcvs' ),
|
105 |
+
'fields' => array(
|
106 |
+
array(
|
107 |
+
'id' => 'wcvs-enable-image-swatches',
|
108 |
+
'type' => 'checkbox',
|
109 |
+
'name' => 'enable-image-swatches',
|
110 |
+
)
|
111 |
+
),
|
112 |
+
'class'=>'main-ajax-trigger',
|
113 |
+
'desc' => __( 'Enable the Image type for Product Attributes', 'wcvs' ),
|
114 |
+
'priority' => 1
|
115 |
+
),
|
116 |
+
array(
|
117 |
+
'title' => __( 'Select Attributes', 'wcvs' ),
|
118 |
+
'fields' => array(
|
119 |
+
array(
|
120 |
+
'id' => 'wcvs-image-swatches-attributes',
|
121 |
+
'type' => 'html',
|
122 |
+
'html' => TA_WC_Variation_Swatches::get_product_attributes_as_checkbox(
|
123 |
+
'general',
|
124 |
+
'',
|
125 |
+
'image-swatches-attribute',
|
126 |
+
true,
|
127 |
+
'image' )
|
128 |
+
)
|
129 |
+
),
|
130 |
+
'desc' => __( 'Which attributes you want to enable the Image type?', 'wcvs' ),
|
131 |
+
'class' => 'indent ajax-to-update',
|
132 |
+
'field_to_check' => 'wcvs-enable-image-swatches',
|
133 |
+
'show_if_checked' => true,
|
134 |
+
'priority' => 1
|
135 |
+
),
|
136 |
array(
|
137 |
'title' => __( 'Auto Convert Dropdowns To Label', 'wcvs' ),
|
138 |
'fields' => array(
|
151 |
array(
|
152 |
'id' => 'wcvs-selectbox-to-label',
|
153 |
'type' => 'html',
|
154 |
+
'html' => TA_WC_Variation_Swatches::get_product_attributes_as_checkbox( 'general', '', 'dropdown-to-label-attribute' )
|
155 |
)
|
156 |
),
|
157 |
'class' => 'indent',
|
225 |
'priority' => 7
|
226 |
),
|
227 |
array(
|
228 |
+
'title' => __( 'Enable Dual Color', 'wcvs' ),
|
229 |
+
'fields' => array(
|
230 |
array(
|
231 |
'id' => 'wcvs-enable-dual-color',
|
232 |
'type' => 'checkbox',
|
234 |
)
|
235 |
),
|
236 |
'is_pro_feature' => true,
|
237 |
+
'desc' => __( 'Enable or disable when the attribute type is set to color', 'wcvs' ),
|
238 |
+
'priority' => 8
|
239 |
),
|
240 |
array(
|
241 |
'title' => __( 'Out of Stock Behaviour', 'wcvs' ),
|
911 |
),
|
912 |
'toolTipDesign' => array(
|
913 |
array(
|
914 |
+
'title' => __( 'Tooltip styling', 'wcvs' ),
|
915 |
+
'fields' => array(
|
916 |
array(
|
917 |
'id' => 'wcvs-item-tooltip',
|
918 |
'type' => 'checkbox',
|
919 |
'name' => 'item-tooltip',
|
920 |
)
|
921 |
),
|
922 |
+
'is_pro_feature' => true,
|
923 |
+
'priority' => 1
|
924 |
),
|
925 |
array(
|
926 |
'title' => __( 'Tooltip Text font size', 'wcvs' ),
|
includes/class-setting-fields-renderer.php
CHANGED
@@ -423,7 +423,7 @@ if ( ! class_exists( 'VSWC_Setting_Fields_Renderer' ) ) {
|
|
423 |
*/
|
424 |
private function render_field_desc( $field_args ) {
|
425 |
if ( ! empty( $field_args['desc'] ) ) {
|
426 |
-
echo '<br><span class="sub">' .
|
427 |
}
|
428 |
}
|
429 |
|
423 |
*/
|
424 |
private function render_field_desc( $field_args ) {
|
425 |
if ( ! empty( $field_args['desc'] ) ) {
|
426 |
+
echo '<br><span class="sub">' . $field_args['desc'] . '</span>';
|
427 |
}
|
428 |
}
|
429 |
|
includes/class-variation-swatches.php
CHANGED
@@ -44,6 +44,7 @@ final class TA_WC_Variation_Swatches {
|
|
44 |
$this->includes();
|
45 |
$this->init_hooks();
|
46 |
}
|
|
|
47 |
/**
|
48 |
* Include required core files used in admin and on the frontend.
|
49 |
*/
|
@@ -108,7 +109,9 @@ final class TA_WC_Variation_Swatches {
|
|
108 |
|
109 |
$attr = substr( $taxonomy, 3 );
|
110 |
|
111 |
-
|
|
|
|
|
112 |
}
|
113 |
|
114 |
/**
|
@@ -156,7 +159,7 @@ final class TA_WC_Variation_Swatches {
|
|
156 |
}
|
157 |
}
|
158 |
|
159 |
-
public static function get_product_attributes_as_checkbox( $section_id, $tab_id, $field_name ) {
|
160 |
ob_start();
|
161 |
$current_options = get_option( 'woosuite_variation_swatches_option' ) ?: array();
|
162 |
if ( ! empty( $tab_id ) ) {
|
@@ -172,6 +175,8 @@ final class TA_WC_Variation_Swatches {
|
|
172 |
}
|
173 |
$field_id = $field_name . '-' . $att->attribute_name;
|
174 |
$field_name_modified = $field_name_prefix . '[' . $field_name . '-' . $att->attribute_name . ']';
|
|
|
|
|
175 |
?>
|
176 |
<label class="variation-checkbox-container" for="<?php echo $field_id; ?>">
|
177 |
<?php echo $att->attribute_label; ?>
|
@@ -180,8 +185,17 @@ final class TA_WC_Variation_Swatches {
|
|
180 |
type="checkbox"
|
181 |
name="<?php echo $field_name_modified; ?>"
|
182 |
value="1"
|
|
|
|
|
183 |
<?php checked( '1', $field_value ); ?>/>
|
184 |
<span class="checkmark"></span>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
185 |
</label>
|
186 |
<?php
|
187 |
}
|
44 |
$this->includes();
|
45 |
$this->init_hooks();
|
46 |
}
|
47 |
+
|
48 |
/**
|
49 |
* Include required core files used in admin and on the frontend.
|
50 |
*/
|
109 |
|
110 |
$attr = substr( $taxonomy, 3 );
|
111 |
|
112 |
+
$result = $wpdb->get_row( $wpdb->prepare( "SELECT * FROM " . $wpdb->prefix . "woocommerce_attribute_taxonomies WHERE attribute_name = %s", $attr ) );
|
113 |
+
|
114 |
+
return apply_filters( 'tawcvs_tax_attributes', $result );
|
115 |
}
|
116 |
|
117 |
/**
|
159 |
}
|
160 |
}
|
161 |
|
162 |
+
public static function get_product_attributes_as_checkbox( $section_id, $tab_id, $field_name, $show_configure_link = false, $type_to_update = '' ) {
|
163 |
ob_start();
|
164 |
$current_options = get_option( 'woosuite_variation_swatches_option' ) ?: array();
|
165 |
if ( ! empty( $tab_id ) ) {
|
175 |
}
|
176 |
$field_id = $field_name . '-' . $att->attribute_name;
|
177 |
$field_name_modified = $field_name_prefix . '[' . $field_name . '-' . $att->attribute_name . ']';
|
178 |
+
|
179 |
+
$tax_slug = esc_attr( wc_attribute_taxonomy_name( $att->attribute_name ) );
|
180 |
?>
|
181 |
<label class="variation-checkbox-container" for="<?php echo $field_id; ?>">
|
182 |
<?php echo $att->attribute_label; ?>
|
185 |
type="checkbox"
|
186 |
name="<?php echo $field_name_modified; ?>"
|
187 |
value="1"
|
188 |
+
data-slug="<?php echo $att->attribute_name; ?>"
|
189 |
+
<?php echo $type_to_update ? 'data-type="' . esc_attr( $type_to_update ) . '"' : '';; ?>
|
190 |
<?php checked( '1', $field_value ); ?>/>
|
191 |
<span class="checkmark"></span>
|
192 |
+
<?php if ( $show_configure_link ): ?>
|
193 |
+
<?php $configure_link = 'edit-tags.php?taxonomy=' . $tax_slug . '&post_type=product'; ?>
|
194 |
+
<a class="configure-items-link <?php echo 1 == $field_value ? '' : 'hidden'; ?>"
|
195 |
+
href="<?php echo $configure_link; ?>">
|
196 |
+
<?php _e( 'Configure items', 'wcvs' ); ?>
|
197 |
+
</a>
|
198 |
+
<?php endif; ?>
|
199 |
</label>
|
200 |
<?php
|
201 |
}
|
readme.txt
CHANGED
@@ -3,7 +3,7 @@ Contributors: variationswatches, themealien, zgani, mehbubrashid, minhnguyen25
|
|
3 |
Tags: variation swatches, woocommerce, product attribute, product color, product size, variable products
|
4 |
Requires at least: 4.5
|
5 |
Tested up to: 5.8
|
6 |
-
Stable tag: 2.0
|
7 |
WC requires at least: 3.2.0
|
8 |
WC tested up to: 5.6.0
|
9 |
License: GPLv2 or later
|
@@ -23,11 +23,11 @@ https://www.youtube.com/watch?v=1qGusf9IfFY&t
|
|
23 |
**Woosuite Variation Swatches for WooCommerce Features :**
|
24 |
|
25 |
* <a href="https://woosuite.com/plugins/woocommerce-variation-swatches/#button" rel="friend">Auto Convert All Variation Dropdowns To Button Swatch</a> - With a click of a button you can convert your dropdowns into button/label.
|
26 |
-
* <a href="https://woosuite.com/plugins/woocommerce-variation-swatches/#autoimage" rel="friend">Auto Convert Into Image Swatches*</a> - By toggling this option you can set dual color for those products that can not be described with one color.
|
27 |
* <a href="https://woosuite.com/plugins/woocommerce-variation-swatches/#dualcolor" rel="friend">Dual Color Variation Swatches*</a> - Automatically covert dropdowns to "Image Swatch" if variation has an image.
|
28 |
-
* <a href="https://woosuite.com/plugins/woocommerce-variation-swatches/#archive" rel="friend">Show swatches on archive / shop</a> - Let users find what they really want by showing your swatches on the shop archive.
|
29 |
-
* <a href="https://woosuite.com/plugins/woocommerce-variation-swatches/#shapes" rel="friend">Attribute Variation Swatches Shapes</a> - We have included three presets for you to choose from as well as advanced styling options to further customize your swatches.
|
30 |
-
* <a href="https://woosuite.com/plugins/woocommerce-variation-swatches/#outofstock" rel="friend">Out of Stock Variation Swatches Control</a> - With our recent update, we have included the option for you to manage how to handle your out-of-stock variation.
|
31 |
* Completely integrate with WooCommerce plugin
|
32 |
* Work on variable product only
|
33 |
* Create attribute color swatches
|
@@ -45,7 +45,7 @@ If you like this WordPress popup plugin, then consider checking out our other pr
|
|
45 |
* <a href="https://woosuite.com/plugins/woocommerce-show-variations-on-shop-page/">Show Variations on Shop Page</a> - Show your variation products on your shop page separately to increase your catalog size and the user experience.
|
46 |
* <a href="https://woosuite.com/plugins/dynamic-pricing-discount-rules/" rel="friend" title="Dynamic Pricing & Discount Rules for WooCommerce">Dynamic Pricing & Discount Rules for WooCommerce</a> - Create Buy one get one free offers, schedule promotions, tiered pricing, role base pricing, and much more.
|
47 |
* <a href="https://woosuite.com/plugins/min-max-quantities/" rel="friend" title="Minimum/Maximum Quantity for WooCommerce">Minimum/Maximum Quantity for WooCommerce</a> - Create quantity increments, spending rules, and as the name suggests minimum and maximum quantity for woocommerce.
|
48 |
-
* <a href="https://woosuite.com/plugins/woocommerce-product-bundles/">Product Bundles for WooCommerce</a> - Improve your average order value by creating irresistible product bundles.
|
49 |
* <a href="https://woosuite.com/plugins/wholesale/">Wholesale Suite for Woocommerce</a> - Maximize your store revenue by catering to wholesale customers, you can sell to B2B + B2C.
|
50 |
* <a href="https://woosuite.com/plugins/product-table/">Quick Order Form for WooCommerce</a> - Create a streamlined bulk order form to reduce friction in users checking out.
|
51 |
* <a href="https://woosuite.com/plugins/woocommerce-quick-view/">Product Quick View for WooCommerce</a> - Allows users to get a quick look at products without opening the product page.
|
@@ -103,6 +103,13 @@ Yes, it will work with any theme, but may require some styling to make it match
|
|
103 |
7. Add new attribute color when edit a product
|
104 |
|
105 |
== Changelog ==
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
106 |
= 2.0.22 =
|
107 |
* update styling for sober theme
|
108 |
* removed unfinished diagnostic feedback option
|
3 |
Tags: variation swatches, woocommerce, product attribute, product color, product size, variable products
|
4 |
Requires at least: 4.5
|
5 |
Tested up to: 5.8
|
6 |
+
Stable tag: 2.1.0
|
7 |
WC requires at least: 3.2.0
|
8 |
WC tested up to: 5.6.0
|
9 |
License: GPLv2 or later
|
23 |
**Woosuite Variation Swatches for WooCommerce Features :**
|
24 |
|
25 |
* <a href="https://woosuite.com/plugins/woocommerce-variation-swatches/#button" rel="friend">Auto Convert All Variation Dropdowns To Button Swatch</a> - With a click of a button you can convert your dropdowns into button/label.
|
26 |
+
* <a href="https://woosuite.com/plugins/woocommerce-variation-swatches/#autoimage" rel="friend">Auto Convert Into Image Swatches*</a> - By toggling this option you can set dual color for those products that can not be described with one color.
|
27 |
* <a href="https://woosuite.com/plugins/woocommerce-variation-swatches/#dualcolor" rel="friend">Dual Color Variation Swatches*</a> - Automatically covert dropdowns to "Image Swatch" if variation has an image.
|
28 |
+
* <a href="https://woosuite.com/plugins/woocommerce-variation-swatches/#archive" rel="friend">Show swatches on archive / shop</a> - Let users find what they really want by showing your swatches on the shop archive.
|
29 |
+
* <a href="https://woosuite.com/plugins/woocommerce-variation-swatches/#shapes" rel="friend">Attribute Variation Swatches Shapes</a> - We have included three presets for you to choose from as well as advanced styling options to further customize your swatches.
|
30 |
+
* <a href="https://woosuite.com/plugins/woocommerce-variation-swatches/#outofstock" rel="friend">Out of Stock Variation Swatches Control</a> - With our recent update, we have included the option for you to manage how to handle your out-of-stock variation.
|
31 |
* Completely integrate with WooCommerce plugin
|
32 |
* Work on variable product only
|
33 |
* Create attribute color swatches
|
45 |
* <a href="https://woosuite.com/plugins/woocommerce-show-variations-on-shop-page/">Show Variations on Shop Page</a> - Show your variation products on your shop page separately to increase your catalog size and the user experience.
|
46 |
* <a href="https://woosuite.com/plugins/dynamic-pricing-discount-rules/" rel="friend" title="Dynamic Pricing & Discount Rules for WooCommerce">Dynamic Pricing & Discount Rules for WooCommerce</a> - Create Buy one get one free offers, schedule promotions, tiered pricing, role base pricing, and much more.
|
47 |
* <a href="https://woosuite.com/plugins/min-max-quantities/" rel="friend" title="Minimum/Maximum Quantity for WooCommerce">Minimum/Maximum Quantity for WooCommerce</a> - Create quantity increments, spending rules, and as the name suggests minimum and maximum quantity for woocommerce.
|
48 |
+
* <a href="https://woosuite.com/plugins/woocommerce-product-bundles/">Product Bundles for WooCommerce</a> - Improve your average order value by creating irresistible product bundles.
|
49 |
* <a href="https://woosuite.com/plugins/wholesale/">Wholesale Suite for Woocommerce</a> - Maximize your store revenue by catering to wholesale customers, you can sell to B2B + B2C.
|
50 |
* <a href="https://woosuite.com/plugins/product-table/">Quick Order Form for WooCommerce</a> - Create a streamlined bulk order form to reduce friction in users checking out.
|
51 |
* <a href="https://woosuite.com/plugins/woocommerce-quick-view/">Product Quick View for WooCommerce</a> - Allows users to get a quick look at products without opening the product page.
|
103 |
7. Add new attribute color when edit a product
|
104 |
|
105 |
== Changelog ==
|
106 |
+
= 2.1.0 =
|
107 |
+
* Added section to control the attribute type directly in the plugin settings panel
|
108 |
+
* Added feature to show the swatch images on shop/archive pages
|
109 |
+
* Added feature to disable the swatches by product
|
110 |
+
* Fixed the swatch styles
|
111 |
+
* Minor fix bugs
|
112 |
+
|
113 |
= 2.0.22 =
|
114 |
* update styling for sober theme
|
115 |
* removed unfinished diagnostic feedback option
|
templates/admin/welcome-popup-version-2_0_0.php
DELETED
@@ -1,18 +0,0 @@
|
|
1 |
-
<div class="wcvs-popup wcvs-welcome-popup" style="display: block">
|
2 |
-
<div class="popup-close"></div>
|
3 |
-
<div class="content">
|
4 |
-
<div class="popup-logo">
|
5 |
-
<img src="<?php echo WCVS_PLUGIN_URL . 'assets/images/wslogo.png'; ?>">
|
6 |
-
</div>
|
7 |
-
<div class="popup-content">
|
8 |
-
<h2 class="popup-title"><?php _e( 'What\'s new in the Variation Swatches 2.0:', 'wcvs' ); ?></h2>
|
9 |
-
<div class="popup-iframe">
|
10 |
-
<iframe width="560" height="315" src="https://www.youtube.com/embed/I3poqB-EigI"
|
11 |
-
title="YouTube video player" frameborder="0"
|
12 |
-
allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture"
|
13 |
-
allowfullscreen></iframe>
|
14 |
-
</div>
|
15 |
-
</div>
|
16 |
-
</div>
|
17 |
-
</div>
|
18 |
-
<div class="wcvs-popup-blur" style="display: block"></div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
templates/admin/welcome-popup.php
ADDED
@@ -0,0 +1,27 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<div class="wcvs-popup wcvs-welcome-popup" style="display: block">
|
2 |
+
<div class="popup-close"></div>
|
3 |
+
<div class="content">
|
4 |
+
<div class="popup-logo">
|
5 |
+
<img src="<?php echo WCVS_PLUGIN_URL . 'assets/images/wslogo.png'; ?>">
|
6 |
+
</div>
|
7 |
+
<div class="popup-content">
|
8 |
+
<h2 class="popup-title"><?php _e( 'Variation Swatches 2.1.0 is here! 🥳 🥳', 'wcvs' ); ?></h2>
|
9 |
+
<div class="popup-inner-content">
|
10 |
+
<p><strong>Congratulations on updating to v2.1.0!</strong></p>
|
11 |
+
<p>We've been quiet on this end for several weeks as we've been hard at work making our plugin even
|
12 |
+
better for you…</p>
|
13 |
+
<p>Based on your feedback, we have added a bunch of new features and enhancements with a lot more to
|
14 |
+
go.</p>
|
15 |
+
<p><a href="https://woosuite.com/news/variation-swatches-v2-1-0-update/" target="_blank"
|
16 |
+
rel="noopener noreferrer nofollow">
|
17 |
+
Click here to learn more.
|
18 |
+
</a></p>
|
19 |
+
<p>If you experience any issues, please get in touch with support so we can make it right:
|
20 |
+
<a href="https://woosuite.com/support/" target="_blank"
|
21 |
+
rel="noopener noreferrer nofollow">Support</a>
|
22 |
+
</p>
|
23 |
+
</div>
|
24 |
+
</div>
|
25 |
+
</div>
|
26 |
+
</div>
|
27 |
+
<div class="wcvs-popup-blur" style="display: block"></div>
|
variation-swatches-for-woocommerce.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Plugin Name: Variation Swatches for WooCommerce
|
4 |
* Plugin URI: https://woosuite.com/plugins/woocommerce-variation-swatches/
|
5 |
* Description: Creates variation swatches for WooCommerce, converts your variation dropdown into color, label, or photo swatches with ease, The original Variation Swatches for WooCommerce.
|
6 |
-
* Version: 2.0
|
7 |
* Author: Woosuite
|
8 |
* Author URI: https://woosuite.com/
|
9 |
* Requires at least: 4.5
|
@@ -27,7 +27,7 @@ if ( ! defined( 'TAWC_VS_PLUGIN_FILE' ) ) {
|
|
27 |
}
|
28 |
|
29 |
if ( ! defined( 'WCVS_PLUGIN_VERSION' ) ) {
|
30 |
-
define( 'WCVS_PLUGIN_VERSION', '2.0
|
31 |
}
|
32 |
|
33 |
if ( ! defined( 'WCVS_PLUGIN_URL' ) ) {
|
3 |
* Plugin Name: Variation Swatches for WooCommerce
|
4 |
* Plugin URI: https://woosuite.com/plugins/woocommerce-variation-swatches/
|
5 |
* Description: Creates variation swatches for WooCommerce, converts your variation dropdown into color, label, or photo swatches with ease, The original Variation Swatches for WooCommerce.
|
6 |
+
* Version: 2.1.0
|
7 |
* Author: Woosuite
|
8 |
* Author URI: https://woosuite.com/
|
9 |
* Requires at least: 4.5
|
27 |
}
|
28 |
|
29 |
if ( ! defined( 'WCVS_PLUGIN_VERSION' ) ) {
|
30 |
+
define( 'WCVS_PLUGIN_VERSION', '2.1.0' );
|
31 |
}
|
32 |
|
33 |
if ( ! defined( 'WCVS_PLUGIN_URL' ) ) {
|