tabexseriescomponents 0.0.407 → 0.0.409

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/dist/index.cjs.js CHANGED
@@ -2272,7 +2272,7 @@ var DescriptionContent = function DescriptionContent(props) {
2272
2272
  function ownKeys$2q(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
2273
2273
  function _objectSpread$2q(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$2q(Object(t), !0).forEach(function (r) { _defineProperty__default["default"](e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$2q(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
2274
2274
  var Product_itemtype = function Product_itemtype(props) {
2275
- var _fetchProductInfoQuer2, _fetchProductInfoQuer3, _fetchProductInfoQuer4, _fetchProductInfoQuer5, _fetchProductInfoQuer6, _fetchProductInfoQuer7, _fetchProductInfoQuer8, _fetchProductInfoQuer9, _fetchProductInfoQuer10, _fetchProductInfoQuer11, _fetchProductInfoQuer12, _fetchProductInfoQuer13, _fetchProductInfoQuer14, _fetchProductInfoQuer15, _fetchProductInfoQuer16, _fetchProductInfoQuer17, _fetchProductInfoQuer18, _fetchProductInfoQuer19, _fetchProductInfoQuer20, _fetchProductInfoQuer21, _fetchProductInfoQuer22, _fetchProductInfoQuer23, _fetchProductInfoQuer25, _fetchProductInfoQuer26, _fetchProductInfoQuer27, _fetchProductInfoQuer29, _fetchProductInfoQuer30, _fetchProductInfoQuer31, _fetchProductInfoQuer32, _fetchProductInfoQuer33, _fetchProductInfoQuer34, _fetchProductInfoQuer35;
2275
+ var _fetchProductInfoQuer2, _fetchProductInfoQuer3, _fetchProductInfoQuer4, _fetchProductInfoQuer5, _fetchProductInfoQuer6, _fetchProductInfoQuer7, _fetchProductInfoQuer8, _fetchProductInfoQuer9, _fetchProductInfoQuer10, _fetchProductInfoQuer11, _fetchProductInfoQuer12, _fetchProductInfoQuer13, _fetchProductInfoQuer14, _fetchProductInfoQuer15, _fetchProductInfoQuer16, _fetchProductInfoQuer17, _fetchProductInfoQuer18, _fetchProductInfoQuer19, _fetchProductInfoQuer20, _fetchProductInfoQuer21, _fetchProductInfoQuer22, _fetchProductInfoQuer23, _fetchProductInfoQuer25, _fetchProductInfoQuer26, _fetchProductInfoQuer27, _fetchProductInfoQuer29, _fetchProductInfoQuer30, _fetchProductInfoQuer31, _fetchProductInfoQuer32, _fetchProductInfoQuer33, _fetchProductInfoQuer34, _fetchProductInfoQuer35, _fetchProductInfoQuer36;
2276
2276
  var lang = props.actions.lang;
2277
2277
  var langdetect = props.actions.langdetect;
2278
2278
  var srcfromprops = props.actions.srcfromprops;
@@ -2997,7 +2997,30 @@ var Product_itemtype = function Product_itemtype(props) {
2997
2997
  size: sectionproperties.favBtnIconfontsize
2998
2998
  }), sectionproperties.faviconshape == 'Heart Shape' && /*#__PURE__*/React__default["default"].createElement(FaRegHeart.FaRegHeart, {
2999
2999
  size: sectionproperties.favBtnIconfontsize
3000
- })))))))), sectionproperties.productInformationType == 'Product/Service Information' && (fetchProductInfoQueryContext === null || fetchProductInfoQueryContext === void 0 || (_fetchProductInfoQuer31 = fetchProductInfoQueryContext.data) === null || _fetchProductInfoQuer31 === void 0 || (_fetchProductInfoQuer31 = _fetchProductInfoQuer31.data) === null || _fetchProductInfoQuer31 === void 0 || (_fetchProductInfoQuer31 = _fetchProductInfoQuer31.productinfo) === null || _fetchProductInfoQuer31 === void 0 ? void 0 : _fetchProductInfoQuer31.isproducttobesold) == 1 && sectionproperties.showtotalsection == 'Show' && /*#__PURE__*/React__default["default"].createElement("div", {
3000
+ }))))), sectionproperties.cartbtnalone == 'Alone' && sectionproperties.showbuynowbtn == 'Show' && (fetchProductInfoQueryContext === null || fetchProductInfoQueryContext === void 0 || (_fetchProductInfoQuer31 = fetchProductInfoQueryContext.data) === null || _fetchProductInfoQuer31 === void 0 || (_fetchProductInfoQuer31 = _fetchProductInfoQuer31.data) === null || _fetchProductInfoQuer31 === void 0 || (_fetchProductInfoQuer31 = _fetchProductInfoQuer31.productinfo) === null || _fetchProductInfoQuer31 === void 0 ? void 0 : _fetchProductInfoQuer31.isproducttobesold) == 1 && /*#__PURE__*/React__default["default"].createElement("div", {
3001
+ "class": "row m-0 w-100 mt-3",
3002
+ style: {
3003
+ overflow: 'hidden'
3004
+ }
3005
+ }, /*#__PURE__*/React__default["default"].createElement("button", {
3006
+ className: "".concat(productinfo_cssstyles.cart_btn, " ") + ' d-flex align-items-center justify-content-center mb-sm-2 ',
3007
+ style: {
3008
+ width: sectionproperties.cartBtnWidth + '%'
3009
+ },
3010
+ onClick: function onClick() {
3011
+ addtocartfunc('forcetocheckout');
3012
+ },
3013
+ disabled: AddtoCartMutationContext.isLoading == true ? true : false
3014
+ }, !AddtoCartMutationContext.isLoading && /*#__PURE__*/React__default["default"].createElement("span", {
3015
+ className: ' d-flex align-items-center justify-content-center '
3016
+ }, langdetect == 'en' ? 'Buy Now' : 'إشترى الان'), AddtoCartMutationContext.isLoading && /*#__PURE__*/React__default["default"].createElement("div", {
3017
+ className: ' d-flex align-items-center justify-content-center '
3018
+ }, /*#__PURE__*/React__default["default"].createElement(reactCssfxLoading.CircularProgress, {
3019
+ color: "white",
3020
+ width: "20px",
3021
+ height: "20px",
3022
+ duration: "1s"
3023
+ }))))))), sectionproperties.productInformationType == 'Product/Service Information' && (fetchProductInfoQueryContext === null || fetchProductInfoQueryContext === void 0 || (_fetchProductInfoQuer32 = fetchProductInfoQueryContext.data) === null || _fetchProductInfoQuer32 === void 0 || (_fetchProductInfoQuer32 = _fetchProductInfoQuer32.data) === null || _fetchProductInfoQuer32 === void 0 || (_fetchProductInfoQuer32 = _fetchProductInfoQuer32.productinfo) === null || _fetchProductInfoQuer32 === void 0 ? void 0 : _fetchProductInfoQuer32.isproducttobesold) == 1 && sectionproperties.showtotalsection == 'Show' && /*#__PURE__*/React__default["default"].createElement("div", {
3001
3024
  className: "col-lg-12 p-0 mb-3"
3002
3025
  }, /*#__PURE__*/React__default["default"].createElement("div", {
3003
3026
  className: "row m-0 w-100 d-flex flex-row"
@@ -3020,7 +3043,7 @@ var Product_itemtype = function Product_itemtype(props) {
3020
3043
  }
3021
3044
  }, /*#__PURE__*/React__default["default"].createElement("span", {
3022
3045
  className: langdetect == 'en' ? ' d-flex align-items-center justify-content-end wordbreak text-right ' : ' d-flex align-items-center justify-content-end wordbreak text-left '
3023
- }, langdetect == 'en' ? authdetailsContext === null || authdetailsContext === void 0 ? void 0 : authdetailsContext.currencyname_en : '', ' ', variantindexcompleted != undefined && variantindexcompleted.length == 0 && fetchProductInfoQueryContext.data.data.productinfo.hassale == 0 && parseFloat(getprice_discountpriceprops('defaultprice', 1, variantindexcompleted)).toFixed(2), variantindexcompleted != undefined && variantindexcompleted.length == 0 && fetchProductInfoQueryContext.data.data.productinfo.hassale == 1 && parseFloat(getprice_discountpriceprops('defaultsaleprice', 1, variantindexcompleted)).toFixed(2), variantindexcompleted != undefined && variantindexcompleted.length != 0 && (fetchProductInfoQueryContext === null || fetchProductInfoQueryContext === void 0 || (_fetchProductInfoQuer32 = fetchProductInfoQueryContext.data) === null || _fetchProductInfoQuer32 === void 0 || (_fetchProductInfoQuer32 = _fetchProductInfoQuer32.data) === null || _fetchProductInfoQuer32 === void 0 || (_fetchProductInfoQuer32 = _fetchProductInfoQuer32.productinfo) === null || _fetchProductInfoQuer32 === void 0 || (_fetchProductInfoQuer32 = _fetchProductInfoQuer32.variants[variantindexcompleted]) === null || _fetchProductInfoQuer32 === void 0 ? void 0 : _fetchProductInfoQuer32.hassale) == 1 && parseFloat(getprice_discountpriceprops('defaultsaleprice', 1, variantindexcompleted)).toFixed(2), variantindexcompleted != undefined && variantindexcompleted.length != 0 && (fetchProductInfoQueryContext === null || fetchProductInfoQueryContext === void 0 || (_fetchProductInfoQuer33 = fetchProductInfoQueryContext.data) === null || _fetchProductInfoQuer33 === void 0 || (_fetchProductInfoQuer33 = _fetchProductInfoQuer33.data) === null || _fetchProductInfoQuer33 === void 0 || (_fetchProductInfoQuer33 = _fetchProductInfoQuer33.productinfo) === null || _fetchProductInfoQuer33 === void 0 || (_fetchProductInfoQuer33 = _fetchProductInfoQuer33.variants[variantindexcompleted]) === null || _fetchProductInfoQuer33 === void 0 ? void 0 : _fetchProductInfoQuer33.hassale) == 0 && parseFloat(getprice_discountpriceprops('defaultprice', 1, variantindexcompleted)).toFixed(2), langdetect == 'en' ? '' : authdetailsContext === null || authdetailsContext === void 0 ? void 0 : authdetailsContext.currencyname_ar)), /*#__PURE__*/React__default["default"].createElement("p", {
3046
+ }, langdetect == 'en' ? authdetailsContext === null || authdetailsContext === void 0 ? void 0 : authdetailsContext.currencyname_en : '', ' ', variantindexcompleted != undefined && variantindexcompleted.length == 0 && fetchProductInfoQueryContext.data.data.productinfo.hassale == 0 && parseFloat(getprice_discountpriceprops('defaultprice', 1, variantindexcompleted)).toFixed(2), variantindexcompleted != undefined && variantindexcompleted.length == 0 && fetchProductInfoQueryContext.data.data.productinfo.hassale == 1 && parseFloat(getprice_discountpriceprops('defaultsaleprice', 1, variantindexcompleted)).toFixed(2), variantindexcompleted != undefined && variantindexcompleted.length != 0 && (fetchProductInfoQueryContext === null || fetchProductInfoQueryContext === void 0 || (_fetchProductInfoQuer33 = fetchProductInfoQueryContext.data) === null || _fetchProductInfoQuer33 === void 0 || (_fetchProductInfoQuer33 = _fetchProductInfoQuer33.data) === null || _fetchProductInfoQuer33 === void 0 || (_fetchProductInfoQuer33 = _fetchProductInfoQuer33.productinfo) === null || _fetchProductInfoQuer33 === void 0 || (_fetchProductInfoQuer33 = _fetchProductInfoQuer33.variants[variantindexcompleted]) === null || _fetchProductInfoQuer33 === void 0 ? void 0 : _fetchProductInfoQuer33.hassale) == 1 && parseFloat(getprice_discountpriceprops('defaultsaleprice', 1, variantindexcompleted)).toFixed(2), variantindexcompleted != undefined && variantindexcompleted.length != 0 && (fetchProductInfoQueryContext === null || fetchProductInfoQueryContext === void 0 || (_fetchProductInfoQuer34 = fetchProductInfoQueryContext.data) === null || _fetchProductInfoQuer34 === void 0 || (_fetchProductInfoQuer34 = _fetchProductInfoQuer34.data) === null || _fetchProductInfoQuer34 === void 0 || (_fetchProductInfoQuer34 = _fetchProductInfoQuer34.productinfo) === null || _fetchProductInfoQuer34 === void 0 || (_fetchProductInfoQuer34 = _fetchProductInfoQuer34.variants[variantindexcompleted]) === null || _fetchProductInfoQuer34 === void 0 ? void 0 : _fetchProductInfoQuer34.hassale) == 0 && parseFloat(getprice_discountpriceprops('defaultprice', 1, variantindexcompleted)).toFixed(2), langdetect == 'en' ? '' : authdetailsContext === null || authdetailsContext === void 0 ? void 0 : authdetailsContext.currencyname_ar)), /*#__PURE__*/React__default["default"].createElement("p", {
3024
3047
  className: 'm-0 p-0 linethrough wordbreak',
3025
3048
  style: {
3026
3049
  color: sectionproperties.prodsalePriceColor,
@@ -3034,14 +3057,14 @@ var Product_itemtype = function Product_itemtype(props) {
3034
3057
  style: {
3035
3058
  textDecoration: 'none'
3036
3059
  }
3037
- }, "-"), langdetect == 'en' ? authdetailsContext === null || authdetailsContext === void 0 ? void 0 : authdetailsContext.currencyname_en : '', ' ', parseFloat(getprice_discountpriceprops('defaultprice', 1, variantindexcompleted)), ' ', langdetect == 'en' ? '' : authdetailsContext === null || authdetailsContext === void 0 ? void 0 : authdetailsContext.currencyname_ar), variantindexcompleted != undefined && variantindexcompleted.length != 0 && (fetchProductInfoQueryContext === null || fetchProductInfoQueryContext === void 0 || (_fetchProductInfoQuer34 = fetchProductInfoQueryContext.data) === null || _fetchProductInfoQuer34 === void 0 || (_fetchProductInfoQuer34 = _fetchProductInfoQuer34.data) === null || _fetchProductInfoQuer34 === void 0 || (_fetchProductInfoQuer34 = _fetchProductInfoQuer34.productinfo) === null || _fetchProductInfoQuer34 === void 0 || (_fetchProductInfoQuer34 = _fetchProductInfoQuer34.variants[variantindexcompleted]) === null || _fetchProductInfoQuer34 === void 0 ? void 0 : _fetchProductInfoQuer34.hassale) == 1 && /*#__PURE__*/React__default["default"].createElement("span", {
3060
+ }, "-"), langdetect == 'en' ? authdetailsContext === null || authdetailsContext === void 0 ? void 0 : authdetailsContext.currencyname_en : '', ' ', parseFloat(getprice_discountpriceprops('defaultprice', 1, variantindexcompleted)), ' ', langdetect == 'en' ? '' : authdetailsContext === null || authdetailsContext === void 0 ? void 0 : authdetailsContext.currencyname_ar), variantindexcompleted != undefined && variantindexcompleted.length != 0 && (fetchProductInfoQueryContext === null || fetchProductInfoQueryContext === void 0 || (_fetchProductInfoQuer35 = fetchProductInfoQueryContext.data) === null || _fetchProductInfoQuer35 === void 0 || (_fetchProductInfoQuer35 = _fetchProductInfoQuer35.data) === null || _fetchProductInfoQuer35 === void 0 || (_fetchProductInfoQuer35 = _fetchProductInfoQuer35.productinfo) === null || _fetchProductInfoQuer35 === void 0 || (_fetchProductInfoQuer35 = _fetchProductInfoQuer35.variants[variantindexcompleted]) === null || _fetchProductInfoQuer35 === void 0 ? void 0 : _fetchProductInfoQuer35.hassale) == 1 && /*#__PURE__*/React__default["default"].createElement("span", {
3038
3061
  className: langdetect == 'en' ? ' d-flex align-items-center justify-content-end wordbreak text-right wordbreak ' : ' d-flex align-items-center justify-content-end wordbreak text-left wordbreak '
3039
3062
  }, /*#__PURE__*/React__default["default"].createElement("span", {
3040
3063
  className: "ml-2 mr-2",
3041
3064
  style: {
3042
3065
  textDecoration: 'none'
3043
3066
  }
3044
- }, "-"), langdetect == 'en' ? authdetailsContext === null || authdetailsContext === void 0 ? void 0 : authdetailsContext.currencyname_en : '', ' ', parseFloat(getprice_discountpriceprops('defaultprice', 1, variantindexcompleted)), ' ', langdetect == 'en' ? '' : authdetailsContext === null || authdetailsContext === void 0 ? void 0 : authdetailsContext.currencyname_ar))))), sectionproperties.availabilitybtnposition == 'Bottom' && sectionproperties.show_availability == 'Show' && (fetchProductInfoQueryContext === null || fetchProductInfoQueryContext === void 0 || (_fetchProductInfoQuer35 = fetchProductInfoQueryContext.data) === null || _fetchProductInfoQuer35 === void 0 || (_fetchProductInfoQuer35 = _fetchProductInfoQuer35.data) === null || _fetchProductInfoQuer35 === void 0 || (_fetchProductInfoQuer35 = _fetchProductInfoQuer35.productinfo) === null || _fetchProductInfoQuer35 === void 0 ? void 0 : _fetchProductInfoQuer35.isproducttobesold) == 1 && /*#__PURE__*/React__default["default"].createElement("div", {
3067
+ }, "-"), langdetect == 'en' ? authdetailsContext === null || authdetailsContext === void 0 ? void 0 : authdetailsContext.currencyname_en : '', ' ', parseFloat(getprice_discountpriceprops('defaultprice', 1, variantindexcompleted)), ' ', langdetect == 'en' ? '' : authdetailsContext === null || authdetailsContext === void 0 ? void 0 : authdetailsContext.currencyname_ar))))), sectionproperties.availabilitybtnposition == 'Bottom' && sectionproperties.show_availability == 'Show' && (fetchProductInfoQueryContext === null || fetchProductInfoQueryContext === void 0 || (_fetchProductInfoQuer36 = fetchProductInfoQueryContext.data) === null || _fetchProductInfoQuer36 === void 0 || (_fetchProductInfoQuer36 = _fetchProductInfoQuer36.data) === null || _fetchProductInfoQuer36 === void 0 || (_fetchProductInfoQuer36 = _fetchProductInfoQuer36.productinfo) === null || _fetchProductInfoQuer36 === void 0 ? void 0 : _fetchProductInfoQuer36.isproducttobesold) == 1 && /*#__PURE__*/React__default["default"].createElement("div", {
3045
3068
  className: "col-lg-12 p-0 mb-3 mt-2"
3046
3069
  }, /*#__PURE__*/React__default["default"].createElement("div", {
3047
3070
  style: {
@@ -5134,8 +5157,9 @@ var Productinfo = function Productinfo(props) {
5134
5157
  // queryClient.setQueryData('fetchProductInfo_API' + JSON.stringify(fetchproductinfoObjContext), productarr);
5135
5158
  setProductInfoObj(_objectSpread$2m({}, productarr));
5136
5159
  };
5137
- var addtocartfunc = function addtocartfunc() {
5160
+ var addtocartfunc = function addtocartfunc(forcetocheckout) {
5138
5161
  var runfunc = false;
5162
+ var forcetocheckoutvalue = forcetocheckout;
5139
5163
  if (addtocardpayloadobj.productid.length != 0 && addtocardpayloadobj.quantity > 0) {
5140
5164
  var _fetchProductInfoQuer6;
5141
5165
  if ((fetchProductInfoQueryContext === null || fetchProductInfoQueryContext === void 0 || (_fetchProductInfoQuer6 = fetchProductInfoQueryContext.data) === null || _fetchProductInfoQuer6 === void 0 || (_fetchProductInfoQuer6 = _fetchProductInfoQuer6.data) === null || _fetchProductInfoQuer6 === void 0 || (_fetchProductInfoQuer6 = _fetchProductInfoQuer6.productinfo) === null || _fetchProductInfoQuer6 === void 0 ? void 0 : _fetchProductInfoQuer6.hasvariants) == 1) {
@@ -5155,6 +5179,9 @@ var Productinfo = function Productinfo(props) {
5155
5179
  var tempaddtocardpayloadobj = _objectSpread$2m({}, addtocardpayloadobj);
5156
5180
  tempaddtocardpayloadobj.isproductforcedtocheckout = fetchProductInfoQueryContext === null || fetchProductInfoQueryContext === void 0 || (_fetchProductInfoQuer7 = fetchProductInfoQueryContext.data) === null || _fetchProductInfoQuer7 === void 0 || (_fetchProductInfoQuer7 = _fetchProductInfoQuer7.data) === null || _fetchProductInfoQuer7 === void 0 || (_fetchProductInfoQuer7 = _fetchProductInfoQuer7.productinfo) === null || _fetchProductInfoQuer7 === void 0 ? void 0 : _fetchProductInfoQuer7.isproductforcedtocheckout;
5157
5181
  tempaddtocardpayloadobj.vendorid = fetchProductInfoQueryContext === null || fetchProductInfoQueryContext === void 0 || (_fetchProductInfoQuer8 = fetchProductInfoQueryContext.data) === null || _fetchProductInfoQuer8 === void 0 || (_fetchProductInfoQuer8 = _fetchProductInfoQuer8.data) === null || _fetchProductInfoQuer8 === void 0 || (_fetchProductInfoQuer8 = _fetchProductInfoQuer8.productinfo) === null || _fetchProductInfoQuer8 === void 0 ? void 0 : _fetchProductInfoQuer8.vendorproviderid;
5182
+ if (forcetocheckoutvalue != undefined) {
5183
+ tempaddtocardpayloadobj.forcetocheckoutvalue = forcetocheckoutvalue;
5184
+ }
5158
5185
  var Extrafieldvalidationresponse = validateextrafields();
5159
5186
  if (Extrafieldvalidationresponse.status) {
5160
5187
  var _fetchProductInfoQuer9, _fetchProductInfoQuer10, _fetchProductInfoQuer11, _fetchProductInfoQuer12, _fetchProductInfoQuer13, _fetchProductInfoQuer14;
@@ -15193,6 +15220,7 @@ var CardsSection = function CardsSection(props) {
15193
15220
  _useState14 = _slicedToArray__default["default"](_useState13, 2),
15194
15221
  perpageItems = _useState14[0],
15195
15222
  setperpageItems = _useState14[1];
15223
+ var AddtoCartMutationContext = props.actions.AddtoCartMutationContext;
15196
15224
  React.useEffect(function () {
15197
15225
  var productfilerobjtemp = ProductFilterObjContext;
15198
15226
  if (props.filterparamsprops != undefined) {
@@ -15488,6 +15516,7 @@ var CardsSection = function CardsSection(props) {
15488
15516
  cardobj.productcashbackvalue = arrayItem.productinfo.productcashbackvalue;
15489
15517
  cardobj.product_phonenumber = arrayItem.productinfo.product_phonenumber;
15490
15518
  cardobj.productcanrate = arrayItem.productinfo.productcanrate;
15519
+ cardobj.sku = arrayItem.productinfo.sku;
15491
15520
  if (langdetect == 'en') {
15492
15521
  cardobj.currencyname = fetchAuthorizationQueryContext === null || fetchAuthorizationQueryContext === void 0 ? void 0 : fetchAuthorizationQueryContext.data.data.currencyname_en;
15493
15522
  } else {
@@ -16050,7 +16079,8 @@ var CardsSection = function CardsSection(props) {
16050
16079
  sectionindexprops: index,
16051
16080
  sectionidprops: item.sectionid,
16052
16081
  actions: actions,
16053
- fontFamilyprops: sectionproperties.sectiontitlefontfamily == 'ASUL' ? 'ASUL' : ''
16082
+ fontFamilyprops: sectionproperties.sectiontitlefontfamily == 'ASUL' ? 'ASUL' : '',
16083
+ AddtoCartMutationContext: AddtoCartMutationContext
16054
16084
  }));
16055
16085
  } else if (sectionproperties.overallnumberofcards != 0) {
16056
16086
  if (cardinfoindex < sectionproperties.overallnumberofcards) {
@@ -16064,7 +16094,8 @@ var CardsSection = function CardsSection(props) {
16064
16094
  sectionindexprops: index,
16065
16095
  sectionidprops: item.sectionid,
16066
16096
  actions: actions,
16067
- fontFamilyprops: sectionproperties.sectiontitlefontfamily == 'ASUL' ? 'ASUL' : ''
16097
+ fontFamilyprops: sectionproperties.sectiontitlefontfamily == 'ASUL' ? 'ASUL' : '',
16098
+ AddtoCartMutationContext: AddtoCartMutationContext
16068
16099
  }));
16069
16100
  }
16070
16101
  }
@@ -16252,7 +16283,8 @@ var CardsSection = function CardsSection(props) {
16252
16283
  sectionidprops: item.sectionid,
16253
16284
  actions: actions,
16254
16285
  fontFamilyprops: sectionproperties.sectiontitlefontfamily == 'ASUL' ? 'ASUL' : '',
16255
- numberOfColsvertical: sectionproperties.numberOfColsvertical
16286
+ numberOfColsvertical: sectionproperties.numberOfColsvertical,
16287
+ AddtoCartMutationContext: AddtoCartMutationContext
16256
16288
  }));
16257
16289
  } else if (sectionproperties.overallnumberofcards != 0) {
16258
16290
  if (cardinfoindex < sectionproperties.overallnumberofcards) {
@@ -16268,7 +16300,8 @@ var CardsSection = function CardsSection(props) {
16268
16300
  sectionidprops: item.sectionid,
16269
16301
  actions: actions,
16270
16302
  fontFamilyprops: sectionproperties.sectiontitlefontfamily == 'ASUL' ? 'ASUL' : '',
16271
- numberOfColsvertical: sectionproperties.numberOfColsvertical
16303
+ numberOfColsvertical: sectionproperties.numberOfColsvertical,
16304
+ AddtoCartMutationContext: AddtoCartMutationContext
16272
16305
  }));
16273
16306
  }
16274
16307
  }
@@ -43789,7 +43822,7 @@ var Newsletterfooter = function Newsletterfooter(props) {
43789
43822
  onClick: function onClick() {
43790
43823
  routingcountext(StaticPagesLinksContext.Wishlist);
43791
43824
  }
43792
- }, langdetect == 'en' ? sectionproperties.wishlisttitle_en : sectionproperties.previousorders_titlear)), authdetailsContext.loggedin && /*#__PURE__*/React__default["default"].createElement("div", {
43825
+ }, langdetect == 'en' ? sectionproperties.wishlisttitle_en : sectionproperties.wishlisttitle_ar)), authdetailsContext.loggedin && /*#__PURE__*/React__default["default"].createElement("div", {
43793
43826
  "class": "col-lg-12 col-md-12 col-sm-12 p-0 d-flex mb-1"
43794
43827
  }, /*#__PURE__*/React__default["default"].createElement("p", {
43795
43828
  "class": "".concat(footerStyles.subPages) + ' wordbreak m-0 p-0 ',
@@ -43934,7 +43967,7 @@ var Newsletterfooter = function Newsletterfooter(props) {
43934
43967
  objectFit: 'contain'
43935
43968
  },
43936
43969
  loading: "lazy"
43937
- }))), /*#__PURE__*/React__default["default"].createElement("div", {
43970
+ }))), sectionproperties.showfooterdescription == 'Show' && /*#__PURE__*/React__default["default"].createElement("div", {
43938
43971
  "class": "col-lg-12 p-0 d-flex justify-content-start justify-content-md-start"
43939
43972
  }, /*#__PURE__*/React__default["default"].createElement("p", {
43940
43973
  className: "".concat(footerStyles.textStyles) + ' wordbreak wordbreak3 text-center p-0 mb-4 '
@@ -61085,6 +61118,7 @@ var Card23 = function Card23(props) {
61085
61118
  _useState4 = _slicedToArray__default["default"](_useState3, 2),
61086
61119
  item = _useState4[0],
61087
61120
  setitem = _useState4[1];
61121
+ var AddtoCartMutationContext = props.AddtoCartMutationContext;
61088
61122
  var _useState5 = React.useState(''),
61089
61123
  _useState6 = _slicedToArray__default["default"](_useState5, 2),
61090
61124
  secondimage = _useState6[0],
@@ -61206,7 +61240,7 @@ var Card23 = function Card23(props) {
61206
61240
  }
61207
61241
  }),
61208
61242
  cart_btn: glamor.css({
61209
- width: sectionproperties.cartBtnWidth + 'px',
61243
+ width: sectionproperties.cartBtnWidth + '%',
61210
61244
  height: sectionproperties.cartBtnHeight + 'px',
61211
61245
  background: sectionproperties.cartbtn_bgtransparent == 'Transparent' ? 'transparent' : sectionproperties.cartBtnbgColor,
61212
61246
  borderRadius: sectionproperties.cart_btn_borderBottomLeftRadius + 'px',
@@ -61221,6 +61255,23 @@ var Card23 = function Card23(props) {
61221
61255
  borderColor: sectionproperties.cartBtnTextcoloronhover
61222
61256
  }
61223
61257
  }),
61258
+ buynow: glamor.css({
61259
+ width: sectionproperties.cartBtnWidth + '%',
61260
+ height: sectionproperties.cartBtnHeight + 'px',
61261
+ background: sectionproperties.cartBtnTextcolor,
61262
+ borderRadius: sectionproperties.cart_btn_borderBottomLeftRadius + 'px',
61263
+ color: 'white',
61264
+ fontSize: sectionproperties.cartBtnTextfontsize + 'px',
61265
+ fontWeight: sectionproperties.cartBtnTextfontweight,
61266
+ // border: sectionproperties.cartbtnborderwidth + 'px solid ' + sectionproperties.cartbtnbordercolor,
61267
+ transition: '.3s',
61268
+ ':hover': {
61269
+ background: sectionproperties.cartBtnTextcoloronhover,
61270
+ color: 'white'
61271
+ // borderColor: sectionproperties.cartBtnTextcoloronhover,
61272
+ }
61273
+ }),
61274
+
61224
61275
  iconsContainer: glamor.css({
61225
61276
  display: 'flex',
61226
61277
  flexDirection: 'column',
@@ -61391,6 +61442,33 @@ var Card23 = function Card23(props) {
61391
61442
  "class": "m-0 p-0"
61392
61443
  }, langdetect == 'en' ? sectionproperties.outstock_contenten : sectionproperties.outstock_contentar)));
61393
61444
  };
61445
+ var _useState9 = React.useState(''),
61446
+ _useState10 = _slicedToArray__default["default"](_useState9, 2),
61447
+ addtocardpayloadobj = _useState10[0];
61448
+ _useState10[1];
61449
+ var AddtoCartContext = props.actions.AddtoCartContext;
61450
+ var addtocartfunc = function addtocartfunc(forcetocheckout) {
61451
+ var forcetocheckoutvalue = forcetocheckout;
61452
+ var tempaddtocardpayloadobj = _objectSpread$x({}, addtocardpayloadobj);
61453
+ tempaddtocardpayloadobj.productid = item.productid;
61454
+ tempaddtocardpayloadobj.functype = 'add';
61455
+ tempaddtocardpayloadobj.item_type = 'product';
61456
+ tempaddtocardpayloadobj.quantity = 1;
61457
+ if (forcetocheckoutvalue != undefined) {
61458
+ tempaddtocardpayloadobj.forcetocheckoutvalue = forcetocheckoutvalue;
61459
+ }
61460
+
61461
+ // Pixel_EventsContext('AddToCart', {
61462
+ // content_ids: [item.productid],
61463
+ // content_name: item.name_en + ' - ' + item.name_ar,
61464
+ // content_sku: item.sku,
61465
+ // content_type: 'product',
61466
+ // currency: item.currencyname_en,
61467
+ // value: item.defaultprice,
61468
+ // quantity: 1,
61469
+ // });
61470
+ AddtoCartContext(tempaddtocardpayloadobj);
61471
+ };
61394
61472
  return /*#__PURE__*/React__default["default"].createElement("div", {
61395
61473
  "class": langdetect == 'en' ? sectionproperties.card_marginLeft != 0 ? 'row m-0 w-100 pl-sm-2' : sectionproperties.card_marginRight != 0 ? 'row m-0 w-100 pr-sm-2' : 'row m-0 w-100' : langdetect == 'en' ? sectionproperties.card_marginRight != 0 ? 'row m-0 w-100 pr-sm-2' : sectionproperties.card_marginLeft != 0 ? 'row m-0 w-100 pl-sm-2' : 'row m-0 w-100' : 'row m-0 w-100',
61396
61474
  style: {
@@ -61568,9 +61646,9 @@ var Card23 = function Card23(props) {
61568
61646
  }, "/"), sectionproperties.prodsalePriceshow == 'Show' && item.hassale == 1 && /*#__PURE__*/React__default["default"].createElement("p", {
61569
61647
  "class": langdetect == 'en' ? "".concat(cardsstyles2.productSalePricestyles) + ' linethrough m-0 wordbreak d-flex mt-sm-auto mb-sm-auto text-right text-sm-left ' : "".concat(cardsstyles2.productSalePricestyles) + ' linethrough m-0 wordbreak d-flex mt-sm-auto mb-sm-auto text-left text-sm-right '
61570
61648
  }, langdetect == 'en' ? item.currencyname : '', " ", item.defaultprice, " ", langdetect == 'en' ? '' : item.currencyname)), /*#__PURE__*/React__default["default"].createElement("div", {
61571
- "class": "d-flex align-items-center m-0"
61649
+ "class": "d-flex align-items-center m-0 flex-column w-100"
61572
61650
  }, sectionproperties.cartBtnShow == 'Show' && /*#__PURE__*/React__default["default"].createElement("button", {
61573
- "class": "".concat(cardsstyles2.cart_btn) + ' allcentered ',
61651
+ "class": "".concat(cardsstyles2.cart_btn) + ' allcentered mt-3 ',
61574
61652
  onClick: function onClick() {
61575
61653
  setShowProductInfoModalContext(true);
61576
61654
  setProductIdProdutInfoModalContext(item.productid);
@@ -61601,7 +61679,17 @@ var Card23 = function Card23(props) {
61601
61679
  size: sectionproperties.cartBtn_iconFontSize
61602
61680
  })), /*#__PURE__*/React__default["default"].createElement("p", {
61603
61681
  "class": "m-0 p-0"
61604
- }, langdetect == 'en' ? sectionproperties.cartBtnContentenglish : sectionproperties.cartBtnContentarabic))))))));
61682
+ }, langdetect == 'en' ? sectionproperties.cartBtnContentenglish : sectionproperties.cartBtnContentarabic))), sectionproperties.showbuynowbtn == 'Show' && /*#__PURE__*/React__default["default"].createElement("button", {
61683
+ "class": "".concat(cardsstyles2.buynow) + ' allcentered mt-3 ',
61684
+ onClick: function onClick() {
61685
+ addtocartfunc('forcetocheckout');
61686
+ },
61687
+ disabled: AddtoCartMutationContext.isLoading == true ? true : false
61688
+ }, /*#__PURE__*/React__default["default"].createElement("div", {
61689
+ "class": "d-flex align-items-center justify-content-center"
61690
+ }, /*#__PURE__*/React__default["default"].createElement("p", {
61691
+ "class": "m-0 p-0"
61692
+ }, langdetect == 'en' ? 'Buy Now' : 'اشترى الان'))))))));
61605
61693
  };
61606
61694
 
61607
61695
  function ownKeys$w(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
package/dist/index.esm.js CHANGED
@@ -2223,7 +2223,7 @@ var DescriptionContent = function DescriptionContent(props) {
2223
2223
  function ownKeys$2q(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
2224
2224
  function _objectSpread$2q(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$2q(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$2q(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
2225
2225
  var Product_itemtype = function Product_itemtype(props) {
2226
- var _fetchProductInfoQuer2, _fetchProductInfoQuer3, _fetchProductInfoQuer4, _fetchProductInfoQuer5, _fetchProductInfoQuer6, _fetchProductInfoQuer7, _fetchProductInfoQuer8, _fetchProductInfoQuer9, _fetchProductInfoQuer10, _fetchProductInfoQuer11, _fetchProductInfoQuer12, _fetchProductInfoQuer13, _fetchProductInfoQuer14, _fetchProductInfoQuer15, _fetchProductInfoQuer16, _fetchProductInfoQuer17, _fetchProductInfoQuer18, _fetchProductInfoQuer19, _fetchProductInfoQuer20, _fetchProductInfoQuer21, _fetchProductInfoQuer22, _fetchProductInfoQuer23, _fetchProductInfoQuer25, _fetchProductInfoQuer26, _fetchProductInfoQuer27, _fetchProductInfoQuer29, _fetchProductInfoQuer30, _fetchProductInfoQuer31, _fetchProductInfoQuer32, _fetchProductInfoQuer33, _fetchProductInfoQuer34, _fetchProductInfoQuer35;
2226
+ var _fetchProductInfoQuer2, _fetchProductInfoQuer3, _fetchProductInfoQuer4, _fetchProductInfoQuer5, _fetchProductInfoQuer6, _fetchProductInfoQuer7, _fetchProductInfoQuer8, _fetchProductInfoQuer9, _fetchProductInfoQuer10, _fetchProductInfoQuer11, _fetchProductInfoQuer12, _fetchProductInfoQuer13, _fetchProductInfoQuer14, _fetchProductInfoQuer15, _fetchProductInfoQuer16, _fetchProductInfoQuer17, _fetchProductInfoQuer18, _fetchProductInfoQuer19, _fetchProductInfoQuer20, _fetchProductInfoQuer21, _fetchProductInfoQuer22, _fetchProductInfoQuer23, _fetchProductInfoQuer25, _fetchProductInfoQuer26, _fetchProductInfoQuer27, _fetchProductInfoQuer29, _fetchProductInfoQuer30, _fetchProductInfoQuer31, _fetchProductInfoQuer32, _fetchProductInfoQuer33, _fetchProductInfoQuer34, _fetchProductInfoQuer35, _fetchProductInfoQuer36;
2227
2227
  var lang = props.actions.lang;
2228
2228
  var langdetect = props.actions.langdetect;
2229
2229
  var srcfromprops = props.actions.srcfromprops;
@@ -2948,7 +2948,30 @@ var Product_itemtype = function Product_itemtype(props) {
2948
2948
  size: sectionproperties.favBtnIconfontsize
2949
2949
  }), sectionproperties.faviconshape == 'Heart Shape' && /*#__PURE__*/React.createElement(FaRegHeart, {
2950
2950
  size: sectionproperties.favBtnIconfontsize
2951
- })))))))), sectionproperties.productInformationType == 'Product/Service Information' && (fetchProductInfoQueryContext === null || fetchProductInfoQueryContext === void 0 || (_fetchProductInfoQuer31 = fetchProductInfoQueryContext.data) === null || _fetchProductInfoQuer31 === void 0 || (_fetchProductInfoQuer31 = _fetchProductInfoQuer31.data) === null || _fetchProductInfoQuer31 === void 0 || (_fetchProductInfoQuer31 = _fetchProductInfoQuer31.productinfo) === null || _fetchProductInfoQuer31 === void 0 ? void 0 : _fetchProductInfoQuer31.isproducttobesold) == 1 && sectionproperties.showtotalsection == 'Show' && /*#__PURE__*/React.createElement("div", {
2951
+ }))))), sectionproperties.cartbtnalone == 'Alone' && sectionproperties.showbuynowbtn == 'Show' && (fetchProductInfoQueryContext === null || fetchProductInfoQueryContext === void 0 || (_fetchProductInfoQuer31 = fetchProductInfoQueryContext.data) === null || _fetchProductInfoQuer31 === void 0 || (_fetchProductInfoQuer31 = _fetchProductInfoQuer31.data) === null || _fetchProductInfoQuer31 === void 0 || (_fetchProductInfoQuer31 = _fetchProductInfoQuer31.productinfo) === null || _fetchProductInfoQuer31 === void 0 ? void 0 : _fetchProductInfoQuer31.isproducttobesold) == 1 && /*#__PURE__*/React.createElement("div", {
2952
+ "class": "row m-0 w-100 mt-3",
2953
+ style: {
2954
+ overflow: 'hidden'
2955
+ }
2956
+ }, /*#__PURE__*/React.createElement("button", {
2957
+ className: "".concat(productinfo_cssstyles.cart_btn, " ") + ' d-flex align-items-center justify-content-center mb-sm-2 ',
2958
+ style: {
2959
+ width: sectionproperties.cartBtnWidth + '%'
2960
+ },
2961
+ onClick: function onClick() {
2962
+ addtocartfunc('forcetocheckout');
2963
+ },
2964
+ disabled: AddtoCartMutationContext.isLoading == true ? true : false
2965
+ }, !AddtoCartMutationContext.isLoading && /*#__PURE__*/React.createElement("span", {
2966
+ className: ' d-flex align-items-center justify-content-center '
2967
+ }, langdetect == 'en' ? 'Buy Now' : 'إشترى الان'), AddtoCartMutationContext.isLoading && /*#__PURE__*/React.createElement("div", {
2968
+ className: ' d-flex align-items-center justify-content-center '
2969
+ }, /*#__PURE__*/React.createElement(CircularProgress, {
2970
+ color: "white",
2971
+ width: "20px",
2972
+ height: "20px",
2973
+ duration: "1s"
2974
+ }))))))), sectionproperties.productInformationType == 'Product/Service Information' && (fetchProductInfoQueryContext === null || fetchProductInfoQueryContext === void 0 || (_fetchProductInfoQuer32 = fetchProductInfoQueryContext.data) === null || _fetchProductInfoQuer32 === void 0 || (_fetchProductInfoQuer32 = _fetchProductInfoQuer32.data) === null || _fetchProductInfoQuer32 === void 0 || (_fetchProductInfoQuer32 = _fetchProductInfoQuer32.productinfo) === null || _fetchProductInfoQuer32 === void 0 ? void 0 : _fetchProductInfoQuer32.isproducttobesold) == 1 && sectionproperties.showtotalsection == 'Show' && /*#__PURE__*/React.createElement("div", {
2952
2975
  className: "col-lg-12 p-0 mb-3"
2953
2976
  }, /*#__PURE__*/React.createElement("div", {
2954
2977
  className: "row m-0 w-100 d-flex flex-row"
@@ -2971,7 +2994,7 @@ var Product_itemtype = function Product_itemtype(props) {
2971
2994
  }
2972
2995
  }, /*#__PURE__*/React.createElement("span", {
2973
2996
  className: langdetect == 'en' ? ' d-flex align-items-center justify-content-end wordbreak text-right ' : ' d-flex align-items-center justify-content-end wordbreak text-left '
2974
- }, langdetect == 'en' ? authdetailsContext === null || authdetailsContext === void 0 ? void 0 : authdetailsContext.currencyname_en : '', ' ', variantindexcompleted != undefined && variantindexcompleted.length == 0 && fetchProductInfoQueryContext.data.data.productinfo.hassale == 0 && parseFloat(getprice_discountpriceprops('defaultprice', 1, variantindexcompleted)).toFixed(2), variantindexcompleted != undefined && variantindexcompleted.length == 0 && fetchProductInfoQueryContext.data.data.productinfo.hassale == 1 && parseFloat(getprice_discountpriceprops('defaultsaleprice', 1, variantindexcompleted)).toFixed(2), variantindexcompleted != undefined && variantindexcompleted.length != 0 && (fetchProductInfoQueryContext === null || fetchProductInfoQueryContext === void 0 || (_fetchProductInfoQuer32 = fetchProductInfoQueryContext.data) === null || _fetchProductInfoQuer32 === void 0 || (_fetchProductInfoQuer32 = _fetchProductInfoQuer32.data) === null || _fetchProductInfoQuer32 === void 0 || (_fetchProductInfoQuer32 = _fetchProductInfoQuer32.productinfo) === null || _fetchProductInfoQuer32 === void 0 || (_fetchProductInfoQuer32 = _fetchProductInfoQuer32.variants[variantindexcompleted]) === null || _fetchProductInfoQuer32 === void 0 ? void 0 : _fetchProductInfoQuer32.hassale) == 1 && parseFloat(getprice_discountpriceprops('defaultsaleprice', 1, variantindexcompleted)).toFixed(2), variantindexcompleted != undefined && variantindexcompleted.length != 0 && (fetchProductInfoQueryContext === null || fetchProductInfoQueryContext === void 0 || (_fetchProductInfoQuer33 = fetchProductInfoQueryContext.data) === null || _fetchProductInfoQuer33 === void 0 || (_fetchProductInfoQuer33 = _fetchProductInfoQuer33.data) === null || _fetchProductInfoQuer33 === void 0 || (_fetchProductInfoQuer33 = _fetchProductInfoQuer33.productinfo) === null || _fetchProductInfoQuer33 === void 0 || (_fetchProductInfoQuer33 = _fetchProductInfoQuer33.variants[variantindexcompleted]) === null || _fetchProductInfoQuer33 === void 0 ? void 0 : _fetchProductInfoQuer33.hassale) == 0 && parseFloat(getprice_discountpriceprops('defaultprice', 1, variantindexcompleted)).toFixed(2), langdetect == 'en' ? '' : authdetailsContext === null || authdetailsContext === void 0 ? void 0 : authdetailsContext.currencyname_ar)), /*#__PURE__*/React.createElement("p", {
2997
+ }, langdetect == 'en' ? authdetailsContext === null || authdetailsContext === void 0 ? void 0 : authdetailsContext.currencyname_en : '', ' ', variantindexcompleted != undefined && variantindexcompleted.length == 0 && fetchProductInfoQueryContext.data.data.productinfo.hassale == 0 && parseFloat(getprice_discountpriceprops('defaultprice', 1, variantindexcompleted)).toFixed(2), variantindexcompleted != undefined && variantindexcompleted.length == 0 && fetchProductInfoQueryContext.data.data.productinfo.hassale == 1 && parseFloat(getprice_discountpriceprops('defaultsaleprice', 1, variantindexcompleted)).toFixed(2), variantindexcompleted != undefined && variantindexcompleted.length != 0 && (fetchProductInfoQueryContext === null || fetchProductInfoQueryContext === void 0 || (_fetchProductInfoQuer33 = fetchProductInfoQueryContext.data) === null || _fetchProductInfoQuer33 === void 0 || (_fetchProductInfoQuer33 = _fetchProductInfoQuer33.data) === null || _fetchProductInfoQuer33 === void 0 || (_fetchProductInfoQuer33 = _fetchProductInfoQuer33.productinfo) === null || _fetchProductInfoQuer33 === void 0 || (_fetchProductInfoQuer33 = _fetchProductInfoQuer33.variants[variantindexcompleted]) === null || _fetchProductInfoQuer33 === void 0 ? void 0 : _fetchProductInfoQuer33.hassale) == 1 && parseFloat(getprice_discountpriceprops('defaultsaleprice', 1, variantindexcompleted)).toFixed(2), variantindexcompleted != undefined && variantindexcompleted.length != 0 && (fetchProductInfoQueryContext === null || fetchProductInfoQueryContext === void 0 || (_fetchProductInfoQuer34 = fetchProductInfoQueryContext.data) === null || _fetchProductInfoQuer34 === void 0 || (_fetchProductInfoQuer34 = _fetchProductInfoQuer34.data) === null || _fetchProductInfoQuer34 === void 0 || (_fetchProductInfoQuer34 = _fetchProductInfoQuer34.productinfo) === null || _fetchProductInfoQuer34 === void 0 || (_fetchProductInfoQuer34 = _fetchProductInfoQuer34.variants[variantindexcompleted]) === null || _fetchProductInfoQuer34 === void 0 ? void 0 : _fetchProductInfoQuer34.hassale) == 0 && parseFloat(getprice_discountpriceprops('defaultprice', 1, variantindexcompleted)).toFixed(2), langdetect == 'en' ? '' : authdetailsContext === null || authdetailsContext === void 0 ? void 0 : authdetailsContext.currencyname_ar)), /*#__PURE__*/React.createElement("p", {
2975
2998
  className: 'm-0 p-0 linethrough wordbreak',
2976
2999
  style: {
2977
3000
  color: sectionproperties.prodsalePriceColor,
@@ -2985,14 +3008,14 @@ var Product_itemtype = function Product_itemtype(props) {
2985
3008
  style: {
2986
3009
  textDecoration: 'none'
2987
3010
  }
2988
- }, "-"), langdetect == 'en' ? authdetailsContext === null || authdetailsContext === void 0 ? void 0 : authdetailsContext.currencyname_en : '', ' ', parseFloat(getprice_discountpriceprops('defaultprice', 1, variantindexcompleted)), ' ', langdetect == 'en' ? '' : authdetailsContext === null || authdetailsContext === void 0 ? void 0 : authdetailsContext.currencyname_ar), variantindexcompleted != undefined && variantindexcompleted.length != 0 && (fetchProductInfoQueryContext === null || fetchProductInfoQueryContext === void 0 || (_fetchProductInfoQuer34 = fetchProductInfoQueryContext.data) === null || _fetchProductInfoQuer34 === void 0 || (_fetchProductInfoQuer34 = _fetchProductInfoQuer34.data) === null || _fetchProductInfoQuer34 === void 0 || (_fetchProductInfoQuer34 = _fetchProductInfoQuer34.productinfo) === null || _fetchProductInfoQuer34 === void 0 || (_fetchProductInfoQuer34 = _fetchProductInfoQuer34.variants[variantindexcompleted]) === null || _fetchProductInfoQuer34 === void 0 ? void 0 : _fetchProductInfoQuer34.hassale) == 1 && /*#__PURE__*/React.createElement("span", {
3011
+ }, "-"), langdetect == 'en' ? authdetailsContext === null || authdetailsContext === void 0 ? void 0 : authdetailsContext.currencyname_en : '', ' ', parseFloat(getprice_discountpriceprops('defaultprice', 1, variantindexcompleted)), ' ', langdetect == 'en' ? '' : authdetailsContext === null || authdetailsContext === void 0 ? void 0 : authdetailsContext.currencyname_ar), variantindexcompleted != undefined && variantindexcompleted.length != 0 && (fetchProductInfoQueryContext === null || fetchProductInfoQueryContext === void 0 || (_fetchProductInfoQuer35 = fetchProductInfoQueryContext.data) === null || _fetchProductInfoQuer35 === void 0 || (_fetchProductInfoQuer35 = _fetchProductInfoQuer35.data) === null || _fetchProductInfoQuer35 === void 0 || (_fetchProductInfoQuer35 = _fetchProductInfoQuer35.productinfo) === null || _fetchProductInfoQuer35 === void 0 || (_fetchProductInfoQuer35 = _fetchProductInfoQuer35.variants[variantindexcompleted]) === null || _fetchProductInfoQuer35 === void 0 ? void 0 : _fetchProductInfoQuer35.hassale) == 1 && /*#__PURE__*/React.createElement("span", {
2989
3012
  className: langdetect == 'en' ? ' d-flex align-items-center justify-content-end wordbreak text-right wordbreak ' : ' d-flex align-items-center justify-content-end wordbreak text-left wordbreak '
2990
3013
  }, /*#__PURE__*/React.createElement("span", {
2991
3014
  className: "ml-2 mr-2",
2992
3015
  style: {
2993
3016
  textDecoration: 'none'
2994
3017
  }
2995
- }, "-"), langdetect == 'en' ? authdetailsContext === null || authdetailsContext === void 0 ? void 0 : authdetailsContext.currencyname_en : '', ' ', parseFloat(getprice_discountpriceprops('defaultprice', 1, variantindexcompleted)), ' ', langdetect == 'en' ? '' : authdetailsContext === null || authdetailsContext === void 0 ? void 0 : authdetailsContext.currencyname_ar))))), sectionproperties.availabilitybtnposition == 'Bottom' && sectionproperties.show_availability == 'Show' && (fetchProductInfoQueryContext === null || fetchProductInfoQueryContext === void 0 || (_fetchProductInfoQuer35 = fetchProductInfoQueryContext.data) === null || _fetchProductInfoQuer35 === void 0 || (_fetchProductInfoQuer35 = _fetchProductInfoQuer35.data) === null || _fetchProductInfoQuer35 === void 0 || (_fetchProductInfoQuer35 = _fetchProductInfoQuer35.productinfo) === null || _fetchProductInfoQuer35 === void 0 ? void 0 : _fetchProductInfoQuer35.isproducttobesold) == 1 && /*#__PURE__*/React.createElement("div", {
3018
+ }, "-"), langdetect == 'en' ? authdetailsContext === null || authdetailsContext === void 0 ? void 0 : authdetailsContext.currencyname_en : '', ' ', parseFloat(getprice_discountpriceprops('defaultprice', 1, variantindexcompleted)), ' ', langdetect == 'en' ? '' : authdetailsContext === null || authdetailsContext === void 0 ? void 0 : authdetailsContext.currencyname_ar))))), sectionproperties.availabilitybtnposition == 'Bottom' && sectionproperties.show_availability == 'Show' && (fetchProductInfoQueryContext === null || fetchProductInfoQueryContext === void 0 || (_fetchProductInfoQuer36 = fetchProductInfoQueryContext.data) === null || _fetchProductInfoQuer36 === void 0 || (_fetchProductInfoQuer36 = _fetchProductInfoQuer36.data) === null || _fetchProductInfoQuer36 === void 0 || (_fetchProductInfoQuer36 = _fetchProductInfoQuer36.productinfo) === null || _fetchProductInfoQuer36 === void 0 ? void 0 : _fetchProductInfoQuer36.isproducttobesold) == 1 && /*#__PURE__*/React.createElement("div", {
2996
3019
  className: "col-lg-12 p-0 mb-3 mt-2"
2997
3020
  }, /*#__PURE__*/React.createElement("div", {
2998
3021
  style: {
@@ -5085,8 +5108,9 @@ var Productinfo = function Productinfo(props) {
5085
5108
  // queryClient.setQueryData('fetchProductInfo_API' + JSON.stringify(fetchproductinfoObjContext), productarr);
5086
5109
  setProductInfoObj(_objectSpread$2m({}, productarr));
5087
5110
  };
5088
- var addtocartfunc = function addtocartfunc() {
5111
+ var addtocartfunc = function addtocartfunc(forcetocheckout) {
5089
5112
  var runfunc = false;
5113
+ var forcetocheckoutvalue = forcetocheckout;
5090
5114
  if (addtocardpayloadobj.productid.length != 0 && addtocardpayloadobj.quantity > 0) {
5091
5115
  var _fetchProductInfoQuer6;
5092
5116
  if ((fetchProductInfoQueryContext === null || fetchProductInfoQueryContext === void 0 || (_fetchProductInfoQuer6 = fetchProductInfoQueryContext.data) === null || _fetchProductInfoQuer6 === void 0 || (_fetchProductInfoQuer6 = _fetchProductInfoQuer6.data) === null || _fetchProductInfoQuer6 === void 0 || (_fetchProductInfoQuer6 = _fetchProductInfoQuer6.productinfo) === null || _fetchProductInfoQuer6 === void 0 ? void 0 : _fetchProductInfoQuer6.hasvariants) == 1) {
@@ -5106,6 +5130,9 @@ var Productinfo = function Productinfo(props) {
5106
5130
  var tempaddtocardpayloadobj = _objectSpread$2m({}, addtocardpayloadobj);
5107
5131
  tempaddtocardpayloadobj.isproductforcedtocheckout = fetchProductInfoQueryContext === null || fetchProductInfoQueryContext === void 0 || (_fetchProductInfoQuer7 = fetchProductInfoQueryContext.data) === null || _fetchProductInfoQuer7 === void 0 || (_fetchProductInfoQuer7 = _fetchProductInfoQuer7.data) === null || _fetchProductInfoQuer7 === void 0 || (_fetchProductInfoQuer7 = _fetchProductInfoQuer7.productinfo) === null || _fetchProductInfoQuer7 === void 0 ? void 0 : _fetchProductInfoQuer7.isproductforcedtocheckout;
5108
5132
  tempaddtocardpayloadobj.vendorid = fetchProductInfoQueryContext === null || fetchProductInfoQueryContext === void 0 || (_fetchProductInfoQuer8 = fetchProductInfoQueryContext.data) === null || _fetchProductInfoQuer8 === void 0 || (_fetchProductInfoQuer8 = _fetchProductInfoQuer8.data) === null || _fetchProductInfoQuer8 === void 0 || (_fetchProductInfoQuer8 = _fetchProductInfoQuer8.productinfo) === null || _fetchProductInfoQuer8 === void 0 ? void 0 : _fetchProductInfoQuer8.vendorproviderid;
5133
+ if (forcetocheckoutvalue != undefined) {
5134
+ tempaddtocardpayloadobj.forcetocheckoutvalue = forcetocheckoutvalue;
5135
+ }
5109
5136
  var Extrafieldvalidationresponse = validateextrafields();
5110
5137
  if (Extrafieldvalidationresponse.status) {
5111
5138
  var _fetchProductInfoQuer9, _fetchProductInfoQuer10, _fetchProductInfoQuer11, _fetchProductInfoQuer12, _fetchProductInfoQuer13, _fetchProductInfoQuer14;
@@ -15144,6 +15171,7 @@ var CardsSection = function CardsSection(props) {
15144
15171
  _useState14 = _slicedToArray(_useState13, 2),
15145
15172
  perpageItems = _useState14[0],
15146
15173
  setperpageItems = _useState14[1];
15174
+ var AddtoCartMutationContext = props.actions.AddtoCartMutationContext;
15147
15175
  useEffect(function () {
15148
15176
  var productfilerobjtemp = ProductFilterObjContext;
15149
15177
  if (props.filterparamsprops != undefined) {
@@ -15439,6 +15467,7 @@ var CardsSection = function CardsSection(props) {
15439
15467
  cardobj.productcashbackvalue = arrayItem.productinfo.productcashbackvalue;
15440
15468
  cardobj.product_phonenumber = arrayItem.productinfo.product_phonenumber;
15441
15469
  cardobj.productcanrate = arrayItem.productinfo.productcanrate;
15470
+ cardobj.sku = arrayItem.productinfo.sku;
15442
15471
  if (langdetect == 'en') {
15443
15472
  cardobj.currencyname = fetchAuthorizationQueryContext === null || fetchAuthorizationQueryContext === void 0 ? void 0 : fetchAuthorizationQueryContext.data.data.currencyname_en;
15444
15473
  } else {
@@ -16001,7 +16030,8 @@ var CardsSection = function CardsSection(props) {
16001
16030
  sectionindexprops: index,
16002
16031
  sectionidprops: item.sectionid,
16003
16032
  actions: actions,
16004
- fontFamilyprops: sectionproperties.sectiontitlefontfamily == 'ASUL' ? 'ASUL' : ''
16033
+ fontFamilyprops: sectionproperties.sectiontitlefontfamily == 'ASUL' ? 'ASUL' : '',
16034
+ AddtoCartMutationContext: AddtoCartMutationContext
16005
16035
  }));
16006
16036
  } else if (sectionproperties.overallnumberofcards != 0) {
16007
16037
  if (cardinfoindex < sectionproperties.overallnumberofcards) {
@@ -16015,7 +16045,8 @@ var CardsSection = function CardsSection(props) {
16015
16045
  sectionindexprops: index,
16016
16046
  sectionidprops: item.sectionid,
16017
16047
  actions: actions,
16018
- fontFamilyprops: sectionproperties.sectiontitlefontfamily == 'ASUL' ? 'ASUL' : ''
16048
+ fontFamilyprops: sectionproperties.sectiontitlefontfamily == 'ASUL' ? 'ASUL' : '',
16049
+ AddtoCartMutationContext: AddtoCartMutationContext
16019
16050
  }));
16020
16051
  }
16021
16052
  }
@@ -16203,7 +16234,8 @@ var CardsSection = function CardsSection(props) {
16203
16234
  sectionidprops: item.sectionid,
16204
16235
  actions: actions,
16205
16236
  fontFamilyprops: sectionproperties.sectiontitlefontfamily == 'ASUL' ? 'ASUL' : '',
16206
- numberOfColsvertical: sectionproperties.numberOfColsvertical
16237
+ numberOfColsvertical: sectionproperties.numberOfColsvertical,
16238
+ AddtoCartMutationContext: AddtoCartMutationContext
16207
16239
  }));
16208
16240
  } else if (sectionproperties.overallnumberofcards != 0) {
16209
16241
  if (cardinfoindex < sectionproperties.overallnumberofcards) {
@@ -16219,7 +16251,8 @@ var CardsSection = function CardsSection(props) {
16219
16251
  sectionidprops: item.sectionid,
16220
16252
  actions: actions,
16221
16253
  fontFamilyprops: sectionproperties.sectiontitlefontfamily == 'ASUL' ? 'ASUL' : '',
16222
- numberOfColsvertical: sectionproperties.numberOfColsvertical
16254
+ numberOfColsvertical: sectionproperties.numberOfColsvertical,
16255
+ AddtoCartMutationContext: AddtoCartMutationContext
16223
16256
  }));
16224
16257
  }
16225
16258
  }
@@ -43740,7 +43773,7 @@ var Newsletterfooter = function Newsletterfooter(props) {
43740
43773
  onClick: function onClick() {
43741
43774
  routingcountext(StaticPagesLinksContext.Wishlist);
43742
43775
  }
43743
- }, langdetect == 'en' ? sectionproperties.wishlisttitle_en : sectionproperties.previousorders_titlear)), authdetailsContext.loggedin && /*#__PURE__*/React.createElement("div", {
43776
+ }, langdetect == 'en' ? sectionproperties.wishlisttitle_en : sectionproperties.wishlisttitle_ar)), authdetailsContext.loggedin && /*#__PURE__*/React.createElement("div", {
43744
43777
  "class": "col-lg-12 col-md-12 col-sm-12 p-0 d-flex mb-1"
43745
43778
  }, /*#__PURE__*/React.createElement("p", {
43746
43779
  "class": "".concat(footerStyles.subPages) + ' wordbreak m-0 p-0 ',
@@ -43885,7 +43918,7 @@ var Newsletterfooter = function Newsletterfooter(props) {
43885
43918
  objectFit: 'contain'
43886
43919
  },
43887
43920
  loading: "lazy"
43888
- }))), /*#__PURE__*/React.createElement("div", {
43921
+ }))), sectionproperties.showfooterdescription == 'Show' && /*#__PURE__*/React.createElement("div", {
43889
43922
  "class": "col-lg-12 p-0 d-flex justify-content-start justify-content-md-start"
43890
43923
  }, /*#__PURE__*/React.createElement("p", {
43891
43924
  className: "".concat(footerStyles.textStyles) + ' wordbreak wordbreak3 text-center p-0 mb-4 '
@@ -61036,6 +61069,7 @@ var Card23 = function Card23(props) {
61036
61069
  _useState4 = _slicedToArray(_useState3, 2),
61037
61070
  item = _useState4[0],
61038
61071
  setitem = _useState4[1];
61072
+ var AddtoCartMutationContext = props.AddtoCartMutationContext;
61039
61073
  var _useState5 = useState(''),
61040
61074
  _useState6 = _slicedToArray(_useState5, 2),
61041
61075
  secondimage = _useState6[0],
@@ -61157,7 +61191,7 @@ var Card23 = function Card23(props) {
61157
61191
  }
61158
61192
  }),
61159
61193
  cart_btn: css({
61160
- width: sectionproperties.cartBtnWidth + 'px',
61194
+ width: sectionproperties.cartBtnWidth + '%',
61161
61195
  height: sectionproperties.cartBtnHeight + 'px',
61162
61196
  background: sectionproperties.cartbtn_bgtransparent == 'Transparent' ? 'transparent' : sectionproperties.cartBtnbgColor,
61163
61197
  borderRadius: sectionproperties.cart_btn_borderBottomLeftRadius + 'px',
@@ -61172,6 +61206,23 @@ var Card23 = function Card23(props) {
61172
61206
  borderColor: sectionproperties.cartBtnTextcoloronhover
61173
61207
  }
61174
61208
  }),
61209
+ buynow: css({
61210
+ width: sectionproperties.cartBtnWidth + '%',
61211
+ height: sectionproperties.cartBtnHeight + 'px',
61212
+ background: sectionproperties.cartBtnTextcolor,
61213
+ borderRadius: sectionproperties.cart_btn_borderBottomLeftRadius + 'px',
61214
+ color: 'white',
61215
+ fontSize: sectionproperties.cartBtnTextfontsize + 'px',
61216
+ fontWeight: sectionproperties.cartBtnTextfontweight,
61217
+ // border: sectionproperties.cartbtnborderwidth + 'px solid ' + sectionproperties.cartbtnbordercolor,
61218
+ transition: '.3s',
61219
+ ':hover': {
61220
+ background: sectionproperties.cartBtnTextcoloronhover,
61221
+ color: 'white'
61222
+ // borderColor: sectionproperties.cartBtnTextcoloronhover,
61223
+ }
61224
+ }),
61225
+
61175
61226
  iconsContainer: css({
61176
61227
  display: 'flex',
61177
61228
  flexDirection: 'column',
@@ -61342,6 +61393,33 @@ var Card23 = function Card23(props) {
61342
61393
  "class": "m-0 p-0"
61343
61394
  }, langdetect == 'en' ? sectionproperties.outstock_contenten : sectionproperties.outstock_contentar)));
61344
61395
  };
61396
+ var _useState9 = useState(''),
61397
+ _useState10 = _slicedToArray(_useState9, 2),
61398
+ addtocardpayloadobj = _useState10[0];
61399
+ _useState10[1];
61400
+ var AddtoCartContext = props.actions.AddtoCartContext;
61401
+ var addtocartfunc = function addtocartfunc(forcetocheckout) {
61402
+ var forcetocheckoutvalue = forcetocheckout;
61403
+ var tempaddtocardpayloadobj = _objectSpread$x({}, addtocardpayloadobj);
61404
+ tempaddtocardpayloadobj.productid = item.productid;
61405
+ tempaddtocardpayloadobj.functype = 'add';
61406
+ tempaddtocardpayloadobj.item_type = 'product';
61407
+ tempaddtocardpayloadobj.quantity = 1;
61408
+ if (forcetocheckoutvalue != undefined) {
61409
+ tempaddtocardpayloadobj.forcetocheckoutvalue = forcetocheckoutvalue;
61410
+ }
61411
+
61412
+ // Pixel_EventsContext('AddToCart', {
61413
+ // content_ids: [item.productid],
61414
+ // content_name: item.name_en + ' - ' + item.name_ar,
61415
+ // content_sku: item.sku,
61416
+ // content_type: 'product',
61417
+ // currency: item.currencyname_en,
61418
+ // value: item.defaultprice,
61419
+ // quantity: 1,
61420
+ // });
61421
+ AddtoCartContext(tempaddtocardpayloadobj);
61422
+ };
61345
61423
  return /*#__PURE__*/React.createElement("div", {
61346
61424
  "class": langdetect == 'en' ? sectionproperties.card_marginLeft != 0 ? 'row m-0 w-100 pl-sm-2' : sectionproperties.card_marginRight != 0 ? 'row m-0 w-100 pr-sm-2' : 'row m-0 w-100' : langdetect == 'en' ? sectionproperties.card_marginRight != 0 ? 'row m-0 w-100 pr-sm-2' : sectionproperties.card_marginLeft != 0 ? 'row m-0 w-100 pl-sm-2' : 'row m-0 w-100' : 'row m-0 w-100',
61347
61425
  style: {
@@ -61519,9 +61597,9 @@ var Card23 = function Card23(props) {
61519
61597
  }, "/"), sectionproperties.prodsalePriceshow == 'Show' && item.hassale == 1 && /*#__PURE__*/React.createElement("p", {
61520
61598
  "class": langdetect == 'en' ? "".concat(cardsstyles2.productSalePricestyles) + ' linethrough m-0 wordbreak d-flex mt-sm-auto mb-sm-auto text-right text-sm-left ' : "".concat(cardsstyles2.productSalePricestyles) + ' linethrough m-0 wordbreak d-flex mt-sm-auto mb-sm-auto text-left text-sm-right '
61521
61599
  }, langdetect == 'en' ? item.currencyname : '', " ", item.defaultprice, " ", langdetect == 'en' ? '' : item.currencyname)), /*#__PURE__*/React.createElement("div", {
61522
- "class": "d-flex align-items-center m-0"
61600
+ "class": "d-flex align-items-center m-0 flex-column w-100"
61523
61601
  }, sectionproperties.cartBtnShow == 'Show' && /*#__PURE__*/React.createElement("button", {
61524
- "class": "".concat(cardsstyles2.cart_btn) + ' allcentered ',
61602
+ "class": "".concat(cardsstyles2.cart_btn) + ' allcentered mt-3 ',
61525
61603
  onClick: function onClick() {
61526
61604
  setShowProductInfoModalContext(true);
61527
61605
  setProductIdProdutInfoModalContext(item.productid);
@@ -61552,7 +61630,17 @@ var Card23 = function Card23(props) {
61552
61630
  size: sectionproperties.cartBtn_iconFontSize
61553
61631
  })), /*#__PURE__*/React.createElement("p", {
61554
61632
  "class": "m-0 p-0"
61555
- }, langdetect == 'en' ? sectionproperties.cartBtnContentenglish : sectionproperties.cartBtnContentarabic))))))));
61633
+ }, langdetect == 'en' ? sectionproperties.cartBtnContentenglish : sectionproperties.cartBtnContentarabic))), sectionproperties.showbuynowbtn == 'Show' && /*#__PURE__*/React.createElement("button", {
61634
+ "class": "".concat(cardsstyles2.buynow) + ' allcentered mt-3 ',
61635
+ onClick: function onClick() {
61636
+ addtocartfunc('forcetocheckout');
61637
+ },
61638
+ disabled: AddtoCartMutationContext.isLoading == true ? true : false
61639
+ }, /*#__PURE__*/React.createElement("div", {
61640
+ "class": "d-flex align-items-center justify-content-center"
61641
+ }, /*#__PURE__*/React.createElement("p", {
61642
+ "class": "m-0 p-0"
61643
+ }, langdetect == 'en' ? 'Buy Now' : 'اشترى الان'))))))));
61556
61644
  };
61557
61645
 
61558
61646
  function ownKeys$w(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
package/dist/index.umd.js CHANGED
@@ -2104,7 +2104,7 @@
2104
2104
  function ownKeys$2q(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
2105
2105
  function _objectSpread$2q(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$2q(Object(t), !0).forEach(function (r) { _defineProperty__default["default"](e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$2q(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
2106
2106
  var Product_itemtype = function Product_itemtype(props) {
2107
- var _fetchProductInfoQuer2, _fetchProductInfoQuer3, _fetchProductInfoQuer4, _fetchProductInfoQuer5, _fetchProductInfoQuer6, _fetchProductInfoQuer7, _fetchProductInfoQuer8, _fetchProductInfoQuer9, _fetchProductInfoQuer10, _fetchProductInfoQuer11, _fetchProductInfoQuer12, _fetchProductInfoQuer13, _fetchProductInfoQuer14, _fetchProductInfoQuer15, _fetchProductInfoQuer16, _fetchProductInfoQuer17, _fetchProductInfoQuer18, _fetchProductInfoQuer19, _fetchProductInfoQuer20, _fetchProductInfoQuer21, _fetchProductInfoQuer22, _fetchProductInfoQuer23, _fetchProductInfoQuer25, _fetchProductInfoQuer26, _fetchProductInfoQuer27, _fetchProductInfoQuer29, _fetchProductInfoQuer30, _fetchProductInfoQuer31, _fetchProductInfoQuer32, _fetchProductInfoQuer33, _fetchProductInfoQuer34, _fetchProductInfoQuer35;
2107
+ var _fetchProductInfoQuer2, _fetchProductInfoQuer3, _fetchProductInfoQuer4, _fetchProductInfoQuer5, _fetchProductInfoQuer6, _fetchProductInfoQuer7, _fetchProductInfoQuer8, _fetchProductInfoQuer9, _fetchProductInfoQuer10, _fetchProductInfoQuer11, _fetchProductInfoQuer12, _fetchProductInfoQuer13, _fetchProductInfoQuer14, _fetchProductInfoQuer15, _fetchProductInfoQuer16, _fetchProductInfoQuer17, _fetchProductInfoQuer18, _fetchProductInfoQuer19, _fetchProductInfoQuer20, _fetchProductInfoQuer21, _fetchProductInfoQuer22, _fetchProductInfoQuer23, _fetchProductInfoQuer25, _fetchProductInfoQuer26, _fetchProductInfoQuer27, _fetchProductInfoQuer29, _fetchProductInfoQuer30, _fetchProductInfoQuer31, _fetchProductInfoQuer32, _fetchProductInfoQuer33, _fetchProductInfoQuer34, _fetchProductInfoQuer35, _fetchProductInfoQuer36;
2108
2108
  var lang = props.actions.lang;
2109
2109
  var langdetect = props.actions.langdetect;
2110
2110
  var srcfromprops = props.actions.srcfromprops;
@@ -2829,7 +2829,30 @@
2829
2829
  size: sectionproperties.favBtnIconfontsize
2830
2830
  }), sectionproperties.faviconshape == 'Heart Shape' && /*#__PURE__*/React__default["default"].createElement(FaRegHeart.FaRegHeart, {
2831
2831
  size: sectionproperties.favBtnIconfontsize
2832
- })))))))), sectionproperties.productInformationType == 'Product/Service Information' && (fetchProductInfoQueryContext === null || fetchProductInfoQueryContext === void 0 || (_fetchProductInfoQuer31 = fetchProductInfoQueryContext.data) === null || _fetchProductInfoQuer31 === void 0 || (_fetchProductInfoQuer31 = _fetchProductInfoQuer31.data) === null || _fetchProductInfoQuer31 === void 0 || (_fetchProductInfoQuer31 = _fetchProductInfoQuer31.productinfo) === null || _fetchProductInfoQuer31 === void 0 ? void 0 : _fetchProductInfoQuer31.isproducttobesold) == 1 && sectionproperties.showtotalsection == 'Show' && /*#__PURE__*/React__default["default"].createElement("div", {
2832
+ }))))), sectionproperties.cartbtnalone == 'Alone' && sectionproperties.showbuynowbtn == 'Show' && (fetchProductInfoQueryContext === null || fetchProductInfoQueryContext === void 0 || (_fetchProductInfoQuer31 = fetchProductInfoQueryContext.data) === null || _fetchProductInfoQuer31 === void 0 || (_fetchProductInfoQuer31 = _fetchProductInfoQuer31.data) === null || _fetchProductInfoQuer31 === void 0 || (_fetchProductInfoQuer31 = _fetchProductInfoQuer31.productinfo) === null || _fetchProductInfoQuer31 === void 0 ? void 0 : _fetchProductInfoQuer31.isproducttobesold) == 1 && /*#__PURE__*/React__default["default"].createElement("div", {
2833
+ "class": "row m-0 w-100 mt-3",
2834
+ style: {
2835
+ overflow: 'hidden'
2836
+ }
2837
+ }, /*#__PURE__*/React__default["default"].createElement("button", {
2838
+ className: "".concat(productinfo_cssstyles.cart_btn, " ") + ' d-flex align-items-center justify-content-center mb-sm-2 ',
2839
+ style: {
2840
+ width: sectionproperties.cartBtnWidth + '%'
2841
+ },
2842
+ onClick: function onClick() {
2843
+ addtocartfunc('forcetocheckout');
2844
+ },
2845
+ disabled: AddtoCartMutationContext.isLoading == true ? true : false
2846
+ }, !AddtoCartMutationContext.isLoading && /*#__PURE__*/React__default["default"].createElement("span", {
2847
+ className: ' d-flex align-items-center justify-content-center '
2848
+ }, langdetect == 'en' ? 'Buy Now' : 'إشترى الان'), AddtoCartMutationContext.isLoading && /*#__PURE__*/React__default["default"].createElement("div", {
2849
+ className: ' d-flex align-items-center justify-content-center '
2850
+ }, /*#__PURE__*/React__default["default"].createElement(reactCssfxLoading.CircularProgress, {
2851
+ color: "white",
2852
+ width: "20px",
2853
+ height: "20px",
2854
+ duration: "1s"
2855
+ }))))))), sectionproperties.productInformationType == 'Product/Service Information' && (fetchProductInfoQueryContext === null || fetchProductInfoQueryContext === void 0 || (_fetchProductInfoQuer32 = fetchProductInfoQueryContext.data) === null || _fetchProductInfoQuer32 === void 0 || (_fetchProductInfoQuer32 = _fetchProductInfoQuer32.data) === null || _fetchProductInfoQuer32 === void 0 || (_fetchProductInfoQuer32 = _fetchProductInfoQuer32.productinfo) === null || _fetchProductInfoQuer32 === void 0 ? void 0 : _fetchProductInfoQuer32.isproducttobesold) == 1 && sectionproperties.showtotalsection == 'Show' && /*#__PURE__*/React__default["default"].createElement("div", {
2833
2856
  className: "col-lg-12 p-0 mb-3"
2834
2857
  }, /*#__PURE__*/React__default["default"].createElement("div", {
2835
2858
  className: "row m-0 w-100 d-flex flex-row"
@@ -2852,7 +2875,7 @@
2852
2875
  }
2853
2876
  }, /*#__PURE__*/React__default["default"].createElement("span", {
2854
2877
  className: langdetect == 'en' ? ' d-flex align-items-center justify-content-end wordbreak text-right ' : ' d-flex align-items-center justify-content-end wordbreak text-left '
2855
- }, langdetect == 'en' ? authdetailsContext === null || authdetailsContext === void 0 ? void 0 : authdetailsContext.currencyname_en : '', ' ', variantindexcompleted != undefined && variantindexcompleted.length == 0 && fetchProductInfoQueryContext.data.data.productinfo.hassale == 0 && parseFloat(getprice_discountpriceprops('defaultprice', 1, variantindexcompleted)).toFixed(2), variantindexcompleted != undefined && variantindexcompleted.length == 0 && fetchProductInfoQueryContext.data.data.productinfo.hassale == 1 && parseFloat(getprice_discountpriceprops('defaultsaleprice', 1, variantindexcompleted)).toFixed(2), variantindexcompleted != undefined && variantindexcompleted.length != 0 && (fetchProductInfoQueryContext === null || fetchProductInfoQueryContext === void 0 || (_fetchProductInfoQuer32 = fetchProductInfoQueryContext.data) === null || _fetchProductInfoQuer32 === void 0 || (_fetchProductInfoQuer32 = _fetchProductInfoQuer32.data) === null || _fetchProductInfoQuer32 === void 0 || (_fetchProductInfoQuer32 = _fetchProductInfoQuer32.productinfo) === null || _fetchProductInfoQuer32 === void 0 || (_fetchProductInfoQuer32 = _fetchProductInfoQuer32.variants[variantindexcompleted]) === null || _fetchProductInfoQuer32 === void 0 ? void 0 : _fetchProductInfoQuer32.hassale) == 1 && parseFloat(getprice_discountpriceprops('defaultsaleprice', 1, variantindexcompleted)).toFixed(2), variantindexcompleted != undefined && variantindexcompleted.length != 0 && (fetchProductInfoQueryContext === null || fetchProductInfoQueryContext === void 0 || (_fetchProductInfoQuer33 = fetchProductInfoQueryContext.data) === null || _fetchProductInfoQuer33 === void 0 || (_fetchProductInfoQuer33 = _fetchProductInfoQuer33.data) === null || _fetchProductInfoQuer33 === void 0 || (_fetchProductInfoQuer33 = _fetchProductInfoQuer33.productinfo) === null || _fetchProductInfoQuer33 === void 0 || (_fetchProductInfoQuer33 = _fetchProductInfoQuer33.variants[variantindexcompleted]) === null || _fetchProductInfoQuer33 === void 0 ? void 0 : _fetchProductInfoQuer33.hassale) == 0 && parseFloat(getprice_discountpriceprops('defaultprice', 1, variantindexcompleted)).toFixed(2), langdetect == 'en' ? '' : authdetailsContext === null || authdetailsContext === void 0 ? void 0 : authdetailsContext.currencyname_ar)), /*#__PURE__*/React__default["default"].createElement("p", {
2878
+ }, langdetect == 'en' ? authdetailsContext === null || authdetailsContext === void 0 ? void 0 : authdetailsContext.currencyname_en : '', ' ', variantindexcompleted != undefined && variantindexcompleted.length == 0 && fetchProductInfoQueryContext.data.data.productinfo.hassale == 0 && parseFloat(getprice_discountpriceprops('defaultprice', 1, variantindexcompleted)).toFixed(2), variantindexcompleted != undefined && variantindexcompleted.length == 0 && fetchProductInfoQueryContext.data.data.productinfo.hassale == 1 && parseFloat(getprice_discountpriceprops('defaultsaleprice', 1, variantindexcompleted)).toFixed(2), variantindexcompleted != undefined && variantindexcompleted.length != 0 && (fetchProductInfoQueryContext === null || fetchProductInfoQueryContext === void 0 || (_fetchProductInfoQuer33 = fetchProductInfoQueryContext.data) === null || _fetchProductInfoQuer33 === void 0 || (_fetchProductInfoQuer33 = _fetchProductInfoQuer33.data) === null || _fetchProductInfoQuer33 === void 0 || (_fetchProductInfoQuer33 = _fetchProductInfoQuer33.productinfo) === null || _fetchProductInfoQuer33 === void 0 || (_fetchProductInfoQuer33 = _fetchProductInfoQuer33.variants[variantindexcompleted]) === null || _fetchProductInfoQuer33 === void 0 ? void 0 : _fetchProductInfoQuer33.hassale) == 1 && parseFloat(getprice_discountpriceprops('defaultsaleprice', 1, variantindexcompleted)).toFixed(2), variantindexcompleted != undefined && variantindexcompleted.length != 0 && (fetchProductInfoQueryContext === null || fetchProductInfoQueryContext === void 0 || (_fetchProductInfoQuer34 = fetchProductInfoQueryContext.data) === null || _fetchProductInfoQuer34 === void 0 || (_fetchProductInfoQuer34 = _fetchProductInfoQuer34.data) === null || _fetchProductInfoQuer34 === void 0 || (_fetchProductInfoQuer34 = _fetchProductInfoQuer34.productinfo) === null || _fetchProductInfoQuer34 === void 0 || (_fetchProductInfoQuer34 = _fetchProductInfoQuer34.variants[variantindexcompleted]) === null || _fetchProductInfoQuer34 === void 0 ? void 0 : _fetchProductInfoQuer34.hassale) == 0 && parseFloat(getprice_discountpriceprops('defaultprice', 1, variantindexcompleted)).toFixed(2), langdetect == 'en' ? '' : authdetailsContext === null || authdetailsContext === void 0 ? void 0 : authdetailsContext.currencyname_ar)), /*#__PURE__*/React__default["default"].createElement("p", {
2856
2879
  className: 'm-0 p-0 linethrough wordbreak',
2857
2880
  style: {
2858
2881
  color: sectionproperties.prodsalePriceColor,
@@ -2866,14 +2889,14 @@
2866
2889
  style: {
2867
2890
  textDecoration: 'none'
2868
2891
  }
2869
- }, "-"), langdetect == 'en' ? authdetailsContext === null || authdetailsContext === void 0 ? void 0 : authdetailsContext.currencyname_en : '', ' ', parseFloat(getprice_discountpriceprops('defaultprice', 1, variantindexcompleted)), ' ', langdetect == 'en' ? '' : authdetailsContext === null || authdetailsContext === void 0 ? void 0 : authdetailsContext.currencyname_ar), variantindexcompleted != undefined && variantindexcompleted.length != 0 && (fetchProductInfoQueryContext === null || fetchProductInfoQueryContext === void 0 || (_fetchProductInfoQuer34 = fetchProductInfoQueryContext.data) === null || _fetchProductInfoQuer34 === void 0 || (_fetchProductInfoQuer34 = _fetchProductInfoQuer34.data) === null || _fetchProductInfoQuer34 === void 0 || (_fetchProductInfoQuer34 = _fetchProductInfoQuer34.productinfo) === null || _fetchProductInfoQuer34 === void 0 || (_fetchProductInfoQuer34 = _fetchProductInfoQuer34.variants[variantindexcompleted]) === null || _fetchProductInfoQuer34 === void 0 ? void 0 : _fetchProductInfoQuer34.hassale) == 1 && /*#__PURE__*/React__default["default"].createElement("span", {
2892
+ }, "-"), langdetect == 'en' ? authdetailsContext === null || authdetailsContext === void 0 ? void 0 : authdetailsContext.currencyname_en : '', ' ', parseFloat(getprice_discountpriceprops('defaultprice', 1, variantindexcompleted)), ' ', langdetect == 'en' ? '' : authdetailsContext === null || authdetailsContext === void 0 ? void 0 : authdetailsContext.currencyname_ar), variantindexcompleted != undefined && variantindexcompleted.length != 0 && (fetchProductInfoQueryContext === null || fetchProductInfoQueryContext === void 0 || (_fetchProductInfoQuer35 = fetchProductInfoQueryContext.data) === null || _fetchProductInfoQuer35 === void 0 || (_fetchProductInfoQuer35 = _fetchProductInfoQuer35.data) === null || _fetchProductInfoQuer35 === void 0 || (_fetchProductInfoQuer35 = _fetchProductInfoQuer35.productinfo) === null || _fetchProductInfoQuer35 === void 0 || (_fetchProductInfoQuer35 = _fetchProductInfoQuer35.variants[variantindexcompleted]) === null || _fetchProductInfoQuer35 === void 0 ? void 0 : _fetchProductInfoQuer35.hassale) == 1 && /*#__PURE__*/React__default["default"].createElement("span", {
2870
2893
  className: langdetect == 'en' ? ' d-flex align-items-center justify-content-end wordbreak text-right wordbreak ' : ' d-flex align-items-center justify-content-end wordbreak text-left wordbreak '
2871
2894
  }, /*#__PURE__*/React__default["default"].createElement("span", {
2872
2895
  className: "ml-2 mr-2",
2873
2896
  style: {
2874
2897
  textDecoration: 'none'
2875
2898
  }
2876
- }, "-"), langdetect == 'en' ? authdetailsContext === null || authdetailsContext === void 0 ? void 0 : authdetailsContext.currencyname_en : '', ' ', parseFloat(getprice_discountpriceprops('defaultprice', 1, variantindexcompleted)), ' ', langdetect == 'en' ? '' : authdetailsContext === null || authdetailsContext === void 0 ? void 0 : authdetailsContext.currencyname_ar))))), sectionproperties.availabilitybtnposition == 'Bottom' && sectionproperties.show_availability == 'Show' && (fetchProductInfoQueryContext === null || fetchProductInfoQueryContext === void 0 || (_fetchProductInfoQuer35 = fetchProductInfoQueryContext.data) === null || _fetchProductInfoQuer35 === void 0 || (_fetchProductInfoQuer35 = _fetchProductInfoQuer35.data) === null || _fetchProductInfoQuer35 === void 0 || (_fetchProductInfoQuer35 = _fetchProductInfoQuer35.productinfo) === null || _fetchProductInfoQuer35 === void 0 ? void 0 : _fetchProductInfoQuer35.isproducttobesold) == 1 && /*#__PURE__*/React__default["default"].createElement("div", {
2899
+ }, "-"), langdetect == 'en' ? authdetailsContext === null || authdetailsContext === void 0 ? void 0 : authdetailsContext.currencyname_en : '', ' ', parseFloat(getprice_discountpriceprops('defaultprice', 1, variantindexcompleted)), ' ', langdetect == 'en' ? '' : authdetailsContext === null || authdetailsContext === void 0 ? void 0 : authdetailsContext.currencyname_ar))))), sectionproperties.availabilitybtnposition == 'Bottom' && sectionproperties.show_availability == 'Show' && (fetchProductInfoQueryContext === null || fetchProductInfoQueryContext === void 0 || (_fetchProductInfoQuer36 = fetchProductInfoQueryContext.data) === null || _fetchProductInfoQuer36 === void 0 || (_fetchProductInfoQuer36 = _fetchProductInfoQuer36.data) === null || _fetchProductInfoQuer36 === void 0 || (_fetchProductInfoQuer36 = _fetchProductInfoQuer36.productinfo) === null || _fetchProductInfoQuer36 === void 0 ? void 0 : _fetchProductInfoQuer36.isproducttobesold) == 1 && /*#__PURE__*/React__default["default"].createElement("div", {
2877
2900
  className: "col-lg-12 p-0 mb-3 mt-2"
2878
2901
  }, /*#__PURE__*/React__default["default"].createElement("div", {
2879
2902
  style: {
@@ -4966,8 +4989,9 @@
4966
4989
  // queryClient.setQueryData('fetchProductInfo_API' + JSON.stringify(fetchproductinfoObjContext), productarr);
4967
4990
  setProductInfoObj(_objectSpread$2m({}, productarr));
4968
4991
  };
4969
- var addtocartfunc = function addtocartfunc() {
4992
+ var addtocartfunc = function addtocartfunc(forcetocheckout) {
4970
4993
  var runfunc = false;
4994
+ var forcetocheckoutvalue = forcetocheckout;
4971
4995
  if (addtocardpayloadobj.productid.length != 0 && addtocardpayloadobj.quantity > 0) {
4972
4996
  var _fetchProductInfoQuer6;
4973
4997
  if ((fetchProductInfoQueryContext === null || fetchProductInfoQueryContext === void 0 || (_fetchProductInfoQuer6 = fetchProductInfoQueryContext.data) === null || _fetchProductInfoQuer6 === void 0 || (_fetchProductInfoQuer6 = _fetchProductInfoQuer6.data) === null || _fetchProductInfoQuer6 === void 0 || (_fetchProductInfoQuer6 = _fetchProductInfoQuer6.productinfo) === null || _fetchProductInfoQuer6 === void 0 ? void 0 : _fetchProductInfoQuer6.hasvariants) == 1) {
@@ -4987,6 +5011,9 @@
4987
5011
  var tempaddtocardpayloadobj = _objectSpread$2m({}, addtocardpayloadobj);
4988
5012
  tempaddtocardpayloadobj.isproductforcedtocheckout = fetchProductInfoQueryContext === null || fetchProductInfoQueryContext === void 0 || (_fetchProductInfoQuer7 = fetchProductInfoQueryContext.data) === null || _fetchProductInfoQuer7 === void 0 || (_fetchProductInfoQuer7 = _fetchProductInfoQuer7.data) === null || _fetchProductInfoQuer7 === void 0 || (_fetchProductInfoQuer7 = _fetchProductInfoQuer7.productinfo) === null || _fetchProductInfoQuer7 === void 0 ? void 0 : _fetchProductInfoQuer7.isproductforcedtocheckout;
4989
5013
  tempaddtocardpayloadobj.vendorid = fetchProductInfoQueryContext === null || fetchProductInfoQueryContext === void 0 || (_fetchProductInfoQuer8 = fetchProductInfoQueryContext.data) === null || _fetchProductInfoQuer8 === void 0 || (_fetchProductInfoQuer8 = _fetchProductInfoQuer8.data) === null || _fetchProductInfoQuer8 === void 0 || (_fetchProductInfoQuer8 = _fetchProductInfoQuer8.productinfo) === null || _fetchProductInfoQuer8 === void 0 ? void 0 : _fetchProductInfoQuer8.vendorproviderid;
5014
+ if (forcetocheckoutvalue != undefined) {
5015
+ tempaddtocardpayloadobj.forcetocheckoutvalue = forcetocheckoutvalue;
5016
+ }
4990
5017
  var Extrafieldvalidationresponse = validateextrafields();
4991
5018
  if (Extrafieldvalidationresponse.status) {
4992
5019
  var _fetchProductInfoQuer9, _fetchProductInfoQuer10, _fetchProductInfoQuer11, _fetchProductInfoQuer12, _fetchProductInfoQuer13, _fetchProductInfoQuer14;
@@ -15025,6 +15052,7 @@
15025
15052
  _useState14 = _slicedToArray__default["default"](_useState13, 2),
15026
15053
  perpageItems = _useState14[0],
15027
15054
  setperpageItems = _useState14[1];
15055
+ var AddtoCartMutationContext = props.actions.AddtoCartMutationContext;
15028
15056
  React.useEffect(function () {
15029
15057
  var productfilerobjtemp = ProductFilterObjContext;
15030
15058
  if (props.filterparamsprops != undefined) {
@@ -15320,6 +15348,7 @@
15320
15348
  cardobj.productcashbackvalue = arrayItem.productinfo.productcashbackvalue;
15321
15349
  cardobj.product_phonenumber = arrayItem.productinfo.product_phonenumber;
15322
15350
  cardobj.productcanrate = arrayItem.productinfo.productcanrate;
15351
+ cardobj.sku = arrayItem.productinfo.sku;
15323
15352
  if (langdetect == 'en') {
15324
15353
  cardobj.currencyname = fetchAuthorizationQueryContext === null || fetchAuthorizationQueryContext === void 0 ? void 0 : fetchAuthorizationQueryContext.data.data.currencyname_en;
15325
15354
  } else {
@@ -15882,7 +15911,8 @@
15882
15911
  sectionindexprops: index,
15883
15912
  sectionidprops: item.sectionid,
15884
15913
  actions: actions,
15885
- fontFamilyprops: sectionproperties.sectiontitlefontfamily == 'ASUL' ? 'ASUL' : ''
15914
+ fontFamilyprops: sectionproperties.sectiontitlefontfamily == 'ASUL' ? 'ASUL' : '',
15915
+ AddtoCartMutationContext: AddtoCartMutationContext
15886
15916
  }));
15887
15917
  } else if (sectionproperties.overallnumberofcards != 0) {
15888
15918
  if (cardinfoindex < sectionproperties.overallnumberofcards) {
@@ -15896,7 +15926,8 @@
15896
15926
  sectionindexprops: index,
15897
15927
  sectionidprops: item.sectionid,
15898
15928
  actions: actions,
15899
- fontFamilyprops: sectionproperties.sectiontitlefontfamily == 'ASUL' ? 'ASUL' : ''
15929
+ fontFamilyprops: sectionproperties.sectiontitlefontfamily == 'ASUL' ? 'ASUL' : '',
15930
+ AddtoCartMutationContext: AddtoCartMutationContext
15900
15931
  }));
15901
15932
  }
15902
15933
  }
@@ -16084,7 +16115,8 @@
16084
16115
  sectionidprops: item.sectionid,
16085
16116
  actions: actions,
16086
16117
  fontFamilyprops: sectionproperties.sectiontitlefontfamily == 'ASUL' ? 'ASUL' : '',
16087
- numberOfColsvertical: sectionproperties.numberOfColsvertical
16118
+ numberOfColsvertical: sectionproperties.numberOfColsvertical,
16119
+ AddtoCartMutationContext: AddtoCartMutationContext
16088
16120
  }));
16089
16121
  } else if (sectionproperties.overallnumberofcards != 0) {
16090
16122
  if (cardinfoindex < sectionproperties.overallnumberofcards) {
@@ -16100,7 +16132,8 @@
16100
16132
  sectionidprops: item.sectionid,
16101
16133
  actions: actions,
16102
16134
  fontFamilyprops: sectionproperties.sectiontitlefontfamily == 'ASUL' ? 'ASUL' : '',
16103
- numberOfColsvertical: sectionproperties.numberOfColsvertical
16135
+ numberOfColsvertical: sectionproperties.numberOfColsvertical,
16136
+ AddtoCartMutationContext: AddtoCartMutationContext
16104
16137
  }));
16105
16138
  }
16106
16139
  }
@@ -43621,7 +43654,7 @@
43621
43654
  onClick: function onClick() {
43622
43655
  routingcountext(StaticPagesLinksContext.Wishlist);
43623
43656
  }
43624
- }, langdetect == 'en' ? sectionproperties.wishlisttitle_en : sectionproperties.previousorders_titlear)), authdetailsContext.loggedin && /*#__PURE__*/React__default["default"].createElement("div", {
43657
+ }, langdetect == 'en' ? sectionproperties.wishlisttitle_en : sectionproperties.wishlisttitle_ar)), authdetailsContext.loggedin && /*#__PURE__*/React__default["default"].createElement("div", {
43625
43658
  "class": "col-lg-12 col-md-12 col-sm-12 p-0 d-flex mb-1"
43626
43659
  }, /*#__PURE__*/React__default["default"].createElement("p", {
43627
43660
  "class": "".concat(footerStyles.subPages) + ' wordbreak m-0 p-0 ',
@@ -43766,7 +43799,7 @@
43766
43799
  objectFit: 'contain'
43767
43800
  },
43768
43801
  loading: "lazy"
43769
- }))), /*#__PURE__*/React__default["default"].createElement("div", {
43802
+ }))), sectionproperties.showfooterdescription == 'Show' && /*#__PURE__*/React__default["default"].createElement("div", {
43770
43803
  "class": "col-lg-12 p-0 d-flex justify-content-start justify-content-md-start"
43771
43804
  }, /*#__PURE__*/React__default["default"].createElement("p", {
43772
43805
  className: "".concat(footerStyles.textStyles) + ' wordbreak wordbreak3 text-center p-0 mb-4 '
@@ -60917,6 +60950,7 @@
60917
60950
  _useState4 = _slicedToArray__default["default"](_useState3, 2),
60918
60951
  item = _useState4[0],
60919
60952
  setitem = _useState4[1];
60953
+ var AddtoCartMutationContext = props.AddtoCartMutationContext;
60920
60954
  var _useState5 = React.useState(''),
60921
60955
  _useState6 = _slicedToArray__default["default"](_useState5, 2),
60922
60956
  secondimage = _useState6[0],
@@ -61038,7 +61072,7 @@
61038
61072
  }
61039
61073
  }),
