CINXE.COM

Where to buy - TrinaSolar

<!doctype html> <html lang="en_GB"> <head> <!-- Google tag (gtag.js) --> <script async src="https://www.googletagmanager.com/gtag/js?id=G-FNT8H4BM4M"></script> <script> window.dataLayer = window.dataLayer || []; function gtag(){dataLayer.push(arguments);} gtag('js', new Date()); gtag('config', 'G-FNT8H4BM4M'); </script> <meta charset="UTF-8"> <title>Where to buy - TrinaSolar</title> <meta name="viewport" content="width=device-width, user-scalable=yes, initial-scale=1. maximum-scale=5, minimum-scale=1"> <meta http-equiv="X-UA-Compatible" content="ie=edge"> <link rel="icon" href="https://wheretobuy.trinasolar.com/wp-content/themes/mohito/favicon/favicon.ico" sizes="16x16" /> <meta name='robots' content='noindex, nofollow' /> <style>img:is([sizes="auto" i], [sizes^="auto," i]) { contain-intrinsic-size: 3000px 1500px }</style> <link rel="alternate" href="https://wheretobuy.trinasolar.com/" hreflang="en" /> <link rel="alternate" href="https://wheretobuy.trinasolar.com/de/" hreflang="de" /> <link rel="alternate" href="https://wheretobuy.trinasolar.com/it/" hreflang="it" /> <link rel='stylesheet' id='wp-block-library-css' href='https://wheretobuy.trinasolar.com/wp-includes/css/dist/block-library/style.min.css?ver=6.7.1' type='text/css' media='all' /> <style id='classic-theme-styles-inline-css' type='text/css'> /*! This file is auto-generated */ .wp-block-button__link{color:#fff;background-color:#32373c;border-radius:9999px;box-shadow:none;text-decoration:none;padding:calc(.667em + 2px) calc(1.333em + 2px);font-size:1.125em}.wp-block-file__button{background:#32373c;color:#fff;text-decoration:none} </style> <style id='global-styles-inline-css' type='text/css'> :root{--wp--preset--aspect-ratio--square: 1;--wp--preset--aspect-ratio--4-3: 4/3;--wp--preset--aspect-ratio--3-4: 3/4;--wp--preset--aspect-ratio--3-2: 3/2;--wp--preset--aspect-ratio--2-3: 2/3;--wp--preset--aspect-ratio--16-9: 16/9;--wp--preset--aspect-ratio--9-16: 9/16;--wp--preset--color--black: #000000;--wp--preset--color--cyan-bluish-gray: #abb8c3;--wp--preset--color--white: #ffffff;--wp--preset--color--pale-pink: #f78da7;--wp--preset--color--vivid-red: #cf2e2e;--wp--preset--color--luminous-vivid-orange: #ff6900;--wp--preset--color--luminous-vivid-amber: #fcb900;--wp--preset--color--light-green-cyan: #7bdcb5;--wp--preset--color--vivid-green-cyan: #00d084;--wp--preset--color--pale-cyan-blue: #8ed1fc;--wp--preset--color--vivid-cyan-blue: #0693e3;--wp--preset--color--vivid-purple: #9b51e0;--wp--preset--gradient--vivid-cyan-blue-to-vivid-purple: linear-gradient(135deg,rgba(6,147,227,1) 0%,rgb(155,81,224) 100%);--wp--preset--gradient--light-green-cyan-to-vivid-green-cyan: linear-gradient(135deg,rgb(122,220,180) 0%,rgb(0,208,130) 100%);--wp--preset--gradient--luminous-vivid-amber-to-luminous-vivid-orange: linear-gradient(135deg,rgba(252,185,0,1) 0%,rgba(255,105,0,1) 100%);--wp--preset--gradient--luminous-vivid-orange-to-vivid-red: linear-gradient(135deg,rgba(255,105,0,1) 0%,rgb(207,46,46) 100%);--wp--preset--gradient--very-light-gray-to-cyan-bluish-gray: linear-gradient(135deg,rgb(238,238,238) 0%,rgb(169,184,195) 100%);--wp--preset--gradient--cool-to-warm-spectrum: linear-gradient(135deg,rgb(74,234,220) 0%,rgb(151,120,209) 20%,rgb(207,42,186) 40%,rgb(238,44,130) 60%,rgb(251,105,98) 80%,rgb(254,248,76) 100%);--wp--preset--gradient--blush-light-purple: linear-gradient(135deg,rgb(255,206,236) 0%,rgb(152,150,240) 100%);--wp--preset--gradient--blush-bordeaux: linear-gradient(135deg,rgb(254,205,165) 0%,rgb(254,45,45) 50%,rgb(107,0,62) 100%);--wp--preset--gradient--luminous-dusk: linear-gradient(135deg,rgb(255,203,112) 0%,rgb(199,81,192) 50%,rgb(65,88,208) 100%);--wp--preset--gradient--pale-ocean: linear-gradient(135deg,rgb(255,245,203) 0%,rgb(182,227,212) 50%,rgb(51,167,181) 100%);--wp--preset--gradient--electric-grass: linear-gradient(135deg,rgb(202,248,128) 0%,rgb(113,206,126) 100%);--wp--preset--gradient--midnight: linear-gradient(135deg,rgb(2,3,129) 0%,rgb(40,116,252) 100%);--wp--preset--font-size--small: 13px;--wp--preset--font-size--medium: 20px;--wp--preset--font-size--large: 36px;--wp--preset--font-size--x-large: 42px;--wp--preset--spacing--20: 0.44rem;--wp--preset--spacing--30: 0.67rem;--wp--preset--spacing--40: 1rem;--wp--preset--spacing--50: 1.5rem;--wp--preset--spacing--60: 2.25rem;--wp--preset--spacing--70: 3.38rem;--wp--preset--spacing--80: 5.06rem;--wp--preset--shadow--natural: 6px 6px 9px rgba(0, 0, 0, 0.2);--wp--preset--shadow--deep: 12px 12px 50px rgba(0, 0, 0, 0.4);--wp--preset--shadow--sharp: 6px 6px 0px rgba(0, 0, 0, 0.2);--wp--preset--shadow--outlined: 6px 6px 0px -3px rgba(255, 255, 255, 1), 6px 6px rgba(0, 0, 0, 1);--wp--preset--shadow--crisp: 6px 6px 0px rgba(0, 0, 0, 1);}:where(.is-layout-flex){gap: 0.5em;}:where(.is-layout-grid){gap: 0.5em;}body .is-layout-flex{display: flex;}.is-layout-flex{flex-wrap: wrap;align-items: center;}.is-layout-flex > :is(*, div){margin: 0;}body .is-layout-grid{display: grid;}.is-layout-grid > :is(*, div){margin: 0;}:where(.wp-block-columns.is-layout-flex){gap: 2em;}:where(.wp-block-columns.is-layout-grid){gap: 2em;}:where(.wp-block-post-template.is-layout-flex){gap: 1.25em;}:where(.wp-block-post-template.is-layout-grid){gap: 1.25em;}.has-black-color{color: var(--wp--preset--color--black) !important;}.has-cyan-bluish-gray-color{color: var(--wp--preset--color--cyan-bluish-gray) !important;}.has-white-color{color: var(--wp--preset--color--white) !important;}.has-pale-pink-color{color: var(--wp--preset--color--pale-pink) !important;}.has-vivid-red-color{color: var(--wp--preset--color--vivid-red) !important;}.has-luminous-vivid-orange-color{color: var(--wp--preset--color--luminous-vivid-orange) !important;}.has-luminous-vivid-amber-color{color: var(--wp--preset--color--luminous-vivid-amber) !important;}.has-light-green-cyan-color{color: var(--wp--preset--color--light-green-cyan) !important;}.has-vivid-green-cyan-color{color: var(--wp--preset--color--vivid-green-cyan) !important;}.has-pale-cyan-blue-color{color: var(--wp--preset--color--pale-cyan-blue) !important;}.has-vivid-cyan-blue-color{color: var(--wp--preset--color--vivid-cyan-blue) !important;}.has-vivid-purple-color{color: var(--wp--preset--color--vivid-purple) !important;}.has-black-background-color{background-color: var(--wp--preset--color--black) !important;}.has-cyan-bluish-gray-background-color{background-color: var(--wp--preset--color--cyan-bluish-gray) !important;}.has-white-background-color{background-color: var(--wp--preset--color--white) !important;}.has-pale-pink-background-color{background-color: var(--wp--preset--color--pale-pink) !important;}.has-vivid-red-background-color{background-color: var(--wp--preset--color--vivid-red) !important;}.has-luminous-vivid-orange-background-color{background-color: var(--wp--preset--color--luminous-vivid-orange) !important;}.has-luminous-vivid-amber-background-color{background-color: var(--wp--preset--color--luminous-vivid-amber) !important;}.has-light-green-cyan-background-color{background-color: var(--wp--preset--color--light-green-cyan) !important;}.has-vivid-green-cyan-background-color{background-color: var(--wp--preset--color--vivid-green-cyan) !important;}.has-pale-cyan-blue-background-color{background-color: var(--wp--preset--color--pale-cyan-blue) !important;}.has-vivid-cyan-blue-background-color{background-color: var(--wp--preset--color--vivid-cyan-blue) !important;}.has-vivid-purple-background-color{background-color: var(--wp--preset--color--vivid-purple) !important;}.has-black-border-color{border-color: var(--wp--preset--color--black) !important;}.has-cyan-bluish-gray-border-color{border-color: var(--wp--preset--color--cyan-bluish-gray) !important;}.has-white-border-color{border-color: var(--wp--preset--color--white) !important;}.has-pale-pink-border-color{border-color: var(--wp--preset--color--pale-pink) !important;}.has-vivid-red-border-color{border-color: var(--wp--preset--color--vivid-red) !important;}.has-luminous-vivid-orange-border-color{border-color: var(--wp--preset--color--luminous-vivid-orange) !important;}.has-luminous-vivid-amber-border-color{border-color: var(--wp--preset--color--luminous-vivid-amber) !important;}.has-light-green-cyan-border-color{border-color: var(--wp--preset--color--light-green-cyan) !important;}.has-vivid-green-cyan-border-color{border-color: var(--wp--preset--color--vivid-green-cyan) !important;}.has-pale-cyan-blue-border-color{border-color: var(--wp--preset--color--pale-cyan-blue) !important;}.has-vivid-cyan-blue-border-color{border-color: var(--wp--preset--color--vivid-cyan-blue) !important;}.has-vivid-purple-border-color{border-color: var(--wp--preset--color--vivid-purple) !important;}.has-vivid-cyan-blue-to-vivid-purple-gradient-background{background: var(--wp--preset--gradient--vivid-cyan-blue-to-vivid-purple) !important;}.has-light-green-cyan-to-vivid-green-cyan-gradient-background{background: var(--wp--preset--gradient--light-green-cyan-to-vivid-green-cyan) !important;}.has-luminous-vivid-amber-to-luminous-vivid-orange-gradient-background{background: var(--wp--preset--gradient--luminous-vivid-amber-to-luminous-vivid-orange) !important;}.has-luminous-vivid-orange-to-vivid-red-gradient-background{background: var(--wp--preset--gradient--luminous-vivid-orange-to-vivid-red) !important;}.has-very-light-gray-to-cyan-bluish-gray-gradient-background{background: var(--wp--preset--gradient--very-light-gray-to-cyan-bluish-gray) !important;}.has-cool-to-warm-spectrum-gradient-background{background: var(--wp--preset--gradient--cool-to-warm-spectrum) !important;}.has-blush-light-purple-gradient-background{background: var(--wp--preset--gradient--blush-light-purple) !important;}.has-blush-bordeaux-gradient-background{background: var(--wp--preset--gradient--blush-bordeaux) !important;}.has-luminous-dusk-gradient-background{background: var(--wp--preset--gradient--luminous-dusk) !important;}.has-pale-ocean-gradient-background{background: var(--wp--preset--gradient--pale-ocean) !important;}.has-electric-grass-gradient-background{background: var(--wp--preset--gradient--electric-grass) !important;}.has-midnight-gradient-background{background: var(--wp--preset--gradient--midnight) !important;}.has-small-font-size{font-size: var(--wp--preset--font-size--small) !important;}.has-medium-font-size{font-size: var(--wp--preset--font-size--medium) !important;}.has-large-font-size{font-size: var(--wp--preset--font-size--large) !important;}.has-x-large-font-size{font-size: var(--wp--preset--font-size--x-large) !important;} :where(.wp-block-post-template.is-layout-flex){gap: 1.25em;}:where(.wp-block-post-template.is-layout-grid){gap: 1.25em;} :where(.wp-block-columns.is-layout-flex){gap: 2em;}:where(.wp-block-columns.is-layout-grid){gap: 2em;} :root :where(.wp-block-pullquote){font-size: 1.5em;line-height: 1.6;} </style> <link rel='stylesheet' id='theme-main-css' href='https://wheretobuy.trinasolar.com/wp-content/themes/mohito/styles/main.css?ver=6.7.1' type='text/css' media='all' /> <link rel='stylesheet' id='theme-fonts-css' href='https://fonts.googleapis.com/css2?family=Poppins%3Aital%2Cwght%400%2C100%3B0%2C200%3B0%2C300%3B0%2C400%3B0%2C500%3B0%2C600%3B0%2C700%3B0%2C800%3B1%2C200&#038;display=swap&#038;ver=6.7.1' type='text/css' media='all' /> <link rel="canonical" href="https://wheretobuy.trinasolar.com/" /> <link rel="icon" href="https://wheretobuy.trinasolar.com/wp-content/uploads/2024/05/cropped-688599.SS_-32x32.png" sizes="32x32" /> <link rel="icon" href="https://wheretobuy.trinasolar.com/wp-content/uploads/2024/05/cropped-688599.SS_-192x192.png" sizes="192x192" /> <link rel="apple-touch-icon" href="https://wheretobuy.trinasolar.com/wp-content/uploads/2024/05/cropped-688599.SS_-180x180.png" /> <meta name="msapplication-TileImage" content="https://wheretobuy.trinasolar.com/wp-content/uploads/2024/05/cropped-688599.SS_-270x270.png" /> <link href="https://api.mapbox.com/mapbox-assembly/v1.3.0/assembly.min.css" rel="stylesheet"> <script id="search-js" defer="" src="https://api.mapbox.com/search-js/v1.0.0-beta.18/web.js"></script> </head> <body> <header class="header"> <div class="row"> <div class="column"> <a class="go-back" href="https://www.trinasolar.com/eu-en"> < Go back </a> <a class="header__logo" href="https://wheretobuy.trinasolar.com"> <svg width="120" height="29" viewBox="0 0 120 29" fill="none" xmlns="http://www.w3.org/2000/svg"> <g clip-path="url(#clip0_591_2355)"> <path d="M32.4015 11.3673H27.0366V27.6933H32.4015V11.3673Z" fill="#0086D6"/> <path d="M25.4519 11.3671C23.6684 11.3671 21.9971 11.951 20.5859 13.005V11.3671H15.6387V27.6931H21.0035V20.2806C21.0035 17.3206 23.9286 16.0382 25.693 16.0382V11.3671H25.4519Z" fill="#0086D6"/> <path d="M34.3035 4.58378C34.3035 2.0541 32.252 0.00012207 29.7175 0.00012207C27.183 0.00012207 25.1362 2.0541 25.1362 4.58378C25.1362 7.11346 27.1862 9.16744 29.7175 9.16744C32.2488 9.16744 34.3035 7.11346 34.3035 4.58378Z" fill="#DA291C"/> <path d="M59.1414 23.9497H56.6014C56.0072 23.9497 55.5434 23.5981 55.5434 22.6316C55.5434 21.665 55.9968 21.3158 56.6014 21.3158H59.1414V23.9497ZM50.6606 11.3673V13.1301C50.6606 14.2255 51.5484 15.1133 52.6414 15.1133C52.6478 15.1133 52.6518 15.1109 52.6558 15.1109V15.1133H57.3158C57.3556 15.1133 57.3929 15.1157 57.4303 15.1157C58.3762 15.1531 59.1327 15.9303 59.1327 16.8849H59.1367C59.1391 16.9597 59.1407 17.0344 59.1407 17.1132V17.7782H54.2245C51.5802 17.7782 50.0417 19.6381 50.0417 22.6316C50.0417 25.7101 51.5118 27.6893 53.9787 27.6893H64.5047V16.5349C64.5047 12.8326 62.8747 11.3673 59.0356 11.3673H50.6591H50.6606Z" fill="#0086D6"/> <path d="M44.2387 11.3673H34.3856V11.3697L34.3777 11.3673C34.0261 11.3673 33.7437 11.6497 33.7437 11.9973V27.6893H39.1085V15.4713C39.1109 15.2796 39.2644 15.1244 39.4537 15.1181H41.4115C41.4409 15.1181 41.4695 15.1205 41.5005 15.1205C42.5005 15.1388 43.3071 15.9438 43.3278 16.9414C43.3302 16.9994 43.3318 17.0535 43.3318 17.114V27.6901H48.7014V15.8308C48.7014 13.3656 46.7039 11.3681 44.2387 11.3681" fill="#0086D6"/> <path d="M2.99101 3.80054L2.98703 3.80451C2.96635 3.80213 2.94566 3.80054 2.92498 3.80054C1.31012 3.80054 0.000732422 5.10993 0.000732422 6.72558V9.16617H7.31851V27.6909H13.2243V9.16617H20.5437V6.72558C20.5437 5.11072 19.2343 3.80054 17.6186 3.80054H2.99101Z" fill="#0086D6"/> <path d="M71.9004 28.078C69.7279 28.078 67.4957 27.6914 66.7225 27.4838V25.9644C67.7328 26.0829 69.9069 26.4114 71.84 26.4114C74.8772 26.4114 75.8286 25.3701 75.8286 23.7322C75.8286 22.1253 75.1158 21.5 72.1971 20.3108L71.0373 19.8637C67.942 18.6124 66.5117 17.334 66.5117 15.0414C66.5117 12.3622 68.3867 11.1124 72.2862 11.1124C74.2821 11.1124 76.2462 11.4386 77.0194 11.678V13.1664C75.5024 12.9588 73.6274 12.8092 72.3753 12.8092C69.6961 12.8092 68.4758 13.2849 68.4758 15.0414C68.4758 16.5584 69.3095 17.2139 71.8097 18.2258L72.972 18.7015C76.5724 20.2209 77.7632 21.2622 77.7632 23.7028C77.7632 25.9954 76.4538 28.078 71.8996 28.078" fill="#0086D6"/> <path d="M90.0282 18.7325C90.0282 14.5935 88.5979 12.8395 85.2345 12.8395C81.9006 12.8395 80.4433 14.5935 80.4433 18.7325V20.4579C80.4433 24.5945 81.8712 26.382 85.2345 26.382C88.5979 26.382 90.0282 24.5945 90.0282 20.4579V18.7325ZM85.2345 28.078C80.6509 28.078 78.5078 25.4592 78.5078 20.4579V18.7325C78.5078 13.7606 80.6509 11.1124 85.2345 11.1124C89.8182 11.1124 91.9613 13.7606 91.9613 18.7325V20.4579C91.9613 25.4592 89.8182 28.078 85.2345 28.078Z" fill="#0086D6"/> <path d="M95.8319 4.68213H93.8965V27.6911H95.8319V4.68213Z" fill="#0086D6"/> <path d="M107.737 19.5672H105C101.101 19.5672 99.5518 20.1034 99.5518 22.991V23.5566C99.5518 25.7872 100.801 26.5628 102.826 26.5628C104.851 26.5628 106.844 25.6687 107.738 25.1039V19.568L107.737 19.5672ZM107.827 27.6924V26.5326C106.696 27.2167 104.85 28.079 102.439 28.079C99.2829 28.079 97.6179 26.6511 97.6179 23.4349V22.9902C97.6179 18.8831 100.266 18.047 104.999 18.047H107.737V16.6796C107.737 13.5238 107.053 12.78 103.451 12.78C101.873 12.78 100.534 12.8986 98.7173 13.1086V11.6783C100.237 11.4102 101.515 11.1127 103.6 11.1127C108.749 11.1127 109.701 12.8691 109.701 16.6796V27.6924H107.826H107.827Z" fill="#0086D6"/> <path d="M113.928 14.3565V27.6914H112.024V11.5301H113.928V12.8395C115.832 11.4696 118.125 11.1124 120 11.1124V12.8689C118.214 12.8689 115.714 13.2849 113.928 14.3573" fill="#0086D6"/> </g> <defs> <clipPath id="clip0_591_2355"> <rect width="120" height="28.0779" fill="white"/> </clipPath> </defs> </svg> </a> </div> </div> </header> <main class="page-home"> <div class="home-wrapper"> <div class="container"> <section class="baner"> <div class="baner__title"> Where to buy </div> <div class="baner__image"> <div class="on-desktop"> <img src="https://wheretobuy.trinasolar.com/wp-content/uploads/2024/05/Pins-and-Map-2.png" alt=""> </div> <div class="on-mobile"> <img src="https://wheretobuy.trinasolar.com/wp-content/uploads/2024/05/Pins-and-Map@2x.png" alt=""> </div> </div> </section> <section class="search" data-search="start"> <div class="search__title">Search by</div> <div class="search__inputs"> <div class="search__inputs__item name-input"> <span class="search__inputs__item__name">Name</span> <input type="text" id="name-search" placeholder="Type in Distributor鈥檚 name" /> <div class="search__inputs__item__icon"> <svg width="24" height="25" viewBox="0 0 24 25" fill="none" xmlns="http://www.w3.org/2000/svg"> <path d="M18.031 17.117L22.314 21.399L20.899 22.814L16.617 18.531C15.0237 19.8082 13.042 20.5029 11 20.5C6.032 20.5 2 16.468 2 11.5C2 6.532 6.032 2.5 11 2.5C15.968 2.5 20 6.532 20 11.5C20.0029 13.542 19.3082 15.5237 18.031 17.117ZM16.025 16.375C17.2941 15.0699 18.0029 13.3204 18 11.5C18 7.633 14.867 4.5 11 4.5C7.133 4.5 4 7.633 4 11.5C4 15.367 7.133 18.5 11 18.5C12.8204 18.5029 14.5699 17.7941 15.875 16.525L16.025 16.375Z" fill="black"/> </svg> </div> <ul class="search-results" id="search-results-name"></ul> </div> <div class="search__inputs__item location-input"> <span class="search__inputs__item__name">Location</span> <input type="text" id="name-location" placeholder="City, zipcode or state" /> <div class="search__inputs__item__icon"> <svg width="24" height="25" viewBox="0 0 24 25" fill="none" xmlns="http://www.w3.org/2000/svg"> <path d="M5 11.226L2 11.731L11.23 2.5L10.726 5.5M12 17.381L11.23 19.423L18.923 11.731L16.881 12.5M15.077 15.577L21 21.5M3.538 10.192L9.692 4.038L9.928 4.379C12.0722 7.47606 14.5453 10.332 17.304 12.897L17.539 13.115L12.615 18.038L12.397 17.804C9.83233 15.0454 6.97671 12.5723 3.88 10.428L3.538 10.192Z" stroke="black" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/> </svg> </div> <ul class="search-results" id="search-results-location"></ul> </div> <div class="search__inputs__item country-input"> <span class="search__inputs__item__name">Country</span> <input type="text" id="name-country" placeholder="Type in country name" /> <div class="search__inputs__item__icon"> <svg width="24" height="25" viewBox="0 0 24 25" fill="none" xmlns="http://www.w3.org/2000/svg"> <path d="M12 3.5C10.22 3.5 8.47991 4.02784 6.99987 5.01677C5.51983 6.00571 4.36628 7.41131 3.68509 9.05585C3.0039 10.7004 2.82567 12.51 3.17294 14.2558C3.5202 16.0016 4.37737 17.6053 5.63604 18.864C6.89472 20.1226 8.49836 20.9798 10.2442 21.3271C11.99 21.6743 13.7996 21.4961 15.4442 20.8149C17.0887 20.1337 18.4943 18.9802 19.4832 17.5001C20.4722 16.0201 21 14.28 21 12.5C21 10.1131 20.0518 7.82387 18.364 6.13604C16.6761 4.44821 14.387 3.5 12 3.5ZM19.46 11.75H16.7C16.3507 9.34101 15.332 7.07849 13.76 5.22C15.2678 5.58729 16.625 6.41204 17.6455 7.58115C18.666 8.75025 19.2998 10.2064 19.46 11.75ZM8.81 13.25H15.19C14.7281 15.6188 13.6247 17.8153 12 19.6C10.3753 17.8153 9.2719 15.6188 8.81 13.25ZM8.81 11.75C9.2719 9.38119 10.3753 7.18468 12 5.4C13.6247 7.18468 14.7281 9.38119 15.19 11.75H8.81ZM10.24 5.22C8.66798 7.07849 7.64932 9.34101 7.3 11.75H4.54C4.70021 10.2064 5.33403 8.75025 6.35454 7.58115C7.37504 6.41204 8.73225 5.58729 10.24 5.22ZM4.54 13.22H7.3C7.64932 15.629 8.66798 17.8915 10.24 19.75C8.73666 19.3845 7.38264 18.5642 6.36258 17.401C5.34251 16.2377 4.70606 14.7882 4.54 13.25V13.22ZM13.76 19.75C15.332 17.8915 16.3507 15.629 16.7 13.22H19.46C19.3057 14.7689 18.6745 16.2318 17.6536 17.4067C16.6326 18.5817 15.2722 19.4109 13.76 19.78V19.75Z" fill="black"/> </svg> </div> <ul class="search-results" id="search-results-country"></ul> </div> </div> <div class="mobile-header"> <div class="mobile-header__title"> Results </div> <div class="mobile-header__tabs"> <div class="mobile-header__tabs__item active" data-target="#locations-list"> List </div> <div class="mobile-header__tabs__item" data-target="#map"> Map </div> </div> </div> <link href="https://api.mapbox.com/mapbox-gl-js/v2.15.0/mapbox-gl.css" rel="stylesheet"> <script src="https://api.mapbox.com/mapbox-gl-js/v2.15.0/mapbox-gl.js"></script> <div class="map-wrapper"> <div id="locations-list" class="active"> <div class="locations-list-header"></div> <div id="locations-list-wrapper"></div> </div> <div id="map"></div> </div> <script> var baseUrl = location.protocol + '//' + location.hostname + (location.port ? ':' + location.port : ''); let locationsData = []; function scrollToTopOfLocationsList() { var locationsList = document.getElementById('locations-list'); if (locationsList) { locationsList.scrollTop = 0; } else { console.error('Element with ID "locations-list" not found!'); } } function clickFirstLiOnEnter(selector) { document.addEventListener('keydown', function(event) { if (event.key === 'Enter') { event.preventDefault(); clickFirstListItem(selector); } }); } function simpleScrollToList() { const list = document.querySelector('.mobile-header'); if (!list) { console.log('Target element not found: .mobile-header'); return; } list.scrollIntoView({ behavior: 'smooth' }); } function scrollToList(selector) { const button = document.querySelector(selector); if (!button) { console.log('Button not found:', selector); return; } const list = document.querySelector('.mobile-header'); if (!list) { console.log('Target element not found: .mobile-header'); return; } button.addEventListener('click', function() { list.scrollIntoView({ behavior: 'smooth' }); }); } function setupIconClick(selector, targetSelector) { const icons = document.querySelectorAll(selector); icons.forEach(icon => { icon.addEventListener('click', () => clickFirstListItem(targetSelector)); }); } function clickFirstListItem(selector) { const firstLi = document.querySelector(selector); if (firstLi) { firstLi.click(); } } function setupTabSwitch() { const tabs = document.querySelectorAll('.mobile-header__tabs__item'); tabs.forEach(tab => { tab.addEventListener('click', function() { activateTabAndContent(this); }); }); } function activateTabAndContent(tab) { const tabs = document.querySelectorAll('.mobile-header__tabs__item'); tabs.forEach(t => { t.classList.remove('active'); const targetDiv = document.querySelector(t.getAttribute('data-target')); if (targetDiv) { targetDiv.classList.remove('active'); } }); tab.classList.add('active'); const targetDiv = document.querySelector(tab.getAttribute('data-target')); if (targetDiv) { targetDiv.classList.add('active'); } } function calculateDistance(lat1, lon1, lat2, lon2) { const R = 6371; const dLat = (lat2 - lat1) * Math.PI / 180; const dLon = (lon2 - lon1) * Math.PI / 180; const a = Math.sin(dLat / 2) * Math.sin(dLat / 2) + Math.cos(lat1 * Math.PI / 180) * Math.cos(lat2 * Math.PI / 180) * Math.sin(dLon / 2) * Math.sin(dLon / 2); const c = 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1 - a)); const distance = R * c; return distance.toFixed(0); } function filterLocationsByCountry(countryName) { const filteredLocations = locationsData.filter(location => location.country && location.country.toLowerCase().includes(countryName.toLowerCase()) ); updateLocationsListHeader(filteredLocations.length, countryName); displayLocations(filteredLocations); } function locationsHeader() { let headerDiv = document.querySelector('.locations-list-header'); if (headerDiv) { headerDiv.innerHTML = ''; const content = 'Distributors nearest to your address'; headerDiv.textContent = content; } else { console.log('.locations-list-header div not found.'); } } function nameHeader(numberOfResults) { let headerDiv = document.querySelector('.locations-list-header'); if (headerDiv) { headerDiv.innerHTML = ''; const content = `${numberOfResults} results based on your search`; headerDiv.textContent = content; } else { console.log('.locations-list-header div not found.'); } } function updateLocationsListHeader(numberOfResults, countryName) { let headerDiv = document.querySelector('.locations-list-header'); headerDiv.innerHTML = ''; const numberSpan = document.createElement('span'); numberSpan.classList.add('locations-list-header-number'); numberSpan.textContent = numberOfResults; headerDiv.appendChild(numberSpan); headerDiv.appendChild(document.createTextNode(' results within ')); const countrySpan = document.createElement('span'); countrySpan.classList.add('locations-list-header-country'); countrySpan.textContent = countryName; headerDiv.appendChild(countrySpan); } function clearInputsActive(excludeSelector) { const excludeElement = document.querySelector(excludeSelector)?.closest('.search__inputs__item'); const searchInputsItems = document.querySelectorAll('.search__inputs__item'); searchInputsItems.forEach(item => { if (item !== excludeElement) { item.classList.remove('active'); } }); } function setActiveListItem(locationId) { const container = document.querySelector('#locations-list'); document.querySelectorAll('.locations-list__item').forEach(item => { item.classList.remove('active'); if(item.getAttribute('data-location-id') == locationId) { item.classList.add('active'); const itemTop = item.offsetTop; const itemHeight = item.offsetHeight; const containerHeight = container.offsetHeight; const scrollPosition = itemTop - (containerHeight / 2) + (itemHeight / 2); container.scrollTo({ top: scrollPosition, behavior: "smooth" }); } }); } function setActiveMarker(active) { const defaultIconUrl = baseUrl + '/wp-content/uploads/2024/04/normal-pin.svg'; const activeIconUrl = baseUrl + '/wp-content/uploads/2024/04/selected-pin.svg'; document.querySelectorAll('.marker').forEach(item => { item.classList.remove('active'); item.style.backgroundImage = `url(${defaultIconUrl})`; }); if (active) { active.classList.add('active'); active.style.backgroundImage = `url(${activeIconUrl})`; } } function decodeHtml(html) { var textArea = document.createElement('textarea'); textArea.innerHTML = html; return textArea.value; } function fetchAllLocations(page = 1, allLocations = []) { return fetch(baseUrl + `/wp-json/wp/v2/distributor?per_page=100&page=${page}`) .then(response => response.json()) .then(locations => { allLocations = allLocations.concat(locations); if (locations.length === 100) { return fetchAllLocations(page + 1, allLocations); } else { return allLocations; } }); } function fetchLocations() { fetchAllLocations() .then(allLocations => { locationsData = allLocations; displayLocations(locationsData); }) .catch(error => console.log('Error fetching location data:', error)); } function displayLocations(locations, distances) { const locationsList = document.getElementById('locations-list-wrapper'); const mapDiv = document.getElementById('map'); locationsList.innerHTML = ''; locations.forEach((location, index) => { const locationId = location.id || index; const { title, address, email, phone_number, website, image,longitude, latitude } = location; const locationDiv = document.createElement('div'); locationDiv.className = 'locations-list__item'; locationDiv.setAttribute('data-location-id', locationId); const leftDiv = document.createElement('div'); leftDiv.className = 'locations-list__item--left'; const titleDiv = document.createElement('div'); titleDiv.className = 'title'; titleDiv.textContent = decodeHtml(title.rendered); leftDiv.appendChild(titleDiv); if (address) { const addressDiv = document.createElement('div'); addressDiv.className = 'address'; addressDiv.innerHTML = address; leftDiv.appendChild(addressDiv); } const contactDiv = document.createElement('div'); contactDiv.className = 'contact'; if (email) { const mailLink = document.createElement('a'); mailLink.className = 'mail contact__item'; mailLink.href = `mailto:${email}`; mailLink.textContent = email; contactDiv.appendChild(mailLink); } if (phone_number) { const phoneLink = document.createElement('a'); phoneLink.className = 'phone contact__item'; phoneLink.href = `tel:${phone_number}`; phoneLink.textContent = phone_number; contactDiv.appendChild(phoneLink); } if (contactDiv.hasChildNodes()) { leftDiv.appendChild(contactDiv); if (website) { let modifiedWebsite = website; if (!website.startsWith('http://') && !website.startsWith('https://')) { modifiedWebsite = 'https://' + website; } var websiteLink = document.createElement('a'); websiteLink.className = 'website contact__item'; websiteLink.href = modifiedWebsite; websiteLink.textContent = modifiedWebsite; websiteLink.target = "_blank"; leftDiv.appendChild(websiteLink); } } locationDiv.appendChild(leftDiv); const rightDiv = document.createElement('div'); rightDiv.className = 'locations-list__item--right'; if (image) { const img = document.createElement('img'); img.src = image; img.alt = `Image for ${title.rendered}`; rightDiv.appendChild(img); } const viewMapDiv = document.createElement('div'); viewMapDiv.className = 'view-on-map'; viewMapDiv.textContent = 'View on map'; const locDiv = document.createElement('div'); locDiv.className = 'location-btn'; if (distances) { const distanceSpan = document.createElement('span'); distanceSpan.textContent = distances[index] + ' km'; locDiv.appendChild(distanceSpan); } const searchDiv = document.querySelector('.search'); const nameInput = document.getElementById('name-search'); const parentDiv = nameInput.closest('.search__inputs__item'); viewMapDiv.onclick = function() { clearInputsActive(); searchDiv.setAttribute('data-search', 'view-on-map'); parentDiv.classList.remove('active'); map.resize(); map.flyTo({ center: [longitude, latitude], zoom: 8 }); const mapTab = document.querySelector('.mobile-header__tabs__item[data-target="#map"]'); if (mapTab) { mapTab.click(); } else { console.error('Map tab not found!'); } }; rightDiv.appendChild(viewMapDiv); rightDiv.appendChild(locDiv); locationDiv.addEventListener('click', function() { var locId = locationDiv.getAttribute('data-location-id'); document.querySelectorAll('.locations-list__item').forEach(item => { item.classList.remove('active'); }); locationDiv.classList.add('active'); map.resize(); map.flyTo({ center: [location.longitude, location.latitude], zoom: 8 }); document.querySelectorAll('.marker').forEach(item => { item.classList.remove('active'); }); var activeMarker = document.querySelector(`.marker[data-location-id="${locId}"]`); setActiveMarker(activeMarker); }); locationDiv.appendChild(rightDiv); locationsList.appendChild(locationDiv); }); } const nameInput = document.getElementById('name-search'); nameInput.addEventListener('input', function(e) { scrollToList('.name-input.active .search__inputs__item__icon'); clearInputsActive('#name-search'); clearInputs('#name-search'); const listTab = document.querySelector('.mobile-header__tabs__item[data-target="#locations-list"]'); if (listTab) { listTab.click(); } else { console.error('Map tab not found!'); } const searchText = e.target.value.toLowerCase(); const searchDiv = document.querySelector('.search'); const parentDiv = nameInput.closest('.search__inputs__item'); if (searchText.trim() !== '') { parentDiv.classList.add('active'); searchDiv.setAttribute('data-search', 'name'); } else { parentDiv.classList.remove('active'); searchDiv.setAttribute('data-search', ''); } const filteredLocations = locationsData.filter(location => location.title.rendered.toLowerCase().includes(searchText) ); displayLocations(filteredLocations); nameHeader(filteredLocations.length); }); fetchLocations(); const ACCESS_TOKEN = 'pk.eyJ1IjoibWFkZGFsZW5hLWFuZGJlcmxpbiIsImEiOiJjbHRvbW9nczQwMjJuMmlycHMyY3dka3JoIn0.JRiwlpYtCd39NCuHZcEUWQ'; mapboxgl.accessToken = ACCESS_TOKEN; const map = new mapboxgl.Map({ container: 'map', style: 'mapbox://styles/mapbox/streets-v12', center: [13.0737658, 48.6825819], zoom: 4 }); const defaultIconUrl = baseUrl + '/wp-content/uploads/2024/03/marker.png'; const activeIconUrl = baseUrl + '/wp-content/uploads/2024/03/mdi_location.svg'; function fetchAllLocations2(page = 1, allLocations = []) { return fetch(baseUrl + `/wp-json/wp/v2/distributor?per_page=100&page=${page}`) .then(response => response.json()) .then(locations => { allLocations = allLocations.concat(locations); if (locations.length === 100) { return fetchAllLocations(page + 1, allLocations); } else { return allLocations; } }); } fetchAllLocations2().then(allLocations => { const locationsList = document.getElementById('locations-list-wrapper'); let activeMarker = null; let markersMap = {}; allLocations.forEach((location, index) => { const lngLat = [location.longitude, location.latitude]; const name = location.title.rendered; const locationId = location.id || index; const { title, address, email, phone_number, website, image, longitude, latitude } = location; const el = document.createElement('div'); el.className = 'marker'; el.style.backgroundImage = `url(${defaultIconUrl})`; el.style.width = '30px'; el.style.height = '30px'; el.style.backgroundSize = '100%'; const popupContent = document.createElement('div'); popupContent.className = 'popup-content'; if (image) { const img = document.createElement('img'); img.src = image; img.alt = `Image for ${title.rendered}`; img.style.width = '100px'; popupContent.appendChild(img); } const detailsDiv = document.createElement('div'); const titleDiv = document.createElement('div'); titleDiv.className = 'title'; titleDiv.textContent = decodeHtml(title.rendered); detailsDiv.appendChild(titleDiv); if (address) { const addressDiv = document.createElement('div'); addressDiv.className = 'address popup-content-data'; addressDiv.innerHTML = address; detailsDiv.appendChild(addressDiv); } if (email) { const emailDiv = document.createElement('div'); emailDiv.className = 'email popup-content-data'; emailDiv.textContent = email; detailsDiv.appendChild(emailDiv); } if (phone_number) { const phoneDiv = document.createElement('div'); phoneDiv.className = 'phone popup-content-data'; phoneDiv.textContent = phone_number; detailsDiv.appendChild(phoneDiv); } if (website) { const websiteDiv = document.createElement('div'); websiteDiv.className = 'website popup-content-data'; websiteDiv.textContent = website; detailsDiv.appendChild(websiteDiv); } popupContent.appendChild(detailsDiv); const popup = new mapboxgl.Popup({ offset: 25 }).setDOMContent(popupContent); const marker = new mapboxgl.Marker(el) .setLngLat(lngLat) .setPopup(popup) .addTo(map); markersMap[locationId] = marker; el.setAttribute('data-location-id', locationId); el.addEventListener('click', function () { let listHeader = document.querySelector('.locations-list-header'); const searchDiv = document.querySelector('.search'); searchDiv.setAttribute('data-search', 'marker'); listHeader.innerHTML = ''; displayLocations(allLocations); setActiveMarker(el); map.resize(); map.flyTo({ center: marker.getLngLat(), essential: true }); setActiveListItem(locationId); }); }); }) .catch(error => console.log('Error fetching location data:', error)); mapboxgl.accessToken = 'pk.eyJ1IjoibWFkZGFsZW5hLWFuZGJlcmxpbiIsImEiOiJjbHRvbW9nczQwMjJuMmlycHMyY3dka3JoIn0.JRiwlpYtCd39NCuHZcEUWQ'; const countryInput = document.getElementById('name-country'); countryInput.addEventListener('input', function(e) { clearInputsActive(); const searchText = e.target.value; const searchDiv = document.querySelector('.search'); const parentDiv = countryInput.closest('.search__inputs__item'); if (searchText.length > 2) { parentDiv.classList.add('active'); fetch(`https://api.mapbox.com/geocoding/v5/mapbox.places/${encodeURIComponent(searchText)}.json?access_token=${mapboxgl.accessToken}&types=country`) .then(response => response.json()) .then(data => { const resultsElement = document.getElementById('search-results-country'); resultsElement.innerHTML = ''; if (data.features.length === 0) { const noResultsMsg = document.createElement('li'); noResultsMsg.textContent = "No results"; resultsElement.appendChild(noResultsMsg); } else { data.features.forEach(feature => { const li = document.createElement('li'); li.textContent = feature.place_name; li.onclick = function() { searchDiv.setAttribute('data-search', 'country'); scrollToTopOfLocationsList(); clearInputs(); document.getElementById('name-country').value = feature.place_name; filterLocationsByCountry(feature.place_name); map.resize(); map.flyTo({ center: feature.center, zoom: 4 }); resultsElement.innerHTML = ''; simpleScrollToList(); }; resultsElement.appendChild(li); clickFirstLiOnEnter('#search-results-country li'); setupIconClick('.country-input.active .search__inputs__item__icon', '#search-results-country li'); }); } }); } else { parentDiv.classList.remove('active'); } }); function clearInputs(excludeSelector) { const excludeElement = excludeSelector ? document.querySelector(excludeSelector)?.closest('.search__inputs__item') : null; const searchInputsItems = document.querySelectorAll('.search__inputs__item'); searchInputsItems.forEach(item => { if (item !== excludeElement) { item.classList.remove('active'); const inputFields = item.querySelectorAll('input'); inputFields.forEach(input => { input.value = ''; }); } }); } const locationInput = document.getElementById('name-location'); locationInput.addEventListener('input', function(e) { clearInputsActive(); const searchText = e.target.value; const searchDiv = document.querySelector('.search'); const parentDiv = locationInput.closest('.search__inputs__item'); if (searchText.length > 2) { parentDiv.classList.add('active'); fetch(`https://api.mapbox.com/geocoding/v5/mapbox.places/${encodeURIComponent(searchText)}.json?access_token=${mapboxgl.accessToken}&types=place,postcode,region`) .then(response => response.json()) .then(data => { const resultsElement = document.getElementById('search-results-location'); resultsElement.innerHTML = ''; if (data.features.length === 0) { const noResultsMsg = document.createElement('li'); noResultsMsg.textContent = "No results"; resultsElement.appendChild(noResultsMsg); } else { data.features.forEach(feature => { const li = document.createElement('li'); li.textContent = feature.place_name; li.addEventListener('click', function() { scrollToTopOfLocationsList(); searchDiv.setAttribute('data-search', 'location'); clearInputs(); document.getElementById('name-location').value = feature.place_name; resultsElement.innerHTML = ''; const searchElement = document.querySelector('.search'); locationsHeader(); map.resize(); map.flyTo({ center: feature.center, zoom: 10 }); const selectedPlaceLongitude = feature.center[0]; const selectedPlaceLatitude = feature.center[1]; const locationsWithDistance = locationsData.map(location => { location.distance = calculateDistance( selectedPlaceLatitude, selectedPlaceLongitude, location.latitude, location.longitude ); return location; }); const distances = locationsData.map(location => calculateDistance( selectedPlaceLatitude, selectedPlaceLongitude, location.latitude, location.longitude ) ); const sortedLocations = locationsWithDistance.sort((a, b) => a.distance - b.distance); const sortedDistances = sortedLocations.map(location => location.distance); displayLocations(sortedLocations, sortedDistances); simpleScrollToList(); }); resultsElement.appendChild(li); clickFirstLiOnEnter('#search-results-location li'); setupIconClick('.location-input.active .search__inputs__item__icon', '#search-results-location li'); }); } }) .catch(error => console.error('Error fetching location suggestions:', error)); } else { parentDiv.classList.remove('active'); document.getElementById('search-results-location').innerHTML = ''; // Clear suggestions if input length <= 2 } }); function setupTabSwitch() { const tabs = document.querySelectorAll('.mobile-header__tabs__item'); tabs.forEach(tab => { tab.addEventListener('click', function() { tabs.forEach(t => { t.classList.remove('active'); const targetDiv = document.querySelector(t.getAttribute('data-target')); if (targetDiv) { targetDiv.classList.remove('active'); } }); this.classList.add('active'); const targetDiv = document.querySelector(this.getAttribute('data-target')); if (targetDiv) { targetDiv.classList.add('active'); map.resize(); } }); }); } document.addEventListener('DOMContentLoaded', setupTabSwitch); </script> </section> </div> </div> </main> <footer class="footer"> <div class="row"> <div class="column"> <div class="socials"> <a href="https://www.youtube.com/channel/UCRFbEWYbr1nV2sJygpqjy2A"> <img src="https://wheretobuy.trinasolar.com/wp-content/uploads/2024/04/youtube1.svg" alt=""> </a> <a href="https://www.facebook.com/TrinaSolarEU"> <img src="https://wheretobuy.trinasolar.com/wp-content/uploads/2024/04/svgexport-1-8.svg" alt=""> </a> <a href="https://www.instagram.com/trinasolareurope/"> <img src="https://wheretobuy.trinasolar.com/wp-content/uploads/2024/04/svgexport-1-9.svg" alt=""> </a> <a href="https://www.linkedin.com/company/trina-solar/"> <img src="https://wheretobuy.trinasolar.com/wp-content/uploads/2024/04/svgexport-1-10.svg" alt=""> </a> <a href="https://twitter.com/TrinaSolar_EU"> <img src="https://wheretobuy.trinasolar.com/wp-content/uploads/2024/04/svgexport-1-11.svg" alt=""> </a> </div> <div class="footer-bottom"> <div class="footer-bottom__copy">漏Trinasolar. All Rights Reserved.</div> <ul class="footer-menu__list"> <li class="footer-menu__list__item "><a href="https://www.trinasolar.com/eu-en/legal-statement">Legal Statement</a></li> <li class="footer-menu__list__item "><a href="https://www.trinasolar.com/eu-en/privacy-policy">Privacy Policy</a></li> </ul> </div> </div> </div> </footer> <script type="text/javascript" src="https://wheretobuy.trinasolar.com/wp-content/themes/mohito/scripts/vendor.js?ver=1.0" id="theme-vendor-js"></script> <script type="text/javascript" id="theme-main-js-extra"> /* <![CDATA[ */ var wp = {"ajax":"https:\/\/wheretobuy.trinasolar.com\/wp-admin\/admin-ajax.php"}; /* ]]> */ </script> <script type="text/javascript" src="https://wheretobuy.trinasolar.com/wp-content/themes/mohito/scripts/main.js?ver=1.0" id="theme-main-js"></script> </body> </html>

Pages: 1 2 3 4 5 6 7 8 9 10