tabexseriescomponents 0.0.64 → 0.0.66
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 +25023 -16634
- package/dist/index.esm.js +25033 -16645
- package/dist/index.umd.js +24824 -16437
- package/package.json +1 -1
- package/src1-10/Contexts/LanguageContext.jsx +347 -0
- package/src1-10/Contexts/ProductsCardsSectionContext.jsx +28 -0
- package/src1-10/StylesJS/Customstyles.js +235 -0
- package/src1-10/TabexComponents/Cards/CategoryCardwithhoveraction/CategoryCardwithhoveraction.jsx +205 -0
- package/src1-10/TabexComponents/Cards/Categorycard_fullimage/Categorycard_fullimage.jsx +239 -0
- package/src1-10/TabexComponents/Cards/Categorycard_slidebgscaled/Categorycard_slidebgscaled.jsx +198 -0
- package/src1-10/TabexComponents/Cards/Categorycard_with_trianglebg/Categorycard_with_trianglebg.jsx +169 -0
- package/src1-10/TabexComponents/Cards/Categorycard_with_twolinestransition/Categorycard_with_twolinestransition.jsx +180 -0
- package/src1-10/TabexComponents/Cards/Categorycard_withshapes/Categorycard_withshapes.jsx +162 -0
- package/src1-10/TabexComponents/Cards/Categorycard_withtext/Categorycard_withtext.jsx +184 -0
- package/src1-10/TabexComponents/Cards/Classiccategorycard/Classiccategorycard.jsx +149 -0
- package/src1-10/TabexComponents/Cards/Horizontalcard/Horizontalcard.jsx +271 -0
- package/src1-10/TabexComponents/Cards/MenuCard/MenuCard.jsx +546 -0
- package/src1-10/TabexComponents/Cards/ModernProductCard/ModernProductCard.jsx +474 -0
- package/src1-10/TabexComponents/Cards/Productcard6/Productcard6.jsx +290 -0
- package/src1-10/TabexComponents/Cards/Productcard7/Productcard7.jsx +278 -0
- package/src1-10/TabexComponents/Cards/Productcard_animatedbuttons/Productcard_animatedbuttons.jsx +293 -0
- package/src1-10/TabexComponents/Cards/Productcard_with_circularbg/Productcard_with_circularbg.jsx +278 -0
- package/src1-10/TabexComponents/Cards/Productcard_with_circularhover/Productcard_with_circularhover.jsx +312 -0
- package/src1-10/TabexComponents/Cards/Productcard_with_slideanimation/Productcard_with_slideanimation.jsx +279 -0
- package/src1-10/TabexComponents/Cards/Productcard_with_variants/Productcard_with_variants.jsx +293 -0
- package/src1-10/TabexComponents/Cards/Productcard_with_zoominonhover/Productcard_with_zoominonhover.jsx +456 -0
- package/src1-10/TabexComponents/Cards/Productcarddefault/Productcarddefault.jsx +272 -0
- package/src1-10/TabexComponents/Cards/Productccard_with_imageontopleft/Productccard_with_imageontopleft.jsx +286 -0
- package/src1-10/TabexComponents/Cards/Prouductcard_with_zoomhover/Prouductcard_with_zoomhover.jsx +127 -0
- package/src1-10/TabexComponents/Cards/Simplecategorycardwithtextbelow/Simplecategorycardwithtextbelow.jsx +126 -0
- package/src1-10/TabexComponents/Cards/Simpleproductcard/Simpleproductcard.jsx +292 -0
- package/src1-10/TabexComponents/Cards/StylishProductCard/StylishProductCard.jsx +281 -0
- package/src1-10/TabexComponents/Footer/Footer1/Footer1.jsx +418 -0
- package/src1-10/TabexComponents/Footer/Footer2/Footer2.jsx +381 -0
- package/src1-10/TabexComponents/Footer/Footer3/Footer3.jsx +316 -0
- package/src1-10/TabexComponents/Footer/Footer4/Footer4.jsx +437 -0
- package/src1-10/TabexComponents/Footer/Footer5/Footer5.jsx +488 -0
- package/src1-10/TabexComponents/Footer/Footer6/Footer6.jsx +286 -0
- package/src1-10/TabexComponents/Footer/Footer7/Footer7.jsx +370 -0
- package/src1-10/TabexComponents/Footer/Simplefooter/Simplefooter.jsx +231 -0
- package/src1-10/TabexComponents/Generalfiles/images/egyptflag.png +0 -0
- package/src1-10/TabexComponents/Generalfiles/images/noimage.png +0 -0
- package/src1-10/TabexComponents/Generalfiles/images/payment/cod.png +0 -0
- package/src1-10/TabexComponents/Generalfiles/images/payment/fawry.png +0 -0
- package/src1-10/TabexComponents/Generalfiles/images/payment/payment.png +0 -0
- package/src1-10/TabexComponents/Generalfiles/images/payment/paymob.png +0 -0
- package/src1-10/TabexComponents/Generalfiles/images/payment/paypal.png +0 -0
- package/src1-10/TabexComponents/Generalfiles/images/payment/visa.png +0 -0
- package/src1-10/TabexComponents/Generalfiles/images/shoppingcart.png +0 -0
- package/src1-10/TabexComponents/Generalfiles/images/tabexlogo.png +0 -0
- package/src1-10/TabexComponents/Generalfiles/images/unknownmaleuser.png +0 -0
- package/src1-10/TabexComponents/Generalfiles/images/usflag.png +0 -0
- package/src1-10/TabexComponents/Generalfiles/images/whatsapp.png +0 -0
- package/src1-10/TabexComponents/Headers/AllinoneHeader/AllinoneHeader.jsx +722 -0
- package/src1-10/TabexComponents/Headers/ClassicHeader/ClassicHeader.jsx +681 -0
- package/src1-10/TabexComponents/Headers/Header4/Header4.jsx +614 -0
- package/src1-10/TabexComponents/Headers/Header6/Header6.jsx +666 -0
- package/src1-10/TabexComponents/Headers/Header8/Header8.jsx +888 -0
- package/src1-10/TabexComponents/Headers/HeaderRestaurant/HeaderRestaurant.jsx +710 -0
- package/src1-10/TabexComponents/Headers/Header_threesectionslogocentered/Header_threesectionslogocentered.jsx +769 -0
- package/src1-10/TabexComponents/Headers/Headerresponsive/Headerresponsive.jsx +666 -0
- package/src1-10/TabexComponents/Headers/HeaderwithContactinfo/HeaderwithContactinfo.jsx +940 -0
- package/src1-10/TabexComponents/Headers/Modernheader/Modernheader.jsx +714 -0
- package/src1-10/TabexComponents/Headers/StylishHeader/StylishHeader.jsx +833 -0
- package/src1-10/TabexComponents/Headers/Subheader/Subheader.jsx +239 -0
- package/src1-10/TabexComponents/Sections/BackgroundImages/Backgroundimage1/Backgroundimage1.jsx +312 -0
- package/src1-10/TabexComponents/Sections/BackgroundImages/Backgroundimage_with_toppill/Backgroundimage_with_toppill.jsx +278 -0
- package/src1-10/TabexComponents/Sections/BackgroundImages/BackgroundimageandTextsection/BackgroundimageandTextsection.jsx +129 -0
- package/src1-10/TabexComponents/Sections/BackgroundImages/Section_with_rightbgcont/Section_with_rightbgcont.jsx +153 -0
- package/src1-10/TabexComponents/Sections/BackgroundImages/Threebgimages/Threebgimages.jsx +295 -0
- package/src1-10/TabexComponents/Sections/BackgroundImages/Twobgimages/Twobgimages.jsx +409 -0
- package/src1-10/TabexComponents/Sections/Cards/CardsSection/CardsSection.jsx +793 -0
- package/src1-10/TabexComponents/Sections/Cards/CardsSection2/CardsSection2.jsx +486 -0
- package/src1-10/TabexComponents/Sections/Cards/CardsSection7/CardsSection7.js +888 -0
- package/src1-10/TabexComponents/Sections/Cards/CardsSection8/CardsSection8.js +419 -0
- package/src1-10/TabexComponents/Sections/Cards/Sixverticalcardssection/Sixverticalcardssection.jsx +512 -0
- package/src1-10/TabexComponents/Sections/Slideshow/AboutSection/AboutSection.jsx +281 -0
- package/src1-10/TabexComponents/Sections/Slideshow/Backgroundimage_with_topcircle/Backgroundimage_with_topcircle.jsx +166 -0
- package/src1-10/TabexComponents/Sections/Slideshow/Freetextsection/Freetextsection.jsx +152 -0
- package/src1-10/TabexComponents/Sections/Slideshow/Image_with_leftwords/Image_with_leftwords.jsx +139 -0
- package/src1-10/TabexComponents/Sections/Slideshow/Image_with_rightwords/Image_with_rightwords.jsx +146 -0
- package/src1-10/TabexComponents/Sections/Slideshow/Servicesection/Servicesection.jsx +209 -0
- package/src1-10/TabexComponents/Sections/Slideshow/ServicesectionCenteredcards/ServicesectionCenteredcards.jsx +145 -0
- package/src1-10/TabexComponents/Sections/Slideshow/Slideshow_with_rotatedsquare/Slideshow_with_rotatedsquare.jsx +252 -0
- package/src1-10/TabexComponents/Sections/Slideshow/Slideshow_with_squarebg/Slideshow_with_squarebg.jsx +175 -0
- package/src1-10/TabexComponents/Sections/Slideshow/Slideshowdifferentanimations/Slideshowdifferentanimations.jsx +154 -0
- package/src1-10/TabexComponents/Sections/Slideshow/Slideshowfade/Slideshowfade.jsx +193 -0
- package/src1-10/TabexComponents/Sections/Slideshow/Slideshowslide/Slideshowslide.jsx +197 -0
- package/src1-10/TabexComponents/Sections/Slideshow/Slideshowzoom/Arrow.js +91 -0
- package/src1-10/TabexComponents/Sections/Slideshow/Slideshowzoom/Slideshowzoom.jsx +309 -0
- package/src1-10/TabexComponents/StaticPages/AccountInformation/AccountInformation.jsx +260 -0
- package/src1-10/TabexComponents/StaticPages/CartSlider/CartSlider.jsx +459 -0
- package/src1-10/TabexComponents/StaticPages/Categoriesdropdown/Categoriesdropdown.jsx +216 -0
- package/src1-10/TabexComponents/StaticPages/Checkout/Checkout.jsx +1220 -0
- package/src1-10/TabexComponents/StaticPages/Filter/Filter.jsx +542 -0
- package/src1-10/TabexComponents/StaticPages/Login/FacebookLoginButton.jsx +51 -0
- package/src1-10/TabexComponents/StaticPages/Login/GoogleLoginButton.jsx +35 -0
- package/src1-10/TabexComponents/StaticPages/Login/Login.jsx +299 -0
- package/src1-10/TabexComponents/StaticPages/OrderSuccess/OrderSuccess.js +192 -0
- package/src1-10/TabexComponents/StaticPages/Ordershistory/Ordershistory.jsx +1271 -0
- package/src1-10/TabexComponents/StaticPages/Policies/Policies.jsx +353 -0
- package/src1-10/TabexComponents/StaticPages/Productinfo/Productinfo.jsx +1456 -0
- package/src1-10/TabexComponents/StaticPages/Searchlist/Searchlist.jsx +209 -0
- package/src1-10/TabexComponents/StaticPages/Signup/CustomerInformationForm.jsx +776 -0
- package/src1-10/TabexComponents/StaticPages/Signup/Signup.jsx +157 -0
- package/src1-10/TabexComponents/StaticPages/Staticpagesrouter/Staticpagesrouter.jsx +285 -0
- package/src1-10/TabexComponents/StaticPages/Viewcart/Viewcart.js +1090 -0
- package/src1-10/TabexComponents/StaticPages/Wishlist/Wishlist.jsx +606 -0
- package/src1-10/assets/images/cod.png +0 -0
- package/src1-10/assets/images/egyptflag.png +0 -0
- package/src1-10/assets/images/fawry.png +0 -0
- package/src1-10/assets/images/payment.png +0 -0
- package/src1-10/assets/images/paymob.png +0 -0
- package/src1-10/assets/images/paypal.png +0 -0
- package/src1-10/assets/images/shoppingcart.png +0 -0
- package/src1-10/assets/images/usflag.png +0 -0
- package/src1-10/assets/images/visa.png +0 -0
- package/src1-10/assets/images/whatsapp.png +0 -0
- package/src1-10/button.jsx +40 -0
- package/src1-10/index.jsx +179 -0
- package/src1-10/styles/Home.module.css +129 -0
- package/src1-10/styles/cards/Categorcycard_fullimage.module.css +10 -0
- package/src1-10/styles/cards/Categorycard_slidebgscaled.module.css +73 -0
- package/src1-10/styles/cards/Categorycard_withshapes.module.css +189 -0
- package/src1-10/styles/cards/Productcard6.module.css +9 -0
- package/src1-10/styles/cards/Productcard_with_circularbg.module.css +137 -0
- package/src1-10/styles/cards/Productccard_with_zoominonhover.module.css +51 -0
- package/src1-10/styles/cards/Prouductcard_with_zoomhover.module.css +61 -0
- package/src1-10/styles/cards/categorycard.module.css +102 -0
- package/src1-10/styles/cards/categorycard3.module.css +51 -0
- package/src1-10/styles/cards/categorycardwithtext.module.css +40 -0
- package/src1-10/styles/cards/productcard_animatedbuttons.module.css +104 -0
- package/src1-10/styles/cards/productcard_with_textonhover.module.css +12 -0
- package/src1-10/styles/cards/productccard_with_imageontopleft.module.css +85 -0
- package/src1-10/styles/general/bootstrap.css +4415 -0
- package/src1-10/styles/general/dropdown.css +199 -0
- package/src1-10/styles/general/editorbardropdown.module.css +94 -0
- package/src1-10/styles/general/filter.module.css +108 -0
- package/src1-10/styles/general/form.module.css +273 -0
- package/src1-10/styles/general/general.module.css +861 -0
- package/src1-10/styles/general/image-gallery.css +481 -0
- package/src1-10/styles/general/react-accessible-accordion.module.css +52 -0
- package/src1-10/styles/general/react-phone-input-2.module.css +927 -0
- package/src1-10/styles/general/scrollbtn.module.css +22 -0
- package/src1-10/styles/general/slick.module.css +166 -0
- package/src1-10/styles/general/tabs.module.css +110 -0
- package/src1-10/styles/general/workplaceeditor.module.css +328 -0
- package/src1-10/styles/globals.css +26 -0
- package/src1-10/styles/headers/Allinoneheader.module.css +91 -0
- package/src1-10/styles/headers/Header7.module.css +50 -0
- package/src1-10/styles/headers/Header_threesectionslogocentered.module.css +97 -0
- package/src1-10/styles/headers/Sideheader.module.css +108 -0
- package/src1-10/styles/headers/classicheaderstyles.module.css +16 -0
- package/src1-10/styles/headers/dropdown.css +0 -0
- package/src1-10/styles/headers/header4.module.css +175 -0
- package/src1-10/styles/headers/header5.module.css +30 -0
- package/src1-10/styles/headers/header6.module.css +117 -0
- package/src1-10/styles/headers/header_contactinfo.module.css +78 -0
- package/src1-10/styles/headers/headerresturant.module.css +89 -0
- package/src1-10/styles/headers/headerstyles.module.css +24 -0
- package/src1-10/styles/headers/modernheader.module.css +78 -0
- package/src1-10/styles/headers/subheader.module.css +114 -0
- package/src1-10/styles/sections/Backgroundimage1.module.css +17 -0
- package/src1-10/styles/sections/Backgroundimage_with_topcircle.module.css +28 -0
- package/src1-10/styles/sections/Section_with_rightbgcont.module.css +49 -0
- package/src1-10/styles/sections/Slideshow_with_rotatedsquare.module.css +35 -0
- package/src1-10/styles/sections/Slideshow_with_squarebg.module.css +39 -0
- package/src1-10/styles/staticpages/accordion.module.css +9 -0
- package/src1-10/styles/staticpages/cart.module.css +108 -0
- package/src1-10/styles/staticpages/dropdown.css +196 -0
- package/src1-10/styles/staticpages/filter.module.css +139 -0
- package/src1-10/styles/staticpages/login.module.css +146 -0
- package/src1-10/styles/staticpages/productinfo.module.css +54 -0
- package/src1-10/styles/staticpages/shop.module.css +191 -0
- package/src1-10/styles/staticpages/signup.module.css +206 -0
- package/src1-10/styles/staticpages/staticroutersidenav.module.css +129 -0
- package/src1-10/styles/staticpages/viewcart.module.css +129 -0
- package/src1-10/styles/staticpages/wishlist.module.css +29 -0
|
@@ -0,0 +1,1456 @@
|
|
|
1
|
+
//productidprops
|
|
2
|
+
import React, { useEffect, useState, useContext } from 'react';
|
|
3
|
+
import generalstyles from '../../../styles/general/general.module.css';
|
|
4
|
+
import productinfostyles from '../../../styles/staticpages/productinfo.module.css';
|
|
5
|
+
import ImageGallery from 'react-image-gallery';
|
|
6
|
+
import { MdOutlineShoppingCart } from 'react-icons/md';
|
|
7
|
+
import { CircularProgress } from 'react-cssfx-loading';
|
|
8
|
+
import { css } from 'glamor';
|
|
9
|
+
import ShowMoreText from 'react-show-more-text';
|
|
10
|
+
import { useParams } from 'react-router';
|
|
11
|
+
import { IKImage } from 'imagekitio-react';
|
|
12
|
+
import { FaShippingFast } from 'react-icons/fa';
|
|
13
|
+
import { FiMapPin } from 'react-icons/fi';
|
|
14
|
+
import { MdOutlinePolicy, MdOutlineLocalShipping } from 'react-icons/md';
|
|
15
|
+
import { HiOutlinePhone } from 'react-icons/hi';
|
|
16
|
+
import { RiSecurePaymentLine } from 'react-icons/ri';
|
|
17
|
+
import { AiFillStar, AiOutlineStar } from 'react-icons/ai';
|
|
18
|
+
import { FiShoppingBag, FiShoppingCart } from 'react-icons/fi';
|
|
19
|
+
import { FaRegHeart, FaHeart } from 'react-icons/fa';
|
|
20
|
+
import { CgShoppingBag } from 'react-icons/cg';
|
|
21
|
+
import { BsBag } from 'react-icons/bs';
|
|
22
|
+
import { IoBagHandleOutline } from 'react-icons/io5';
|
|
23
|
+
|
|
24
|
+
const Productinfo = (props) => {
|
|
25
|
+
const StatePagePropertiesContext = props.actions.StatePagePropertiesContext;
|
|
26
|
+
const lang = props.actions.lang;
|
|
27
|
+
const langdetect = props.actions.langdetect;
|
|
28
|
+
const templatepropcontext = props.actions.templatepropcontext;
|
|
29
|
+
const routingcountext = props.actions.routingcountext;
|
|
30
|
+
const StaticPagesLinksContext = props.actions.StaticPagesLinksContext;
|
|
31
|
+
const TabexSectionsComponentsContext = props.actions.TabexSectionsComponentsContext;
|
|
32
|
+
const FetchQueriesEngineContext = props.actions.FetchQueriesEngineContext;
|
|
33
|
+
const setFetchQueriesEngineContext = props.actions.setFetchQueriesEngineContext;
|
|
34
|
+
const serverbaselink = props.actions.serverbaselink;
|
|
35
|
+
const AddtoCartMutationContext = props.actions.AddtoCartMutationContext;
|
|
36
|
+
const ProductIdProdutInfoModalContext = props.actions.ProductIdProdutInfoModalContext;
|
|
37
|
+
const AddtoCartContext = props.actions.AddtoCartContext;
|
|
38
|
+
const addtofavoritescontext = props.actions.addtofavoritescontext;
|
|
39
|
+
const fetchProductInfoQueryContext = props.actions.fetchProductInfoQueryContext;
|
|
40
|
+
const fetchproductinfoObjContext = props.actions.fetchproductinfoObjContext;
|
|
41
|
+
const setfetchproductinfoObjContext = props.actions.setfetchproductinfoObjContext;
|
|
42
|
+
const pageindexcontext = props.actions.pageindexcontext;
|
|
43
|
+
const setpageindexcontext = props.actions.setpageindexcontext;
|
|
44
|
+
const authdetailsContext = props.actions.authdetailsContext;
|
|
45
|
+
const setCurrentPageIdContext = props.actions.setCurrentPageIdContext;
|
|
46
|
+
const productidparam = props.productidparam;
|
|
47
|
+
const [sectionproperties, setsectionproperties] = useState('');
|
|
48
|
+
const [CurrentPageId, setCurrentPageId] = useState('');
|
|
49
|
+
const [RelatedProductsTagid, setRelatedProductsTagid] = useState('');
|
|
50
|
+
const [ProductInfoObj, setProductInfoObj] = useState({});
|
|
51
|
+
const { collectionidparams } = useParams();
|
|
52
|
+
useEffect(() => {
|
|
53
|
+
if (Object.keys(StatePagePropertiesContext).length != 0) {
|
|
54
|
+
var secpropobj = {};
|
|
55
|
+
StatePagePropertiesContext.pageobj != undefined &&
|
|
56
|
+
StatePagePropertiesContext.pageobj.pageproperties != undefined &&
|
|
57
|
+
StatePagePropertiesContext.pageobj.pageproperties.forEach(function (arrayItem, arrayindex) {
|
|
58
|
+
secpropobj[arrayItem.property_css_name] = arrayItem.property_value;
|
|
59
|
+
});
|
|
60
|
+
|
|
61
|
+
setsectionproperties({ ...secpropobj });
|
|
62
|
+
}
|
|
63
|
+
}, [StatePagePropertiesContext]);
|
|
64
|
+
|
|
65
|
+
// const FetchRelatedProductsQuery = useQuery([' FetchRelatedProducts_API' + RelatedProductsTagid], () => FetchRelatedProducts_API({ tagid: RelatedProductsTagid, productid: '' }), {
|
|
66
|
+
// keepPreviousData: true,
|
|
67
|
+
// staleTime: Infinity,
|
|
68
|
+
// enabled: fetchproductinfoObjContext.productid != undefined && fetchproductinfoObjContext.productid.length != 0 && RelatedProductsTagid.length != 0 ? true : false,
|
|
69
|
+
// });
|
|
70
|
+
useEffect(() => {
|
|
71
|
+
var cartindex = templatepropcontext.pagesnprop.findIndex((x) => x.staticpageid == '6218bccb810ae');
|
|
72
|
+
|
|
73
|
+
if (cartindex >= 0) {
|
|
74
|
+
setpageindexcontext(cartindex);
|
|
75
|
+
setCurrentPageId(templatepropcontext.pagesnprop[cartindex].pageid);
|
|
76
|
+
if (props.srcfromprops != 'templatedraftrouter') {
|
|
77
|
+
// setpageindexcontext(cartindex);
|
|
78
|
+
setCurrentPageIdContext(templatepropcontext.pagesnprop[cartindex].pageid);
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
}, []);
|
|
82
|
+
useEffect(() => {
|
|
83
|
+
var secpropobj = {};
|
|
84
|
+
templatepropcontext?.pagesnprop[pageindexcontext]?.pageproperties?.forEach(function (arrayItem, arrayindex) {
|
|
85
|
+
secpropobj[arrayItem.property_css_name] = arrayItem.property_value;
|
|
86
|
+
});
|
|
87
|
+
setsectionproperties({ ...secpropobj });
|
|
88
|
+
}, [pageindexcontext]);
|
|
89
|
+
const [productimagesarray, setproductimagesarray] = useState([]);
|
|
90
|
+
const [addtocardpayloadobj, setaddtocardpayloadobj] = useState({
|
|
91
|
+
functype: 'add',
|
|
92
|
+
productid: '',
|
|
93
|
+
variantid: '',
|
|
94
|
+
quantity: 1,
|
|
95
|
+
});
|
|
96
|
+
const [variantindexcompleted, setvariantindexcompleted] = useState('');
|
|
97
|
+
useEffect(() => {
|
|
98
|
+
if (productidparam == undefined) {
|
|
99
|
+
productidassigner(ProductIdProdutInfoModalContext);
|
|
100
|
+
} else {
|
|
101
|
+
productidassigner(productidparam);
|
|
102
|
+
}
|
|
103
|
+
}, []);
|
|
104
|
+
useEffect(() => {
|
|
105
|
+
if (fetchProductInfoQueryContext.isSuccess) {
|
|
106
|
+
setProductInfoObj(fetchProductInfoQueryContext.data);
|
|
107
|
+
}
|
|
108
|
+
}, [fetchProductInfoQueryContext.isSuccess, fetchProductInfoQueryContext.data]);
|
|
109
|
+
const productidassigner = (productid) => {
|
|
110
|
+
var tempFetchQueriesEngineContext = { ...FetchQueriesEngineContext };
|
|
111
|
+
tempFetchQueriesEngineContext.fetchproductinfo = true;
|
|
112
|
+
setFetchQueriesEngineContext({ ...tempFetchQueriesEngineContext });
|
|
113
|
+
var tempfetchproductinfoObjContext = { ...fetchproductinfoObjContext };
|
|
114
|
+
|
|
115
|
+
tempfetchproductinfoObjContext.productid = productid;
|
|
116
|
+
setfetchproductinfoObjContext({ ...tempfetchproductinfoObjContext });
|
|
117
|
+
};
|
|
118
|
+
useEffect(() => {
|
|
119
|
+
if (!fetchProductInfoQueryContext.isFetching && fetchProductInfoQueryContext.isSuccess) {
|
|
120
|
+
if (fetchProductInfoQueryContext.data.data.productinfo != null) {
|
|
121
|
+
var tempproductimagesarray = [];
|
|
122
|
+
if (Array.isArray(fetchProductInfoQueryContext.data.data.productinfo.productimages)) {
|
|
123
|
+
fetchProductInfoQueryContext.data.data.productinfo.productimages.forEach(function (arrayItem, arrayindex) {
|
|
124
|
+
var productimagesarrayobj = {
|
|
125
|
+
thumbnail: serverbaselink + arrayItem.path,
|
|
126
|
+
original: serverbaselink + arrayItem.path,
|
|
127
|
+
};
|
|
128
|
+
tempproductimagesarray.push(productimagesarrayobj);
|
|
129
|
+
});
|
|
130
|
+
}
|
|
131
|
+
setproductimagesarray([...tempproductimagesarray]);
|
|
132
|
+
variantchecker();
|
|
133
|
+
var tempaddtocardpayloadobj = { ...addtocardpayloadobj };
|
|
134
|
+
tempaddtocardpayloadobj.productid = fetchProductInfoQueryContext.data.data.productinfo.productid;
|
|
135
|
+
setaddtocardpayloadobj({ ...tempaddtocardpayloadobj });
|
|
136
|
+
setRelatedProductsTagid(fetchProductInfoQueryContext.data.data.productinfo.maintagid);
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
}, [fetchProductInfoQueryContext.isSuccess, fetchProductInfoQueryContext.data]);
|
|
140
|
+
const selectproductoptionvalue = (optionindex, optionvaluesitem, optionvaluesindex) => {
|
|
141
|
+
var productarr = ProductInfoObj;
|
|
142
|
+
var isselected = productarr.data.productinfo.productoptions[optionindex].optionvalues[optionvaluesindex].isselected;
|
|
143
|
+
if (isselected == 1) {
|
|
144
|
+
productarr.data.productinfo.productoptions[optionindex].optionvalues[optionvaluesindex].isselected = 0;
|
|
145
|
+
} else {
|
|
146
|
+
productarr.data.productinfo.productoptions[optionindex].optionvalues[optionvaluesindex].isselected = 1;
|
|
147
|
+
}
|
|
148
|
+
productarr.data.productinfo.productoptions[optionindex].optionvalues.forEach(function (arrayItem, arrayindex) {
|
|
149
|
+
if (optionvaluesindex != arrayindex) {
|
|
150
|
+
arrayItem.isselected = 0;
|
|
151
|
+
}
|
|
152
|
+
});
|
|
153
|
+
variantchecker();
|
|
154
|
+
variantcompleting();
|
|
155
|
+
// queryClient.setQueryData('fetchProductInfo_API' + JSON.stringify(fetchproductinfoObjContext), productarr);
|
|
156
|
+
setProductInfoObj({ ...productarr });
|
|
157
|
+
};
|
|
158
|
+
const variantchecker = () => {
|
|
159
|
+
var productarr = ProductInfoObj;
|
|
160
|
+
if (Object.keys(productarr).length != 0) {
|
|
161
|
+
if (productarr.data.productinfo.hasvariants == 1) {
|
|
162
|
+
var selectedoptionsvalues = [];
|
|
163
|
+
var variantsaccessible = [];
|
|
164
|
+
productarr.data.productinfo.productoptions.forEach(function (productoptionsitem, productoptionsindex) {
|
|
165
|
+
productoptionsitem.optionvalues.forEach(function (ProductOptionValuesitem, ProductOptionValuesIndex) {
|
|
166
|
+
if (ProductOptionValuesitem.isselected == 1) {
|
|
167
|
+
selectedoptionsvalues.push(ProductOptionValuesitem);
|
|
168
|
+
}
|
|
169
|
+
});
|
|
170
|
+
});
|
|
171
|
+
if (selectedoptionsvalues.length == 0) {
|
|
172
|
+
productarr.data.productinfo.variants.forEach(function (ProductVariantItem, ProductVariantIndex) {
|
|
173
|
+
ProductVariantItem.variantoptions.forEach(function (varinatoptionitem, variantoptionindex) {
|
|
174
|
+
productarr.data.productinfo.productoptions.forEach(function (productoptionsitem, productoptionsindex) {
|
|
175
|
+
productoptionsitem.optionvalues.forEach(function (ProductOptionValuesitem, ProductOptionValuesIndex) {
|
|
176
|
+
if (ProductOptionValuesitem.valueid == varinatoptionitem.valueid) {
|
|
177
|
+
ProductOptionValuesitem.isenabled = 1;
|
|
178
|
+
}
|
|
179
|
+
});
|
|
180
|
+
});
|
|
181
|
+
});
|
|
182
|
+
});
|
|
183
|
+
} else {
|
|
184
|
+
productarr.data.productinfo.productoptions.forEach(function (productoptionsitem, productoptionsindex) {
|
|
185
|
+
productoptionsitem.optionvalues.forEach(function (ProductOptionValuesitem, ProductOptionValuesIndex) {
|
|
186
|
+
ProductOptionValuesitem.isenabled = 0;
|
|
187
|
+
});
|
|
188
|
+
});
|
|
189
|
+
|
|
190
|
+
productarr.data.productinfo.variants.forEach(function (ProductVariantItem, ProductVariantIndex) {
|
|
191
|
+
var variantcommonvalues = [];
|
|
192
|
+
ProductVariantItem.variantoptions.forEach(function (varinatoptionitem, variantoptionindex) {
|
|
193
|
+
selectedoptionsvalues.forEach(function (ProductOptionValuesitem, ProductOptionValuesIndex) {
|
|
194
|
+
if (ProductOptionValuesitem.optionid == varinatoptionitem.optionid) {
|
|
195
|
+
variantcommonvalues.push(varinatoptionitem);
|
|
196
|
+
}
|
|
197
|
+
});
|
|
198
|
+
});
|
|
199
|
+
|
|
200
|
+
var addvariantcount = [];
|
|
201
|
+
var addvariant = false;
|
|
202
|
+
selectedoptionsvalues.forEach(function (ProductOptionValuesitem, ProductOptionValuesIndex) {
|
|
203
|
+
addvariant = false;
|
|
204
|
+
variantcommonvalues.forEach(function (varinatoptionitem, variantoptionindex) {
|
|
205
|
+
if (ProductOptionValuesitem.optionid == varinatoptionitem.optionid) {
|
|
206
|
+
if (ProductOptionValuesitem.valueid == varinatoptionitem.valueid) {
|
|
207
|
+
addvariant = true;
|
|
208
|
+
} else {
|
|
209
|
+
addvariantcount.push(varinatoptionitem);
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
});
|
|
213
|
+
});
|
|
214
|
+
if (addvariant && addvariantcount.length == 0) {
|
|
215
|
+
variantsaccessible.push(ProductVariantItem);
|
|
216
|
+
}
|
|
217
|
+
});
|
|
218
|
+
|
|
219
|
+
variantsaccessible.forEach(function (ProductVariantItem, ProductVariantIndex) {
|
|
220
|
+
ProductVariantItem.variantoptions.forEach(function (varinatoptionitem, variantoptionindex) {
|
|
221
|
+
productarr.data.productinfo.productoptions.forEach(function (productoptionsitem, productoptionsindex) {
|
|
222
|
+
productoptionsitem.optionvalues.forEach(function (ProductOptionValuesitem, ProductOptionValuesIndex) {
|
|
223
|
+
if (ProductOptionValuesitem.valueid == varinatoptionitem.valueid) {
|
|
224
|
+
ProductOptionValuesitem.isenabled = 1;
|
|
225
|
+
}
|
|
226
|
+
});
|
|
227
|
+
});
|
|
228
|
+
});
|
|
229
|
+
});
|
|
230
|
+
}
|
|
231
|
+
// queryClient.setQueryData('fetchProductInfo_API' + JSON.stringify(fetchproductinfoObjContext), productarr);
|
|
232
|
+
setProductInfoObj({ ...productarr });
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
};
|
|
236
|
+
const variantcompleting = () => {
|
|
237
|
+
setvariantindexcompleted('');
|
|
238
|
+
var tempaddtocardpayloadobj = { ...addtocardpayloadobj };
|
|
239
|
+
tempaddtocardpayloadobj.variantid = '';
|
|
240
|
+
setaddtocardpayloadobj({ ...tempaddtocardpayloadobj });
|
|
241
|
+
var productarr = ProductInfoObj;
|
|
242
|
+
var selectedoptionsvalues = [];
|
|
243
|
+
|
|
244
|
+
productarr.data.productinfo.productoptions.forEach(function (productoptionsitem, productoptionsindex) {
|
|
245
|
+
productoptionsitem.optionvalues.forEach(function (ProductOptionValuesitem, ProductOptionValuesIndex) {
|
|
246
|
+
if (ProductOptionValuesitem.isselected == 1) {
|
|
247
|
+
selectedoptionsvalues.push(ProductOptionValuesitem);
|
|
248
|
+
}
|
|
249
|
+
});
|
|
250
|
+
});
|
|
251
|
+
productarr.data.productinfo.variants.forEach(function (ProductVariantItem, ProductVariantIndex) {
|
|
252
|
+
var isvariant = false;
|
|
253
|
+
var variantnotmatch = [];
|
|
254
|
+
if (selectedoptionsvalues.length == ProductVariantItem.variantoptions.length) {
|
|
255
|
+
isvariant = true;
|
|
256
|
+
ProductVariantItem.variantoptions.forEach(function (varinatoptionitem, variantoptionindex) {
|
|
257
|
+
selectedoptionsvalues.forEach(function (ProductOptionValuesitem, ProductOptionValuesIndex) {
|
|
258
|
+
if (ProductOptionValuesitem.optionid == varinatoptionitem.optionid) {
|
|
259
|
+
if (ProductOptionValuesitem.valueid == varinatoptionitem.valueid) {
|
|
260
|
+
} else {
|
|
261
|
+
variantnotmatch.push('s');
|
|
262
|
+
}
|
|
263
|
+
}
|
|
264
|
+
});
|
|
265
|
+
});
|
|
266
|
+
}
|
|
267
|
+
if (variantnotmatch.length == 0 && isvariant == true) {
|
|
268
|
+
var variantobj = fetchProductInfoQueryContext.data.data.productinfo.variants[ProductVariantIndex];
|
|
269
|
+
var variantid = '';
|
|
270
|
+
if (variantobj == undefined) {
|
|
271
|
+
NotificationManager.warning('', 'Variant Not Found');
|
|
272
|
+
} else {
|
|
273
|
+
variantid = variantobj.variantid;
|
|
274
|
+
var tempaddtocardpayloadobj = { ...addtocardpayloadobj };
|
|
275
|
+
tempaddtocardpayloadobj.variantid = variantid;
|
|
276
|
+
setaddtocardpayloadobj({ ...tempaddtocardpayloadobj });
|
|
277
|
+
setvariantindexcompleted(ProductVariantIndex);
|
|
278
|
+
}
|
|
279
|
+
}
|
|
280
|
+
});
|
|
281
|
+
// queryClient.setQueryData('fetchProductInfo_API' + JSON.stringify(fetchproductinfoObjContext), productarr);
|
|
282
|
+
setProductInfoObj({ ...productarr });
|
|
283
|
+
};
|
|
284
|
+
const addtocartfunc = () => {
|
|
285
|
+
var runfunc = false;
|
|
286
|
+
if (addtocardpayloadobj.productid.length != 0 && addtocardpayloadobj.quantity > 0) {
|
|
287
|
+
if (fetchProductInfoQueryContext.data.data.productinfo.hasvariants == 1) {
|
|
288
|
+
if (addtocardpayloadobj.variantid.length != 0) {
|
|
289
|
+
runfunc = true;
|
|
290
|
+
} else {
|
|
291
|
+
NotificationManager.warning('', 'Please Choose Product Options');
|
|
292
|
+
}
|
|
293
|
+
} else {
|
|
294
|
+
runfunc = true;
|
|
295
|
+
}
|
|
296
|
+
} else {
|
|
297
|
+
NotificationManager.warning('', 'Please Choose Quantity');
|
|
298
|
+
}
|
|
299
|
+
|
|
300
|
+
if (runfunc == true) {
|
|
301
|
+
AddtoCartContext(addtocardpayloadobj);
|
|
302
|
+
}
|
|
303
|
+
};
|
|
304
|
+
const productinfo_cssstyles = {
|
|
305
|
+
sectiontitlespan: css({
|
|
306
|
+
':after': {
|
|
307
|
+
width: sectionproperties.relatedproducttitle_lineafterwidth + '%',
|
|
308
|
+
backgroundColor: sectionproperties.relatedproducttitlelinebgcolor,
|
|
309
|
+
},
|
|
310
|
+
}),
|
|
311
|
+
sectiontitlespan2: css({
|
|
312
|
+
':after': {
|
|
313
|
+
width: sectionproperties.relatedproducttitle_lineafterwidth + 'px',
|
|
314
|
+
height: '100%',
|
|
315
|
+
backgroundColor: sectionproperties.relatedproducttitlelinebgcolor,
|
|
316
|
+
},
|
|
317
|
+
}),
|
|
318
|
+
cart_btn: css({
|
|
319
|
+
width: sectionproperties.cartBtnWidth + 'px',
|
|
320
|
+
height: sectionproperties.cartBtnHeight + 'px',
|
|
321
|
+
background: sectionproperties.cartbtn_bgtransparent == 'Transparent' ? 'transparent' : sectionproperties.cartBtnbgColor,
|
|
322
|
+
borderRadius: sectionproperties.cart_btn_borderBottomLeftRadius + 'px',
|
|
323
|
+
color: sectionproperties.cartBtnTextcolor,
|
|
324
|
+
fontSize: sectionproperties.cartBtnTextfontsize + 'px',
|
|
325
|
+
textTransform: sectionproperties.cartBtnTexttransform,
|
|
326
|
+
fontWeight: sectionproperties.cartBtnTextfontweight,
|
|
327
|
+
border: sectionproperties.cartbtnborderwidth + 'px solid ' + sectionproperties.cartbtnbordercolor,
|
|
328
|
+
transition: '.3s',
|
|
329
|
+
opacity: sectionproperties.cartbtn_opacity,
|
|
330
|
+
display: 'flex',
|
|
331
|
+
alignItems: 'center',
|
|
332
|
+
justifyContent: 'center',
|
|
333
|
+
overflow: 'hidden',
|
|
334
|
+
margin: 0,
|
|
335
|
+
position: 'relative',
|
|
336
|
+
':hover': {
|
|
337
|
+
background: sectionproperties.cartbtn_transparentbgcoloronhover == 'Transparent' ? 'transparent' : sectionproperties.cartBtnbgColoronhover,
|
|
338
|
+
color: sectionproperties.cartBtnTextcoloronhover,
|
|
339
|
+
opacity: sectionproperties.cartbtn_opacityonhover,
|
|
340
|
+
},
|
|
341
|
+
}),
|
|
342
|
+
quantitybtn: css({
|
|
343
|
+
width: sectionproperties.quantitybtn_height + 'px',
|
|
344
|
+
height: sectionproperties.quantitybtn_width + 'px',
|
|
345
|
+
display: 'flex',
|
|
346
|
+
flexDirection: 'column',
|
|
347
|
+
overflow: 'hidden',
|
|
348
|
+
borderRadius: sectionproperties.quantitybtn_borderradius + 'px',
|
|
349
|
+
background: sectionproperties.quantitybtn_bgcolor,
|
|
350
|
+
alignItems: 'center',
|
|
351
|
+
justifyContent: 'center',
|
|
352
|
+
margin: 0,
|
|
353
|
+
position: 'relative',
|
|
354
|
+
fontWeight: sectionproperties.quantitybtn_textfontweight,
|
|
355
|
+
color: sectionproperties.quantitybtn_textcolor,
|
|
356
|
+
fontSize: sectionproperties.quantitybtn_textfontsize + 'px',
|
|
357
|
+
border: sectionproperties.quantitybtnborderwidth + 'px solid ' + sectionproperties.quantitybtnbordercolor,
|
|
358
|
+
}),
|
|
359
|
+
quantitybtn_text: css({
|
|
360
|
+
margin: 'auto',
|
|
361
|
+
}),
|
|
362
|
+
add_quantitybtn_icon_container: css({
|
|
363
|
+
position: 'relative',
|
|
364
|
+
width: '35px',
|
|
365
|
+
height: '35px',
|
|
366
|
+
background: sectionproperties.add_quantitybtn_bgcolor,
|
|
367
|
+
display: 'flex',
|
|
368
|
+
alignItems: 'center',
|
|
369
|
+
justifyContent: 'center',
|
|
370
|
+
borderRadius: sectionproperties.add_quantitybtn_borderradius + 'px',
|
|
371
|
+
fontSize: sectionproperties.add_quantitybtn_textfontsize + 'px',
|
|
372
|
+
color: sectionproperties.add_quantitybtn_textcolor,
|
|
373
|
+
transition: '.3s',
|
|
374
|
+
':hover': {
|
|
375
|
+
color: sectionproperties.add_quantitybtn_textcoloronhover,
|
|
376
|
+
background: sectionproperties.add_quantitybtn_bgcoloronhover,
|
|
377
|
+
},
|
|
378
|
+
}),
|
|
379
|
+
minus_quantitybtn_icon_container: css({
|
|
380
|
+
position: 'relative',
|
|
381
|
+
width: '35px',
|
|
382
|
+
height: '35px',
|
|
383
|
+
background: sectionproperties.remove_quantitybtn_bgcolor,
|
|
384
|
+
display: 'flex',
|
|
385
|
+
alignItems: 'center',
|
|
386
|
+
justifyContent: 'center',
|
|
387
|
+
borderRadius: sectionproperties.remove_quantitybtn_borderradius + 'px',
|
|
388
|
+
fontSize: sectionproperties.remove_quantitybtn_textfontsize + 'px',
|
|
389
|
+
color: sectionproperties.remove_quantitybtn_textcolor,
|
|
390
|
+
transition: '.3s',
|
|
391
|
+
':hover': {
|
|
392
|
+
color: sectionproperties.remove_quantitybtn_textcoloronhover,
|
|
393
|
+
background: sectionproperties.remove_quantitybtn_bgcoloronhover,
|
|
394
|
+
},
|
|
395
|
+
}),
|
|
396
|
+
imagecont: css({
|
|
397
|
+
width: '60px',
|
|
398
|
+
height: '60px',
|
|
399
|
+
border: sectionproperties.prodimage_borderwidth + 'px solid ' + sectionproperties.prodimage_color,
|
|
400
|
+
backgroundColor: sectionproperties.prodimage_bgcolor,
|
|
401
|
+
borderBottomLeftRadius: sectionproperties.prodimage__borderBottomLeftRadius + 'px',
|
|
402
|
+
borderBottomRightRadius: sectionproperties.prodimage__borderBottomRightRadius + 'px',
|
|
403
|
+
borderTopLeftRadius: sectionproperties.prodimage__borderTopLeftRadius + 'px',
|
|
404
|
+
borderTopRightRadius: sectionproperties.prodimage__borderTopRightRadius + 'px',
|
|
405
|
+
display: 'flex',
|
|
406
|
+
alignItems: 'center',
|
|
407
|
+
justifyContent: 'center',
|
|
408
|
+
backgroundRepeat: 'no-repeat',
|
|
409
|
+
backgroundSize: 'cover',
|
|
410
|
+
backgroundPosition: 'center',
|
|
411
|
+
position: 'relative',
|
|
412
|
+
}),
|
|
413
|
+
relatedproductNameStyles: css({
|
|
414
|
+
color: sectionproperties.relatedprodNameColor,
|
|
415
|
+
fontSize: sectionproperties.relatedprodNameFontSize + 'px',
|
|
416
|
+
fontWeight: sectionproperties.relatedprodnamefontWeight,
|
|
417
|
+
textTransform: sectionproperties.relatedprodNameTextTranform,
|
|
418
|
+
|
|
419
|
+
':hover': {
|
|
420
|
+
color: sectionproperties.relatedprodNameColoronhover,
|
|
421
|
+
},
|
|
422
|
+
}),
|
|
423
|
+
relatedproductPricestyles: css({
|
|
424
|
+
color: sectionproperties.relatedprodPriceColor,
|
|
425
|
+
fontSize: sectionproperties.relatedprodpriceFontSize + 'px',
|
|
426
|
+
fontWeight: sectionproperties.relatedprodPriceFontWeight,
|
|
427
|
+
}),
|
|
428
|
+
cardcontainer: css({
|
|
429
|
+
backgroundColor: sectionproperties.backgroundColor,
|
|
430
|
+
borderTopLeftRadius: sectionproperties.borderTopLeftRadius + 'px',
|
|
431
|
+
borderTopRightRadius: sectionproperties.borderTopRightRadius + 'px',
|
|
432
|
+
borderBottomLeftRadius: sectionproperties.borderBottomLeftRadius + 'px',
|
|
433
|
+
borderBottomRightRadius: sectionproperties.borderBottomRightRadius + 'px',
|
|
434
|
+
paddingRight: sectionproperties.paddingRight + 'px',
|
|
435
|
+
paddingLeft: sectionproperties.paddingLeft + 'px',
|
|
436
|
+
paddingTop: sectionproperties.paddingTop + 'px',
|
|
437
|
+
paddingBottom: sectionproperties.paddingBottom + 'px',
|
|
438
|
+
border: sectionproperties.sectioncardborderwidth + 'px solid ' + sectionproperties.sectioncardbordercolor,
|
|
439
|
+
}),
|
|
440
|
+
wishlist_btn: css({
|
|
441
|
+
width: sectionproperties.favBtnWidth + 'px',
|
|
442
|
+
height: sectionproperties.favBtnHeight + 'px',
|
|
443
|
+
background: sectionproperties.favbtn_bgtransparent == 'Transparent' ? 'transparent' : sectionproperties.favBtnbgColor,
|
|
444
|
+
borderRadius: sectionproperties.fav_btn_borderBottomLeftRadius + 'px',
|
|
445
|
+
color: sectionproperties.favBtniconcolor,
|
|
446
|
+
fontSize: sectionproperties.favBtnTextfontsize + 'px',
|
|
447
|
+
textTransform: sectionproperties.favBtnTexttransform,
|
|
448
|
+
fontWeight: sectionproperties.favBtnTextfontweight,
|
|
449
|
+
transition: '.3s',
|
|
450
|
+
boxShadow: sectionproperties.favbtn_showshadow == 'Show' ? '0 0 10px ' + sectionproperties.favbtn_shadowcolor : '',
|
|
451
|
+
border: sectionproperties.favbtnborderwidth + 'px solid ' + sectionproperties.favbtnbordercolor,
|
|
452
|
+
opacity: sectionproperties.favbtn_opacity,
|
|
453
|
+
cursor: 'pointer',
|
|
454
|
+
':hover': {
|
|
455
|
+
background: sectionproperties.favbtn_transparentbgcoloronhover == 'Transparent' ? 'transparent' : sectionproperties.favBtnbgColoronhover,
|
|
456
|
+
color: sectionproperties.favBtnTextcoloronhover,
|
|
457
|
+
opacity: sectionproperties.favbtn_opacityonhover,
|
|
458
|
+
},
|
|
459
|
+
}),
|
|
460
|
+
productname: css({
|
|
461
|
+
fontSize: sectionproperties.prodNameFontSize + 'px',
|
|
462
|
+
textTransform: sectionproperties.prodNameTextTranform,
|
|
463
|
+
fontWeight: sectionproperties.prodNameFontWeight,
|
|
464
|
+
color: sectionproperties.prodNameColor,
|
|
465
|
+
}),
|
|
466
|
+
productnamehover: css({
|
|
467
|
+
transition: '.3s',
|
|
468
|
+
':hover': {
|
|
469
|
+
color: sectionproperties.prodNameColorOnHover,
|
|
470
|
+
},
|
|
471
|
+
}),
|
|
472
|
+
};
|
|
473
|
+
const returnpolicyobj = (policytype) => {
|
|
474
|
+
var policyobj = {};
|
|
475
|
+
authdetailsContext?.instinfo?.instpolicies?.forEach(function (item, index) {
|
|
476
|
+
if (item.policytype == policytype) {
|
|
477
|
+
policyobj = item;
|
|
478
|
+
}
|
|
479
|
+
});
|
|
480
|
+
return policyobj;
|
|
481
|
+
};
|
|
482
|
+
return (
|
|
483
|
+
<div
|
|
484
|
+
className={'row w-100 ml-0 mr-0'}
|
|
485
|
+
style={{
|
|
486
|
+
marginTop: sectionproperties.marginTop + 'px',
|
|
487
|
+
}}
|
|
488
|
+
>
|
|
489
|
+
{fetchProductInfoQueryContext.isFetching && (
|
|
490
|
+
<div className={'row ml-0 mr-0 mt-2 w-100 pb-3 mb-3'}>
|
|
491
|
+
{/* <Pagepreloader /> */}
|
|
492
|
+
Loading..
|
|
493
|
+
</div>
|
|
494
|
+
)}
|
|
495
|
+
<div className="col-lg-12 p-0">
|
|
496
|
+
{!fetchProductInfoQueryContext.isFetching && fetchProductInfoQueryContext.isSuccess && fetchProductInfoQueryContext.data.data.productinfo != null && (
|
|
497
|
+
<div
|
|
498
|
+
className={'row m-0 w-100 pl-md-3 pr-md-3 p-sm-0'}
|
|
499
|
+
style={{
|
|
500
|
+
paddingLeft: props.srcfromprops == 'templatdraftrouter' ? sectionproperties.card_marginLeft + 'px' : 0,
|
|
501
|
+
paddingRight: props.srcfromprops == 'templatdraftrouter' ? sectionproperties.card_marginRight + 'px' : 0,
|
|
502
|
+
}}
|
|
503
|
+
>
|
|
504
|
+
<div className="col-lg-9 pl-2 pr-2 mb-md-3">
|
|
505
|
+
<div className={`${productinfo_cssstyles.cardcontainer}`} style={{ minHeight: '70vh' }}>
|
|
506
|
+
<div className={'row m-0 w-100'}>
|
|
507
|
+
<div className="col-xl-5 col-lg-6 col-md-12 col-sm-12 mb-md-3 pl-1 pr-1">
|
|
508
|
+
<div
|
|
509
|
+
className="col-lg-12 p-0 "
|
|
510
|
+
style={{
|
|
511
|
+
width: '100%',
|
|
512
|
+
height: '100%',
|
|
513
|
+
}}
|
|
514
|
+
>
|
|
515
|
+
<ImageGallery items={productimagesarray} thumbnailPosition="bottom" showNav={false} showPlayButton={false} />
|
|
516
|
+
</div>
|
|
517
|
+
</div>
|
|
518
|
+
<div className={langdetect == 'en' ? 'col-lg-7 col-md-12 col-sm-12 pl-2 pr-0' : 'col-lg-7 col-md-12 col-sm-12 pl-0 pr-2'}>
|
|
519
|
+
<div className="row m-0 w-100">
|
|
520
|
+
{/* Name */}
|
|
521
|
+
<div className="row m-0 w-100">
|
|
522
|
+
{props.srcfromprops != 'templatdraftrouter' && (
|
|
523
|
+
<div className="col-lg-10 col-md-10 col-sm-10 p-0 mb-2 d-flex justify-content-start align-items-center">
|
|
524
|
+
<p
|
|
525
|
+
className={
|
|
526
|
+
`${productinfo_cssstyles.productname} ${productinfo_cssstyles.productnamehover}` +
|
|
527
|
+
' m-0 p-0 wordbreak d-flex justify-content-start cursor-pointer font-sm-15 '
|
|
528
|
+
}
|
|
529
|
+
onClick={() => {
|
|
530
|
+
routingcountext(StaticPagesLinksContext.productinfo, true, fetchProductInfoQueryContext.data.data.productinfo.productid);
|
|
531
|
+
}}
|
|
532
|
+
>
|
|
533
|
+
{langdetect == 'en'
|
|
534
|
+
? fetchProductInfoQueryContext.data.data.productinfo.name_en
|
|
535
|
+
: fetchProductInfoQueryContext.data.data.productinfo.name_ar}
|
|
536
|
+
</p>
|
|
537
|
+
</div>
|
|
538
|
+
)}
|
|
539
|
+
{props.srcfromprops == 'templatdraftrouter' && (
|
|
540
|
+
<div className="col-lg-10 col-md-10 col-sm-10 p-0 mb-2 d-flex justify-content-start align-items-center">
|
|
541
|
+
<p className={`${productinfo_cssstyles.productname}` + ' m-0 p-0 wordbreak d-flex justify-content-start '}>
|
|
542
|
+
{langdetect == 'en'
|
|
543
|
+
? fetchProductInfoQueryContext.data.data.productinfo.name_en
|
|
544
|
+
: fetchProductInfoQueryContext.data.data.productinfo.name_ar}
|
|
545
|
+
</p>
|
|
546
|
+
</div>
|
|
547
|
+
)}
|
|
548
|
+
<div className="col-lg-2 col-md-2 col-sm-2 d-flex justify-content-end p-0">
|
|
549
|
+
<div
|
|
550
|
+
className={productinfo_cssstyles.wishlist_btn + ' d-flex justify-content-center align-items-center '}
|
|
551
|
+
onClick={() => {
|
|
552
|
+
addtofavoritescontext(fetchProductInfoQueryContext.data.data.productinfo.productid);
|
|
553
|
+
}}
|
|
554
|
+
style={{
|
|
555
|
+
background: fetchProductInfoQueryContext.data.data.productinfo.IsFavExists == true ? sectionproperties.activebgcolor : '',
|
|
556
|
+
}}
|
|
557
|
+
>
|
|
558
|
+
<i className="h-100 d-flex align-items-center justify-content-center">
|
|
559
|
+
{fetchProductInfoQueryContext.data.data.productinfo.IsFavExists && (
|
|
560
|
+
<i className="h-100 d-flex align-items-center justify-content-center">
|
|
561
|
+
{sectionproperties.faviconshape == 'Star Shape' && (
|
|
562
|
+
<AiFillStar size={sectionproperties.favBtnIconfontsize} style={{ color: sectionproperties.activefaviconcolor }} />
|
|
563
|
+
)}
|
|
564
|
+
{sectionproperties.faviconshape == 'Heart Shape' && (
|
|
565
|
+
<FaHeart size={sectionproperties.favBtnIconfontsize} style={{ color: sectionproperties.activefaviconcolor }} />
|
|
566
|
+
)}
|
|
567
|
+
</i>
|
|
568
|
+
)}
|
|
569
|
+
{!fetchProductInfoQueryContext.data.data.productinfo.IsFavExists && (
|
|
570
|
+
<i className="h-100 d-flex align-items-center justify-content-center">
|
|
571
|
+
{sectionproperties.faviconshape == 'Star Shape' && <AiOutlineStar size={sectionproperties.favBtnIconfontsize} />}
|
|
572
|
+
{sectionproperties.faviconshape == 'Heart Shape' && <FaRegHeart size={sectionproperties.favBtnIconfontsize} />}
|
|
573
|
+
</i>
|
|
574
|
+
)}
|
|
575
|
+
</i>
|
|
576
|
+
</div>
|
|
577
|
+
</div>
|
|
578
|
+
</div>
|
|
579
|
+
{/* Desc */}
|
|
580
|
+
{langdetect == 'en' && fetchProductInfoQueryContext.data.data.productinfo.description_en != '' && (
|
|
581
|
+
<div className="col-lg-12 p-0 mb-5 d-flex justify-content-center" style={{ minHeight: '15vh' }}>
|
|
582
|
+
<div className="row m-0 w-100 d-flex flex-column">
|
|
583
|
+
<p className="m-0 p-0 text-light font-15 d-flex justify-content-start">{lang.description}:</p>
|
|
584
|
+
{/* <ShowMoreText
|
|
585
|
+
lines={5}
|
|
586
|
+
more={lang.showmore}
|
|
587
|
+
less={lang.showless}
|
|
588
|
+
anchorClass="my-anchor-css-className"
|
|
589
|
+
expanded={false}
|
|
590
|
+
truncatedEndingComponent={'... '}
|
|
591
|
+
>
|
|
592
|
+
<p
|
|
593
|
+
className={'text-black text-capitalize m-0 p-0 wordbreak'}
|
|
594
|
+
style={{ textAlign: langdetect == 'en' ? 'left' : 'right' }}
|
|
595
|
+
dangerouslySetInnerHTML={{
|
|
596
|
+
__html:
|
|
597
|
+
langdetect == 'en'
|
|
598
|
+
? fetchProductInfoQueryContext.data.data.productinfo.description_en
|
|
599
|
+
: fetchProductInfoQueryContext.data.data.productinfo.description_ar,
|
|
600
|
+
}}
|
|
601
|
+
></p>
|
|
602
|
+
</ShowMoreText> */}
|
|
603
|
+
</div>
|
|
604
|
+
</div>
|
|
605
|
+
)}
|
|
606
|
+
{langdetect == 'ar' && fetchProductInfoQueryContext.data.data.productinfo.description_ar != '' && (
|
|
607
|
+
<div className="col-lg-12 p-0 mb-5 d-flex justify-content-center" style={{ minHeight: '15vh' }}>
|
|
608
|
+
<div className="row m-0 w-100 d-flex flex-column">
|
|
609
|
+
<p className="m-0 p-0 text-light font-15 d-flex justify-content-start">{lang.description}:</p>
|
|
610
|
+
<ShowMoreText
|
|
611
|
+
lines={5}
|
|
612
|
+
more="Show more"
|
|
613
|
+
less="Show less"
|
|
614
|
+
anchorClass="my-anchor-css-className"
|
|
615
|
+
expanded={false}
|
|
616
|
+
truncatedEndingComponent={'... '}
|
|
617
|
+
>
|
|
618
|
+
<p
|
|
619
|
+
className={'text-black text-capitalize m-0 p-0 wordbreak'}
|
|
620
|
+
style={{ textAlign: langdetect == 'en' ? 'left' : 'right' }}
|
|
621
|
+
dangerouslySetInnerHTML={{
|
|
622
|
+
__html:
|
|
623
|
+
langdetect == 'en'
|
|
624
|
+
? fetchProductInfoQueryContext.data.data.productinfo.description_en
|
|
625
|
+
: fetchProductInfoQueryContext.data.data.productinfo.description_ar,
|
|
626
|
+
}}
|
|
627
|
+
></p>
|
|
628
|
+
</ShowMoreText>
|
|
629
|
+
</div>
|
|
630
|
+
</div>
|
|
631
|
+
)}
|
|
632
|
+
{fetchProductInfoQueryContext.data.data.productinfo.hasvariants == 1 && (
|
|
633
|
+
<div className="row m-0 w-100 d-flex align-items-start">
|
|
634
|
+
{fetchProductInfoQueryContext.data.data.productinfo.productoptions.map((item, index) => {
|
|
635
|
+
return (
|
|
636
|
+
<div className="col-lg-12 p-0 mb-3 d-flex justify-content-start">
|
|
637
|
+
<div className="row m-0 w-100 d-flex align-items-start">
|
|
638
|
+
<div className="col-lg-12 col-md-12 p-0 d-flex mb-1">
|
|
639
|
+
<p
|
|
640
|
+
className={' m-0 p-0 wordbreak'}
|
|
641
|
+
style={{
|
|
642
|
+
color: sectionproperties.varianttitle_color,
|
|
643
|
+
fontWeight: sectionproperties.varianttitle_fontweight,
|
|
644
|
+
textTransform: sectionproperties.varianttitle_texttransform,
|
|
645
|
+
fontSize: sectionproperties.varianttitle_fontSize + 'px',
|
|
646
|
+
}}
|
|
647
|
+
>
|
|
648
|
+
{lang.select} {item.optionname}:
|
|
649
|
+
</p>
|
|
650
|
+
</div>
|
|
651
|
+
<div className="col-lg-12 col-md-12 p-0 d-flex pb-md-3 justify-content-start align-items-start scrollhorixontalcontainer">
|
|
652
|
+
{item.optionvalues.map((optionvaluesitem, optionvaluesindex) => {
|
|
653
|
+
var isoptionvalueselected = 0;
|
|
654
|
+
if (optionvaluesitem.isselected == 1) {
|
|
655
|
+
isoptionvalueselected = 1;
|
|
656
|
+
} else {
|
|
657
|
+
isoptionvalueselected = 0;
|
|
658
|
+
}
|
|
659
|
+
var isoptionvaluedenabled = 0;
|
|
660
|
+
if (optionvaluesitem.isenabled == 1) {
|
|
661
|
+
isoptionvaluedenabled = 1;
|
|
662
|
+
} else {
|
|
663
|
+
isoptionvaluedenabled = 0;
|
|
664
|
+
}
|
|
665
|
+
if (item.optionname == 'color') {
|
|
666
|
+
return (
|
|
667
|
+
<div
|
|
668
|
+
className={
|
|
669
|
+
productinfostyles.color_container +
|
|
670
|
+
' mr-2 variabttcontainer ' +
|
|
671
|
+
`${isoptionvalueselected == 1 ? productinfostyles.color_container_active : ''}`
|
|
672
|
+
}
|
|
673
|
+
onClick={() => {
|
|
674
|
+
if (optionvaluesitem.isenabled == 1) {
|
|
675
|
+
selectproductoptionvalue(index, optionvaluesitem, optionvaluesindex);
|
|
676
|
+
}
|
|
677
|
+
}}
|
|
678
|
+
style={{
|
|
679
|
+
background: optionvaluesitem.valuename,
|
|
680
|
+
opacity: isoptionvaluedenabled == 1 ? 1 : 0.2,
|
|
681
|
+
cursor: isoptionvaluedenabled == 1 ? 'pointer' : 'not-allowed',
|
|
682
|
+
}}
|
|
683
|
+
></div>
|
|
684
|
+
);
|
|
685
|
+
} else if (item.optionname == 'size') {
|
|
686
|
+
return (
|
|
687
|
+
<div
|
|
688
|
+
className={
|
|
689
|
+
`${productinfostyles.variant_container} ${productinfostyles.size_variant_container}` +
|
|
690
|
+
' mr-2 variabttcontainer ' +
|
|
691
|
+
`${isoptionvalueselected == 1 ? productinfostyles.variant_container_active : ''}`
|
|
692
|
+
}
|
|
693
|
+
onClick={() => {
|
|
694
|
+
if (optionvaluesitem.isenabled == 1) {
|
|
695
|
+
selectproductoptionvalue(index, optionvaluesitem, optionvaluesindex);
|
|
696
|
+
}
|
|
697
|
+
}}
|
|
698
|
+
style={{
|
|
699
|
+
backgroundColor: isoptionvaluedenabled == 1 ? '' : 'grey',
|
|
700
|
+
cursor: isoptionvaluedenabled == 1 ? 'pointer' : 'not-allowed',
|
|
701
|
+
}}
|
|
702
|
+
>
|
|
703
|
+
<p
|
|
704
|
+
className={'font-12 wordbreak m-0 p-0 d-flex align-items-center justify-content-center'}
|
|
705
|
+
style={{
|
|
706
|
+
color: sectionproperties.varianttext_color,
|
|
707
|
+
fontWeight: sectionproperties.varianttext_fontweight,
|
|
708
|
+
textTransform: sectionproperties.varianttext_texttransform,
|
|
709
|
+
fontSize: sectionproperties.varianttext_fontSize + 'px',
|
|
710
|
+
}}
|
|
711
|
+
>
|
|
712
|
+
{optionvaluesitem.valuename}
|
|
713
|
+
</p>
|
|
714
|
+
</div>
|
|
715
|
+
);
|
|
716
|
+
} else {
|
|
717
|
+
return (
|
|
718
|
+
<div
|
|
719
|
+
className={
|
|
720
|
+
productinfostyles.variant_container +
|
|
721
|
+
' mr-2 variabttcontainer ' +
|
|
722
|
+
`${isoptionvalueselected == 1 ? productinfostyles.variant_container_active : ''}`
|
|
723
|
+
}
|
|
724
|
+
onClick={() => {
|
|
725
|
+
if (optionvaluesitem.isenabled == 1) {
|
|
726
|
+
selectproductoptionvalue(index, optionvaluesitem, optionvaluesindex);
|
|
727
|
+
}
|
|
728
|
+
}}
|
|
729
|
+
style={{
|
|
730
|
+
backgroundColor:
|
|
731
|
+
isoptionvalueselected == 1
|
|
732
|
+
? 'green'
|
|
733
|
+
: isoptionvaluedenabled == 1
|
|
734
|
+
? sectionproperties.variantcontainer_bgcolor
|
|
735
|
+
: 'grey',
|
|
736
|
+
minWidth: sectionproperties.variantcontainer_minwidth + 'px',
|
|
737
|
+
height: sectionproperties.variantcontainer_height + 'px',
|
|
738
|
+
borderRadius: sectionproperties.variantcontainer_borderBottomLeftRadius + 'px',
|
|
739
|
+
color: sectionproperties.variantcontainer_color,
|
|
740
|
+
cursor: isoptionvaluedenabled == 1 ? 'pointer' : 'not-allowed',
|
|
741
|
+
}}
|
|
742
|
+
>
|
|
743
|
+
<p
|
|
744
|
+
className={'m-0 p-0 d-flex align-items-center justify-content-center'}
|
|
745
|
+
style={{
|
|
746
|
+
color: sectionproperties.varianttext_color,
|
|
747
|
+
fontWeight: sectionproperties.varianttext_fontweight,
|
|
748
|
+
textTransform: sectionproperties.varianttext_texttransform,
|
|
749
|
+
fontSize: sectionproperties.varianttext_fontSize + 'px',
|
|
750
|
+
}}
|
|
751
|
+
>
|
|
752
|
+
{optionvaluesitem.valuename}
|
|
753
|
+
</p>
|
|
754
|
+
</div>
|
|
755
|
+
);
|
|
756
|
+
}
|
|
757
|
+
})}
|
|
758
|
+
</div>
|
|
759
|
+
</div>
|
|
760
|
+
</div>
|
|
761
|
+
);
|
|
762
|
+
})}
|
|
763
|
+
</div>
|
|
764
|
+
)}
|
|
765
|
+
<div className="col-lg-12 p-0 mb-3">
|
|
766
|
+
<div
|
|
767
|
+
style={{
|
|
768
|
+
width: sectionproperties.availability_width + 'px',
|
|
769
|
+
height: sectionproperties.availability_height + 'px',
|
|
770
|
+
background:
|
|
771
|
+
fetchProductInfoQueryContext.data.data.productinfo.quantavailtype == 'nolimit'
|
|
772
|
+
? sectionproperties.availability_availablebgcolor
|
|
773
|
+
: sectionproperties.availability_limitedbgcolor,
|
|
774
|
+
borderRadius: sectionproperties.availability_borderrradius + 'px',
|
|
775
|
+
border:
|
|
776
|
+
fetchProductInfoQueryContext.data.data.productinfo.quantavailtype == 'nolimit'
|
|
777
|
+
? sectionproperties.availability_borderwidtth + 'px solid ' + sectionproperties.availability_availabletextcolor
|
|
778
|
+
: sectionproperties.availability_borderwidtth + 'px solid ' + sectionproperties.availability_limitedtextcolor,
|
|
779
|
+
}}
|
|
780
|
+
className="d-flex justify-content-start align-items-center pl-3 pr-3"
|
|
781
|
+
>
|
|
782
|
+
<p
|
|
783
|
+
className="m-0 p-0 font-weight-500 wordbreak"
|
|
784
|
+
style={{
|
|
785
|
+
color:
|
|
786
|
+
fetchProductInfoQueryContext.data.data.productinfo.quantavailtype == 'nolimit'
|
|
787
|
+
? sectionproperties.availability_availabletextcolor
|
|
788
|
+
: sectionproperties.availability_limitedtextcolor,
|
|
789
|
+
fontSize: sectionproperties.availability_fontsize + 'px',
|
|
790
|
+
}}
|
|
791
|
+
>
|
|
792
|
+
<span style={{ color: sectionproperties.availability_textcolor }} className="font-weight-600">
|
|
793
|
+
{lang.availability}:
|
|
794
|
+
</span>
|
|
795
|
+
<span className="ml-1 mr-1">
|
|
796
|
+
{fetchProductInfoQueryContext.data.data.productinfo.quantavailtype == 'nolimit' ? lang.available : lang.limitedquantity}
|
|
797
|
+
</span>
|
|
798
|
+
</p>
|
|
799
|
+
</div>
|
|
800
|
+
</div>
|
|
801
|
+
<div className="col-lg-12 p-0 mb-3">
|
|
802
|
+
<hr className="mb-0 mt-2" />
|
|
803
|
+
</div>
|
|
804
|
+
<div className="col-lg-12 p-0 mb-3">
|
|
805
|
+
<div className="row m-0 w-100">
|
|
806
|
+
<div className="col-lg-12 p-0 mb-2 d-flex justofy-content-start">
|
|
807
|
+
<p
|
|
808
|
+
className="m-0 p-0"
|
|
809
|
+
style={{
|
|
810
|
+
color: sectionproperties.text_secondarycolor,
|
|
811
|
+
fontSize: sectionproperties.secondaryfontsize + 'px',
|
|
812
|
+
}}
|
|
813
|
+
>
|
|
814
|
+
{lang.quantity}:
|
|
815
|
+
</p>
|
|
816
|
+
</div>
|
|
817
|
+
<button
|
|
818
|
+
className={` ${productinfo_cssstyles.quantitybtn}` + ' p-0 d-flex align-items-center justify-content-center ml-sm-auto mr-sm-auto mb-sm-2 '}
|
|
819
|
+
style={{
|
|
820
|
+
height: sectionproperties.quantitybtn_height + 'px',
|
|
821
|
+
width: sectionproperties.quantitybtn_width + 'px',
|
|
822
|
+
flexDirection: 'row',
|
|
823
|
+
direction: 'ltr',
|
|
824
|
+
}}
|
|
825
|
+
>
|
|
826
|
+
<span
|
|
827
|
+
className={`${productinfo_cssstyles.minus_quantitybtn_icon_container}` + ' m-1 '}
|
|
828
|
+
onClick={() => {
|
|
829
|
+
var tempaddtocardpayloadobj = { ...addtocardpayloadobj };
|
|
830
|
+
if (tempaddtocardpayloadobj.quantity > 0) {
|
|
831
|
+
tempaddtocardpayloadobj.quantity = tempaddtocardpayloadobj.quantity - 1;
|
|
832
|
+
}
|
|
833
|
+
setaddtocardpayloadobj({ ...tempaddtocardpayloadobj });
|
|
834
|
+
}}
|
|
835
|
+
>
|
|
836
|
+
<i className="fa fa-chevron-down font-12"></i>
|
|
837
|
+
</span>
|
|
838
|
+
<span className={`${productinfo_cssstyles.quantitybtn_text}`}>{addtocardpayloadobj.quantity}</span>
|
|
839
|
+
<span
|
|
840
|
+
className={`${productinfo_cssstyles.add_quantitybtn_icon_container}` + ' m-1 '}
|
|
841
|
+
onClick={() => {
|
|
842
|
+
var tempaddtocardpayloadobj = { ...addtocardpayloadobj };
|
|
843
|
+
tempaddtocardpayloadobj.quantity = tempaddtocardpayloadobj.quantity + 1;
|
|
844
|
+
setaddtocardpayloadobj({ ...tempaddtocardpayloadobj });
|
|
845
|
+
}}
|
|
846
|
+
>
|
|
847
|
+
<i className="fa fa-chevron-up font-12"></i>
|
|
848
|
+
</span>
|
|
849
|
+
</button>
|
|
850
|
+
<button
|
|
851
|
+
className={`${productinfo_cssstyles.cart_btn} ` + ' ml-1 mr-1 d-flex align-items-center justify-content-center ml-sm-auto mr-sm-auto mb-sm-2 '}
|
|
852
|
+
onClick={() => {
|
|
853
|
+
addtocartfunc();
|
|
854
|
+
}}
|
|
855
|
+
disabled={AddtoCartMutationContext.isLoading == true ? true : false}
|
|
856
|
+
>
|
|
857
|
+
{!AddtoCartMutationContext.isLoading && (
|
|
858
|
+
<span className={' d-flex align-items-center justify-content-center '}>
|
|
859
|
+
<i
|
|
860
|
+
className={
|
|
861
|
+
langdetect == 'en'
|
|
862
|
+
? 'h-100 d-flex align-items-center justify-content-center mr-2'
|
|
863
|
+
: 'h-100 d-flex align-items-center justify-content-center ml-2'
|
|
864
|
+
}
|
|
865
|
+
>
|
|
866
|
+
{sectionproperties.carticonstyle == 'Shopping bag 1' && (
|
|
867
|
+
<FiShoppingBag className="" size={sectionproperties.cartBtn_iconFontSize} />
|
|
868
|
+
)}
|
|
869
|
+
{sectionproperties.carticonstyle == 'Shopping bag 2' && (
|
|
870
|
+
<CgShoppingBag className="" size={sectionproperties.cartBtn_iconFontSize} />
|
|
871
|
+
)}
|
|
872
|
+
{sectionproperties.carticonstyle == 'Shopping bag 3' && <BsBag className="" size={sectionproperties.cartBtn_iconFontSize} />}
|
|
873
|
+
{sectionproperties.carticonstyle == 'Shopping bag 4' && (
|
|
874
|
+
<IoBagHandleOutline className="" size={sectionproperties.cartBtn_iconFontSize} />
|
|
875
|
+
)}
|
|
876
|
+
{sectionproperties.carticonstyle == 'Shopping cart 1' && (
|
|
877
|
+
<FiShoppingCart className="" size={sectionproperties.cartBtn_iconFontSize} />
|
|
878
|
+
)}
|
|
879
|
+
{sectionproperties.carticonstyle == 'Shopping cart 2' && <MdOutlineShoppingCart size={sectionproperties.cartBtn_iconFontSize} />}
|
|
880
|
+
</i>
|
|
881
|
+
{lang.addtocart}
|
|
882
|
+
</span>
|
|
883
|
+
)}
|
|
884
|
+
{AddtoCartMutationContext.isLoading && (
|
|
885
|
+
<div className={' d-flex align-items-center justify-content-center '}>
|
|
886
|
+
<CircularProgress color="white" width="20px" height="20px" duration="1s" />
|
|
887
|
+
</div>
|
|
888
|
+
)}
|
|
889
|
+
</button>
|
|
890
|
+
</div>
|
|
891
|
+
</div>
|
|
892
|
+
<div className="col-lg-12 p-0 mb-3">
|
|
893
|
+
<div className="row m-0 w-100 d-flex flex-row">
|
|
894
|
+
<p
|
|
895
|
+
className="m-0 p-0"
|
|
896
|
+
style={{
|
|
897
|
+
color: sectionproperties.total_color,
|
|
898
|
+
fontSize: sectionproperties.total_fontsize + 'px',
|
|
899
|
+
fontWeight: sectionproperties.total_fontweight,
|
|
900
|
+
textTransform: sectionproperties.total_texttransform,
|
|
901
|
+
}}
|
|
902
|
+
>
|
|
903
|
+
{lang.total}:
|
|
904
|
+
</p>
|
|
905
|
+
<div className="col-lg-9 col-md-9 col-sm-9 d-flex align-items-center pl-1 pr-1">
|
|
906
|
+
<p
|
|
907
|
+
className={'m-0 p-0 wordbreak d-flex align-items-center justify-content-end'}
|
|
908
|
+
style={{
|
|
909
|
+
fontSize: sectionproperties.prodpriceFontSize + 'px',
|
|
910
|
+
fontWeight: sectionproperties.prodPriceFontWeight,
|
|
911
|
+
color: sectionproperties.prodPriceColor,
|
|
912
|
+
}}
|
|
913
|
+
>
|
|
914
|
+
{fetchProductInfoQueryContext.data.data.productinfo.hasvariants == 1 && variantindexcompleted.length != 0 && (
|
|
915
|
+
<>
|
|
916
|
+
{fetchProductInfoQueryContext.data.data.productinfo.variants[variantindexcompleted].hassale == 1 && (
|
|
917
|
+
<p
|
|
918
|
+
className={
|
|
919
|
+
langdetect == 'en'
|
|
920
|
+
? ' m-0 p-0 d-flex align-items-center justify-content-end wordbreak text-right '
|
|
921
|
+
: ' m-0 p-0 d-flex align-items-center justify-content-end wordbreak text-left '
|
|
922
|
+
}
|
|
923
|
+
>
|
|
924
|
+
{langdetect == 'en' ? 'EGP' : ''}{' '}
|
|
925
|
+
{fetchProductInfoQueryContext.data.data.productinfo.variants[variantindexcompleted].variantsaleprice}{' '}
|
|
926
|
+
{langdetect == 'en' ? '' : 'ج.م'}
|
|
927
|
+
</p>
|
|
928
|
+
)}
|
|
929
|
+
<>
|
|
930
|
+
{fetchProductInfoQueryContext.data.data.productinfo.variants[variantindexcompleted].hassale == 0 && (
|
|
931
|
+
<p
|
|
932
|
+
className={
|
|
933
|
+
langdetect == 'en'
|
|
934
|
+
? ' m-0 p-0 d-flex align-items-center justify-content-end wordbreak text-right wordbreak '
|
|
935
|
+
: ' m-0 p-0 d-flex align-items-center justify-content-end wordbreak text-left wordbreak '
|
|
936
|
+
}
|
|
937
|
+
>
|
|
938
|
+
{langdetect == 'en' ? 'EGP' : ''}{' '}
|
|
939
|
+
{fetchProductInfoQueryContext.data.data.productinfo.variants[variantindexcompleted].variantprice}{' '}
|
|
940
|
+
{langdetect == 'en' ? '' : 'ج.م'}
|
|
941
|
+
</p>
|
|
942
|
+
)}
|
|
943
|
+
</>
|
|
944
|
+
</>
|
|
945
|
+
)}
|
|
946
|
+
{fetchProductInfoQueryContext.data.data.productinfo.hasvariants == 0 && (
|
|
947
|
+
<>
|
|
948
|
+
{fetchProductInfoQueryContext.data.data.productinfo.hassale == 0 && (
|
|
949
|
+
<span
|
|
950
|
+
className={
|
|
951
|
+
langdetect == 'en'
|
|
952
|
+
? ' d-flex align-items-center justify-content-end wordbreak text-right wordbreak '
|
|
953
|
+
: ' d-flex align-items-center justify-content-end wordbreak text-left wordbreak '
|
|
954
|
+
}
|
|
955
|
+
>
|
|
956
|
+
{langdetect == 'en' ? 'EGP' : ''} {fetchProductInfoQueryContext.data.data.productinfo.defaultprice}{' '}
|
|
957
|
+
{langdetect == 'en' ? '' : 'ج.م'}
|
|
958
|
+
</span>
|
|
959
|
+
)}
|
|
960
|
+
<>
|
|
961
|
+
{fetchProductInfoQueryContext.data.data.productinfo.hassale == 1 && (
|
|
962
|
+
<span
|
|
963
|
+
className={
|
|
964
|
+
langdetect == 'en'
|
|
965
|
+
? ' d-flex align-items-center justify-content-end wordbreak text-right wordbreak '
|
|
966
|
+
: ' d-flex align-items-center justify-content-end wordbreak text-left wordbreak '
|
|
967
|
+
}
|
|
968
|
+
>
|
|
969
|
+
{langdetect == 'en' ? 'EGP' : ''} {fetchProductInfoQueryContext.data.data.productinfo.defaultsaleprice}{' '}
|
|
970
|
+
{langdetect == 'en' ? '' : 'ج.م'}
|
|
971
|
+
</span>
|
|
972
|
+
)}
|
|
973
|
+
</>
|
|
974
|
+
</>
|
|
975
|
+
)}
|
|
976
|
+
</p>
|
|
977
|
+
<p
|
|
978
|
+
className={'m-0 p-0 linethrough wordbreak'}
|
|
979
|
+
style={{
|
|
980
|
+
color: sectionproperties.prodsalePriceColor,
|
|
981
|
+
fontSize: sectionproperties.prodsalepriceFontSize + 'px',
|
|
982
|
+
fontWeight: sectionproperties.prodsalePriceFontWeight,
|
|
983
|
+
}}
|
|
984
|
+
>
|
|
985
|
+
{fetchProductInfoQueryContext.data.data.productinfo.hasvariants == 0 && (
|
|
986
|
+
<>
|
|
987
|
+
{fetchProductInfoQueryContext.data.data.productinfo.hassale == 1 && (
|
|
988
|
+
<span
|
|
989
|
+
className={
|
|
990
|
+
langdetect == 'en'
|
|
991
|
+
? ' d-flex align-items-center justify-content-end wordbreak text-right wordbreak '
|
|
992
|
+
: ' d-flex align-items-center justify-content-end wordbreak text-left wordbreak '
|
|
993
|
+
}
|
|
994
|
+
>
|
|
995
|
+
<span className="ml-2 mr-2">-</span> {langdetect == 'en' ? 'EGP' : ''}{' '}
|
|
996
|
+
{fetchProductInfoQueryContext.data.data.productinfo.defaultprice} {langdetect == 'en' ? '' : 'ج.م'}
|
|
997
|
+
</span>
|
|
998
|
+
)}
|
|
999
|
+
</>
|
|
1000
|
+
)}
|
|
1001
|
+
{fetchProductInfoQueryContext.data.data.productinfo.hasvariants == 1 && variantindexcompleted.length != 0 && (
|
|
1002
|
+
<>
|
|
1003
|
+
{fetchProductInfoQueryContext.data.data.productinfo.variants[variantindexcompleted].hassale == 1 && (
|
|
1004
|
+
<span
|
|
1005
|
+
className={
|
|
1006
|
+
langdetect == 'en'
|
|
1007
|
+
? ' d-flex align-items-center justify-content-end wordbreak text-right wordbreak '
|
|
1008
|
+
: ' d-flex align-items-center justify-content-end wordbreak text-left wordbreak '
|
|
1009
|
+
}
|
|
1010
|
+
>
|
|
1011
|
+
<span className="ml-2 mr-2">-</span>
|
|
1012
|
+
{langdetect == 'en' ? 'EGP' : ''}{' '}
|
|
1013
|
+
{fetchProductInfoQueryContext.data.data.productinfo.variants[variantindexcompleted].variantprice}{' '}
|
|
1014
|
+
{langdetect == 'en' ? '' : 'ج.م'}
|
|
1015
|
+
</span>
|
|
1016
|
+
)}
|
|
1017
|
+
</>
|
|
1018
|
+
)}
|
|
1019
|
+
</p>
|
|
1020
|
+
</div>
|
|
1021
|
+
</div>
|
|
1022
|
+
</div>
|
|
1023
|
+
<div className="col-lg-12 p-0 mb-3">
|
|
1024
|
+
<hr className="mb-0 mt-2" />
|
|
1025
|
+
</div>
|
|
1026
|
+
<div className="row m-0 w-100 d-flex align-items-center mb-3">
|
|
1027
|
+
<div
|
|
1028
|
+
style={{
|
|
1029
|
+
width: sectionproperties.iconcontainerwidth + 'px',
|
|
1030
|
+
height: sectionproperties.iconcontainerheight + 'px',
|
|
1031
|
+
borderRadius: sectionproperties.iconcontainerborderbl + 'px',
|
|
1032
|
+
background: sectionproperties.iconcontainerbg,
|
|
1033
|
+
}}
|
|
1034
|
+
>
|
|
1035
|
+
<i className="h-100 d-flex align-items-center justify-content-center">
|
|
1036
|
+
<RiSecurePaymentLine
|
|
1037
|
+
size={20}
|
|
1038
|
+
style={{
|
|
1039
|
+
color: sectionproperties.iconcontainercolor,
|
|
1040
|
+
}}
|
|
1041
|
+
/>
|
|
1042
|
+
</i>
|
|
1043
|
+
</div>
|
|
1044
|
+
<div className="col-lg-9 col-md-9 col-sm-9 d-flex justofy-content-start">
|
|
1045
|
+
<p
|
|
1046
|
+
className="m-0 p-0 wordbreak"
|
|
1047
|
+
style={{
|
|
1048
|
+
fontSize: sectionproperties.icontextfontsize + 'px',
|
|
1049
|
+
color: sectionproperties.icontextcolor,
|
|
1050
|
+
fontWeight: sectionproperties.icontextfontweight,
|
|
1051
|
+
}}
|
|
1052
|
+
>
|
|
1053
|
+
{lang.securepayment}
|
|
1054
|
+
</p>
|
|
1055
|
+
</div>
|
|
1056
|
+
</div>
|
|
1057
|
+
<div className="row m-0 w-100 d-flex align-items-center mb-3">
|
|
1058
|
+
<div
|
|
1059
|
+
style={{
|
|
1060
|
+
width: sectionproperties.iconcontainerwidth + 'px',
|
|
1061
|
+
height: sectionproperties.iconcontainerheight + 'px',
|
|
1062
|
+
borderRadius: sectionproperties.iconcontainerborderbl + 'px',
|
|
1063
|
+
background: sectionproperties.iconcontainerbg,
|
|
1064
|
+
}}
|
|
1065
|
+
>
|
|
1066
|
+
<i className="h-100 d-flex align-items-center justify-content-center">
|
|
1067
|
+
<MdOutlineLocalShipping
|
|
1068
|
+
size={20}
|
|
1069
|
+
style={{
|
|
1070
|
+
color: sectionproperties.iconcontainercolor,
|
|
1071
|
+
}}
|
|
1072
|
+
/>
|
|
1073
|
+
</i>
|
|
1074
|
+
</div>
|
|
1075
|
+
<div className="col-lg-9 col-md-9 col-sm-9 d-flex justofy-content-start">
|
|
1076
|
+
<p
|
|
1077
|
+
className="m-0 p-0 wordbreak"
|
|
1078
|
+
style={{
|
|
1079
|
+
fontSize: sectionproperties.icontextfontsize + 'px',
|
|
1080
|
+
color: sectionproperties.icontextcolor,
|
|
1081
|
+
fontWeight: sectionproperties.icontextfontweight,
|
|
1082
|
+
}}
|
|
1083
|
+
>
|
|
1084
|
+
{lang.trustedshipping}
|
|
1085
|
+
</p>
|
|
1086
|
+
</div>
|
|
1087
|
+
</div>
|
|
1088
|
+
</div>
|
|
1089
|
+
</div>
|
|
1090
|
+
</div>
|
|
1091
|
+
</div>
|
|
1092
|
+
</div>
|
|
1093
|
+
<div className="col-lg-3 pl-2 pr-2">
|
|
1094
|
+
{authdetailsContext?.loggedin && (
|
|
1095
|
+
<div className={`${productinfo_cssstyles.cardcontainer}` + ' mb-3 '}>
|
|
1096
|
+
<div className="row m-0 w-100">
|
|
1097
|
+
<i className="h-100 d-flex align-items-center justify-content-center mt-1">
|
|
1098
|
+
<FiMapPin
|
|
1099
|
+
size={20}
|
|
1100
|
+
style={{
|
|
1101
|
+
color: sectionproperties.generaliconcolor,
|
|
1102
|
+
}}
|
|
1103
|
+
/>
|
|
1104
|
+
</i>
|
|
1105
|
+
<div className="col-lg-10 col-md-10 col-sm-10 d-flex justify-content-start flex-column">
|
|
1106
|
+
<div className="row m-0 w-100">
|
|
1107
|
+
<div className="col-lg-12 p-0 d-flex justify-content-start">
|
|
1108
|
+
<p
|
|
1109
|
+
className="m-0 p-0 wordbreak"
|
|
1110
|
+
style={{
|
|
1111
|
+
fontSize: sectionproperties.generaltext_fontSize + 'px',
|
|
1112
|
+
color: sectionproperties.generaltext_fontColor,
|
|
1113
|
+
textTransform: sectionproperties.generaltext_textTransform,
|
|
1114
|
+
fontWeight: sectionproperties.generaltext_fontWeight,
|
|
1115
|
+
}}
|
|
1116
|
+
>
|
|
1117
|
+
{lang.deliverto}
|
|
1118
|
+
</p>
|
|
1119
|
+
</div>
|
|
1120
|
+
<div className="col-lg-12 p-0 d-flex justify-content-start">
|
|
1121
|
+
{authdetailsContext?.loggedin && (
|
|
1122
|
+
<p
|
|
1123
|
+
className="m-0 p-0 wordbreak"
|
|
1124
|
+
style={{
|
|
1125
|
+
color: sectionproperties.text_secondarycolor,
|
|
1126
|
+
fontSize: sectionproperties.secondaryfontsize + 'px',
|
|
1127
|
+
}}
|
|
1128
|
+
>
|
|
1129
|
+
{authdetailsContext?.customerinfo?.name}, Egypt
|
|
1130
|
+
</p>
|
|
1131
|
+
)}
|
|
1132
|
+
</div>
|
|
1133
|
+
</div>
|
|
1134
|
+
</div>
|
|
1135
|
+
</div>
|
|
1136
|
+
</div>
|
|
1137
|
+
)}
|
|
1138
|
+
<div
|
|
1139
|
+
className={`${productinfo_cssstyles.cardcontainer}` + ' mb-3 '}
|
|
1140
|
+
style={{ cursor: 'pointer' }}
|
|
1141
|
+
onClick={() => {
|
|
1142
|
+
routingcountext(StaticPagesLinksContext.Policies);
|
|
1143
|
+
}}
|
|
1144
|
+
>
|
|
1145
|
+
<div className="row m-0 w-100">
|
|
1146
|
+
<div className="col-lg-12 pl-1 pr-1 d-flex align-items-center">
|
|
1147
|
+
<i className="h-100 d-flex align-items-center justify-content-center">
|
|
1148
|
+
<FaShippingFast
|
|
1149
|
+
size={18}
|
|
1150
|
+
style={{
|
|
1151
|
+
color: sectionproperties.generaliconcolor,
|
|
1152
|
+
}}
|
|
1153
|
+
/>
|
|
1154
|
+
</i>
|
|
1155
|
+
<p
|
|
1156
|
+
className="m-0 p-0 ml-2 mr-2 wordbreak"
|
|
1157
|
+
style={{
|
|
1158
|
+
fontSize: sectionproperties.generaltext_fontSize + 'px',
|
|
1159
|
+
color: sectionproperties.generaltext_fontColor,
|
|
1160
|
+
textTransform: sectionproperties.generaltext_textTransform,
|
|
1161
|
+
fontWeight: sectionproperties.generaltext_fontWeight,
|
|
1162
|
+
cursor: 'pointer',
|
|
1163
|
+
}}
|
|
1164
|
+
>
|
|
1165
|
+
{langdetect == 'en' ? returnpolicyobj('Shipping Policy')?.policypagename_en : returnpolicyobj('Shipping Policy')?.policypagename_ar}
|
|
1166
|
+
{/* {lang.shippingpolicy} */}
|
|
1167
|
+
</p>
|
|
1168
|
+
</div>
|
|
1169
|
+
<div className="col-lg-12 pl-1 pr-1">
|
|
1170
|
+
<hr className="mt-2 mb-2" />
|
|
1171
|
+
</div>
|
|
1172
|
+
<div className="col-lg-12 pl-1 pr-1 d-flex justify-content-start">
|
|
1173
|
+
<p
|
|
1174
|
+
className="m-0 p-0 wordbreak"
|
|
1175
|
+
style={{
|
|
1176
|
+
fontSize: sectionproperties.secondaryfontsize + 'px',
|
|
1177
|
+
color: sectionproperties.text_secondarycolor,
|
|
1178
|
+
lineClamp: 20,
|
|
1179
|
+
WebkitLineClamp: 20,
|
|
1180
|
+
}}
|
|
1181
|
+
dangerouslySetInnerHTML={{
|
|
1182
|
+
__html: langdetect == 'en' ? returnpolicyobj('Shipping Policy')?.policycontent_en : returnpolicyobj('Shipping Policy')?.policycontent_ar,
|
|
1183
|
+
}}
|
|
1184
|
+
></p>
|
|
1185
|
+
</div>
|
|
1186
|
+
</div>
|
|
1187
|
+
</div>
|
|
1188
|
+
<div
|
|
1189
|
+
className={`${productinfo_cssstyles.cardcontainer}` + ' mb-3 '}
|
|
1190
|
+
style={{ cursor: 'pointer' }}
|
|
1191
|
+
onClick={() => {
|
|
1192
|
+
routingcountext(StaticPagesLinksContext.Policies);
|
|
1193
|
+
}}
|
|
1194
|
+
>
|
|
1195
|
+
<div className="row m-0 w-100">
|
|
1196
|
+
<div className="col-lg-12 pl-1 pr-1 d-flex align-items-center">
|
|
1197
|
+
<i className="h-100 d-flex align-items-center justify-content-center">
|
|
1198
|
+
<MdOutlinePolicy
|
|
1199
|
+
size={18}
|
|
1200
|
+
style={{
|
|
1201
|
+
color: sectionproperties.generaliconcolor,
|
|
1202
|
+
}}
|
|
1203
|
+
/>
|
|
1204
|
+
</i>
|
|
1205
|
+
<p
|
|
1206
|
+
className="m-0 p-0 ml-2 mr-2 wordbreak"
|
|
1207
|
+
style={{
|
|
1208
|
+
fontSize: sectionproperties.generaltext_fontSize + 'px',
|
|
1209
|
+
color: sectionproperties.generaltext_fontColor,
|
|
1210
|
+
textTransform: sectionproperties.generaltext_textTransform,
|
|
1211
|
+
fontWeight: sectionproperties.generaltext_fontWeight,
|
|
1212
|
+
}}
|
|
1213
|
+
>
|
|
1214
|
+
{langdetect == 'en' ? returnpolicyobj('Refund Policy')?.policypagename_en : returnpolicyobj('Refund Policy')?.policypagename_ar}
|
|
1215
|
+
</p>
|
|
1216
|
+
</div>
|
|
1217
|
+
<div className="col-lg-12 pl-1 pr-1">
|
|
1218
|
+
<hr className="mt-2 mb-2" />
|
|
1219
|
+
</div>
|
|
1220
|
+
<div className="col-lg-12 pl-1 pr-1 d-flex justify-content-start">
|
|
1221
|
+
<p
|
|
1222
|
+
className="m-0 p-0 wordbreak"
|
|
1223
|
+
style={{
|
|
1224
|
+
fontSize: sectionproperties.secondaryfontsize + 'px',
|
|
1225
|
+
color: sectionproperties.text_secondarycolor,
|
|
1226
|
+
lineClamp: 20,
|
|
1227
|
+
WebkitLineClamp: 20,
|
|
1228
|
+
}}
|
|
1229
|
+
dangerouslySetInnerHTML={{
|
|
1230
|
+
__html: langdetect == 'en' ? returnpolicyobj('Refund Policy')?.policycontent_en : returnpolicyobj('Refund Policy')?.policycontent_ar,
|
|
1231
|
+
}}
|
|
1232
|
+
></p>
|
|
1233
|
+
</div>
|
|
1234
|
+
</div>
|
|
1235
|
+
</div>
|
|
1236
|
+
<div className={`${productinfo_cssstyles.cardcontainer}` + ' mb-3 '}>
|
|
1237
|
+
<div className="row m-0 w-100">
|
|
1238
|
+
<i className="h-100 d-flex align-items-center justify-content-center text-light mt-1">
|
|
1239
|
+
<HiOutlinePhone
|
|
1240
|
+
size={20}
|
|
1241
|
+
style={{
|
|
1242
|
+
color: sectionproperties.generaliconcolor,
|
|
1243
|
+
}}
|
|
1244
|
+
/>
|
|
1245
|
+
</i>
|
|
1246
|
+
<div className="col-lg-10 col-md-10 col-sm-10 d-flex justify-content-start">
|
|
1247
|
+
<div className="row m-0 w-100">
|
|
1248
|
+
<div className="col-lg-12 p-0 d-flex justify-content-start">
|
|
1249
|
+
<p
|
|
1250
|
+
className="m-0 p-0 wordbreak"
|
|
1251
|
+
style={{
|
|
1252
|
+
fontSize: sectionproperties.generaltext_fontSize + 'px',
|
|
1253
|
+
color: sectionproperties.generaltext_fontColor,
|
|
1254
|
+
textTransform: sectionproperties.generaltext_textTransform,
|
|
1255
|
+
fontWeight: sectionproperties.generaltext_fontWeight,
|
|
1256
|
+
}}
|
|
1257
|
+
>
|
|
1258
|
+
{lang.callus}
|
|
1259
|
+
</p>
|
|
1260
|
+
</div>
|
|
1261
|
+
<div className="col-lg-12 p-0 d-flex justify-content-start">
|
|
1262
|
+
<p
|
|
1263
|
+
className="m-0 p-0 wordbreak"
|
|
1264
|
+
style={{
|
|
1265
|
+
fontSize: sectionproperties.secondaryfontsize + 'px',
|
|
1266
|
+
color: sectionproperties.text_secondarycolor,
|
|
1267
|
+
}}
|
|
1268
|
+
>
|
|
1269
|
+
{authdetailsContext?.instinfo?.contactinfo?.mobile}
|
|
1270
|
+
</p>
|
|
1271
|
+
</div>
|
|
1272
|
+
</div>
|
|
1273
|
+
</div>
|
|
1274
|
+
</div>
|
|
1275
|
+
</div>
|
|
1276
|
+
</div>
|
|
1277
|
+
</div>
|
|
1278
|
+
)}
|
|
1279
|
+
</div>
|
|
1280
|
+
{/* {FetchRelatedProductsQuery.isSuccess && FetchRelatedProductsQuery.data.data.productsrelated.length != 0 && (
|
|
1281
|
+
<div className="w-100 row m-0 d-flex justify-content-start">
|
|
1282
|
+
<div className="col-lg-12">
|
|
1283
|
+
<hr className="mt-0" />
|
|
1284
|
+
</div>
|
|
1285
|
+
<div
|
|
1286
|
+
className="col-lg-12"
|
|
1287
|
+
style={{
|
|
1288
|
+
background: sectionproperties.relatedproductsbg,
|
|
1289
|
+
paddingTop: sectionproperties.relatedproductspaddingTop + 'px',
|
|
1290
|
+
paddingBottom: sectionproperties.relatedproductspaddingBottom + 'px',
|
|
1291
|
+
paddingLeft: sectionproperties.relatedproductspaddingLeft + 'px',
|
|
1292
|
+
paddingRight: sectionproperties.relatedproductspaddingRight + 'px',
|
|
1293
|
+
borderTopLeftRadius: sectionproperties.relatedproductsbgbtlr + 'px',
|
|
1294
|
+
borderTopRightRadius: sectionproperties.relatedproductsbgbtrr + 'px',
|
|
1295
|
+
borderBottomLeftRadius: sectionproperties.relatedproductsbgbblr + 'px',
|
|
1296
|
+
borderBottomRightRadius: sectionproperties.relatedproductsbgbbrr + 'px',
|
|
1297
|
+
boxShadow: sectionproperties.relatedproductsbgbbrrshowshadow == 'Show' ? '0 0 10px ' + sectionproperties.relatedproductsshadowcolor : 'none',
|
|
1298
|
+
}}
|
|
1299
|
+
>
|
|
1300
|
+
<div className="row m-0 w-100">
|
|
1301
|
+
<div className="col-lg-12 col-md-12 col-sm-12 d-flex align-items-center p-0 mb-2">
|
|
1302
|
+
<div className={`${generalstyles.sectiontitlecont} `}>
|
|
1303
|
+
{sectionproperties.relatedproductstitlestyle == 'Line Under Text' && (
|
|
1304
|
+
<div className="col-lg-12 col-md-12 col-sm-12 d-flex align-items-center p-0">
|
|
1305
|
+
<div className={`${generalstyles.sectiontitlecont} `}>
|
|
1306
|
+
<div className={' col-lg-12 d-flex align-items-center p-0'}>
|
|
1307
|
+
<span
|
|
1308
|
+
className={`${productinfo_cssstyles.sectiontitlespan}`}
|
|
1309
|
+
style={{
|
|
1310
|
+
fontSize: sectionproperties.relatedproductstitlefontsize + 'px',
|
|
1311
|
+
color: sectionproperties.relatedproductstitlecolor,
|
|
1312
|
+
fontWeight: sectionproperties.relatedproductstitlefontweight,
|
|
1313
|
+
textTransform: sectionproperties.relatedproductstitletextTransform,
|
|
1314
|
+
}}
|
|
1315
|
+
>
|
|
1316
|
+
{lang.relatedproducts}
|
|
1317
|
+
</span>
|
|
1318
|
+
</div>
|
|
1319
|
+
</div>
|
|
1320
|
+
</div>
|
|
1321
|
+
)}
|
|
1322
|
+
{sectionproperties.relatedproductstitlestyle == 'Line Before Text' && (
|
|
1323
|
+
<div
|
|
1324
|
+
className="col-lg-12 col-md-12 col-sm-12 d-flex align-items-center p-0"
|
|
1325
|
+
style={{
|
|
1326
|
+
justifyContent: sectionproperties.sectiontitleposition == 'Centered' ? 'center' : '',
|
|
1327
|
+
}}
|
|
1328
|
+
>
|
|
1329
|
+
<div className={`${generalstyles.sectiontitlecont2}`}>
|
|
1330
|
+
<span
|
|
1331
|
+
className={`${productinfo_cssstyles.sectiontitlespan2}` + ' pl-3 '}
|
|
1332
|
+
style={{
|
|
1333
|
+
fontSize: sectionproperties.relatedproductstitlefontsize + 'px',
|
|
1334
|
+
color: sectionproperties.relatedproductstitlecolor,
|
|
1335
|
+
fontWeight: sectionproperties.relatedproductstitlefontweight,
|
|
1336
|
+
textTransform: sectionproperties.relatedproductstitletextTransform,
|
|
1337
|
+
}}
|
|
1338
|
+
>
|
|
1339
|
+
Related
|
|
1340
|
+
<br /> Products
|
|
1341
|
+
</span>
|
|
1342
|
+
</div>
|
|
1343
|
+
</div>
|
|
1344
|
+
)}
|
|
1345
|
+
</div>
|
|
1346
|
+
</div>
|
|
1347
|
+
|
|
1348
|
+
<div className="col-lg-12 p-0 pl-md-2 pr-md-2">
|
|
1349
|
+
<ScrollMenu
|
|
1350
|
+
// onWheel={onWheel}
|
|
1351
|
+
transitionBehavior={'auto'}
|
|
1352
|
+
wrapperClassName={''}
|
|
1353
|
+
itemClassName={'scrollmenuclassnameitem'}
|
|
1354
|
+
scrollContainerClassName={'scrollmenuclasssubscrollbar'}
|
|
1355
|
+
>
|
|
1356
|
+
{FetchRelatedProductsQuery.data.data.productsrelated.map((item, index) => {
|
|
1357
|
+
if (item.productid != fetchProductInfoQueryContext.data.data.productinfo.productid) {
|
|
1358
|
+
return (
|
|
1359
|
+
<div
|
|
1360
|
+
className="col-lg-12 w-100 p-2"
|
|
1361
|
+
onClick={() => {
|
|
1362
|
+
if (props.srcfromprops != 'templatdraftrouter') {
|
|
1363
|
+
productidassigner(item.productid);
|
|
1364
|
+
} else {
|
|
1365
|
+
routingcountext(StaticPagesLinksContext.productinfo, true, item.productid);
|
|
1366
|
+
}
|
|
1367
|
+
}}
|
|
1368
|
+
>
|
|
1369
|
+
<div
|
|
1370
|
+
className="row w-100 m-0 cursor-pointer p-1"
|
|
1371
|
+
style={{ boxShadow: '0 0 10px #ccc', cursor: 'pointer', borderRadius: '10px', background: 'white' }}
|
|
1372
|
+
>
|
|
1373
|
+
<div className={'col-lg-2 col-md-2 col-sm-2 pl-0'}>
|
|
1374
|
+
<div className={productinfo_cssstyles.imagecont}>
|
|
1375
|
+
<IKImage
|
|
1376
|
+
path={item.productinfo.productmainimage}
|
|
1377
|
+
style={{
|
|
1378
|
+
borderBottomLeftRadius: sectionproperties.prodimage__borderBottomLeftRadius + 'px',
|
|
1379
|
+
borderBottomRightRadius: sectionproperties.prodimage__borderBottomRightRadius + 'px',
|
|
1380
|
+
borderTopLeftRadius: sectionproperties.prodimage__borderTopLeftRadius + 'px',
|
|
1381
|
+
borderTopRightRadius: sectionproperties.prodimage__borderTopRightRadius + 'px',
|
|
1382
|
+
width: '100%',
|
|
1383
|
+
height: '100%',
|
|
1384
|
+
objectFit: 'cover',
|
|
1385
|
+
}}
|
|
1386
|
+
loading="lazy"
|
|
1387
|
+
/>
|
|
1388
|
+
</div>
|
|
1389
|
+
</div>
|
|
1390
|
+
<div className="col-lg-10 col-md-10 col-sm-10 pl-3 ">
|
|
1391
|
+
<div className="row m-0 w-100">
|
|
1392
|
+
<div className="col-lg-12 col-md-12 col-sm-12 p-0 d-flex justify-content-start">
|
|
1393
|
+
<p
|
|
1394
|
+
className={`${productinfo_cssstyles.relatedproductNameStyles}` + ' m-0 p-0 module line-clamp d-flex justify-content-start '}
|
|
1395
|
+
style={{ fontSize: '15px' }}
|
|
1396
|
+
>
|
|
1397
|
+
{langdetect == 'en' ? item.productinfo.name_en : item.productinfo.name_ar}
|
|
1398
|
+
</p>
|
|
1399
|
+
</div>
|
|
1400
|
+
<div
|
|
1401
|
+
className={
|
|
1402
|
+
langdetect == 'en'
|
|
1403
|
+
? `${productinfo_cssstyles.relatedproductPricestyles}` + ' col-lg-12 col-md-12 col-sm-12 p-0 d-flex wordbreak text-right '
|
|
1404
|
+
: `${productinfo_cssstyles.relatedproductPricestyles}` + ' col-lg-12 col-md-12 col-sm-12 p-0 d-flex wordbreak text-left '
|
|
1405
|
+
}
|
|
1406
|
+
>
|
|
1407
|
+
<span className={'ml-1 mr-1'}>
|
|
1408
|
+
{item.productinfo.hasvariants == 1 ? item.productinfo.variants.variantsaleprice : item.productinfo.defaultsaleprice}{' '}
|
|
1409
|
+
{langdetect == 'en' ? 'EGP' : 'ج.م'}
|
|
1410
|
+
</span>
|
|
1411
|
+
</div>
|
|
1412
|
+
</div>
|
|
1413
|
+
</div>
|
|
1414
|
+
</div>
|
|
1415
|
+
</div>
|
|
1416
|
+
);
|
|
1417
|
+
}
|
|
1418
|
+
})}
|
|
1419
|
+
</ScrollMenu>
|
|
1420
|
+
</div>
|
|
1421
|
+
</div>
|
|
1422
|
+
</div>
|
|
1423
|
+
</div>
|
|
1424
|
+
)} */}
|
|
1425
|
+
{/* {props.srcfromprops != 'templatedraftrouter' && (
|
|
1426
|
+
<div className="col-lg-12 d-flex align-items-center justify-content-center p-0">
|
|
1427
|
+
{pageindexcontext.length != 0 && Object.keys(StatePagePropertiesContext).length != 0 && (
|
|
1428
|
+
<div className={generalstyles.app_container + ' w-100 '} style={{ position: 'relative' }}>
|
|
1429
|
+
{StatePagePropertiesContext.pageobj.sections.map((item, index) => {
|
|
1430
|
+
if (item.tabexsectioninfo != null && TabexSectionsComponentsContext[item.tabexsectioninfo.sectioncompname] != undefined && item.componenttype == 'section') {
|
|
1431
|
+
var sectioncomp = TabexSectionsComponentsContext[item.tabexsectioninfo.sectioncompname];
|
|
1432
|
+
return (
|
|
1433
|
+
<div className="row w-100 ml-0 mr-0 d-flex justify-content-center p-0">
|
|
1434
|
+
{item.tabexsectioninfo.sectiontype == 'Cards' && (
|
|
1435
|
+
<ProductsCardsSectionContext_Provider>
|
|
1436
|
+
{React.createElement(sectioncomp, {
|
|
1437
|
+
sectionidprops: item.sectionid,
|
|
1438
|
+
sectionindexprops: index,
|
|
1439
|
+
srcfromprops: 'GeneralProductsComponent',
|
|
1440
|
+
collectionidprops: collectionidparams,
|
|
1441
|
+
})}
|
|
1442
|
+
</ProductsCardsSectionContext_Provider>
|
|
1443
|
+
)}
|
|
1444
|
+
{item.tabexsectioninfo.sectiontype != 'Cards' && React.createElement(sectioncomp, { sectionidprops: item.sectionid, sectionindexprops: index })}
|
|
1445
|
+
</div>
|
|
1446
|
+
);
|
|
1447
|
+
}
|
|
1448
|
+
})}
|
|
1449
|
+
</div>
|
|
1450
|
+
)}
|
|
1451
|
+
</div>
|
|
1452
|
+
)} */}
|
|
1453
|
+
</div>
|
|
1454
|
+
);
|
|
1455
|
+
};
|
|
1456
|
+
export default Productinfo;
|