61040
61074
  cart_btn: glamor.css({
61041
- width: sectionproperties.cartBtnWidth + 'px',
61075
+ width: sectionproperties.cartBtnWidth + '%',
61042
61076
  height: sectionproperties.cartBtnHeight + 'px',
61043
61077
  background: sectionproperties.cartbtn_bgtransparent == 'Transparent' ? 'transparent' : sectionproperties.cartBtnbgColor,
61044
61078
  borderRadius: sectionproperties.cart_btn_borderBottomLeftRadius + 'px',
@@ -61053,6 +61087,23 @@
61053
61087
  borderColor: sectionproperties.cartBtnTextcoloronhover
61054
61088
  }
61055
61089
  }),
61090
+ buynow: glamor.css({
61091
+ width: sectionproperties.cartBtnWidth + '%',
61092
+ height: sectionproperties.cartBtnHeight + 'px',
61093
+ background: sectionproperties.cartBtnTextcolor,
61094
+ borderRadius: sectionproperties.cart_btn_borderBottomLeftRadius + 'px',
61095
+ color: 'white',
61096
+ fontSize: sectionproperties.cartBtnTextfontsize + 'px',
61097
+ fontWeight: sectionproperties.cartBtnTextfontweight,
61098
+ // border: sectionproperties.cartbtnborderwidth + 'px solid ' + sectionproperties.cartbtnbordercolor,
61099
+ transition: '.3s',
61100
+ ':hover': {
61101
+ background: sectionproperties.cartBtnTextcoloronhover,
61102
+ color: 'white'
61103
+ // borderColor: sectionproperties.cartBtnTextcoloronhover,
61104
+ }
61105
+ }),
61106
+
61056
61107
  iconsContainer: glamor.css({
61057
61108
  display: 'flex',
61058
61109
  flexDirection: 'column',
@@ -61223,6 +61274,33 @@
61223
61274
  "class": "m-0 p-0"
61224
61275
  }, langdetect == 'en' ? sectionproperties.outstock_contenten : sectionproperties.outstock_contentar)));
61225
61276
  };
61277
+ var _useState9 = React.useState(''),
61278
+ _useState10 = _slicedToArray__default["default"](_useState9, 2),
61279
+ addtocardpayloadobj = _useState10[0];
61280
+ _useState10[1];
61281
+ var AddtoCartContext = props.actions.AddtoCartContext;
61282
+ var addtocartfunc = function addtocartfunc(forcetocheckout) {
61283
+ var forcetocheckoutvalue = forcetocheckout;
61284
+ var tempaddtocardpayloadobj = _objectSpread$x({}, addtocardpayloadobj);
61285
+ tempaddtocardpayloadobj.productid = item.productid;
61286
+ tempaddtocardpayloadobj.functype = 'add';
61287
+ tempaddtocardpayloadobj.item_type = 'product';
61288
+ tempaddtocardpayloadobj.quantity = 1;
61289
+ if (forcetocheckoutvalue != undefined) {
61290
+ tempaddtocardpayloadobj.forcetocheckoutvalue = forcetocheckoutvalue;
61291
+ }
61292
+
61293
+ // Pixel_EventsContext('AddToCart', {
61294
+ // content_ids: [item.productid],
61295
+ // content_name: item.name_en + ' - ' + item.name_ar,
61296
+ // content_sku: item.sku,
61297
+ // content_type: 'product',
61298
+ // currency: item.currencyname_en,
61299
+ // value: item.defaultprice,
61300
+ // quantity: 1,
61301
+ // });
61302
+ AddtoCartContext(tempaddtocardpayloadobj);
61303
+ };
61226
61304
  return /*#__PURE__*/React__default["default"].createElement("div", {
61227
61305
  "class": langdetect == 'en' ? sectionproperties.card_marginLeft != 0 ? 'row m-0 w-100 pl-sm-2' : sectionproperties.card_marginRight != 0 ? 'row m-0 w-100 pr-sm-2' : 'row m-0 w-100' : langdetect == 'en' ? sectionproperties.card_marginRight != 0 ? 'row m-0 w-100 pr-sm-2' : sectionproperties.card_marginLeft != 0 ? 'row m-0 w-100 pl-sm-2' : 'row m-0 w-100' : 'row m-0 w-100',
61228
61306
  style: {
@@ -61400,9 +61478,9 @@
61400
61478
  }, "/"), sectionproperties.prodsalePriceshow == 'Show' && item.hassale == 1 && /*#__PURE__*/React__default["default"].createElement("p", {
61401
61479
  "class": langdetect == 'en' ? "".concat(cardsstyles2.productSalePricestyles) + ' linethrough m-0 wordbreak d-flex mt-sm-auto mb-sm-auto text-right text-sm-left ' : "".concat(cardsstyles2.productSalePricestyles) + ' linethrough m-0 wordbreak d-flex mt-sm-auto mb-sm-auto text-left text-sm-right '
61402
61480
  }, langdetect == 'en' ? item.currencyname : '', " ", item.defaultprice, " ", langdetect == 'en' ? '' : item.currencyname)), /*#__PURE__*/React__default["default"].createElement("div", {
61403
- "class": "d-flex align-items-center m-0"
61481
+ "class": "d-flex align-items-center m-0 flex-column w-100"
61404
61482
  }, sectionproperties.cartBtnShow == 'Show' && /*#__PURE__*/React__default["default"].createElement("button", {
61405
- "class": "".concat(cardsstyles2.cart_btn) + ' allcentered ',
61483
+ "class": "".concat(cardsstyles2.cart_btn) + ' allcentered mt-3 ',
61406
61484
  onClick: function onClick() {
61407
61485
  setShowProductInfoModalContext(true);
61408
61486
  setProductIdProdutInfoModalContext(item.productid);
@@ -61433,7 +61511,17 @@
61433
61511
  size: sectionproperties.cartBtn_iconFontSize
61434
61512
  })), /*#__PURE__*/React__default["default"].createElement("p", {
61435
61513
  "class": "m-0 p-0"
61436
- }, langdetect == 'en' ? sectionproperties.cartBtnContentenglish : sectionproperties.cartBtnContentarabic))))))));
61514
+ }, langdetect == 'en' ? sectionproperties.cartBtnContentenglish : sectionproperties.cartBtnContentarabic))), sectionproperties.showbuynowbtn == 'Show' && /*#__PURE__*/React__default["default"].createElement("button", {
61515
+ "class": "".concat(cardsstyles2.buynow) + ' allcentered mt-3 ',
61516
+ onClick: function onClick() {
61517
+ addtocartfunc('forcetocheckout');
61518
+ },
61519
+ disabled: AddtoCartMutationContext.isLoading == true ? true : false
61520
+ }, /*#__PURE__*/React__default["default"].createElement("div", {
61521
+ "class": "d-flex align-items-center justify-content-center"
61522
+ }, /*#__PURE__*/React__default["default"].createElement("p", {
61523
+ "class": "m-0 p-0"
61524
+ }, langdetect == 'en' ? 'Buy Now' : 'اشترى الان'))))))));
61437
61525
  };
61438
61526
 
61439
61527
  function ownKeys$w(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tabexseriescomponents",
3
- "version": "0.0.407",
3
+ "version": "0.0.409",
4
4
  "description": "your description",
5
5
  "main": "dist/index.cjs.js",
6
6
  "scripts": {