geer-builder 1.2.948 → 1.2.950

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/GCart.vue CHANGED
@@ -551,6 +551,14 @@ export default {
551
551
  },
552
552
  async changeQuantity(cart_det)
553
553
  {
554
+ let is_renewal = cart_det.product_details && cart_det.product_details.membership_kit && (cart_det.product_details.membership_kit.use_for_renew === true || cart_det.product_details.membership_kit.use_for_renew === 'Yes');
555
+ if(is_renewal && cart_det.quantity > 1)
556
+ {
557
+ cart_det.quantity = 1;
558
+ this.$_fbCall('memberChangeCartQuantity', cart_det);
559
+ this.computeSubtotal();
560
+ return;
561
+ }
554
562
  if (cart_det.product_id != this.temp_product)
555
563
  {
556
564
  let product_query = "";
@@ -578,13 +586,19 @@ export default {
578
586
  this.$_fbCall('memberChangeCartQuantity', cart_det);
579
587
  }
580
588
  else
581
- {
589
+ {
582
590
  this.$_fbCall('memberChangeCartQuantity', cart_det);
583
591
  }
584
592
  this.computeSubtotal();
585
593
  },
586
594
  async increaseQuantity(cart_det)
587
595
  {
596
+ let is_renewal = cart_det.product_details && cart_det.product_details.membership_kit && (cart_det.product_details.membership_kit.use_for_renew === true || cart_det.product_details.membership_kit.use_for_renew === 'Yes');
597
+ if(is_renewal && cart_det.quantity >= 1)
598
+ {
599
+ swal({ title: "Limit Reached", text: "Renewal products are limited to 1 per order.", icon: "info" });
600
+ return;
601
+ }
588
602
  if (cart_det.product_id != this.temp_product)
589
603
  {
590
604
  let product_query = "";
package/GCheckout.vue CHANGED
@@ -2786,6 +2786,13 @@ export default {
2786
2786
  },
2787
2787
  async addQuantity(i, ind)
2788
2788
  {
2789
+ let prod_item = this.groupedProducts[i].products[ind];
2790
+ let is_renewal = prod_item.product && prod_item.product.membership_kit && (prod_item.product.membership_kit.use_for_renew === true || prod_item.product.membership_kit.use_for_renew === 'Yes');
2791
+ if(is_renewal && prod_item.quantity >= 1)
2792
+ {
2793
+ this.$q.dialog({ title: 'Limit Reached', message: 'Renewal products are limited to 1 per order.' });
2794
+ return;
2795
+ }
2789
2796
  if (this.groupedProducts[i].products[ind].product_id != this.temp_product)
2790
2797
  {
2791
2798
  let product_query = "";
package/GProductPage.vue CHANGED
@@ -1037,6 +1037,11 @@ export default {
1037
1037
 
1038
1038
  },
1039
1039
  methods:{
1040
+ isRenewalProduct()
1041
+ {
1042
+ let pd = this.variant_product_details ? this.variant_product_details : this.product_details;
1043
+ return pd && pd.membership_kit && (pd.membership_kit.use_for_renew === true || pd.membership_kit.use_for_renew === 'Yes');
1044
+ },
1040
1045
  async chooseVariant(index,name)
1041
1046
  {
1042
1047
  if(this.selected_arra.some(val => val.hasOwnProperty('name') && val.name.toLowerCase() == name.toLowerCase() && val.hasOwnProperty('type') && this.product_details.variation[index].variation_type == val.type))
@@ -1132,6 +1137,7 @@ export default {
1132
1137
  },
1133
1138
  async addtocart()
1134
1139
  {
1140
+ if(this.isRenewalProduct()) { this.quantity = 1; }
1135
1141
  this.add_to_cart = true;
1136
1142
  if(this.user_info)
1137
1143
  {
@@ -1196,6 +1202,7 @@ export default {
1196
1202
  },
1197
1203
  buyNow()
1198
1204
  {
1205
+ if(this.isRenewalProduct()) { this.quantity = 1; }
1199
1206
  this.add_to_cart = false;
1200
1207
  if(this.user_info)
1201
1208
  {
@@ -1246,6 +1253,7 @@ export default {
1246
1253
  },
1247
1254
  async changeQuantity()
1248
1255
  {
1256
+ if(this.isRenewalProduct() && this.quantity > 1) { this.quantity = 1; return; }
1249
1257
  if(this.product_details.hasOwnProperty("stockist"))
1250
1258
  {
1251
1259
  if((this.quantity<=0) || (this.quantity == "") || this.quantity > this.merchant_product_stock)
@@ -1263,6 +1271,11 @@ export default {
1263
1271
  },
1264
1272
  async increaseQuantity()
1265
1273
  {
1274
+ if(this.isRenewalProduct() && this.quantity >= 1)
1275
+ {
1276
+ swal({ title: "Limit Reached", text: "Renewal products are limited to 1 per order.", icon: "info" });
1277
+ return;
1278
+ }
1266
1279
  if(this.product_details.hasOwnProperty("stockist"))
1267
1280
  {
1268
1281
  if(this.quantity<this.merchant_product_stock)
@@ -1,5 +1,5 @@
1
1
  <template>
2
- <q-card class="process-checkout-dialog refill form" style="width: 900px; max-width: 1000px;">
2
+ <q-card class="process-checkout-dialog refill form" style="width: 900px; max-width: 1000px; max-height: 700px;">
3
3
  <q-form @submit="submit()">
4
4
  <div v-if="sale" style="max-height: 70vh; overflow-y: auto;" class="product-list">
5
5
  <printable title="Order Summary"
@@ -264,4 +264,7 @@ export default {
264
264
  padding: 20px;
265
265
  }
266
266
  }
267
+ .q-dialog__inner--minimized > .process-checkout-dialog {
268
+ max-height: unset;
269
+ }
267
270
  </style>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "geer-builder",
3
- "version": "1.2.948",
3
+ "version": "1.2.950",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {