PageSourceSearch

https://www.tworoad.tw/product/product&product_id=21

html tworoad.tw collected 2026-10-08 23:17:03 UTC 190,481 bytes, 4,865 lines download raw bytes

1<!DOCTYPE html><html class="no-js" lang="zh-TW" prefix="og: https://ogp.me/ns# fb: https://ogp.me/ns/fb# website: https://ogp.me/ns/website#"> <head> <base href="https://www.tworoad.tw/" /> <meta charset="utf-8" /> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge, chrome=1" /> <meta http-equiv='x-dns-prefetch-control' content='on'> <meta name="author" content="二路蘿蔔糕 l 用心,把這件事做到極致"> <meta name="copyright" content="二路蘿蔔糕 | 花生蘿蔔糕"> <meta name="google" content="notranslate" /> <meta name="mobile-web-app-capable" content="yes"> <meta name="theme-color" content="#f5f5f5"> <link rel="preconnect" href="//cdn.qdm.cloud" /> <link rel="preconnect" href="//image-cdn-flare.qdm.cloud" /> <link rel="preconnect" href="//image-cdn.qdm.cloud" /> <link rel="preconnect" href="//www.facebook.com" /> <link rel="preconnect" href="//connect.facebook.net" /> <link rel="preconnect" href="//ajax.googleapis.com" /> <link rel="dns-prefetch" href="//ajax.googleapis.com" /> <link rel="dns-prefetch" href="//image-cdn-flare.qdm.cloud" /> <link rel="dns-prefetch" href="//image-cdn.qdm.cloud" /> <link rel="dns-prefetch" href="//cdn.qdm.cloud" /> <link rel="dns-prefetch" href="//fonts.googleapis.com" /> <link rel="dns-prefetch" href="//www.google-analytics.com" /> <link rel="dns-prefetch" href="//www.googletagmanager.com" /> <link rel='dns-prefetch' href="//www.google.com" /> <link rel='dns-prefetch' href="//www.google.com.tw" /> <link rel='dns-prefetch' href="//maxcdn.bootstrapcdn.com" /> <link rel='dns-prefetch' href="//cdnjs.cloudflare.com" /> <link rel='dns-prefetch' href="//www.facebook.com" /> <link rel='dns-prefetch' href="//connect.facebook.net" /> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title itemprop='name'>二路蘿蔔糕 | 花生蘿蔔糕 | 二路蘿蔔糕 l 用心,把這件事做到極致</title> <meta name="description" content="✸ 傳承三代的經典美味,高雄最新爆紅團購美食
2✸ 首款可生食等級蘿蔔糕,百分之百的天然健康美味
3✸ 僅使用嚴選100%純在來米、花生製作,加入胡椒粉與鹽,不含玉米粉、馬蹄粉或其它任何添加物或調味料,絕對的真材實料
4✸ 口感豐富、料理方式多元,純素可食且不易引起腸胃不適" /> <meta property="og:description" content="✸ 傳承三代的經典美味,高雄最新爆紅團購美食
5✸ 首款可生食等級蘿蔔糕,百分之百的天然健康美味
6✸ 僅使用嚴選100%純在來米、花生製作,加入胡椒粉與鹽,不含玉米粉、馬蹄粉或其它任何添加物或調味料,絕對的真材實料
7✸ 口感豐富、料理方式多元,純素可食且不易引起腸胃不適" /> <meta name="keywords" content="二路蘿蔔糕,職人精神,天然健康,美食溫度,生食級蘿蔔糕,高雄美食,花生粿,古早味" /> <link href="https://www.tworoad.tw/product/product&product_id=21" rel="canonical" itemprop="url"> <!-- FACESPACE --> <meta property="fb:admins" content="563373182,768266873" /> <meta property="fb:app_id" content="111452980985663" /> <meta property="og:title" content="二路蘿蔔糕 | 花生蘿蔔糕 | 二路蘿蔔糕 l 用心,把這件事做到極致"/> <meta property="og:type" content="website"/> <meta property="og:url" content="https://www.tworoad.tw/product/product&amp;product_id=21"/> <meta property="og:locale" content="zh_TW" /> <meta property="og:image" content="https://image-cdn-flare.qdm.cloud/q67b3ef089f8e6/image/data/New_version/花生-1.jpg"/> <meta property="og:image:url" content="https://image-cdn-flare.qdm.cloud/q67b3ef089f8e6/image/data/New_version/花生-1.jpg"/> <meta property="og:site_name" content="二路蘿蔔糕 l 用心,把這件事做到極致"> <meta property="og:updated_time" content="1791501423"> <!-- Twitter Card --> <meta name="twitter:card" content="summary_large_image"> <meta name="twitter:title" content="二路蘿蔔糕 | 花生蘿蔔糕 | 二路蘿蔔糕 l 用心,把這件事做到極致"> <meta name="twitter:description" content="✸ 傳承三代的經典美味,高雄最新爆紅團購美食
8✸ 首款可生食等級蘿蔔糕,百分之百的天然健康美味
9✸ 僅使用嚴選100%純在來米、花生製作,加入胡椒粉與鹽,不含玉米粉、馬蹄粉或其它任何添加物或調味料,絕對的真材實料
10✸ 口感豐富、料理方式多元,純素可食且不易引起腸胃不適"> <meta name="twitter:image" content="https://image-cdn-flare.qdm.cloud/q67b3ef089f8e6/image/data/New_version/花生-1.jpg"> <!-- llms.txt --> <link rel="llms-txt" href="/llms.txt" /> <!-- G++ --> <meta itemprop="name" content="二路蘿蔔糕 | 花生蘿蔔糕"> <meta itemprop="description" content="✸ 傳承三代的經典美味,高雄最新爆紅團購美食
11✸ 首款可生食等級蘿蔔糕,百分之百的天然健康美味
12✸ 僅使用嚴選100%純在來米、花生製作,加入胡椒粉與鹽,不含玉米粉、馬蹄粉或其它任何添加物或調味料,絕對的真材實料
13✸ 口感豐富、料理方式多元,純素可食且不易引起腸胃不適"> <meta itemprop="image" content="//image-cdn-flare.qdm.cloud/q67b3ef089f8e6/image/data/New_version/花生-1.jpg"> <meta name="google-site-verification" content="nTLQNQEOAUL_80bZjcd3H09Z-Arl-u7X7GL3Rc-f7dI" /> <link title='二路蘿蔔糕 | 花生蘿蔔糕 - 訂閱商品快訊RSS' href="https://www.tworoad.tw/googlebase.xml" type='application/rss+xml' rel='alternate' > <!-- Google's Sitelinks Search --> 
13<script type="application/ld+json">
14	{
15		"@context": "https://schema.org",
16		"@type": "WebSite",
17		"name" : "二路蘿蔔糕 l 用心,把這件事做到極致",
18		"url": "https://www.tworoad.tw/",
19		"potentialAction": {
20			"@type": "SearchAction",
21			"target": {
22				"@type": "EntryPoint",
23				"urlTemplate": "https://www.tworoad.tw/search?q={filter_name}"
24			},
25			"query-input": "required name=filter_name"
26		}
27	}
28	</script>
28 <!-- Organization / LocalBusiness Schema --> 
28<script type="application/ld+json">
29	{
30    "@context": "https:\/\/schema.org",
31    "@type": "Organization",
32    "name": "二路蘿蔔糕 l 用心,把這件事做到極致",
33    "url": "https:\/\/www.tworoad.tw\/",
34    "logo": "https:\/\/image-cdn-flare.qdm.cloud\/q67b3ef089f8e6\/image\/data\/New_version\/頭版_logo.jpg",
35    "email": "[email protected]",
36    "sameAs": [
37        "https:\/\/www.facebook.com\/tworoad2021",
38        "https:\/\/line.me\/R\/ti\/p\/@217yujvr"
39    ],
40    "image": "https:\/\/image-cdn-flare.qdm.cloud\/q67b3ef089f8e6\/image\/data\/New_version\/頭版_logo.jpg"
41}	</script>
41 
41<script type="text/javascript">
42(function(c,l,a,r,i,t,y){
43c[a]=c[a]||function(){(c[a].q=c[a].q||[]).push(arguments)};
44t=l.createElement(r);t.async=1;t.src="https://www.clarity.ms/tag/"+i;
45y=l.getElementsByTagName(r)[0];y.parentNode.insertBefore(t,y);
46})(window, document, "clarity", "script", "99n8zhelys");
47</script>
47 <!-- Global site tag (gtag.js) - Google Analytics -->
vendor: 68 bytes, lines 47-48
47 <script async
48				src="https://www.googletagmanager.com/gtag/js?id=
48G-8CRMWS8GBK
vendor: 12 bytes, line 48
48"></script> 
48<script>
49			
vendor: 141 bytes, lines 49-53
49window.dataLayer = window.dataLayer || [];
50			function gtag(){dataLayer.push(arguments);}
51			gtag('js', new Date());
52
53							gtag('config', "
53G-8CRMWS8GBK
vendor: 42 bytes, lines 53-55
53", { send_page_view: false });
54			
55							
55gtag('config', "323701551", { send_page_view: false });
56					</script>
56 
56<script>
57
58				var enhanced_conversion_data = {};
59				var ga_userId = null;
60		var ga_userId_global = null;
61		var qdm_user_uuid = "q67b3ef089f8e6-61kue534b9i3e113gocbuie1pr";
62		var helperga4 = null;
63		var xmlhttp_uinfo = new XMLHttpRequest();
64		xmlhttp_uinfo.open('GET', "https://www.tworoad.tw/index.php?route=common/header/getLoggedInUserInfo&token=" + new Date().getTime() + "1" + (Math.floor(Math.random() * 999) + 100) , true);
65		xmlhttp_uinfo.onreadystatechange = function() {
66			if (xmlhttp_uinfo.readyState == 4) {
67				if(xmlhttp_uinfo.status == 200) {
68					try {
69						var obj = JSON.parse(xmlhttp_uinfo.responseText);
70						ga_userId = obj.user_id;
71						if( obj.email ) {
72							enhanced_conversion_data.email = obj.email;
73													}
74					} catch (e) { }
75				 }
76			}
77		};
78		xmlhttp_uinfo.send(null);
79
80		try {
81			if ('localStorage' in window && window['localStorage'] !== null){
82				if( localStorage.getItem('qdm_user_uuid') && qdm_user_uuid == null ) {
83					qdm_user_uuid = localStorage.getItem('qdm_user_uuid');
84				}
85			}
86		} catch (e) {}
87		window.addEventListener("beforeunload", () => localStorage.removeItem('qdm_user_uuid'));
88
89		function QUUID(){var x=(new Date).getTime(),t="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(t){const n=(x+16*Math.random())%16|0;return x=Math.floor(x/16),("x"==t?n:3&n|8).toString(16)});return "q67b3ef089f8e6"+t;}
90		var dateTime = Date.now();
91		var timestamp = Math.floor(dateTime / 1000);
92		var global_quuid = QUUID();
93		//var global_quuid = "q67b3ef089f8e6" + Math.random().toString(13).substr(2, 9) + "" + timestamp + "" + new Date().getTime();
94		var global_product_id = 0;
95		var ecommCheckoutTotal = 0;
96		var gecommProduct = new Array("21");
97				var gecommProductName = '花生蘿蔔糕';
98		var gecommProductSKU = '';
99		var gecommProductDesc = gecommProductName;
100				var gecommProductDesc = '✸ 傳承三代的經典美味,高雄最新爆紅團購美食✸ 首款可生食等級蘿蔔糕,百分之百的天然健康美味✸ 僅使用嚴選100%純在來米、花生製作,加入胡椒粉與鹽,不含玉米粉、馬蹄粉或其它任何添加物或調味料,絕對的真材實料✸ 口感豐富、料理方式多元,純素可食且不易引起腸胃不適';
101				var gecommProductBrand = '花生蘿蔔糕';
102						var gecommProductBrand_cyntelli = '二路蘿蔔糕';
103				var gecommProductCategoryPath = '全部商品';
104		var gecommProductCategoryWithComma = '全部商品';
105				var gecommProductPrice = 280;
106				var gecommCompareAtPrice = 280;
107				var gecommProductImageUrl = 'https://image-cdn-flare.qdm.cloud/q67b3ef089f8e6/image/data/New_version/花生-1.jpg';
108		var gecommProductUrl = "https://www.tworoad.tw/product/product&product_id=21";
109				var gecommViewCategoryName = '';
110		var gecommViewFullCategoryName = '';
111		var gecommProductToCart = {};
112		var ecommOrderToCheckout = {};
113				dataLayer.push({
114			'pageCategory': 'signup',
115			'visitorType': 'high-value'
116		});
117
118				var customer_id = '0';
119		if(customer_id>0){
120			if( ga_userId !== null ) {
121				ga_userId = customer_id;
122			}
123		}
124
125		var ga_utm_source = null;
126		var toggleVisible = function(id){
127			var el = document.getElementById(id);
128			if( el !== null ) { el.style.visibility = "visible"; }
129		};
130		
131	</script>
131 
131<script id="google-ga-event-track" type="text/javascript">
132
133		var track_google_ga_trigger = 0;
134
135		setTimeout(function(){
136
137			if( ga_userId !== null ) {
138				ga_userId_global = "q67b3ef089f8e6_" + ga_userId;
139
140				dataLayer.push({
141					'event': 'data',
142					'UID': ga_userId
143				});
144				window.adGeek_d = {
145					'memberId': ga_userId
146				};
147
148									gtag('config', '323701551', {'user_id': ga_userId_global}); /*ga4*/
149				
150									gtag('config', "G-8CRMWS8GBK", {'user_id': ga_userId_global});
151				
152				
153							} else {
154							}
155
156			if( track_google_ga_trigger == 1 ) { return false; };
157
158			if ( parseInt(global_product_id) > 0 ) {
159				if (typeof gaTrackProductView == 'function') {
160					gaTrackProductView();
161				}
162			}
163
164			
165			
166			
167			
168
169						try {
170				gtag('event', 'page_view', {
171				  page_title: '二路蘿蔔糕 | 花生蘿蔔糕',
172				  page_location: location.href,
173				  page_path: location.pathname,
174				});
175
176				
177			} catch (e) { }
178			
179		}, 2000);
180
181	</script>
181 
181<script>
182		
183		var QDMPPID = "8826156b3590b073274e7eeaf22d4336";
184		function setCookie(name, value, days) {
185			var expires = "";
186			if (days) {
187				// Mutate ONE Date object then format it. The previous one-liner set the
188				// expiry on a throwaway Date and formatted a fresh (now) Date, so every
189				// "persistent" cookie got expires=now and was dropped immediately.
190				var expireDate = new Date();
191				expireDate.setTime(expireDate.getTime() + (864e5 * days));
192				expires = "; expires=" + expireDate.toUTCString();
193			}
194			// SameSite=Lax lets cookies survive redirects back from external services (e.g. ECPay logistics).
195			document.cookie = name + "=" + value + expires + "; path=/; Secure; SameSite=Lax";
196		}
197		function getCookie(e){var n,i=document.cookie,o=i.indexOf(" "+e+"=");return-1==o&&(o=i.indexOf(e+"=")),i=-1==o?null:(o=i.indexOf("=",o)+1,-1==(n=i.indexOf(";",o))&&(n=i.length),unescape(i.substring(o,n)))}
198		if( !getCookie("QDMPPID") ) { setCookie("QDMPPID","055ab27c7645ba8dede3893359625aab", 365); }
199		QDMPPID = getCookie("QDMPPID");
200		<!-- Facebook Pixel Code -->
201		!function(f,b,e,v,n,t,s){if(f.fbq)return;n=f.fbq=function(){n.callMethod?
202		n.callMethod.apply(n,arguments):n.queue.push(arguments)};if(!f._fbq)f._fbq=n;
203		n.push=n;n.loaded=!0;n.version='2.0';n.queue=[];t=b.createElement(e);t.async=!0;
204		t.src=v;s=b.getElementsByTagName(e)[0];s.parentNode.insertBefore(t,s)}(window,
205		document,'script','https://connect.facebook.net/en_US/fbevents.js');
206		<!-- End Facebook Pixel Code -->
207
208		function onloadCSS(e,n){function t(){!o&&n&&(o=!0,n.call(e))}var o;e.addEventListener&&e.addEventListener("load",t),e.attachEvent&&e.attachEvent("onload",t),"isApplicationInstalled"in navigator&&"onloadcssdefined"in e&&e.onloadcssdefined(t)}!function(e){"use strict";var n=function(n,t,o){function a(e){return l.body?e():void setTimeout(function(){a(e)})}function d(){r.addEventListener&&r.removeEventListener("load",d),r.media=o||"all"}var i,l=e.document,r=l.createElement("link");if(t)i=t;else{var s=(l.body||l.getElementsByTagName("head")[0]).childNodes;i=s[s.length-1]}var f=l.styleSheets;r.rel="stylesheet",r.href=n,r.media="only x",a(function(){i.parentNode.insertBefore(r,t?i:i.nextSibling)});var c=function(e){for(var n=r.href,t=f.length;t--;)if(f[t].href===n)return e();setTimeout(function(){c(e)})};return r.addEventListener&&r.addEventListener("load",d),r.onloadcssdefined=c,c(d),r};"undefined"!=typeof exports?exports.loadCSS=n:e.loadCSS=n}("undefined"!=typeof global?global:this);
209
210		function removeClass( classname, element ) {
211			var cn = element.className;
212			var rxp = new RegExp( "s?b"+classname+"b", "g" );
213			cn = cn.replace( rxp, '' );
214			element.className = cn;
215		}
216
217		var disabledScroll = 1;
218		var doJsAfterLoad = 0;
219
220		
221		var stylesheets = [
222			"https://cdn.qdm.cloud/static/fontawesome/v3.2.1/css/font-awesome.min.css",
223			"https://cdn.qdm.cloud/static/fontawesome/v4.7.0/css/font-awesome.min.css",
224			"https://cdn.qdm.cloud/static/fontawesome/v5.11.2/css/all.min.css",
225			"https://cdn.qdm.cloud/static/fontawesome/v5.11.2/css/v4-shims.min.css",
226			"https://cdn.qdm.cloud/static/fontawesome/v6.5.1/css/all.min.css",
227			"https://fonts.googleapis.com/css?family=Roboto:400,400i,500,700&display=swap",
228			"https://cdnjs.cloudflare.com/ajax/libs/animate.css/4.1.1/animate.min.css",
229			"https://cdnjs.cloudflare.com/ajax/libs/izitoast/1.4.0/css/iziToast.min.css"
230		];
231				function refreshMiniCartScrollBar(){
232			var nice = $(".nicescroll-box").niceScroll(".wrap",{emulatetouch:true,bouncescroll:true});
233		}
234		function initCoreCSS(){
235			if( doJsAfterLoad ) return;
236						var loading_css_product = loadCSS("https://cdn.qdm.cloud/assets/css/core_product.24022002.css");
237			onloadCSS(loading_css_product, function(){ initCSS(); });
238						toggleVisible('header');
239			toggleVisible('mainnav');
240			doJsAfterLoad = 1;
241		}
242		function initCSS(){
243			for (var i=0; i < stylesheets.length; i++) { loadCSS(stylesheets[i]); }
244					}
245		function loadJS(){
246						$LAB.script("https://cdn.qdm.cloud/assets/js/jquery.countdown.2.2.0.0.min.js");
247											}
248
249		const ImageErrorHandler = {
250			// 配置選項
251			config: {
252				maxRetries: 5,
253				baseDelay: 200,
254				maxDelay: 3000,
255				defaultImage: "data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",
256				fallbackImage: "//cdn.qdm.cloud/assets/no_image.jpg" // 可選的替代圖片
257			},
258
259			// 正在處理的圖片 Map(防止重複處理)
260			processingImages: new WeakMap(), //WeakMap減少記憶體的洩漏
261			handle(image) {
262				try {
263					if (!image || !image.src || this.processingImages.has(image)) {
264						return;
265					}
266
267					// 標記為處理中
268					this.processingImages.set(image, true);
269
270					const retryCount = parseInt(image.getAttribute('data-reload') || '0') + 1;
271
272					if (retryCount > this.config.maxRetries) {
273						this.handleFinalError(image);
274						return;
275					}
276
277					image.setAttribute('data-reload', retryCount);
278
279					// 計算延遲時間(指數退避)
280					const delay = Math.min(
281						this.config.baseDelay * Math.pow(2, retryCount - 1),
282						this.config.maxDelay
283					);
284
285					setTimeout(() => {
286						this.retryLoad(image, retryCount);
287					}, delay);
288
289				} catch (err) {
290					console.error('ImageErrorHandler error:', err);
291					this.handleFinalError(image);
292				}
293			},
294
295			retryLoad(image, retryCount) {
296				const imageSrc = this.updateTimestamp(image.src);
297				// 使用新圖片物件測試
298				const testImage = new Image();
299				testImage.onload = () => {
300					// 成功載入
301					image.src = imageSrc;
302					this.processingImages.delete(image);
303
304					// 重新綁定錯誤處理
305					image.onerror = () => this.handle(image);
306				};
307
308				testImage.onerror = () => {
309					// 載入失敗
310					this.processingImages.delete(image);
311
312					// 如果是最後一次重試前,嘗試使用備用圖片
313					if (retryCount === this.config.maxRetries - 1 && this.config.fallbackImage) {
314						image.src = this.config.fallbackImage;
315						image.onerror = () => this.handle(image);
316					} else {
317						this.handle(image);
318					}
319				};
320
321				testImage.src = imageSrc;
322			},
323
324			updateTimestamp(src) {
325				const timestamp = `timestamp=${Date.now()}`;
326
327				if (src.includes('timestamp=')) {
328					return src.replace(/timestamp=\d+/, timestamp);
329				}
330
331				const separator = src.includes('?') ? '&' : '?';
332				return `${src}${separator}${timestamp}`;
333			},
334
335			handleFinalError(image) {
336				// 清理
337				image.onerror = null;
338				image.onload = null;
339				this.processingImages.delete(image);
340
341				// 保存原始 URL
342				if (!image.src.includes("base64") && !image.hasAttribute('data-image-raw')) {
343					image.setAttribute('data-image-raw', image.src);
344				}
345
346				// 設置預設圖片
347				image.src = this.config.defaultImage;
348
349				// 觸發事件
350				image.dispatchEvent(new CustomEvent('imageFinalError', {
351					detail: {
352						originalSrc: image.getAttribute('data-image-raw'),
353						retries: image.getAttribute('data-reload')
354					}
355				}));
356			}
357		};
358
359		// 圖片錯誤
360		function imgError(image) {
361			ImageErrorHandler.handle(image);
362		}
363
364
365	</script>
365 <!-- Facebook Pixel Code --> 
365<script id="facebook-pixcel-reportFbqTrack" type="text/javascript">
366	function reportFbqTrack() {
367	fbq('dataProcessingOptions', []);
368	var pixel_ids = ['748438983148999'];
369	var fb_advanced_matching = {};
370	for (var i = 0; i < pixel_ids.length; i++){
371		try {
372			var init_params = Object.assign({}, fb_advanced_matching);
373			if( ga_userId !== null ) {
374				ga_userId_global = "q67b3ef089f8e6_" + ga_userId;
375				init_params.uid = ga_userId_global;
376			}
377			init_params.external_id = QDMPPID;
378			fbq('init', pixel_ids[i], init_params, {'agent':'plQDM'});
379		} catch (e) {
380			// fallback: 至少包含 external_id
381			var fallback_params = {external_id: QDMPPID};
382			fbq('init', pixel_ids[i], fallback_params, {'agent':'plQDM'});
383		}
384	}
385		setTimeout(function() { fbq('track', "PageView", {}, {eventID: global_quuid + "v"}); }, 30);
386				setTimeout(function() {
387				fbq('track', 'ViewContent', {
388						content_name: '花生蘿蔔糕',
389						value: 280.0000,
390						currency: 'TWD'
391		}, {eventID: global_quuid + "c"});
392			}, 300);
393				
394	
395		
396			}
397	</script>
397 <!-- End Facebook Pixel Code --> 
397<script>
398		function vbtrax_track(){
399				}
400
401		function criteo_track(){
402		}
403
404		
405	</script>
405 <!-- Google Tag Manager --> 
405<script>
406	setTimeout(function(){
vendor: 333 bytes, lines 406-411
406
407	(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
408	new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
409	j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
410	'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
411	})(window,document,'script','dataLayer','
411GTM-KXZFJ3C
vendor: 5 bytes, lines 411-412
411');
412	
412}, 1500);
413	</script>
413 <!-- End Google Tag Manager --> 
413<script type="application/javascript"> <!-- LINE Tag Base Code -->
414(function(g,d,o){
415  g._ltq=g._ltq||[];g._lt=g._lt||function(){g._ltq.push(arguments)};
416  var h=location.protocol==='https:'?'https://d.line-scdn.net':'http://d.line-cdn.net';
417  var s=d.createElement('script');s.async=1;
418  s.src=o||h+'/n/line_tag/public/release/v1/lt.js';
419  var t=d.getElementsByTagName('script')[0];t.parentNode.insertBefore(s,t);
420    })(window, document);
421_lt('init', {
422  customerType: 'lap',
423  tagId: 'ca1644dc-2795-476b-9ffa-e1550d80f920&#039;'
424});
425_lt('send', 'pv', ['ca1644dc-2795-476b-9ffa-e1550d80f920&#039;']);
426<!-- End LINE Tag Base Code -->
427
428try { setCookie("qdmfbevent_id", global_quuid + "v", 5); } catch (error) { }
429
430(function() {
431	var url = "https://www.tworoad.tw/index.php?route=pixcel/facebook/capi_page_view&quuid=" + global_quuid + "v";
432
433	if (typeof fetch === "function") {
434		try {
435			fetch(url, { method: "GET", keepalive: true, credentials: "include" }).catch(function() {});
436		} catch (e) {}
437	} else {
438		try {
439			var xhr = new XMLHttpRequest();
440			xhr.open("GET", url, true);
441			xhr.send();
442		} catch (e) {}
443	}
444})();
445
446_lt('send', 'cv', {
447type: 'dpa_detail',
448itemIds: [gecommProduct.toString()],
449price: gecommProductPrice.toString(), 
450currency: 'TWD', 
451quantity: '1' 
452},
453{dpa:true},
454['ca1644dc-2795-476b-9ffa-e1550d80f920&#039;']);
455
456_lt('send', 'cv', {
457 type: 'ViewContent'
458},['ca1644dc-2795-476b-9ffa-e1550d80f920&#039;']);
459
460try { setCookie("qdmfbevent_id", global_quuid + "c", 5); } catch (error) { }
461
462(function() {
463	var url = "https://www.tworoad.tw/index.php?route=pixcel/facebook/capi_view_product&quuid=" + global_quuid + "c";
464	var payload = JSON.stringify({
465		"id"   : gecommProduct.toString(),
466		"price": gecommProductPrice,
467		"name" : gecommProductName
468	});
469	var sent = false;
470
471	if (typeof navigator !== "undefined" && typeof navigator.sendBeacon === "function") {
472		try {
473			var blob = new Blob([payload], { type: "text/plain" });
474			sent = navigator.sendBeacon(url, blob);
475		} catch (e) { sent = false; }
476	}
477
478	if (!sent && typeof fetch === "function") {
479		try {
480			fetch(url, {
481				method: "POST",
482				headers: { "Content-Type": "text/plain" },
483				body: payload,
484				keepalive: true,
485				credentials: "include"
486			}).catch(function() {});
487		} catch (e) {}
488	}
489})();
490	</script>
490 </script>
490 
490<script>
491			var N=document.createElement("link");
492	N.setAttribute("href", "https://image-cdn-flare.qdm.cloud/q67b3ef089f8e6/image/data/2023/03/28/d582cbfbb5e6775893b8fbf654d4fc86.jpg");
493	N.setAttribute("rel", "shortcut icon");
494		N.setAttribute("type", "image/jpeg");
495			document.head.appendChild(N);
496		</script>
496 
496<script>document.createElement("picture");</script>
496 
496<script async src='https://cdnjs.cloudflare.com/ajax/libs/picturefill/3.0.3/picturefill.min.js'></script>
496 <link rel="icon" href="https://image-cdn-flare.qdm.cloud/q67b3ef089f8e6/image/data/2023/03/28/d582cbfbb5e6775893b8fbf654d4fc86.jpg" type="image/png" sizes="48x48" > <link rel="shortcut icon" href="https://image-cdn-flare.qdm.cloud/q67b3ef089f8e6/image/data/2023/03/28/d582cbfbb5e6775893b8fbf654d4fc86.jpg" type="image/png" sizes="48x48" > <link type="text/css" rel="stylesheet" href="https://cdn.qdm.cloud/min/css/core.260320v01.css"> <style>
497	*, body, p, pre, button, input, optgroup, select, textarea, a, a:visited { font-family: 'SF Pro TC', 'SF Pro Text', 'PingFang TC', 'Segoe UI', SegoeUI, 'Microsoft JhengHei', 微軟正黑體, 'Helvetica Neue', Helvetica, Arial, sans-serif; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
498	@media (min-width: 1200px) { body { padding-top: 40px; } .container, .navbar-static-top .container, .navbar-fixed-top .container, .navbar-fixed-bottom .container { width: 1170px; } }
499	.hidden{display:none;visibility:hidden}
500	.pull-right { float: right !important; }
501	.container > #mainnav.skin4 { max-width:860px;width:100%; }
502	.container > #mainnav.skin4 .nav.menu-nav { display:inherit; }
503	#mainnav ul { list-style: none; display: flex; flex-wrap: wrap; }
504	#mainnav ul li { position: relative; }
505	#mainnav ul li ul.dropdown-menu { position: absolute; display: none; flex-direction: column; }
506	#mainnav ul li ul.dropdown-menu > li.column-menu { display: table-cell; border-right: 1px solid #eee; vertical-align: top; }
507	#mainnav ul li ul.dropdown-menu > li.column-menu > ul { display: block; }
508	#mainnav ul li:hover > ul { display: flex; }
509	#mainnav ul ul ul {top: 0; left: 100%; border-left:solid 1px #fff; width:auto;}
510	#mainnav ul.nav li.dropdown ul.dropdown-menu { webkit-box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2); -moz-box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2); box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2); }
511	#mainnav ul.nav li.dropdown ul.dropdown-menu li a { font-size: 17px; line-height: 26px; }
512	#mainnav ul.nav li.dropdown > ul.dropdown-menu > li[data-has-child] > a:after { content: ''; border: 4px solid transparent; border-left: 4px solid #000; margin-top: 2px; margin-bottom: 3px; display: inline-block; vertical-align: bottom; position: absolute; right: 6px; top: 10px; }
513	.navbar-fixed-top,.navbar-fixed-bottom{position:fixed;right:0;left:0;z-index:1030;margin-bottom:0;}
514	.navbar-fixed-top .navbar-inner,.navbar-static-top .navbar-inner{border-width:0 0 1px;}
515	#header ul{list-style:none;margin:0;padding:0} #header li{list-style:none}
516	.navbar .nav{position:relative;}
517	.navbar .nav.pull-right{float:right;margin-right:0;}
518	.navbar .nav>li{float:left;}
519	.navbar .nav>li>a{float:none;padding:10px 15px 10px;text-decoration:none;}
520	.navbar .nav .dropdown-toggle .caret{margin-top:8px;}
521	.navbar .button-navbar{display:none;float:right;padding:7px 10px;margin-left:5px;margin-right:5px;}
522	.button-navbar .icon-bar+.icon-bar{margin-top:3px;}
523	.navbar .nav>li>.dropdown-menu:before{content:'';display:inline-block;border-left:7px solid transparent;border-right:7px solid transparent;border-bottom:7px solid #ccc;border-bottom-color:rgba(0, 0, 0, 0.2);position:absolute;top:-7px;left:9px;}
524	.navbar .nav>li>.dropdown-menu:after{content:'';display:inline-block;border-left:6px solid transparent;border-right:6px solid transparent;border-bottom:6px solid #ffffff;position:absolute;top:-6px;left:10px;}
525	.dropdown-menu { position: absolute; display: none; float: left; }
526	.dropup, .dropdown { position: relative; }
527			.pushy { z-index: 99999999; }
528	.pushy-menu-storename span{
529		width: 40%;
530		position: absolute;
531		top: 24px;
532		right: 5px;
533		text-align: right;
534		padding-right: 10px;
535	}
536	.pushy-menu-storename a{
537		width: 90%;
538	}
539	.pushy-menu-storename a:hover, a:visited, a:link, a:active {
540		text-decoration: none;
541	}
542	</style> <link type="text/css" rel="stylesheet" href="https://cdn.qdm.cloud/min/css/theme/skin-3.css?v=231130001"> <link type="text/css" rel="stylesheet" href="https://image-cdn.qdm.cloud/site/q67b3ef089f8e6/custom_theme.css?v=20230807100759"> <style>
543	html {-webkit-transition: background-color 0s;transition: background-color 0s;} html.loading { position: relative; overflow:hidden; width:100%; height:100%; min-height:768px;
543 background: #fff url('https://cdn.qdm.cloud/min/cache/loading_1107.gif') no-repeat 50% 40%;-webkit-transition: background-color 0; transition: background-color 0; height: 100%; width: 100%;} body {-webkit-transition: opacity 0.3s ease-in;transition: opacity 0.3s ease-in;} html.loading body { opacity: 0; -webkit-transition: opacity 0s; transition: opacity 0s; } html.loading:before { font-size: 15px; content: "【 請勿關閉視窗 】等候交易授權中"; color: #000; vertical-align: middle; text-align: center; width: 100%; display: block; position: absolute; top: 30%; } img { opacity: 1; transition: opacity 0s; } img[data-src] { opacity: 1; } .flexslider .flex-direction-nav { display:none; }
544			#myBody.product-product .heading h1, #myBody.product-product .mainborder .rightcol h1 { color: rgb(0, 0, 0);
545	}
546			.already_sold span{color:#e4007f;font-weight:bold;}
547	#myBody .fancybox-buttons { top: 60px; }
548	.ui-autocomplete.ui-front.ui-menu {
549		z-index: 999999999; border: none; border: 1px solid #EEE; box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
550	}
551	.ui-autocomplete.ui-front.ui-menu > .ui-menu-item {
552		font-size: 17px; line-height: 26px; list-style-image: none; background-color: #FFF; cursor: pointer; border: none;
553	}
554	.ui-autocomplete.ui-front.ui-menu > .ui-menu-item a.ui-state-focus {
555		line-height: 26px;
556		border-color: #616161;
557		background: #616161 !important;
558		font-weight: bold !important;
559		color: #ffffff !important;
560	}
561	@media only screen and (max-width:768px){.fb_dialog_content>iframe:first-child, .fb-customerchat iframe {bottom: 50px !important;}.quickcheckout-checkout .fb_dialog_content>iframe:first-child, .quickcheckout-checkout .fb-customerchat iframe {bottom: 90px !important;}}
562	.onsale{ width:65px; height:24px; min-width:65px; min-height:24px; padding:2px; border-radius:5%; line-height:20px; }
563	#navbar-top-socialbar li.social-icon{ line-height:0px; padding-top:6px; }
564	#navbar-top-socialbar li.social-icon>a>i{ line-height:24px; }
565	.display_price { display:none; }
566
567	#payment-logo-list{
568		width: 100%;
569		max-width: 1200px;
570		margin: 0 auto;
571		/*padding-bottom: 20px;*/
572		padding-top: 10px;
573	}
574
575	#payment-logo-list .pl-row {
576		display: flex;
577		flex-wrap: wrap;
578		justify-content: center;
579		gap: 20px;
580	}
581
582	#payment-logo-list .pl-col {
583		flex: 1;
584		max-width: 120px;
585		padding: 2px;
586		text-align: center;
587	}
588	#payment-logo-list .pl-col img {
589		max-height: 40px;
590		line-height: 40px;
591		object-fit: contain
592	}
593	@media only screen and (max-width:768px){
594		#payment-logo-list .pl-col {
595			min-width: 10%;
596		}
597	}
598	</style> <style>
599	.preload-hidden { opacity: 0; transition: opacity .3s ease; }
600	.awoo-ui { display:block; margin-top:20px; margin-bottom:20px; }
601	</style> 
601<script>
602	window.addEventListener('load', function(){
603		try {
604			setTimeout(function(){
605				var preloadElements = document.querySelectorAll('.preload-hidden');
606				preloadElements.forEach(function(element) {
607					element.style.opacity = '1';
608				});
609			}, 300);
610		} catch(e) {}
611	});
612	</script>
612 </head> <body id="myBody" data-customer-group="1" data-instant-allow-query-string itemscope itemtype="https://schema.org/WebSite" class="responsive  skin-3 product-product"> <div id="fb-root"></div> 
612<script>
613	window.fbAsyncInit = function() {
614		FB.init({
615		  appId      		: '111452980985663',
616		  autoLogAppEvents 	: true,
617		  cookie     		: true,
618		  xfbml            	: true,
619		  status     		: true,
620		  version    		: 'v19.0'
621		});
622			};
623</script>
623 <!-- Google Tag Manager (noscript) -->
vendor: 68 bytes, line 623
623 <noscript><iframe src="https://www.googletagmanager.com/ns.html?id=
623GTM-KXZFJ3C
vendor: 83 bytes, lines 623-624
623"
624height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript> 
624<!-- End Google Tag Manager (noscript) --> <meta itemprop="url" content="https://www.tworoad.tw/" /> <!-- Mobile Header --> <!--googleoff: index--> <div id="mobile-navbar" class="navbar navbar-static-top FixedTop visible-xs visible-sm" style="display:none;"> <div class="navbar-inner"> <ul class="nav"> <li id="menu-btn" class="menu-btn"><span>&#9776;</span></li> <li class="site-title"> <a href="https://www.tworoad.tw/"><img src="//image-cdn-flare.qdm.cloud/q67b3ef089f8e6/image/data/2023/03/28/68f32fc16614c723f1a2092b597c5d89.jpg" title="二路蘿蔔糕 l 用心,把這件事做到極致" style="width:auto;max-height:56px;" /></a> </li> <li id="shopping-cart-list" class="shopping-cart" data-direction="left" style="overflow: visible; margin: 0px; padding-right: 10px;"><a href="https://www.tworoad.tw/cart"><i class="fa fa-shopping-cart" aria-hidden="true"></i><span class="badge hidden">0</span></a></li> </ul> </div> </div> <!--googleon: index--> <!-- Pushy Menu --> <nav id="mobile-menu-pushy" class="pushy pushy-left visible-xs visible-sm" style="display:none;"> <div class="pushy-content"> <ul> <li class="pushy-menu-storename"> <a href="https://www.tworoad.tw/">二路蘿蔔糕 l 用心,把這件事做到極致</a> <span><i class="fa fa-times" aria-hidden="true"></i></span> </li> <div class="pushy-menu-main"> <li class="header-logged-menu pushy-submenu hidden"> <button><i class="fa fa-user-circle-o"></i>&nbsp;<span id="header-mobile-user"></span></button> <ul> <li class="pushy-link"><a href="/account">會員中心</a></li> <li class="pushy-link"><a href="https://www.tworoad.tw/account/edit">我的資料</a></li> <li class="pushy-link"><a href="https://www.tworoad.tw/account/reward">我的紅利</a></li> <div class="pushy-menu-divide"></div> <li class="pushy-link"><a href="https://www.tworoad.tw/wishlist">願望清單</a></li> <div class="pushy-menu-divide"></div> <li class="pushy-link"><a href="https://www.tworoad.tw/newsletter">我的訂閱</a></li> </ul> </li> <li class="header-logged-menu pushy-submenu hidden"> <button><i class="fa fa-truck" aria-hidden="true"></i>&nbsp;我的訂單</button> <ul> <li class="pushy-link"><a href="https://www.tworoad.tw/order">我的訂單</a></li> <li class="pushy-link"><a href="https://www.tworoad.tw/account/return">退/換貨紀錄</a></li> </ul> </li> <li class="pushy-link header-none-logged-menu hidden"><a href="/login"><i class="fa fa-user-circle-o"></i>&nbsp;會員中心&nbsp;(登入)</a></li> <li class="pushy-link header-none-logged-menu hidden"><a href="/guestorder"><i class="fa fa-search-plus" aria-hidden="true"></i>&nbsp;我要查訂單</a></li> <li class="pushy-submenu"> <button><i class="fa fa-commenting-o" aria-hidden="true"></i>&nbsp;找店長</button> <ul> <li class="pushy-link"><a href="mailto:[email protected]" target="_blank" rel="noopener noreferrer nofollow">電子郵件</a></li> <li class="pushy-link"><a target="_blank" rel="noopener noreferrer nofollow" href="https://line.naver.jp/ti/p/~@217yujvr">LINE@</a></li> <li class="pushy-link"><a href="https://www.messenger.com/t/tworoad2021" target="_blank" rel="noopener noreferrer nofollow">Facebook訊息</a></li> </ul> </li> <li class="pushy-link header-logged-menu hidden"><a href="https://www.tworoad.tw/account/logout"><i class="fa fa-sign-out" aria-hidden="true"></i>&nbsp;登出</a></li> </div> <!-- \.pushy-menu-main --> <div class="pushy-menu-divide"></div> <div class="search"> <form method="get" action="/search"> <span class="fa fa-search"></span> <input type="text" name="q" placeholder="商品關鍵字" autocomplete="off"> </form><br/> </div> <div class="pushy-menu-category"> <li class="pushy-link home-item-link"><a href="https://www.tworoad.tw/">商店首頁</a></li> <li class="pushy-link" > <a href="/用心把這件事做到極致" >品牌故事</a> </li> <li class="pushy-link" > <a href="/latest" >全部商品</a> </li> <li class="pushy-link" > <a href="/下單前請先閱讀唷" >購買資訊</a> </li> <li class="pushy-link" > <a href="/二路來解惑" >常見問題</a> </li> <li class="pushy-submenu" > <button><span class="pushy-submenu-parent" data-url="https://www.tworoad.tw/私廚教室" >私廚教室</span></button> <ul> <li class="pushy-link"> <a href="index.php?route=information/information&information_id=15" >XO醬炒蘿蔔糕</a> </li> <li class="pushy-link"> <a href="index.php?route=information/information&information_id=12" >泡菜炒蘿蔔糕</a> </li> <li class="pushy-link"> <a href="index.php?route=information/information&information_id=16" >涼拌蘿蔔糕</a> </li> <li class="pushy-link"> <a href="index.php?route=information/information&information_id=20" >花枝握壽司</a> </li> <li class="pushy-link"> <a href="index.php?route=information/information&information_id=17" >蒸蘿蔔糕</a> </li> <li class="pushy-link"> <a href="index.php?route=information/information&information_id=21" >蘆筍握壽司</a> </li> <li class="pushy-link"> <a href="index.php?route=information/information&information_id=19" >蘿蔔糕海苔捲</a> </li> <li class="pushy-link"> <a href="index.php?route=information/information&information_id=18" >蘿蔔糕玉子燒</a> </li> <li class="pushy-link"> <a href="index.php?route=information/information&information_id=13" >
624金沙炒蘿蔔糕</a> </li> <li class="pushy-link"> <a href="index.php?route=information/information&information_id=14" >鮪魚握壽司(番茄)</a> </li> </ul> </li> </div> </ul> </div> </nav> <!-- Site Overlay --> <div class="site-overlay"></div> <header id="header" class="visible-lg visible-md navbar" itemscope itemtype="https://schema.org/Organization"> <div class="container"> <a itemprop="url" class="logo" href="https://www.tworoad.tw/"><img onerror='imgError(this);' itemprop="logo" src="//image-cdn-flare.qdm.cloud/q67b3ef089f8e6/image/data/New_version/頭版_logo.jpg" title="二路蘿蔔糕 l 用心,把這件事做到極致" alt="二路蘿蔔糕 l 用心,把這件事做到極致" /></a> <div id="search" class="search searchbox input-append" itemprop="potentialAction" itemscope itemtype="https://schema.org/SearchAction"> <meta itemprop="target" content="https://www.tworoad.tw/search?q={filter_name}" /> <input itemprop="query-input" type="search" name="filter_name" value="" placeholder="搜尋" class="input-xxlarge" /> <i class="icon-search button-search"></i> </div> <ul id="contact-block"> <li style="background-color:transparent;background-image:none;"> <a href="mailto:[email protected]" target="_blank" rel="noopener noreferrer nofollow" title="寫Email"> <i class="fa fa-envelope-o"></i> </a> </li> <li style="background-color:transparent;background-image:none;"> <a href="https://www.messenger.com/t/tworoad2021" target="_blank" rel="noopener noreferrer nofollow" title="Facebook訊息"> <i class="fa fa-facebook-square"></i> </a> </li> <li style="background-color:transparent;background-image:none;"> <a target="_blank" rel="noopener noreferrer nofollow" href="https://line.naver.jp/ti/p/~@217yujvr" title="LINE ID"><i class="fab fa-line"></i></a> </li> </ul> <ul id="main-nav" class="nav nav-pills pull-right"> <li></li> <li></li> <li><section class="float-mini-cart" id="cart"> <style>
625.mini-cart-info td, .mini-cart-total td { line-height:20px; }
626</style> <div class="heading"> <i class="fa fa-shopping-cart"></i>&nbsp;
627		( <a href="https://www.tworoad.tw/cart" id="cart-total">
628					 0 件商品 $0				</a>
629		 )
630			</div> <div class="content"> <div class="empty white">購物車沒有加入任何商品</div> <a id="closecart" class="close" title="Close" onclick="$('#cart').removeClass('active');">×</a> </div> </section></li> <li id="header-logged-menu" class="dropdown hidden"> <a href="https://www.tworoad.tw/account" class="dropdown-toggle" data-toggle="dropdown"><i class="fa fa-user-o"></i>&nbsp;<span id="header-logged-user"></span>&nbsp;<b class="caret"></b></a> <ul class="dropdown-menu"> <li><a href="https://www.tworoad.tw/account">會員中心</a></li> <li><a href="https://www.tworoad.tw/order">我的訂單</a></li> <li><a href="https://www.tworoad.tw/wishlist">願望清單</a></li> <li class="divider"></li> <li><a href="https://www.tworoad.tw/account/logout">登出</a></li> </ul> </li> <li id="header-none-logged-menu"><p style="margin:7px 0px;"><a href="https://www.tworoad.tw/login" title="會員登入" id="bt
630nLogin"><i class="fa fa-user-o"></i> 會員登入</a></p></li> </ul> </div> </header> <div id="content-wrapper"> <div class="container"> <nav id="mainnav" class="navbar visible-lg visible-md" role="navigation" style="visibility:hidden"> <div class="navbar-inner"> <div class="container"> <button type="button" class="button button-navbar" data-toggle="collapse" data-target=".nav-collapse"> <span>
631
632								選單</span> <i class="icon-navbtn"></i> </button> <div class="nav-collapse"> <ul class="nav"> <li data-categoryid="9"  href="/用心把這件事做到極致" > <a  href="/用心把這件事做到極致" ><img class="flipper" data-flipper="https://image-cdn-flare.qdm.cloud/q67b3ef089f8e6/image/data/品牌故事_1.jpg" src="https://image-cdn-flare.qdm.cloud/q67b3ef089f8e6/image/data/品牌故事_1.jpg" alt="品牌故事" title="品牌故事" /></a> </li> <li data-categoryid="8"  href="/latest" > <a  href="/latest" ><img class="flipper" data-flipper="https://image-cdn-flare.qdm.cloud/q67b3ef089f8e6/image/data/全部商品.jpg" src="https://image-cdn-flare.qdm.cloud/q67b3ef089f8e6/image/data/全部商品.jpg" alt="全部商品" title="全部商品" /></a> </li> <li data-categoryid="10"  href="/下單前請先閱讀唷" > <a  href="/下單前請先閱讀唷" ><img class="flipper" data-flipper="https://image-cdn-flare.qdm.cloud/q67b3ef089f8e6/image/data/購買資訊.jpg" src="https://image-cdn-flare.qdm.cloud/q67b3ef089f8e6/image/data/購買資訊.jpg" alt="購買資訊" title="購買資訊" /></a> </li> <li data-categoryid="11"  href="/二路來解惑" > <a  href="/二路來解惑" ><img class="flipper" data-flipper="https://image-cdn-flare.qdm.cloud/q67b3ef089f8e6/image/data/常見問題.jpg" src="https://image-cdn-flare.qdm.cloud/q67b3ef089f8e6/image/data/常見問題.jpg" alt="常見問題" title="常見問題" /></a> </li> <li data-categoryid="12"  href="https://www.tworoad.tw/私廚教室"  class="dropdown"> <a  href="https://www.tworoad.tw/私廚教室" ><img class="flipper" data-flipper="https://image-cdn-flare.qdm.cloud/q67b3ef089f8e6/image/data/私廚教室_1.jpg" src="https://image-cdn-flare.qdm.cloud/q67b3ef089f8e6/image/data/私廚教室_1.jpg" alt="私廚教室" title="私廚教室" /></a> <ul class="dropdown-menu"> <li id="50" ><a href="index.php?route=information/information&information_id=15"  data-hover="">XO醬炒蘿蔔糕</a> </li> <li id="51" ><a href="index.php?route=information/information&information_id=12"  data-hover="">泡菜炒蘿蔔糕</a> </li> <li id="52" ><a href="index.php?route=information/information&information_id=16"  data-hover="">涼拌蘿蔔糕</a> </li> <li id="53" ><a href="index.php?route=information/information&information_id=20"  data-hover="">花枝握壽司</a> </li> <li id="54" ><a href="index.php?route=information/information&information_id=17"  data-hover="">蒸蘿蔔糕</a> </li> <li id="55" ><a href="index.php?route=information/information&information_id=21"  data-hover="">蘆筍握壽司</a> </li> <li id="56" ><a href="index.php?route=information/information&information_id=19"  data-hover="">蘿蔔糕海苔捲</a> </li> <li id="57" ><a href="index.php?route=information/information&information_id=18"  data-hover="">蘿蔔糕玉子燒</a> </li> <li id="58" ><a href="index.php?route=information/information&information_id=13"  data-hover="">金沙炒蘿蔔糕</a> </li> <li id="59" ><a href="index.php?route=information/information&information_id=14"  data-hover="">鮪魚握壽司(番茄)</a> </li> </ul> </li> </ul> </div> </div> </div> </nav><!-- #navbar --> </div><!-- .container --> <div class="fluid-container"> <div id="content-top"></div> </div><!-- .fluid-container --> <div id="body-outer-container" class="container"> <div class="container-inner"> <style>
633	.swal2-container.swal2-center {
634		z-index: 999999999;
635	}
636
637	#options .nice-number {
638		display: inline-block;
639	}
640
641	#options label[data-number-input-option] .nice-number>button {
642		-webkit-appearance: none;
643		border: 1px solid #BBB;
644		background: #FBFBFB;
645		height: 28px;
646	}
647
648	#options label[data-number-input-option] .multicheck-options {
649		border-radius: 0px;
650		height: 28px;
651	}
652
653	#options label.option--value-no-stock .nice-number {
654		display: none;
655	}
656
657	.product-info .rightcol .product-feature-content {
658		-moz-hyphens: auto;
659		-ms-hyphens: auto;
660		-webkit-hyphens: auto;
661		hyphens: auto;
662		word-wrap: break-word;
663	}
664
665	h1.product-heading-title {
666		-moz-hyphens: auto;
667		-ms-hyphens: auto;
668		-webkit-hyphens: auto;
669		hyphens: auto;
670		word-wrap: break-word;
671	}
672
673	.cart .button.button-ticket {
674		background: #35bcab;
675		border-color: #35bcab;
676	}
677
678	.cart .button.button-ticket:hover {
679		background: #35bcab;
680		border-color: #288e84;
681	}
682
683	/*#maincontent.product-info.span12 #main-image.image { text-align: center; } */
684	#maincontent.product-info.span12 #main-image img {
685		width: auto;
686		max-width: 480px;
687	}
688
689	#maincontent.product-info #main-defer-image {
690		width: 100%;
691		max-width: 480px;
692	}
693
694	#image-additional {
695		display: flex;
696		flex-wrap: wrap;
697		align-items: flex-start;
698		gap: 1px;
699		float: none !important;
700	}
701
702	#image-additional-container {
703		float: none !important;
704		clear: both;
705		display: block;
706		margin-left: auto;
707		margin-right: 0;
708	}
709
710	#image-additional li {
711		display: block;
712		margin: 0;
713		list-style: none;
714	}
715
716	#image-additional li a img {
717		display: block;
718	}
719
720	.add-additional-purchase-price {
721		display: inline-block;
722		margin-left: 12px;
723		margin-right: 12px;
724		line-height: 40px;
725	}
726
727	.add-additional-purchase-price .product-original-price {
728		display: inline-block;
729		margin: 0px;
730		margin-left: 6px;
731		text-decoration: line-through;
732		color: #C0C0C0;
733		font-size: 11px;
734	}
735
736	.add-additional-purchase-price .product-additional-price {
737		display: inline-block;
738		margin: 0px;
739		font-weight: bold;
740		color: #d9505b;
741		font-size: 14px;
742	}
743
744	.well.add-additional-purchase-price-container label {
745		padding: 4px;
746		padding-bottom: 8px;
747		padding-left: 12px;
748		border: 2px solid #DFDFDF;
749		background: #FFF;
750		cursor: pointer;
751		position: relative;
752	}
753
754	.well.add-additional-purchase-price-container label .text_no_pick {
755		padding: 0px;
756		padding-left: 6px;
757		padding-right: 6px;
758		border-radius: 4px;
759		background: #65b9aa;
760		color: #FFF;
761		font-size: 9px;
762		line-height: 16px;
763		position: absolute;
764		right: -3px;
765		top: -3px;
766		font-weight: bold;
767	}
768
769	.well.add-additional-purchase-price-container label:hover {
770		border: 2px solid #919191;
771	}
772
773	.well.add-additional-purchase-price-container label input[type='radio'] {
774		padding: 0px;
775		margin: 0px;
776	}
777
778	@media screen and (max-width: 467px) {
779		.option-image small {
780			display: block;
781		}
782
783		#maincontent.product-info.span12 #main-image img {
784			width: auto;
785			max-width: 100%;
786		}
787
788		#maincontent.product-info #main-defer-image {
789			width: 100%;
790			max-width: 100%;
791		}
792
793		h1.product-heading-title {
794			text-align: left;
795			padding: 20px;
796			padding-left: 12px;
797		}
798
799		#discount_list ul,
800		ol {
801			padding: 0;
802			margin: 0 0 10px 10px;
803			text-align: left;
804		}
805	}
806
807	@media only screen and (max-width: 1000px),
808	only screen and (min-device-width: 375px) and (max-device-width: 667px) and (orientation: portrait),
809	only screen and (min-device-width: 414px) and (max-device-width: 736px) and (orientation: portrait) {
810
811		.product-info .image,
812		.product-info .image img {
813			#maincontent.product-info.span12 #main-image img {
814				width: auto;
815				max-width: 100%;
816			}
817
818			#maincontent.product-info #main-defer-image {
819				width: 100%;
820				max-width: 100%;
821			}
822
823			.rightcol .cart #button-cart.button-cart.button.pull-left {
824				-webkit-transition: none;
825				transition: none;
826			}
827		}
828
829	}
830
831
832	/* 貨到通知按鈕設定 */
833	.button-stock-notify {
834		background-color: var(--arrival-notice-button-bg-color, #ffffff);
835		/* 使用 CSS 變數,提供預設值 */
836		color: var(--arrival-notice-button-text-color, #333333);
837		/* 使用 CSS 變數,提供預設值 */
838		border: 1px solid var(--arrival-notice-button-border-color, #d9d9d9);
839		/* 使用 CSS 變數,提供預設值 */
840		border-radius: 6px;
841		padding: 10px 20px;
842		line-height: 1.42857143;
843		display: inline-block;
844		font-weight: 600;
845		text-align: center;
846		white-space: nowrap;
847		vertical-align: middle;
848		cursor: pointer;
849		transition: all .2s ease-in-out;
850		font-size: 16px;
851		width: fit-content;
852		background: linear-gradient(to bottom,
853				var(--arrival-notice-button-bg-color-light, #fdfdfd) 0%,
854				var(--arrival-notice-button-bg-color, #ffffff) 100%);
855		box-shadow:
856			0 2px 4px rgba(0, 0, 0, 0.1),
857			0 5px 15px rgba(0, 0, 0, 0.05),
858			inset 0 1px 0 rgba(255, 255, 255, 0.2);
859		border-color: var(--arrival-notice-button-border-color, #c0c0c0);
860
861	}
862
863	.button-stock-notify.small {
864		font-size: 12px;
865		padding: 0.20rem;
866	}
867
868	.button-stock-notify:hover,
869	.button-stock-notify:focus {
870
871		filter: brightness(98%);
872		/* 稍微抬升並加強陰影 */
873		transform: translateY(-2px);
874		box-shadow:
875			0 4px 8px rgba(0, 0, 0, 0.15),
876			0 8px 20px rgba(0, 0, 0, 0.08),
877			inset 0 1px 0 rgba(255, 255, 255, 0.3);
878		background: linear-gradient(to bottom,
879				var(--arrival-notice-button-bg-color, #ffffff) 0%,
880				var(--arrival-notice-button-bg-color, #f0f0f0) 100%);
881		border-color: var(--arrival-notice-button-border-color, #b0b0b0);
882		color: var(--arrival-notice-button-text-color, #222222);
883	}
884
885	.button-stock-notify:active,
886	.button-stock-notify.active {
887		transform: translateY(1px);
888		box-shadow:
889			0 1px 2px rgba(0, 0, 0, 0.2),
890			inset 0 1px 2px rgba(0, 0, 0, 0.1),
891			inset 0 -1px 0 rgba(255, 255, 255, 0.1);
892		background: var(--arrival-notice-button-bg-color, #e0e0e0);
893		border-color: var(--arrival-notice-button-border-color, #a0a0a0);
894	}
895
896	.button-stock-notify.disabled,
897	.button-stock-notify[disabled] {
898		background-color: #fafafa;
899		color: #b3b3b3;
900		border-color: #e6e6e6;
901		cursor: not-allowed;
902		box-shadow: none;
903		opacity: .75;
904	}
905
906	/*手機板樣式*/
907	.button-stock-notify.mobile {
908		width: 100%;
909		position: fixed;
910		bottom: 0px;
911		margin: 2px;
912		left: 0;
913		z-index: 9999;
914		margin: auto;
915		border-bottom: 0;
916		border-left: 0;
917		border-right: 0;
918		border-radius: 0;
919		padding: 10px;
920		height: 52px;
921	}
922
923	.d-inline-grid {
924		display: inline-grid;
925	}
926
927	/* 修正平板購買按鈕跑版問題 */
928	#button-cart.fix-btn-size,
929	#button-quick-checkout.fix-btn-size {
930		position: fixed;
931		bottom: 10px;
932		padding: 0;
933		margin: 2px;
934		z-index: 999998;
935		border-radius: 0;
936		border: 0;
937		-webkit-box-shadow: none;
938		-moz-box-shadow: none;
939		box-shadow: none;
940		height: 52px;
941		line-height: 52px;
942		font-size: 16px;
943		display: block;
944		text-shadow: none
945	}
946
947	#button-cart.fix-btn-size {
948		left: 0;
949		width: 38%;
950		-webkit-transition: width .5s;
951		transition: width .5s
952	}
953
954	#button-quick-checkout.fix-btn-size {
955		right: 0;
956		width: 60%;
957		background: #31bcab;
958		color: #fafafa !important;
959		font-weight: bold;
960		font-size: 18px
961	}
962
963	#button-instant-checkout.fix-btn-size {
964		width: 60%;
965		-webkit-transition: width .5s;
966		transition: width .5s
967	}
968
969	/* 禁止購買的樣式 */
970	.option-no-stock {
971		background: #f3f3f3 !important;
972		color: #c3c3c3 !important;
973		cursor: not-allowed !important;
974	}
975
976	.cursor-pointer {
977		cursor: pointer;
978	}
979
980	/* 貨到通知 - 彈窗顯示樣式*/
981	:root {
982		--lightbox-alert-error: rgb(95, 8, 2);
983		--lightbox-alert-success: #4CAF50;
984		--lightbox-alert-warning: rgb(119, 100, 71);
985		--lightbox-alert-info: rgb(0, 83, 151);
986	}
987
988
989	.lightbox-alert-icon-success {
990		color: var(--lightbox-alert-success);
991	}
992
993	.lightbox-alert-icon-error {
994		color: var(--lightbox-alert-error);
995	}
996
997	.lightbox-alert-icon-warning {
998		color: var(--lightbox-alert-warning);
999	}
1000
1001	.lightbox-alert-icon-info {
1002		color: var(--lightbox-alert-info);
1003
1004	}
1005
1006	/* Alert 圖示顏色 貨到通知*/
1007	.lightbox-alert-btn-success {
1008		background: var(--lightbox-alert-success);
1009	}
1010
1011	.lightbox-alert-btn-error {
1012		background: var(--lightbox-alert-error);
1013	}
1014
1015	.lightbox-alert-btn-warning {
1016		background: var(--lightbox-alert-warning);
1017	}
1018
1019	.lightbox-alert-btn-info {
1020		background: var(--lightbox-alert-info);
1021	}
1022
1023	.arrival-guide-guest-submit {
1024		background:rgb(119, 133, 145);
1025		color: #fff;
1026		padding: 11px 0;
1027		width: 100%;
1028		border: none;
1029		border-radius: 4px;
1030		font-size: 16px;
1031		cursor: pointer;
1032		font-weight: 500;
1033	}
1034</style> <ol itemscope itemtype="http://schema.org/BreadcrumbList" class="breadcrumb"> <li itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"> <a itemprop="item" href="https://www.tworoad.tw/"><span itemprop="name">首頁</span></a> <meta itemprop="position" content="1" /> <li itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem">
1035			 &gt; 			<a itemprop="item" href="https://www.tworoad.tw/product/product&amp;product_id=21"><span itemprop="name">花生蘿蔔糕</span></a> <meta itemprop="position" content="2" /> </li> </ol> <header class="heading"> <div class="prevnext clearfix"> <ul class="pager"> <li class="previous"> </li> <li class="next"> </li> </ul> </div> <h1 class="product-heading-title">花生蘿蔔糕			</h1> <div id="notification"></div> </header> <div class="row-fluid"> <!-- GEO/AEO: BreadcrumbList JSON-LD --> 
1035<script type="application/ld+json">
1036		{
1037			"@context": "https://schema.org",
1038			"@type": "BreadcrumbList",
1039			"itemListElement": [
1040												{
1041					"@type": "ListItem",
1042					"position": 1,
1043					"name": "\u9996\u9801",
1044					"item": "https:\/\/www.tworoad.tw\/"				}
1045								,				{
1046					"@type": "ListItem",
1047					"position": 2,
1048					"name": "\u82b1\u751f\u863f\u8514\u7cd5",
1049					"item": "https:\/\/www.tworoad.tw\/product\/product&amp;product_id=21"				}
1050							]
1051		}
1052	</script>
1052 <!-- GEO/AEO: WebPage + mainEntity --> 
1052<script type="application/ld+json">
1053		{
1054			"@context": "https://schema.org",
1055			"@type": "WebPage",
1056			"name": "\u82b1\u751f\u863f\u8514\u7cd5",
1057			"url": "https:\/\/www.tworoad.tw\/product\/product&product_id=21",
1058			"mainEntity": {
1059				"@type": "Product",
1060				"@id": "#product"
1061			}
1062		}
1063	</script>
1063 
1063<script type="application/ld+json">
1064		{
1065			"@context": "https://schema.org",
1066			"@type": "Product",
1067			"@id": "#product",
1068			"productID": "21",
1069			"name": "\u4e8c\u8def\u863f\u8514\u7cd5 | \u82b1\u751f\u863f\u8514\u7cd5",
1070			"description": "\u2738 \u50b3\u627f\u4e09\u4ee3\u7684\u7d93\u5178\u7f8e\u5473\uff0c\u9ad8\u96c4\u6700\u65b0\u7206\u7d05\u5718\u8cfc\u7f8e\u98df\r\n\u2738 \u9996\u6b3e\u53ef\u751f\u98df\u7b49\u7d1a\u863f\u8514\u7cd5\uff0c\u767e\u5206\u4e4b\u767e\u7684\u5929\u7136\u5065\u5eb7\u7f8e\u5473\r\n\u2738 \u50c5\u4f7f\u7528\u56b4\u9078100%\u7d14\u5728\u4f86\u7c73\u3001\u82b1\u751f\u88fd\u4f5c\uff0c\u52a0\u5165\u80e1\u6912\u7c89\u8207\u9e7d\uff0c\u4e0d\u542b\u7389\u7c73\u7c89\u3001\u99ac\u8e44\u7c89\u6216\u5176\u5b83\u4efb\u4f55\u6dfb\u52a0\u7269\u6216\u8abf\u5473\u6599\uff0c\u7d55\u5c0d\u7684\u771f\u6750\u5be6\u6599\r\n\u2738 \u53e3\u611f\u8c50\u5bcc\u3001\u6599\u7406\u65b9\u5f0f\u591a\u5143\uff0c\u7d14\u7d20\u53ef\u98df\u4e14\u4e0d\u6613\u5f15\u8d77\u8178\u80c3\u4e0d\u9069",
1071			"image": [
1072				"https:\/\/image-cdn-flare.qdm.cloud\/q67b3ef089f8e6\/image\/data\/New_version\/\u82b1\u751f-1.jpg",
1073				"https:\/\/image-cdn-flare.qdm.cloud\/q67b3ef089f8e6\/image\/data\/2023\/03\/29\/cd67787cc12f2b113e300c3d66604630.jpg",
1074				"https:\/\/image-cdn-flare.qdm.cloud\/q67b3ef089f8e6\/image\/data\/2023\/03\/29\/1a86fc5f662a777f7dea263b2c2ae207.jpg",
1075				"https:\/\/image-cdn-flare.qdm.cloud\/q67b3ef089f8e6\/image\/data\/2023\/03\/29\/9bbc266b6ca6208dc38f9e848bc21a10.jpg"
1076			],
1077			"brand": {
1078				"@type": "Brand",
1079				"name": "\u82b1\u751f\u863f\u8514\u7cd5"
1080			}
1081			, "offers": {
1082				"@type": "Offer",
1083				"url": "https:\/\/www.tworoad.tw\/product\/product&product_id=21",
1084				"priceCurrency": "TWD",
1085				"price": "280",
1086				"priceValidUntil": "2027-10-09",
1087				"itemCondition": "https://schema.org/NewCondition",
1088				"availability": "https://schema.org/InStock",
1089				"seller": {
1090					"@type": "Organization",
1091					"name": "二路蘿蔔糕"
1092				},
1093				"shippingDetails": {
1094					"@type": "OfferShippingDetails",
1095					"shippingRate": {
1096						"@type": "MonetaryAmount",
1097						"value": "0",
1098						"currency": "TWD"
1099					},
1100					"shippingDestination": {
1101						"@type": "DefinedRegion",
1102						"addressCountry": "TW"
1103					},
1104					"deliveryTime": {
1105						"@type": "ShippingDeliveryTime",
1106						"handlingTime": {
1107							"@type": "QuantitativeValue",
1108							"minValue": "1",
1109							"maxValue": "3",
1110							"unitCode": "DAY"
1111						},
1112						"transitTime": {
1113							"@type": "QuantitativeValue",
1114							"minValue": "1",
1115							"maxValue": "3",
1116							"unitCode": "DAY"
1117						}
1118					}
1119				},
1120				"hasMerchantReturnPolicy": {
1121					"@type": "MerchantReturnPolicy",
1122					"applicableCountry": "TW",
1123					"returnPolicyCategory": "https://schema.org/MerchantReturnFiniteReturnWindow",
1124					"merchantReturnDays": "7",
1125					"returnMethod": "https://schema.org/ReturnByMail",
1126					"returnFees": "https://schema.org/FreeReturn"
1127				}
1128			}
1129		}
1130	</script>
1130 <section id="maincontent" class="product-info span12" role="main"> <div class="mainborder"> <div class="row-fluid"> <div class="leftcol"> <img id="main-defer-image" onerror='imgError(this);' src="https://image-cdn-flare.qdm.cloud/q67b3ef089f8e6/image/data/New_version/花生-1.jpg" data-rjs="https://image-cdn-flare.qdm.cloud/q67b3ef089f8e6/image/data/New_version/花生-1.jpg"  style="display:inline-block;" /> <div id="main-image" class="image hidden" style="padding:0px;"> <a class="fancybox-product" href="https://image-cdn-flare.qdm.cloud/q67b3ef089f8e6/image/data/New_version/花生-1.jpg" title="花生蘿蔔糕"><img pagespeed_no_defer="" id='zoom1' src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" data-src="https://image-cdn-flare.qdm.cloud/q67b3ef089f8e6/image/data/New_version/花生-1.jpg" data-rjs="https://image-cdn-flare.qdm.cloud/q67b3ef089f8e6/image/data/New_version/花生-1.jpg"  onerror='imgError(this);' data-hd-image="https://image-cdn-flare.qdm.cloud/q67b3ef089f8e6/image/data/New_version/花生-1.jpg" data-zoom-image="https://image-cdn-flare.qdm.cloud/q67b3ef089f8e6/image/data/New_version/花生-1.jpg" alt="花生蘿蔔糕" style="display:inline-block;min-height:200px;animation-duration:0s;transition: all 0s ease 0s" /></a> </div> <div id="image-additional-container" class="image-additional animated fadeIn" style="display:none;"> <ul id="image-additional"> <li><a data-fancybox="gallery" rel="group" class="zoom-active" data-fancybox-type="image" href="https://image-cdn-flare.qdm.cloud/q67b3ef089f8e6/image/data/New_version/花生-1.jpg" title="花生蘿蔔糕" data-image="https://image-cdn-flare.qdm.cloud/q67b3ef089f8e6/image/data/New_version/花生-1.jpg" data-hd-image="https://image-cdn-flare.qdm.cloud/q67b3ef089f8e6/image/data/New_version/花生-1.jpg" data-zoom-image="https://image-cdn-flare.qdm.cloud/q67b3ef089f8e6/image/data/New_version/花生-1.jpg" class="elevatezoom-gallery"><img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" onerror='imgError(this);' data-src="//image-cdn-flare.qdm.cloud/q67b3ef089f8e6/image/cache/data/New_version/E88AB1E7949F-1-120x120.jpg" title="花生蘿蔔糕" alt="花生蘿蔔糕" /></a></li> <li><a data-fancybox="gallery" rel="group" href="https://image-cdn-flare.qdm.cloud/q67b3ef089f8e6/image/data/2023/03/29/cd67787cc12f2b113e300c3d66604630.jpg" title="花生蘿蔔糕" data-fancybox-type="image" data-image="//image-cdn-flare.qdm.cloud/q67b3ef089f8e6/image/data/2023/03/29/cd67787cc12f2b113e300c3d66604630.jpg" data-hd-image="https://image-cdn-flare.qdm.cloud/q67b3ef089f8e6/image/data/2023/03/29/cd67787cc12f2b113e300c3d66604630.jpg" data-zoom-image="https://image-cdn-flare.qdm.cloud/q67b3ef089f8e6/image/data/2023/03/29/cd67787cc12f2b113e300c3d66604630.jpg" class="elevatezoom-gallery"><img onerror='imgError(this);' src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" data-src="//image-cdn-flare.qdm.cloud/q67b3ef089f8e6/image/cache/data/2023/03/29/cd67787cc12f2b113e300c3d66604630-120x120.jpg" title="花生蘿蔔糕_1" alt="花生蘿蔔糕_1" /></a></li> <li><a data-fancybox="gallery" rel="group" href="https://image-cdn-flare.qdm.cloud/q67b3ef089f8e6/image/data/2023/03/29/1a86fc5f662a777f7dea263b2c2ae207.jpg" title="花生蘿蔔糕" data-fancybox-type="image" data-image="//image-cdn-flare.qdm.cloud/q67b3ef089f8e6/image/data/2023/03/29/1a86fc5f662a777f7dea263b2c2ae207.jpg" data-hd-image="https://image-cdn-flare.qdm.cloud/q67b3ef089f8e6/image/data/2023/03/29/1a86fc5f662a777f7dea263b2c2ae207.jpg" data-zoom-image="https://image-cdn-flare.qdm.cloud/q67b3ef089f8e6/image/data/2023/03/29/1a86fc5f662a777f7dea263b2c2ae207.jpg" class="elevatezoom-gallery"><img onerror='imgError(this);' src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" data-src="//image-cdn-flare.qdm.cloud/q67b3ef089f8e6/image/cache/data/2023/03/29/1a86fc5f662a777f7dea263b2c2ae207-120x120.jpg" title="花生蘿蔔糕_2" alt="花生蘿蔔糕_2" /></a></li> <li><a data-fancybox="gallery" rel="group" href="https://image-cdn-flare.qdm.cloud/q67b3ef089f8e6/image/data/2023/03/29/9bbc266b6ca6208dc38f9e848bc21a10.jpg" title="花生蘿蔔糕" data-fancybox-type="image" data-image="//image-cdn-flare.qdm.cloud/q67b3ef089f8e6/image/data/2023/03/29/9bbc266b6ca6208dc38f9e848bc21a10.jpg" data-hd-image="https://image-cdn-flare.qdm.cloud/q67b3ef089f8e6/image/data/2023/03/29/9bbc266b6ca6208dc38f9e848bc21a10.jpg" data-zoom-image="https://image-cdn-flare.qdm.cloud/q67b3ef089f8e6/image/data/2023/03/29/9bbc266b6ca6208dc38f9e848bc21a10.jpg" class="elevatezoom-gallery"><img onerror='imgError(this);' src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" data-src="//image-cdn-flare.qdm.cloud/q67b3ef089f8e6/image/cache/data/2023/03/29/9bbc266b6ca6208dc38f9e848bc21a10-120x120.jpg" title="花生蘿蔔糕_3" alt="花生蘿蔔糕_3" /></a></li> </ul> </div> </div> <!-- .span6 LEFT BOX--> <div class="rightcol"> <input type="hidden" name="EscrowDays" value="" /> <!-- special_price_countdown start --> <div id="countdown_dashboard" class="countdown"></div> <!-- special_price_countdown end --> <div class="price"> <div id="price-price-block"> <span class="price-normal product-sell-price" data-content="280">$280</span> </div> <div class="discount" id="promotion_list"> </div> <!-- .discount--> </div> <!-- .price --> <div class="description"> <span class="product-feature-content"><p>從懷念一件珍貴事物,再到願意放棄所有, 將傳æ‰
1130¿é‚£æ¨£ç¾Žå¥½è¨˜æ†¶çš„責任視為一生志業,會是什麼樣的感覺?</p> <p>「蘿蔔糕」之於二路,就是這樣重要且獨特的情感連結。</p> <p>因著一顆對阿嬤的蘿蔔糕無限思念的初衷, 二路蘿蔔糕堅持以最天然健康的方式呈現經典美味, 用充滿溫度的心意,守護傳承超過一甲子的美食。</p> <p>✸ 傳承三代的經典美味,高雄最新爆紅團購美食</p> <p>✸ 首款可生食等級蘿蔔糕,百分之百的天然健康美味</p> <p>✸ 僅使用嚴選100%純在來米、花生製作,加入胡椒粉與鹽,不含玉米粉、馬蹄粉或其它任何添加物或調味料,絕對的真材實料</p> <p>✸ 口感豐富、料理方式多元,純素可食且不易引起腸胃不適</p></span><br /> <span>規格型號</span> 含花生蘿蔔糕一條,每條900g<br /> <span>庫存狀況</span>&nbsp;<span id="product-stock-current" data-display-status="0">現貨</span> </div> <!-- .description --> <div class="cart"> <div> <br /> <input type="text" name="quantity" value="1" style="text-align: center;" /> <br /> <input type="hidden" name="product_id" value="21" id="product_id" /> <input type="hidden" name="promotion_id" id="promotion_id" value="-1" /> <div class="hidden-xs hidden-sm pull-left"> <input type="button" class="button-quick-checkout" value="直接購買" id="button-quick-checkout" onclick="buttonQuickCheckout();return false;" /> </div> <a id="button-cart" onclick="buttonAddToCart()" class="button-cart button pull-left"><i class="icon-spinner icon-spin hidden" style="margin-right: 8px;"></i>加入購物車</a> </div> </div> <!-- .cart --> <div class="hidden-lg hidden-md"> <center> <input type="button" class="btn btn-default btn-block button-quick-checkout button-quick-checkout-mobile" value="直接購買" id="button-quick-checkout" onclick="buttonQuickCheckout();return false;" /> <a id="button-instant-checkout" class="button hidden" href="/cart">結帳&nbsp;<i class="fa fa-chevron-right" aria-hidden="true"></i></a> </center> </div> <div class="clearfix hidden-xs hidden-sm"></div> <div id="free_present_list" style="display:none;margin-top:32px;"></div> <div id="buy_together_list" style="display:none;margin-top:32px;"></div> <div id="error_buy_togther"></div><br /> <div id="cloudmaker_stock"> </div> <div class="more-actions"> <div class="wishlist"><a onclick="addToWishList('21');FB_AddToWishlist();">加入願望清單</a></div> <div class="compare"><a onclick="addToCompare('21');">加入商品比較</a></div> </div> <div class="review"> <img src="https://cdn.qdm.cloud/qdm_base/catalog/view/theme/default/images/stars-0.png" alt="0 則評論" style="height:11px;width:62px" /> <a onclick="$('a[href=\'#tab-review\']').trigger('click'); $('html, body').animate({scrollTop: $('#tabs').offset().top}, 800);" class="view-revs">0 則評論</a> <a id="add-review-link" onclick="$('a[href=\'#tab-review\']').trigger('click'); $('html, body').animate({scrollTop: $('#add-review').offset().top}, 800);"><i class="icon-review"></i> 發表評論</a> </div> <div class="tags"> <b>標籤</b> <a href="/tag/二路蘿蔔糕" rel="tag">二路蘿蔔糕</a> <a href="/tag/職人精神" rel="tag">職人精神</a> <a href="/tag/天然健康" rel="tag">天然健康</a> <a href="/tag/美食溫度" rel="tag">美食溫度</a> <a href="/tag/生食級蘿蔔糕" rel="tag">生食級蘿蔔糕</a> <a href="/tag/高雄美食" rel="tag">高雄美食</a> <a href="/tag/花生粿" rel="tag">花生粿</a> <a href="/tag/古早味" rel="tag">古早味</a> </div> <div class="share"> <br /> <div class="a2a_kit a2a_kit_size_22 a2a_default_style" data-a2a-icon-color="transparent" id="my_centered_buttons"> <a class="a2a_button_line external"></a> <a class="a2a_button_facebook external"></a> <a class="a2a_button_twitter external"></a> <a class="a2a_button_google_plus external"></a> <a class="a2a_button_pinterest external"></a> </div> </div> </div> <!-- .span6 RIGHT BOX--> </div> <section id="full-info" class="clearfix"> <div id="tabs" class="htabs  "> <a href="#tab-description">商品介紹</a> <a href="#tab-review" onclick="loadislogin();">商品評論 (0)</a> <a href="#tab-fb">臉書留言板</a> </div> <div id="tab-description" class="tab-content"> <div id="defer-load-spin"><i class="fa fa-circle-o-notch fa-spin fa-fw"></i><br /></div> <div class="visible-xs visible-sm"><img alt="" height="9105" onerror="imgError(this);" src="data:image/gif;base64,R0lGODdhAQABAPAAAP///wAAACwAAAAAAQABAEACAkQBADs=" data-lazy-src="https://image-cdn.qdm.cloud/site/q67b3ef089f8e6/image/data/New_SP_version/花生產品頁0ph.jpg" width="1700" / /></div> <div class="hidden-xs hidden-sm"> <p><img alt="" height="5108" onerror="imgError(this);" src="data:image/gif;base64,R0lGODdhAQABAPAAAP///wAAACwAAAAAAQABAEACAkQBADs=" data-lazy-src="https://image-cdn.qdm.cloud/site/q67b3ef089f8e6/image/data/New_version/花生產品頁0.jpg" width="1024" / /></p> </div> </div> <!-- #tab-description --> <div id="tab-review" class="tab-content"> <div class="row-fluid"> <section id="review" class="span12"></section> <section id="add-review" class="span11"> <div class="contentset center" id="review-title"> <h4 class="inner"><span>發表評論</span></h4> </div> <div id="review-form"> <div id="login_y"> <div class="control-group clearfix"> <label class="label-group"><span class="required">*</span> <b>您對此商品的整體評等</b></label> <div class="controls wrapper"> <input type="radio" name="rating" id="st1" value="5" /> <label for="st1"></label> <input type="radio" name="rating" id="st2" value="4" /> <label for="st2"></label> <input type="radio" name="rating" id="st3" value="3" /> <label for="st3"></label> <input type="radio" name="rating" id="st4" value="2" /> <label for="st4"></label> <input type="radio" name="rating" id="st5" value="1" /> <label for="st5"></label> </div> </div> <br /> <div class="control-group clearfix"> <label class="label-group"><span class="required">*</span> <b>您的暱稱</b></label> <div class="controls"> <input type="text" name="name" value="" class="span6" required /> </div> </div> <div class="control-group clearfix"> <label class="label-group"><span class="required">*</span> <b>您的評論內容</b></label> <div class="controls"><textarea name="text" style="min-height:120px;" class="span6" required></textarea> </div> <small><span style="color #FF0000;">注意</span> 不支援 HTML 語法</small> </div> <div class="control-group clearfix"> <div class="form-actions">點擊 <b>「繼續」按鈕</b> 即同意:「我保證本則針對此商品的評論,其內容是以本人的切身經歷為依據,係本人的真實評論;且本人與此商品無個人或商業關係,也ç„
1130¡æ”¶å—此商品的餽贈或金錢以撰寫這則評論。」<br /><br /><a id="button-review" class="button button-inverse" onclick="addReview();"><span>繼續</span></a> </div> </div> </div> <div id="login_n"> <div class="control-group clearfix"> <div class="form-actions"> <i class="fa fa-star-o" aria-hidden="true"></i>&nbsp;請先會員登入,再進行商品評論<br /><br /> <a class="button button-inverse" href="/login" target="_blank" rel="noopener noreferrer nofollow"><span>登入會員&nbsp;<i class="fa fa-angle-right" aria-hidden="true"></i></span></a> </div> </div> </div> </div> </section> </div> </div> <!-- #tab-review --> <div id="tab-fb" class="tab-content"> <div class="fb-comments" data-href="https://www.tworoad.tw/product/product&product_id=21" data-order-by="time" data-numposts="5" data-width="100%"></div> </div><!-- #tab-FB --> </section> </div> </section> </div> <!-- 商品選項 彈跳視窗 --> <div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true"> <div class="modal-dialog"> <div class="modal-content"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button> <h4 class="modal-title" id="myModalLabel">商品選項</h4> </div> <div id="cart_options_list" class="modal-body"></div> <div class="modal-footer"> <button type="button" class="button" id="button-change-option" style="height: 48px; width: 100%; background: #31bcab; color: #FFF; font-size: 14px; text-align: center; border-radius: 4px; text-shadow: none;">確定</button> </div> </div> </div> </div> <!-- 商品資訊 --> <div style="width: 75%;position: fixed;left: 50%;margin: 0 0 0 -37.5%;" class="modal fade" id="myModal_prod" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true"> <div class="modal-dialog"> <div class="modal-content"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button> <h4 class="modal-title" id="myModalLabel">商品資訊</h4> </div> <div id="prod_data" class="modal-body"> </div> <div class="modal-footer"> </div> </div> </div> </div> <div class="prevnext clearfix"> <ul class="pager"> <li class="previous"> </li> <li class="next"> </li> </ul> </div> 
1130<script>
1131	const goods_arrival_notice_switch_status = 0;
1132	var xOffset = 10;
1133	var yOffset = 30;
1134	var jsLoadProductTimeout = null;
1135	global_product_id = '21';
1136
1137	// GOOGLE TRACKING PRODUCT DETAILS VIEWS
1138	function gaTrackProductView() {
1139				// UA
1140		dataLayer.push({
1141			'ecommerce': {
1142				'detail': {
1143					'products': [{
1144						'name': '花生蘿蔔糕',
1145						'id': '21',
1146						'price': '280',
1147						'category': '全部商品',
1148					}]
1149				}
1150			}
1151		});
1152		// GA4
1153		dataLayer.push({
1154			'event': 'view_item',
1155			'ecommerce': {
1156				'items': [{
1157					'item_name': '花生蘿蔔糕',
1158					'item_id': '21',
1159					'price': '280',
1160					'item_category': '全部商品',
1161					'quantity': '1'
1162				}]
1163			}
1164		});
1165
1166
1167
1168					try {
1169				gtag("event", "view_item", {
1170					value: 280,
1171					items: [{
1172						'item_name': '花生蘿蔔糕',
1173						'item_id': '21',
1174						'price': '280',
1175						'item_category': '全部商品',
1176						'quantity': '1'
1177					}]
1178				});
1179			} catch (e) {}
1180			}
1181
1182	function gaTrackProductAddToCart() {
1183		var qty = 1;
1184		if ($("select[name='quantity']").length) {
1185			qty = $("select[name='quantity'] option:selected").val();
1186		} else {
1187			qty = $("input[name='quantity']").val();
1188		}
1189				// UA
1190		dataLayer.push({
1191			'event': 'addToCart',
1192			'ecommerce': {
1193				'currencyCode': '',
1194				'add': {
1195					'products': [{
1196						'name': '花生蘿蔔糕',
1197						'id': '21',
1198						'price': '280',
1199						'category': '全部商品',
1200						'quantity': qty
1201					}]
1202				}
1203			}
1204		});
1205		// GA4
1206		dataLayer.push({
1207			'event': 'add_to_cart',
1208			'ecommerce': {
1209				'items': [{
1210					'item_name': '花生蘿蔔糕',
1211					'item_id': '21',
1212					'price': '280',
1213					'item_category': '全部商品',
1214					'quantity': qty
1215				}]
1216			}
1217		});
1218
1219					gtag('event', 'add_to_cart', {
1220				'value': (280 * qty),
1221				'items': [{
1222					'id': '21',
1223					'item_id': '21',
1224					'item_name': '花生蘿蔔糕',
1225					'item_category': '全部商品',
1226					'price': 280,
1227					'quantity': qty,
1228					'google_business_vertical': 'retail'
1229				}]
1230			});
1231		
1232		
1233	}
1234
1235	// IMPORTANT: global_quuid MUST be (re)generated by the caller BEFORE invoking this for
1236	// "AddToCart". The CAPI beacon echoed inside (AddToCart.tpl) reads global_quuid from JS
1237	// scope for its quuid; the FB Pixel that fires after the caller uses the same global_quuid
1238	// as eventID. Regenerating global_quuid between this call and the Pixel breaks Meta dedup.
1239	function gaTrackMultiPixelsAddToCart(EventType) {
1240
1241		if (typeof(EventType) === 'undefined') EventType = '';
1242
1243		
1244		var qty = 1;
1245		if ($("select[name='quantity']").length) {
1246			qty = $("select[name='quantity'] option:selected").val();
1247		} else {
1248			qty = $("input[name='quantity']").val();
1249		}
1250
1251		gecommProductToCart.product_id = 21;
1252		gecommProductToCart.price = 280;
1253		gecommProductToCart.quantity = qty;
1254		gecommProductToCart.product_name = '花生蘿蔔糕';
1255		gecommProductToCart.image_url = 'https://image-cdn-flare.qdm.cloud/q67b3ef089f8e6/image/data/New_version/花生-1.jpg';
1256		gecommProductToCart.product_url = "https://www.tworoad.tw/product/product&product_id=21";
1257		gecommProductToCart.sku = "";
1258
1259		if (EventType == "AddToCart") {
1260							
1261try { setCookie("qdmfbevent_id", global_quuid + "ccc", 5); } catch (error) { }
1262
1263(function() {
1264	// CAPI AJAX must survive navigation (cart/add → instant_checkout redirect 1s window).
1265	// Prefer navigator.sendBeacon (designed for unload-time delivery); fallback to fetch keepalive.
1266	var url = "https://www.tworoad.tw/index.php?route=pixcel/facebook/capi_add_to_cart&quuid=" + global_quuid + "ccc";
1267	var payload = JSON.stringify(gecommProductToCart);
1268	var sent = false;
1269
1270	if (typeof navigator !== "undefined" && typeof navigator.sendBeacon === "function") {
1271		try {
1272			var blob = new Blob([payload], { type: "text/plain" });
1273			sent = navigator.sendBeacon(url, blob);
1274		} catch (e) { sent = false; }
1275	}
1276
1277	if (!sent && typeof fetch === "function") {
1278		try {
1279			fetch(url, {
1280				method: "POST",
1281				headers: { "Content-Type": "text/plain" },
1282				body: payload,
1283				keepalive: true,
1284				credentials: "include"
1285			}).catch(function() {});
1286		} catch (e) {}
1287	}
1288})();
1289					}
1290
1291											<!-- LINE Tag Base Code -->
1292(function(g,d,o){
1293  g._ltq=g._ltq||[];g._lt=g._lt||function(){g._ltq.push(arguments)};
1294  var h=location.protocol==='https:'?'https://d.line-scdn.net':'http://d.line-cdn.net';
1295  var s=d.createElement('script');s.async=1;
1296  s.src=o||h+'/n/line_tag/public/release/v1/lt.js';
1297  var t=d.getElementsByTagName('script')[0];t.parentNode.insertBefore(s,t);
1298    })(window, document);
1299_lt('init', {
1300  customerType: 'lap',
1301  tagId: 'ca1644dc-2795-476b-9ffa-e1550d80f920&#039;'
1302});
1303_lt('send', 'pv', ['ca1644dc-2795-476b-9ffa-e1550d80f920&#039;']);
1304<!-- End LINE Tag Base Code -->
1305			switch (EventType) {
1306				case "AddToCart":
1307					
1308_lt('send', 'cv', {
1309type: 'dpa_cart',
1310itemIds: [gecommProductToCart.product_id.toString()],
1311price: gecommProductToCart.price.toString(), 
1312currency: 'TWD', 
1313quantity: gecommProductToCart.quantity.toString()
1314},
1315{dpa:true},
1316['ca1644dc-2795-476b-9ffa-e1550d80f920&#039;']);
1317
1318_lt('send', 'cv', {
1319 type: 'AddToCart'
1320},['ca1644dc-2795-476b-9ffa-e1550d80f920&#039;']);
1321
1322					break;
1323			}
1324											}
1325
1326	function checked_option(option_id) {
1327		$("label.checkbox #option-value-" + option_id).prop("checked", true);
1328		$("label.checkbox #option-value-" + option_id).closest("label.checkbox").addClass("opton-selected");
1329		if (parseInt($("#add-quantity-" + option_id).val()) <= 0) {
1330			$("#add-quantity-" + option_id).val(1);
1331		}
1332	}
1333
1334	function loadproddata(v1) {
1335
1336		if (is.not.desktop()) {
1337			$('.button-cart').removeClass("hidden animated fadeInUp").addClass("animated fadeOutDown");
1338			$('.button-quick-checkout').removeClass("hidden animated fadeInUp").addClass("animated fadeOutDown");
1339		}
1340
1341		$('#prod_data').html("<br/><center><i class='icon-spinner icon-spin icon-large'></i></center>");
1342
1343		$.ajax({
1344			url: 'index.php?route=product/product_info&product_id=' + v1,
1345			dataType: 'html',
1346			beforeSend: function() {},
1347			success: function(html) {
1348				$('#prod_data').html(html);
1349			},
1350			error: function(xhr, ajaxOptions, thrownError) {
1351				console.log(thrownError + "\r\n" + xhr.statusText + "\r\n" + xhr.responseText);
1352			}
1353		});
1354	}
1355
1356	function autosize(ImgD, h, w) {
1357		var image = new Image();
1358		image.src = ImgD.src;
1359		if (image.width < w && image.height < h) {
1360			ImgD.width = image.width;
1361			ImgD.height = image.height;
1362		} else {
1363			if (w / h <= image.width / image.height) {
1364				ImgD.width = w;
1365				ImgD.height = w * (image.height / image.width);
1366			} else {
1367				ImgD.width = h * (image.width / image.height);
1368				ImgD.height = h;
1369			}
1370		}
1371
1372	}
1373
1374	function buttonQuickCheckout() {
1375		if ($("select[name='quantity']").length) {
1376			check_qty = $("select[name='quantity'] option:selected").val();
1377		} else {
1378			check_qty = $("input[name='quantity']").val();
1379		}
1380
1381		if (check_qty == 0) {
1382			$(".alert-danger").remove();
1383			$('#product_id').after('<div class="alert alert-danger" role="alert">商品數量要大於0!</div>');
1384			return false;
1385		}
1386
1387		if ($(".div_group[data-required]").length) {
1388			$(".alert-error").remove();
1389
1390			var r = 0;
1391			var v_qty;
1392			$(".div_group[data-required]").each(function(index) {
1393				var required = $(this).data("required") || 0;
1394				v_qty = 0;
1395				$(this).find(".free_present_qty").each(function() {
1396
1397					v_qty = v_qty + parseInt($(this).val());
1398				});
1399
1400				if (required == 1 && v_qty == 0) r++;
1401			});
1402
1403			if (r > 0) {
1404				$('#free_present_list').before('<div class="alert alert-error" style="margin-bottom:0px;margin-top:30px;"> * 必選的贈品項目請選擇!</div>');
1405
1406				$('html, body').animate({
1407					scrollTop: ($('#free_present_list').offset().top - 150)
1408				}, 1000);
1409				iziToast.show({
1410					timeout: 3000,
1411					color: '#eb4359',
1412					messageColor: '#FFF',
1413					message: "* 必選的贈品項目請選擇",
1414					position: 'center',
1415					progressBar: false,
1416					progressBarEasing: 'ease',
1417				});
1418
1419				return false;
1420			}
1421			if ($(".warning").text().length > 0) {
1422				return false;
1423			}
1424
1425		}
1426		if ($("#options .control-group[data-max-qty]").length) {
1427			var r = true;
1428			$("#options .control-group[data-max-qty]").each(function(index) {
1429				var option_ckb_id = $(this).data("option-id") || 0;
1430				if (option_ckb_id) {
1431					r = checkCheckboxOptionQtyLimition(option_ckb_id);
1432					if (r == false) return false;
1433				}
1434			});
1435			if (r == false) return false;
1436		}
1437		$('.button-quick-checkout').attr("disabled", "disabled");
1438		$('.icon-spinner').removeClass('hidden');
1439		$("input[name='product_id']").attr("value", 21);
1440
1441		var add_cart_url = 'index.php?route=checkout/cart/add';
1442
1443		
1444		$.ajax({
1445			url: add_cart_url,
1446			type: 'post',
1447			data: $('.product-info input[type=\'text\'], .product-info input[type=\'hidden\'], .product-info input[type=\'radio\']:checked, .product-info input[type=\'checkbox\']:checked, .product-info select, .product-info textarea,.cart input[name=\'promption_id\']'),
1448			dataType: 'json',
1449			success: function(json) {
1450				$(".error").remove();
1451				$(".alert-danger").remove();
1452				$('.icon-spinner').addClass('hidden');
1453				$('.button-quick-checkout').removeAttr("disabled", "disabled");
1454				var error_option_msg = 0;
1455
1456				if (json['error']) {
1457
1458					$(".error").remove();
1459
1460					if (json['error']['option']) {
1461						$(".alert-error").remove();
1462						var error_option_msg = 0;
1463						for (i in json['error']['option']) {
1464
1465							error_option_msg = json['error']['option'][i];
1466
1467							if (is.not.desktop()) {
1468
1469								$('#option-' + i).after('<div class="alert alert-error">' + json['error']['option'][i] + '</div>');
1470
1471							} else {
1472
1473								$('#option-' + i).after('<span class="error">' + json['error']['option'][i] + '<br/></span>');
1474							}
1475						}
1476						if (error_option_msg) {
1477							iziToast.show({
1478								timeout: 3000,
1479								color: '#eb4359',
1480								messageColor: '#FFF',
1481								message: error_option_msg,
1482								position: 'center',
1483								progressBar: false,
1484								progressBarEasing: 'ease',
1485							});
1486						}
1487					}
1488
1489					if (json['error']['prod_stock']) {
1490
1491						if (is.not.desktop()) {
1492
1493							$(".alert-error").remove();
1494							$('#product_id').after('<div class="alert alert-danger" role="alert">' + json['error']['prod_stock'] + '</div>');
1495							iziToast.show({
1496								timeout: 3000,
1497								color: '#eb4359',
1498								messageColor: '#FFF',
1499								message: json['error']['prod_stock'],
1500								position: 'center',
1501								progressBar: false,
1502								progressBarEasing: 'ease',
1503							});
1504
1505						} else {
1506
1507							$(".alert-danger").remove();
1508							$('#product_id').after('<div class="alert alert-danger" role="alert">' + json['error']['prod_stock'] + '</div>');
1509
1510						}
1511
1512					}
1513
1514					if (json['error']['buy_together']) {
1515						for (j in json['error']['buy_together']) {
1516															$('#error_buy_togther').after('<span class="error bg-danger">' + json['error']['buy_together'][j] + '</span>');
1517													}
1518					}
1519
1520				}
1521
1522				if (json['success']) {
1523					// fb-capi: regenerate ONE shared event id per AddToCart BEFORE any tracker fires,
1524					// so Pixel(eventID) and CAPI(quuid) match and Meta can dedup the pair.
1525					global_quuid = QUUID();
1526					try {
1527						gaTrackMultiPixelsAddToCart("AddToCart");
1528					} catch (e) {}
1529					try {
1530						gaTrackProductAddToCart();
1531					} catch (e) {}
1532										
1533					var qty = 1;
1534					if ($("select[name='quantity']").length) {
1535						qty = $("select[name='quantity'] option:selected").val();
1536					} else {
1537						qty = $("input[name='quantity']").val();
1538					}
1539
1540					
1541					var product_price = qty * 280;
1542
1543					
1544																										// fb-capi: event id already set at top of success block (shared with CAPI); do NOT regenerate here.
1545								product_price = Number(product_price);
1546								if (isNaN(product_price)) {
1547									product_price = 0;
1548								}
1549								fbq('track', 'AddToCart', {
1550									content_name: '花生蘿蔔糕',
1551																		value: product_price,
1552									currency: 'TWD'
1553								}, {
1554									eventID: global_quuid + "ccc"
1555								});
1556																		
1557					setTimeout(function() {
1558						window.location.href = "https://www.tworoad.tw/cart";
1559					}, 1000);
1560				}
1561
1562				if (is.not.desktop()) {
1563					if (json['error']) {
1564
1565						$('html, body').animate({
1566							scrollTop: $('#options').offset().top
1567						}, 'slow');
1568
1569					}
1570				}
1571
1572
1573				if (json?.error?.prod_stock || error_option_msg != 0) {
1574
1575					if (hasStockError(json.error.prod_stock) || hasStockError(error_option_msg)) {
1576						setTimeout(() => {
1577							showStockAlertBtn(1);
1578						}, 200);
1579					}
1580				}
1581
1582			}
1583		});
1584		return false;
1585
1586	}
1587
1588	function FB_AddToWishlist() {
1589													fbq('track', 'AddToWishlist', {
1590					value: '280',
1591					content_name: '花生蘿蔔糕',
1592										content_category: "花生蘿蔔糕",
1593					currency: 'TWD'
1594				}, {
1595					eventID: global_quuid
1596				});
1597							try {
1598			gaTrackMultiPixelsAddToCart("AddToWishlist");
1599		} catch (e) {}
1600	}
1601
1602	// button-cart
1603	function buttonAddToCart() {
1604		if ($("select[name='quantity']").length) {
1605			check_qty = $("select[name='quantity'] option:selected").val();
1606		} else {
1607			check_qty = $("input[name='quantity']").val();
1608		}
1609
1610		if (check_qty == 0) {
1611			$(".alert-danger").remove();
1612			$('#product_id').after('<div class="alert alert-danger" role="alert">商品數量要大於0!</div>');
1613			return false;
1614		}
1615
1616		if ($(".div_group[data-required]").length) {
1617
1618			$(".alert-error").remove();
1619
1620			var r = 0;
1621			var v_qty;
1622			$(".div_group[data-required]").each(function(index) {
1623				var required = $(this).data("required") || 0;
1624				v_qty = 0;
1625				$(this).find(".free_present_qty").each(function() {
1626
1627					v_qty = v_qty + parseInt($(this).val());
1628				});
1629
1630				if (required == 1 && v_qty == 0) r++;
1631			});
1632
1633			if (r > 0) {
1634				$('#free_present_list').before('<div class="alert alert-error" style="margin-bottom:0px;margin-top:30px;"> * 必選的贈品項目請選擇!</div>');
1635
1636				$('html, body').animate({
1637					scrollTop: ($('#free_present_list').offset().top - 150)
1638				}, 1000);
1639
1640				iziToast.show({
1641					timeout: 3000,
1642					color: '#eb4359',
1643					messageColor: '#FFF',
1644					message: "* 必選的贈品項目請選擇",
1645					position: 'center',
1646					progressBar: false,
1647					progressBarEasing: 'ease',
1648				});
1649
1650				return false;
1651			}
1652
1653			if ($(".warning").text().length > 0) {
1654				return false;
1655			}
1656		}
1657
1658		if ($("#options .control-group[data-max-qty]").length) {
1659			var r = true;
1660			$("#options .control-group[data-max-qty]").each(function(index) {
1661				var option_ckb_id = $(this).data("option-id") || 0;
1662				if (option_ckb_id) {
1663					r = checkCheckboxOptionQtyLimition(option_ckb_id);
1664					if (r == false) return false;
1665				}
1666			});
1667			if (r == false) return false;
1668		}
1669
1670		$('.button-cart').attr("disabled", "disabled");
1671		$('.icon-spinner').removeClass('hidden');
1672		$("input[name='product_id']").attr("value", 21);
1673		$(".alert-danger").remove();
1674
1675		var add_cart_url = 'index.php?route=checkout/cart/add';
1676
1677		
1678		$.ajax({
1679			url: add_cart_url,
1680			type: 'post',
1681			data: $('.product-info input[type=\'text\'], .product-info input[type=\'hidden\'], .product-info input[type=\'radio\']:checked, .product-info input[type=\'checkbox\']:checked, .product-info select, .product-info textarea,.cart input[name=\'promption_id\']'),
1682			dataType: 'json',
1683			success: function(json) {
1684
1685				$('.success, .warning, .attention, information, .error').remove();
1686				$('.icon-spinner').addClass('hidden');
1687
1688				if (json['error']) {
1689
1690					$(".error").remove();
1691
1692					if (json['error']['option']) {
1693						$(".alert-error").remove();
1694						var error_option_msg = 0;
1695						for (i in json['error']['option']) {
1696
1697							error_option_msg = json['error']['option'][i];
1698
1699							if (is.not.desktop()) {
1700
1701								$('#option-' + i).after('<div class="alert alert-error">' + json['error']['option'][i] + '</div>');
1702
1703							} else {
1704
1705								$('#option-' + i).after('<span class="error">' + json['error']['option'][i] + '<br/></span>');
1706
1707							}
1708						}
1709						if (error_option_msg) {
1710							iziToast.show({
1711								timeout: 3000,
1712								color: '#eb4359',
1713								messageColor: '#FFF',
1714								message: error_option_msg,
1715								position: 'center',
1716								progressBar: false,
1717								progressBarEasing: 'ease',
1718							});
1719						}
1720					}
1721
1722					if (json['error']['prod_stock']) {
1723
1724						if (is.not.desktop()) {
1725
1726							$(".alert-error").remove();
1727							$('#product_id').after('<div class="alert alert-danger" role="alert">
1727' + json['error']['prod_stock'] + '</div>');
1728							iziToast.show({
1729								timeout: 3000,
1730								color: '#eb4359',
1731								messageColor: '#FFF',
1732								message: json['error']['prod_stock'],
1733								position: 'center',
1734								progressBar: false,
1735								progressBarEasing: 'ease',
1736							});
1737
1738						} else {
1739
1740							$(".alert-danger").remove();
1741							$('#product_id').after('<div class="alert alert-danger" role="alert">' + json['error']['prod_stock'] + '</div>');
1742
1743						}
1744
1745					}
1746
1747					if (json['error']['buy_together']) {
1748						for (j in json['error']['buy_together']) {
1749															$('#error_buy_togther').after('<span class="error bg-danger">' + json['error']['buy_together'][j] + '</span>');
1750													}
1751					}
1752
1753					$('.button-cart').removeAttr("disabled", "disabled");
1754					if (json?.error?.prod_stock || error_option_msg != 0) {
1755						if (hasStockError(json.error.prod_stock) || hasStockError(error_option_msg)) {
1756							setTimeout(() => {
1757								showStockAlertBtn(1);
1758							}, 200);
1759						}
1760					}
1761				}
1762
1763				if (is.not.desktop()) {
1764					if (json['error']) {
1765
1766						$('html, body').animate({
1767							scrollTop: $('#options').offset().top
1768						}, 'slow');
1769
1770					}
1771				}
1772
1773				if (json['success']) {
1774
1775					// fb-capi: regenerate ONE shared event id per AddToCart BEFORE any tracker fires,
1776					// so Pixel(eventID) and CAPI(quuid) match and Meta can dedup the pair.
1777					global_quuid = QUUID();
1778					try {
1779						gaTrackMultiPixelsAddToCart("AddToCart");
1780					} catch (e) {}
1781					try {
1782						gaTrackProductAddToCart();
1783					} catch (e) {}
1784										
1785					var qty = 1;
1786					if ($(".cart select[name='quantity']").length) {
1787						qty = $(".cart select[name='quantity'] option:selected").val();
1788					} else {
1789						qty = $(".cart input[name='quantity']").val();
1790					}
1791
1792					
1793					var product_price = qty * 280;
1794
1795					
1796																										// fb-capi: event id already set at top of success block (shared with CAPI); do NOT regenerate here.
1797								product_price = Number(product_price);
1798								if (isNaN(product_price)) {
1799									product_price = 0;
1800								}
1801								fbq('track', 'AddToCart', {
1802									content_name: '花生蘿蔔糕',
1803																		value: product_price,
1804									currency: 'TWD'
1805								}, {
1806									eventID: global_quuid + "ccc"
1807								});
1808																		
1809					$('#notification').html('<div class="alert alert-success" style="display: none;">' + json['success'] + '<button type="button" class="close" data-dismiss="alert">&times;</button></div>');
1810
1811					$('.alert').fadeIn('slow');
1812
1813					$('#cart-total').html(json['total']);
1814
1815																
1816					var scroll_time = 700;
1817					var ToScrollTop = 0;
1818					if (is.not.desktop()) {
1819						scroll_time = 300;
1820						ToScrollTop = document.documentElement.scrollTop;
1821					}
1822
1823					$('html, body').animate({
1824						ToScrollTop: 0
1825					}, scroll_time, function() {
1826
1827						
1828							var attr = $('.button-cart').attr('disabled');
1829							if (typeof attr !== typeof undefined && attr !== false) {
1830
1831								var cart = $('#cart');
1832								var imgtodrag = $('#zoom1');
1833								var cart_top = 50;
1834
1835								var cart_right = $(window).width() / 1.5;
1836
1837								if (is.not.desktop()) {
1838									cart_right = $("#mobile-navbar #shopping-cart-list").offset().left;
1839								} else {
1840									cart_right = $("#header #cart").offset().left;
1841								}
1842
1843								if (cart_right < 100) cart_right = $(window).width() / 1.5;
1844
1845								if (is.not.desktop()) {
1846									cart = $('#mobile-navbar .icon-shopping-cart');
1847									cart_top = 0;
1848									$('#cart-total-items').html("(&nbsp;" + json['total'] + "&nbsp;)");
1849									$(".button-quick-checkout-mobile").remove();
1850									$("#button-cart").unbind("click");
1851									$("#button-cart").find('.ok-add-to-cart').remove();
1852									$("#button-cart").prepend('<span class="ok-add-to-cart animated fadeIn"><i class="fa fa-check" aria-hidden="true"></i>&nbsp;</span>');
1853									$("#button-instant-checkout").removeClass('hidden');
1854
1855								}
1856
1857								var imgclone = imgtodrag.clone()
1858									.offset({
1859										top: imgtodrag.offset().top,
1860										left: imgtodrag.offset().left
1861									})
1862									.css({
1863										'opacity': '1.0',
1864										'position': 'absolute',
1865										'top': imgtodrag.offset().top,
1866										'left': imgtodrag.offset().left,
1867										'height': $('#zoom1').width(),
1868										'width': $('#zoom1').height(),
1869										'z-index': '99999999999',
1870										'minHeight': '50px'
1871									})
1872									.appendTo($('body'))
1873									.animate({
1874										'top': cart_top,
1875										'left': cart_right,
1876										'width': 36,
1877										'height': 20,
1878										'opacity': '0.01'
1879									}, 700, 'easeInOutCirc', function() {
1880										$(imgclone).remove();
1881										imgclone.detach();
1882									});
1883
1884								if (is.not.desktop()) {
1885									openSideCart('21');
1886								}
1887
1888							}
1889
1890							if (is.desktop()) {
1891								$("#cart > .heading a").trigger('mouseover');
1892								setTimeout(function() {
1893									refreshMiniCartScrollBar();
1894								}, 300);
1895							}
1896
1897						
1898						$('.button-cart').removeAttr("disabled", "disabled");
1899
1900
1901
1902					});
1903
1904				}
1905
1906
1907			}
1908		});
1909		return false;
1910
1911	}
1912
1913	function addReview() {
1914						$.ajax({
1915					url: 'index.php?route=product/product/write&product_id=21',
1916					type: 'post',
1917					dataType: 'json',
1918						data: 'name=' + encodeURIComponent($('input[name=\'name\']').val()) + '&text=' + encodeURIComponent($('textarea[name=\'text\']').val()) + '&rating=' + encodeURIComponent($('input[name=\'rating\']:checked').val() ? $('input[name=\'rating\']:checked').val() : '') + '&captcha=' + encodeURIComponent($('input[name=\'captcha\']').val()) + '&cf-turnstile-response=' + encodeURIComponent(window.qdmProductReviewTurnstile ? window.qdmProductReviewTurnstile.getResponse() : ($('input[name=\'cf-turnstile-response\']').val() || '')),
1919					beforeSend: function() {
1920						$('.success, .warning').remove();
1921						$('#button-review').attr('disabled', true);
1922						$('#review-title').after('<div class="attention"><img src="https://cdn.qdm.cloud/assets/images/loading.gif" alt="" /> 請稍等</div>');
1923					},
1924						complete: function() {
1925							$('#button-review').attr('disabled', false);
1926							$('.attention').remove();
1927							if (window.qdmProductReviewTurnstile) {
1928								window.qdmProductReviewTurnstile.reset();
1929							}
1930						},
1931					success: function(data) {
1932						if (data['error']) {
1933							$('#review-title').after('<div class="warning">' + data['error'] + '</div>');
1934						}
1935
1936						if (data['success']) {
1937							$('#review-title').after('<div class="success">' + data['success'] + '</div>');
1938
1939							$('input[name=\'name\']').val('');
1940							$('textarea[name=\'text\']').val('');
1941							$('input[name=\'rating\']:checked').attr('checked', '');
1942							$('input[name=\'captcha\']').val('');
1943
1944							$('#review').load('index.php?route=product/product/review&product_id=21');
1945
1946							postbackTrack();
1947						}
1948					}
1949				});
1950					}
1951
1952	function postbackTrack() {
1953			}
1954
1955	function init_review() {
1956
1957		$('#review .pagination a').each(function(index) {
1958			var href = $(this).attr("href");
1959			$(this).attr("href", "javascript:void(0);return false;");
1960			$(this).attr("data-href", href);
1961		});
1962
1963		$('#review .pagination a').click(function() {
1964
1965			var link = $(this).attr("data-href");
1966
1967			$('<i id="review-spin-wait" class="fa fa-circle-o-notch fa-spin fa-fw"></i>').insertBefore($('#review'));
1968
1969			$('#review').fadeOut('slow');
1970
1971			$('#review').load(link, function() {
1972				init_review();
1973				$('#review-spin-wait').remove();
1974				$('#review').fadeIn('slow');
1975			});
1976
1977			return false;
1978
1979		});
1980	}
1981
1982	function isFacebookApp() {
1983		var ua = navigator.userAgent || navigator.vendor || window.opera;
1984		return (ua.indexOf("FBAN") > -1) || (ua.indexOf("FBAV") > -1);
1985	}
1986
1987	function numberWithCommas(x) {
1988		return x.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ",");
1989	}
1990
1991	function update_saleprice_based_select_options(optid) {
1992		var ori_prices = $("#price-price-block .product-sell-price").data("content");
1993		var currency_symbol_left  = "$";
1994		var currency_symbol_right = "";
1995		var currency_value         = 1;
1996		var currency_decimal_place = 0;
1997		function formatPrice(rawBase) {
1998			var v = (parseFloat(rawBase) || 0) * currency_value;
1999			return currency_symbol_left + numberWithCommas(v.toFixed(currency_decimal_place)) + currency_symbol_right;
2000		}
2001		var total_saleprices = ori_prices;
2002		var saleprices_flag = 0;
2003		$("#options .control-group").find(".controls").each(function(index) {
2004			var selected = $(this).find("select option[value]:selected");
2005			if (selected && selected != undefined) {
2006				var prefix = $(selected).data("prefix");
2007				var price = $(selected).data("price");
2008				if (prefix && prefix != undefined) {
2009					if (price && price != undefined) {
2010						switch (prefix) {
2011							case "=":
2012								saleprices_flag = 1;
2013								total_saleprices = price;
2014								break;
2015						}
2016					}
2017				}
2018			}
2019		});
2020		$("#options .control-group").find(".controls").each(function(index) {
2021			var selected = $(this).find("select option[value]:selected");
2022			if (selected && selected != undefined) {
2023				var prefix = $(selected).data("prefix");
2024				var price = $(selected).data("price");
2025				if (prefix && prefix != undefined) {
2026					if (price && price != undefined && !isNaN(parseFloat(price))) {
2027						switch (prefix) {
2028							case "+":
2029								saleprices_flag = 1;
2030								total_saleprices = (parseFloat(total_saleprices) || 0) + parseFloat(price);
2031								break;
2032							case "-":
2033								saleprices_flag = 1;
2034								total_saleprices = (parseFloat(total_saleprices) || 0) - parseFloat(price);
2035								break;
2036						}
2037					}
2038				}
2039			}
2040		});
2041		if (saleprices_flag) {
2042			if (total_saleprices < 0) {
2043				total_saleprices = 0;
2044			}
2045			$("#price-price-block .price-old").hide();
2046			$("#price-price-block .product-sell-price").text(formatPrice(total_saleprices));
2047		} else {
2048			var expected_text = formatPrice(ori_prices);
2049			if ($("#price-price-block .product-sell-price").text() !== expected_text) {
2050				$("#price-price-block .price-old").show();
2051				$("#price-price-block .product-sell-price").text(expected_text);
2052			}
2053		}
2054		$("#price-price-block").hide();
2055		$("#price-price-block").fadeIn(2000);
2056
2057
2058		
2059	}
2060
2061	function changeRadioProductVariation(product_option_value_id, option_id) {
2062		document.getElementById('option-value-' + product_option_value_id).checked = true;
2063		$("#option-" + option_id + ".control-group label.radio").removeClass("opton-selected");
2064		$("#option-" + option_id + ".control-group label.radio #option-value-" + product_option_value_id).closest("label.radio").addClass("opton-selected");
2065		return false;
2066	}
2067
2068	function init_inline() {
2069		loadCSS("https://cdnjs.cloudflare.com/ajax/libs/hint.css/1.2.1/hint.min.css");
2070		if (typeof stop_custom_variation_style === 'undefined') {
2071			loadCSS("https://cdn.qdm.cloud/assets/css/product_variation_option_custom.css?v=220914");
2072		}
2073				getScript("https://cdn.jsdelivr.net/npm/[email protected]/dist/jquery.nice-number.min.js", function() {
2074			$("#options .multicheck-options").niceNumber({
2075				'autoSize': false,
2076				onDecrement: function($currentInput, amount, settings) {
2077					if (amount < 1) {
2078						$currentInput.val(1);
2079					}
2080					var opt_val_ta = $currentInput.closest("label.checkbox").attr("for");
2081					$("#" + opt_val_ta).prop("checked", true);
2082					$("#" + opt_val_ta).closest("label.checkbox").addClass("opton-selected");
2083					var data_option_id = $("#" + opt_val_ta).closest("[data-option-id]").data("option-id");
2084					checkCheckboxOptionQtyLimition(data_option_id);
2085				},
2086				onIncrement: function($currentInput, amount, settings) {
2087					var opt_val_ta = $currentInput.closest("label.checkbox").attr("for");
2088					$("#" + opt_val_ta).prop("checked", true);
2089					$("#" + opt_val_ta).closest("label.checkbox").addClass("opton-selected");
2090					var data_option_id = $("#" + opt_val_ta).closest("[data-option-id]").data("option-id");
2091					checkCheckboxOptionQtyLimition(data_option_id);
2092				}
2093			});
2094			$("#options label.checkbox").find("input[type='checkbox']").change(function() {
2095				var checked_state = $(this).is(':checked');
2096				if (checked_state) {
2097					$(this).closest("label.checkbox").addClass("opton-selected");
2098					$(this).closest("label.checkbox").find(".multicheck-options").val(1);
2099				} else {
2100					$(this).closest("label.checkbox").removeClass("opton-selected");
2101					$(this).closest("label.checkbox").find(".multicheck-options").val(0);
2102				}
2103			});
2104			$("#options").fadeIn("slow");
2105		});
2106
2107		//20220113 Fix 購物圖片選項 點選圖片同步選取選項
2108		if ($(".option-image").length) {
2109			$(".option-image").find("a").click(function() {
2110				$(this).parents(".option-image").find("input[id^='option-value-']").attr('checked', 'checked');
2111			});
2112		}
2113					//20210510 Add 選項連動商品圖 單選切換連動圖
2114			$(".changeImage label.radio").click(function() {
2115				if ($(".changeImage input[type='radio']:checked") || $(".changeImage select option:selected")) {
2116					var optionImage = [];
2117					$(".changeImage").each(function(i) {
2118						if ($(this).find("input[type='radio']:checked").length && $(this).find("input[type='radio']:checked").val()) {
2119							optionImage[i] = [];
2120							optionImage[i][0] = $(this).attr("id").replace("option-", "");
2121							optionImage[i][1] = $(this).find("input[type='radio']:checked").val();
2122						}
2123						if ($(this).find("select option:selected").length && $(this).find("select option:selected").val()) {
2124							optionImage[i] = [];
2125							optionImage[i][0] = $(this).attr("id").replace("option-", "");
2126							optionImage[i][1] = $(this).find("select option:selected").val();
2127						}
2128
2129					});
2130					$.ajax({
2131						url: 'index.php?route=product/product_options/povToPoi',
2132						type: 'POST',
2133						dataType: 'html',
2134						data: {
2135							pid: $("#product_id").val(),
2136							optionImage: optionImage
2137						},
2138						beforeSend: function() {},
2139						success: function(json) {
2140							$("#image-additional li a").each(function() {
2141								if ($(this).hasClass("zoom-active")) {
2142									$(this).removeClass('zoom-active');
2143								}
2144							});
2145							if (json) {
2146								$("#image-additional li").find("img[src='" + json + "']").parents("a").addClass("zoom-active").trigger("mouseenter");
2147								// 220608 Fix 商品連動圖手機版大圖不會變化問題
2148								if (is.not.desktop()) {
2149									var zoomImg = $("#image-additional li").find("img[src='" + json + "']").parents("a").attr("href");
2150									$('#zoom1').attr("src", zoomImg);
2151									$('#zoom1').data("hd-image", zoomImg);
2152									$('#zoom1').data("zoom-image", zoomImg);
2153									// 停留選項
2154									$('html,body').animate({
2155										scrollTop: $("#options").offset().top - 70
2156									}, "show");
2157								}
2158							} else {
2159								$("#image-additional li a").eq(0).addClass("zoom-active").trigger("mouseenter");
2160								// 220608 Fix 商品連動圖手機版大圖不會變化問題
2161								if (is.not.desktop()) {
2162									var zoomImg = $("#image-additional li a").eq(0).attr("href");
2163									$('#zoom1').attr("src", zoomImg);
2164									$('#zoom1').data("hd-image", zoomImg);
2165									$('#zoom1').data("zoom-image", zoomImg);
2166									// 停留選項
2167									$('html,body').animate({
2168										scrollTop: $("#options").offset().top - 70
2169									}, "show");
2170								}
2171							}
2172						},
2173						error: function(xhr, ajaxOptions, thrownError) {
2174							//alert(thrownError + "\r\n" + xhr.statusText + "\r\n" + xhr.responseText);
2175						}
2176					});
2177				}
2178			});
2179			//20210510 Add 選項連動商品圖 下拉選單切換連動圖
2180			$(".changeImage select").change(function() {
2181				if ($(".changeImage input[type='radio']:checked") || $(".changeImage select option:selected")) {
2182					var optionImage = [];
2183					$(".changeImage").each(function(i) {
2184						if ($(this).find("input[type='radio']:checked").length && $(this).find("input[type='radio']:checked").val()) {
2185							optionImage[i] = [];
2186							optionImage[i][0] = $(this).attr("id").replace("option-", "");
2187							optionImage[i][1] = $(this).find("input[type='radio']:checked").val();
2188						}
2189						if ($(this).find("select option:selected").length && $(this).find("select option:selected").val()) {
2190							optionImage[i] = [];
2191							optionImage[i][0] = $(this).attr("id").replace("option-", "");
2192							optionImage[i][1] = $(this).find("select option:selected").val();
2193						}
2194
2195					});
2196					$.ajax({
2197						url: 'index.php?route=product/product_options/povToPoi',
2198						type: 'POST',
2199						dataType: 'html',
2200						data: {
2201							pid: $("#product_id").val(),
2202							optionImage: optionImage
2203						},
2204						beforeSend: function() {},
2205						success: function(json) {
2206							$("#image-additional li a").each(function() {
2207								if ($(this).hasClass("zoom-active")) {
2208									$(this).removeClass('zoom-active');
2209								}
2210							});
2211							if (json) {
2212								$("#image-additional li").find("img[src='" + json + "']").parents("a").addClass("zoom-active").trigger("mouseenter");
2213								// 220608 Fix 商品連動圖手機版大圖不會變化問題
2214								if (is.not.desktop()) {
2215									var zoomImg = $("#image-additional li").find("img[src='" + json + "']").parents("a").attr("href");
2216									$('#zoom1').attr("src", zoomImg);
2217									$('#zoom1').data("hd-image", zoomImg);
2218									$('#zoom1').data("zoom-image", zoomImg);
2219									// 停留選項
2220									$('html,body').animate({
2221										scrollTop: $("#options").offset().top - 70
2222									}, "show");
2223								}
2224							} else {
2225								$("#image-additional li a").eq(0).addClass("zoom-active").trigger("mouseenter");
2226								// 220608 Fix 商品連動圖手機版大圖不會變化問題
2227								if (is.not.desktop()) {
2228									var zoomImg = $("#image-additional li a").eq(0).attr("href");
2229									$('#zoom1').attr("src", zoomImg);
2230									$('#zoom1').data("hd-image", zoomImg);
2231									$('#zoom1').data("zoom-image", zoomImg);
2232									// 停留選項
2233									$('html,body').animate({
2234										scrollTop: $("#options").offset().top - 70
2235									}, "show");
2236								}
2237							}
2238						},
2239						error: function(xhr, ajaxOptions, thrownError) {
2240							//alert(thrownError + "\r\n" + xhr.statusText + "\r\n" + xhr.responseText);
2241						}
2242					});
2243				}
2244			});
2245		
2246		setTimeout(function() {
2247			if (is.not.desktop()) {
2248				$('#zoom1').attr("src", $('#zoom1').data("hd-image"));
2249			}
2250		}, 1500);
2251
2252					getScript("https://static.addtoany.com/menu/page.js", function() {});
2253		
2254		$('#myModal').on('show.bs.modal', function(e) {
2255			if (is.not.desktop()) {
2256				$('.button-cart').removeClass("hidden animated fadeInUp").addClass("animated fadeOutDown");
2257				$('.button-quick-checkout').removeClass("hidden animated fadeInUp").addClass("animated fadeOutDown");
2258			}
2259		});
2260
2261		$("#myModal").on("hidden.bs.modal", function(e) {
2262			if (is.not.desktop()) {
2263				$('.button-cart').removeClass("fadeOutDown").addClass("animated fadeInUp");
2264				$('.button-quick-checkout').removeClass("fadeOutDown").addClass("animated fadeInUp");
2265			}
2266		});
2267
2268		
2269		$(".ck_buy_tgr").prop("checked", false);
2270
2271					window.onload = function() {
2272				setTimeout(function() {
2273											new Image().src = "https://image-cdn-flare.qdm.cloud/q67b3ef089f8e6/image/data/2023/03/29/cd67787cc12f2b113e300c3d66604630.jpg";
2274											new Image().src = "https://image-cdn-flare.qdm.cloud/q67b3ef089f8e6/image/data/2023/03/29/1a86fc5f662a777f7dea263b2c2ae207.jpg";
2275											new Image().src = "https://image-cdn-flare.qdm.cloud/q67b3ef089f8e6/image/data/2023/03/29/9bbc266b6ca6208dc38f9e848bc21a10.jpg";
2276									}, 1000);
2277			};
2278		
2279		if (is.not.desktop()) {
2280			$("#maincontent").removeClass("span9").addClass("span12");
2281			$("#main-image").attr("style", "padding:0px;overflow:hidden;min-height:initial;");
2282			if (!isFacebookApp() && !disabledScroll) {
2283				setTimeout(function() {
2284					$('.button-cart').addClass("animated fadeOutDown");
2285					$('.button-quick-checkout-mobile').addClass("animated fadeOutDown");
2286				}, 1500);
2287			}
2288			$('#zoom1').attr("src", $('#zoom1').data("hd-image"));
2289		}
2290
2291		
2292			if (is.desktop()) {
2293
2294				$("#zoom1").imagesLoaded(function() {
2295
2296					$("#main-defer-image").remove();
2297					$("#main-image").removeClass("hidden");
2298
2299					$("#zoom1").elevateZoom({
2300						easing: false,
2301						gallery: 'image-additional',
2302						cursor: 'pointer',
2303						galleryActiveClass: "zoom-active",
2304						zoomWindowFadeIn: 0,
2305						zoomWindowFadeOut: 0,
2306						zoomWindowWidth: 0,
2307						zoomWindowHeight: 0,
2308						lensSize: 0,
2309						borderSize: 0,
2310						lensFadeIn: 0,
2311						lensFadeOut: 0,
2312						tint: false,
2313						tintColour: '#fff',
2314						tintOpacity: 0,
2315						scrollZoom: false,
2316						imageCrossfade: false,
2317						loadingIcon: "",
2318						responsive: true
2319					});
2320
2321					var ez = $('#zoom1').data('elevateZoom');
2322					ez.refresh();
2323
2324					$(".zoomContainer").remove();
2325
2326					$("#image-additional-container").show();
2327
2328					syncThumbsWidth();
2329				});
2330			}
2331
2332		
2333		$("#image-additional a").hover(function() {
2334							$(".zoomContainer").remove();
2335						var image_pop_url = $(this).data("zoom-image");
2336			var image_base_url = $(this).data("image");
2337			$("#main-image .fancybox-product").attr("href", image_pop_url);
2338			if (image_base_url) {
2339				$("#zoom1").attr("src", image_base_url);
2340			}
2341		});
2342
2343							
2344		
2345		// Load options_list_window
2346		$('input[name^="add_price"]').bind('click', function() {
2347
2348			$('#cart_options_list').html("<br/><center><i class='icon-spinner icon-spin icon-large'></i></center>");
2349
2350			v1 = $(this).val();
2351			v2 = 1;
2352			$.ajax({
2353				url: 'index.php?route=product/product_options&key=' + v1 + '&quantity=' + v2,
2354				dataType: 'html',
2355				beforeSend: function() {},
2356				success: function(html) {
2357
2358					$('#cart_options_list').html(html);
2359
2360				},
2361				error: function(xhr, ajaxOptions, thrownError) {
2362					//alert(thrownError + "\r\n" + xhr.statusText + "\r\n" + xhr.responseText);
2363				}
2364			});
2365
2366			setTimeout($.unblockUI, 1000);
2367		});
2368
2369
2370		$('.close').bind('click', function() {
2371
2372			prod_id = $("#prod_id").val();
2373			bytr_id = $("#buy_together_id").val();
2374
2375			$('#add_price_' + prod_id + '-' + bytr_id).attr("checked", false);
2376			$('#cart_options_list').html("");
2377		});
2378
2379		//加入(有選項)
2380		$('#button-change-option').bind('click', function() {
2381
2382			let hasError = false;
2383			$('.options').find('span.required').each(function() {
2384				let parentDiv = $(this).closest('div[id^="option-"]');
2385				let optionId = parentDiv.attr('id').split('-')[1];
2386				let input = parentDiv.find('select, input[type="radio"], input[type="checkbox"], input[type="text"], textarea');
2387
2388				let valid = false;
2389
2390				if (input.length) {
2391					if (input.is('select')) {
2392						valid = input.val() !== "";
2393					} else if (input.is(':radio') || input.is(':checkbox')) {
2394						valid = input.is(':checked');
2395					} else {
2396						valid = input.val().trim() !== "";
2397					}
2398				}
2399
2400				if (!valid) {
2401					parentDiv.after('<span class="error">此為必填選項,請選擇或輸入</span>');
2402					hasError = true;
2403				}
2404			});
2405
2406			if (hasError) return false;
2407
2408			if ($(".options .form-group[data-max-qty]").length) {
2409				var r = true;
2410				$(".options .form-group[data-max-qty]").each(function(index) {
2411					var option_ckb_id = $(this).data("option-id") || 0;
2412					if (option_ckb_id) {
2413						r = checkCheckboxOptionQtyLimition(option_ckb_id);
2414						if (r == false) return false;
2415					}
2416				});
2417				if (r == false) return false;
2418			}
2419
2420			prod_id = $("#prod_id").val();
2421			bytr_id = $("#buy_together_id").val();
2422
2423			$.ajax({
2424				url: 'index.php?route=product/product_options/validate',
2425				type: 'post',
2426				data: $('#cart_options_list .options input[type=\'text\'], #cart_options_list .options input[type=\'hidden\'], #cart_options_list .options input[type=\'radio\']:checked, #cart_options_list .options input[type=\'checkbox\']:checked, #cart_options_list .options select, #cart_options_list .options textarea, #cart_options_list .quantity_div input[type=\'text\']'),
2427				dataType: 'json',
2428				success: function(json) {
2429
2430					$(".error").remove();
2431					$(".alert").remove();
2432
2433					if (json['error']) {
2434
2435						if (json['error']['option']) {
2436							for (i in json['error']['option']) {
2437
2438								$('#option-' + i).after('<span class="error">' + json['error']['option'][i] + '<br/></span>');
2439							}
2440						}
2441
2442					} else {
2443
2444						$('#lab_addprice_' + prod_id + '-' + bytr_id + ' .add-additional-purchase-option').html("<input type=hidden name=add_price_options_" + prod_id + "-" + bytr_id + " value='" + json['options'] + "' ><span class='label'>" + json['options_name'] + "</span>");
2445
2446						$('#cart_options_list').html("");
2447						$('#myModal').hide();
2448						$('.modal-backdrop').remove();
2449						$('#add_price_' + prod_id + '-' + bytr_id).attr("checked", true);
2450
2451						if (is.not.desktop()) {
2452							$('.button-cart').removeClass("fadeOutDown").addClass("animated fadeInUp");
2453							$('.button-quick-checkout').removeClass("fadeOutDown").addClass("animated fadeInUp");
2454						}
2455
2456					}
2457
2458				}
2459			});
2460		});
2461
2462		var oldURL = document.referrer;
2463
2464		$.fancybox.defaults.hash = false;
2465
2466		$("[data-fancybox='images']").fancybox({
2467			afterLoad: function(instance, slide) {
2468				if ($(".fancybox-container").length > 1) {
2469					$(".fancybox-container").not(':first').remove();
2470				}
2471			},
2472			afterClose: function() {
2473				window.onhashchange = function(e) {
2474					if (window.location.hash.indexOf("#gallery") != -1) {
2475						e.preventDefault();
2476						$.fancybox.close();
2477						if (is.not.empty(oldURL)) {
2478							window.onhashchange = null;
2479							window.location.href = oldURL;
2480						}
2481						return false;
2482					}
2483				}
2484			}
2485		});
2486
2487		if (is.desktop()) {
2488
2489			$("#main-image .fancybox-product").click(function(e) {
2490				e.stopPropagation();
2491				e.preventDefault();
2492				var $links = $("[data-fancybox='gallery']");
2493				var zoom_active_index = $("#image-additional li > a.zoom-active").parent().index();
2494				$.fancybox.open($links, {
2495					hash: false
2496				}, zoom_active_index);
2497				if ($(".fancybox-container").length > 1) {
2498					$(".fancybox-container").not(':first').remove();
2499				}
2500				return false;
2501			});
2502
2503			$("#image-additional a").click(function(e) {
2504				e.stopPropagation();
2505				e.preventDefault();
2506				var $links = $("[data-fancybox='gallery']");
2507				var zoom_active_index = $("#image-additional li > a.zoom-active").parent().index();
2508				$.fancybox.open($links, {
2509					hash: false
2510				}, zoom_active_index);
2511				if ($(".fancybox-container").length > 1) {
2512					$(".fancybox-container").not(':first').remove();
2513				}
2514				return false;
2515			});
2516
2517		} else {
2518
2519			$("#main-image .fancybox-product").click(function(e) {
2520				e.stopPropagation();
2521				e.preventDefault();
2522				var $links = $("[data-fancybox='gallery']");
2523				$.fancybox.open($links, {
2524					hash: false
2525				}, 0);
2526				if ($(".fancybox-container").length > 1) {
2527					$(".fancybox-container").not(':first').remove();
2528				}
2529				return false;
2530			});
2531
2532			$("[data-fancybox='gallery']").fancybox({
2533				hash: false
2534			});
2535		}
2536
2537		$("a.screenshot").hover(function(e) {
2538			this.t = this.title;
2539			this.title = "";
2540			var c = (this.t != "") ? "<br/>" + this.t : "";
2541			this.rel = this.rel.replace(" noopener noreferrer nofollow", "");
2542			$("body").append("<p id='screenshot'><img src='" + this.rel + "' alt='url preview' />" + c + "</p>");
2543			$("#screenshot")
2544				.css("top", (e.pageY - xOffset) + "px")
2545				.css("left", (e.pageX + yOffset) + "px")
2546				.fadeIn("fast");
2547		}, function() {
2548			this.title = this.t;
2549			$("#screenshot").remove();
2550		});
2551
2552		$("a.screenshot").mousemove(function(e) {
2553			$("#screenshot")
2554				.css("top", (e.pageY - xOffset) + "px")
2555				.css("left", (e.pageX + yOffset) + "px");
2556		});
2557
2558		$('#review').load('index.php?route=product/product/review&product_id=21', function() {
2559			init_review();
2560		});
2561
2562
2563		$('.date').datepicker({
2564			dateFormat: 'yy-mm-dd'
2565		});
2566		$('.datetime').datetimepicker({
2567			dateFormat: 'yy-mm-dd',
2568			timeFormat: 'HH:mm',
2569			controlType: 'select'
2570		});
2571		$('.time').timepicker({
2572			timeFormat: 'h:m'
2573		});
2574
2575		$('[data-toggle="tooltip"]').tooltip();
2576
2577					if ($('#countdown_dashboard').length) {
2578				setTimeout(function() {
2579					$('#countdown_dashboard').countdown('1970/01/01 08:00:00', function(event) {
2580						if (event.elapsed) {
2581							$(this).html('');
2582						} else {
2583							$(this).html(event.strftime('<h1>限時優惠</h1><span>%D 天 %H:%M:%S</span>'));
2584						}
2585					});
2586				}, 2000);
2587			}
2588		
2589		if (is.not.desktop()) {
2590
2591			$("#zoom1").imagesLoaded(function() {
2592				$("#main-defer-image").remove();
2593				$("#main-image").removeClass("hidden");
2594				$("#image-additional-container").show();
2595			});
2596
2597			$("#image-additional").find(".zoom-active").removeClass("zoom-active");
2598
2599			var lastScroll = 0;
2600			var lastDirection = 0;
2601			var down = true;
2602			var delta = 0;
2603			$(window).on("scroll", function() {
2604
2605				if ($("#myModal").css('display') == 'block') {
2606					$('.button-cart').removeClass("hidden animated fadeInUp").addClass("animated fadeOutDown");
2607					$('.button-quick-checkout').removeClass("hidden animated fadeInUp").addClass("animated fadeOutDown");
2608				}
2609
2610				if (isFacebookApp() || disabledScroll) {
2611					$('.button-cart').removeClass("hidden animated fadeOutDown");
2612					$('.button-quick-checkout-mobile').removeClass("hidden animated fadeOutDown");
2613					return;
2614				}
2615
2616				var scroll = $(this).scrollTop();
2617				down = scroll > lastScroll;
2618				delta = Math.abs(lastScroll - scroll);
2619				lastScroll = scroll;
2620				if ((down != lastDirection)) {
2621					if (down == true) {
2622						if (delta > 15) {
2623							$('.button-cart').removeClass("hidden animated fadeInUp").addClass("animated fadeOutDown");
2624							$('.button-quick-checkout-mobile').removeClass("hidden animated fadeInUp").addClass("animated fadeOutDown");
2625						}
2626
2627					} else {
2628						$('.button-cart').removeClass("hidden animated fadeOutDown").addClass("animated fadeInUp");
2629						$('.button-quick-checkout-mobile').removeClass("hidden animated fadeOutDown").addClass("animated fadeInUp");
2630					}
2631
2632				}
2633				lastDirection = down;
2634
2635			});
2636
2637			if (isFacebookApp() || disabledScroll) {
2638				$(window).unbind("scroll");
2639				$('#button-cart').attr("class", "button-cart button pull-left");
2640				$('#button-quick-checkout').attr("class", "btn btn-default btn-block button-quick-checkout button-quick-checkout-mobile");
2641				$('#button-cart').show();
2642				$('#button-quick-checkout').show();
2643			}
2644		}
2645
2646		
2647			load_free_present();
2648
2649			$("input[name='quantity']").bind('change', function() {
2650
2651				load_free_present();
2652
2653			});
2654
2655			$("select[name='quantity']").bind('change', function() {
2656
2657				load_free_present();
2658
2659			});
2660
2661		
2662				enableDataSelectsClick();
2663	}
2664
2665	function loadislogin() {
2666
2667					$("#login_n").hide();
2668			}
2669
2670	function loadpromotionlist() {
2671		var html = "";
2672		$.ajax({
2673			url: "index.php?route=product/product/getLoggedInPromotionList&product_id=21",
2674			type: "post",
2675			dataType: "json",
2676			success: function(json) {
2677				if (json.length > 0) {
2678					html += '<hr/><h4>促銷活動</h4>';
2679					html += '<ul>';
2680					for (var i = 0; i < json.length; i++) {
2681
2682						html += ' <li class="promotion-forward-button button button-default"><a href="' + json[i]["promotion_url"] + '" style="text-decoration:none;"> ' + json[i]["name"] + ' &nbsp;&nbsp;<i class="icon-double-angle-right"></i></a></li> ';
2683
2684					}
2685					html += '</ul>';
2686
2687					$("#promotion_list").html(html);
2688				}
2689				//console.log(json.length);
2690			},
2691
2692			error: function() {
2693				console.log("error");
2694			}
2695		});
2696	}
2697
2698	//cloudmaker_stock
2699	function load_cloudmaker() {
2700				$.ajax({
2701			url: 'index.php?route=cloudmaker/order/wareHouseOrdernew&product_sku=' + encodeURIComponent('0'),
2702			dataType: 'json',
2703			type: "post",
2704			success: function(json) {
2705
2706				if (json['error']) {
2707					console.log(json['error']);
2708				} else {
2709					var cjson = json["cred_response"];
2710
2711					if (cjson.length > 0) {
2712
2713						var cloudmaker_value = "";
2714						var cloudmaker_header = "";
2715						var cloudmaker_body = "";
2716						var i = 0;
2717
2718						cjson.forEach(function(data) {
2719							cloudmaker_body += "<tr>";
2720							cloudmaker_body += "	<td style='border:1px solid #ddd;padding:6px;text-align: center;'>" + data.size + "</td>";
2721
2722							var stock = data.stock;
2723
2724							$.each(stock, function() {
2725
2726								$.each(this, function(name, value) {
2727									if (i == 0) {
2728										cloudmaker_header += " <td style='border:1px solid #ddd;padding:6px;text-align: center;'>" + name + "</td>";
2729									}
2730									cloudmaker_body += "	<td style='border:1px solid #ddd;padding:6px;text-align: center;'>" + value + "</td>";
2731								});
2732
2733								i++;
2734							});
2735
2736							cloudmaker_body += "</tr>";
2737
2738						});
2739
2740						cloudmaker_value = "<table style='max-width:450px; width:100%;margin-bottom:6px;'>";
2741						cloudmaker_value += "<tr style='font-weight: bold;'>";
2742						cloudmaker_value += "<td style='border:1px solid #ddd;padding:6px;text-align: center;'>尺寸</td>";
2743						cloudmaker_value += cloudmaker_header;
2744						/*cloudmaker_value += "<td style='border:1px solid #ddd;padding:6px;text-align: center;'>台南小西門</td>";
2745						cloudmaker_value += "<td style='border:1px solid #ddd;padding:6px;text-align: center;'>東區旗艦</td>";
2746						cloudmaker_value += "<td style='border:1px solid #ddd;padding:6px;text-align: center;'>勤美誠品</td>";
2747						cloudmaker_value += "<td style='border:1px solid #ddd;padding:6px;text-align: center;'>信義誠品</td>";*/
2748						cloudmaker_value += "</tr>";
2749						cloudmaker_value += cloudmaker_body;
2750						cloudmaker_value += "</table>";
2751						cloudmaker_value += "<span> 庫存更新時間:2026-10-09 07:17:03 (重新整理網頁可取得最新庫存資訊)</span><br/>";
2752						//cloudmaker_value += "<span style='font-weight: bold;'>總筆數 : "+ cjson.length +" 筆</span>";
2753						//cloudmaker_value += "<hr/>";
2754
2755						$('#cloudmaker_stock').append(cloudmaker_value);
2756
2757					} else {
2758						console.log("cloudmaker_stock(0) is null");
2759					}
2760				}
2761
2762			},
2763			error: function(xhr, ajaxOptions, thrownError) {
2764				//console.log(thrownError + "\r\n" + xhr.statusText + "\r\n" + xhr.responseText);
2765			}
2766		});
2767
2768
2769	}
2770
2771	function load_options() {
2772		$.ajax({
2773			url: 'index.php?route=product/product_options&key=21&type=prod',
2774			dataType: 'html',
2775			beforeSend: function() {},
2776			success: function(html) {
2777
2778				$('#options').html(html);
2779
2780			},
2781			error: function(xhr, ajaxOptions, thrownError) {
2782				//alert(thrownError + "\r\n" + xhr.statusText + "\r\n" + xhr.responseText);
2783			}
2784		});
2785	}
2786
2787	function checkCheckboxOptionQtyLimition(option_id) {
2788
2789		try {
2790			var max_qty = parseInt($("#options #option-" + option_id).data("max-qty")) || 0;
2791			var min_qty = parseInt($("#options #option-" + option_id).data("min-qty")) || 0;
2792			var option_checkbox_name = $("#options #option-" + option_id).data("option-name");
2793			if (max_qty || min_qty) {
2794				$("#options #option-" + option_id).find(".alert-error").remove();
2795				var qty_total_chk = 0;
2796				$("#options #option-" + option_id).find("input[type='text'].CheckboxOptionQtyGroup").each(function(index) {
2797					var pov_id = $(this).data("pov-id");
2798					if ($("#option-value-" + pov_id).is(':checked')) {
2799						qty_total_chk += parseInt($(this).val()) || 0;
2800					}
2801				});
2802				//貨到通知沒有開,會限制可選總數量
2803				if (goods_arrival_notice_switch_status == 0) {
2804					if (max_qty) {
2805						if (qty_total_chk > max_qty) {
2806							$("#options #option-" + option_id + " > label.control-label").after("<div class='alert alert-error'>選項 總數量 限制最多 " + max_qty + " 項!請重新修改數量");
2807							return false;
2808						}
2809					}
2810					if (min_qty) {
2811						if (qty_total_chk < min_qty) {
2812							$("#options #option-" + option_id + " > label.control-label").after("<div class='alert alert-error'>選項 總數量 至少須 " + min_qty + " 項!請重新修改數量");
2813							return false;
2814						}
2815					}
2816				}
2817			}
2818		} catch (e) {}
2819		return true;
2820	}
2821
2822	var a2a_config = a2a_config || {};
2823	a2a_config.locale = "zh-TW";
2824
2825	try {
2826		var main_image_element = document.getElementById("main-defer-image");
2827		main_image_element = function() {
2828			main_image_element.style.opacity = 1;
2829			main_image_element.style.transition = "all 0.2s";
2830		};
2831	} catch (e) {}
2832
2833	function load_free_present() {
2834
2835		var pid = 21;
2836
2837		var price = $('#price-price-block .price-normal').attr('data-content');
2838
2839		if (!price) price = $('#price-price-block .price-new').attr('data-content');
2840
2841		var qty = $('input[name="quantity"]').val();
2842
2843		if (!qty) qty = $('select[name="quantity"]').val();
2844
2845		$.ajax({
2846			url: 'index.php?route=module/free_present',
2847			type: 'post',
2848			dataType: 'html',
2849			data: {
2850				pid: pid,
2851				price: price,
2852				qty: qty
2853			},
2854			beforeSend: function() {},
2855			success: function(html) {
2856				$('#free_present_list').html(html);
2857				$('#free_present_list').show();
2858			},
2859			error: function(xhr, ajaxOptions, thrownError) {
2860				//console.log(thrownError + "\r\n" + xhr.statusText + "\r\n" + xhr.responseText);
2861			}
2862		});
2863	}
2864
2865	
2866	function syncThumbsWidth() {
2867		try {
2868			var mainWidth = $('#main-image').outerWidth();
2869			if (!mainWidth || mainWidth < 1) {
2870				mainWidth = $('#zoom1').outerWidth();
2871			}
2872			if (mainWidth && mainWidth > 0) {
2873				$('#image-additional, #image-additional-container').css({
2874					'width': mainWidth + 'px',
2875					'float': 'right'
2876				});
2877			}
2878		} catch (e) {}
2879	}
2880
2881	try {
2882		$(window).on('resize', syncThumbsWidth);
2883	} catch (e) {}
2884</script>
2884 </div> <!-- .container-inner --> </div> <!-- .container --> </div> <!-- #content_wrapper --> <input type="hidden" id="ga_utm_source" name="ga_utm_source" value=""> <input type="hidden" id="ga_utm_medium" name="ga_utm_medium" value=""> <input type="hidden" id="ga_utm_campaign" name="ga_utm_campaign" value=""> <footer id="footer" class="clearfix  "> <div class="footer-inner container"> <div id="footer-inner-row" data-count="97" class="row-fluid  clearfix"> <div class="span12 contact pull-right"> <h3>&nbsp;</h3> <p>&nbsp;</p> <p>&nbsp;</p> </div> </div> <!-- .row --> </div> <!-- /.footer-inner --> <div class="footer-bottom container  "> <div id="footer-copyright" class="row-fluid"> <div id="payment-logo-list" class="pl-container"> <div class="pl-row"> </div> </div> <div id="copy"> <p>Copyright ©2026 二路蘿蔔糕</p> <p>
2885													穎香國際有限公司																			| 
2886																			統一編號&nbsp;90661570												</p> <!--googleoff: index--><span style="display:none;">q67b3ef089f8e6</span><!--googleon: index--> </div> <div id="qdm-copy"><a href='https://www.tworoad.tw/googlebase.xml' title="RSS" target='blank'><i class="fa fa-rss"></i></a><a href='https://www.tworoad.tw/sitemap'>網站地圖</a></div> </div> </div> </footer> <!-- #footer --> 
2886<script src="https://cdn.qdm.cloud/assets/js/LAB.min.js"></script>
2886 
2886<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/2.2.4/jquery.min.js"></script>
2886 
2886<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery-migrate/1.4.1/jquery-migrate.min.js"></script>
2886 
2886<script type="text/javascript">	
2887			
2888			$(document).ready(function() {
2889				var j = 0;
2890				var delay = 3000; 
2891				function cycleStickyBarTop(){
2892					var jmax = $(".sticky-bar-top .sticky-bar-content").length -1;
2893					if(jmax > 0){
2894						$(".sticky-bar-top .sticky-bar-content:eq(" + j + ")")
2895						.animate({"opacity" : "1","z-index":"9998"} ,400)
2896						.animate({"opacity" : "1","z-index":"9998"}, delay)
2897						.animate({"opacity" : "0","z-index":"9"}, 400, function(){
2898							(j == jmax) ? j=0 : j++;
2899							cycleStickyBarTop();
2900						});
2901					}else{
2902						$(".sticky-bar-top .sticky-bar-content:eq(" + j + ")")
2903						.animate({"opacity" : "1","z-index":"9998"}, delay)
2904					}
2905				};
2906				cycleStickyBarTop();
2907				
2908				var i = 0;
2909				function cycleStickyBarBottom(){
2910					var imax = $(".sticky-bar-bottom .sticky-bar-content").length -1;
2911					if(imax > 0){
2912						$(".sticky-bar-bottom .sticky-bar-content:eq(" + i + ")")
2913						.animate({"opacity" : "1","z-index":"9998"} ,400)
2914						.animate({"opacity" : "1","z-index":"9998"}, delay)
2915						.animate({"opacity" : "0","z-index":"9"}, 400, function(){
2916							(i == imax) ? i=0 : i++;
2917							cycleStickyBarBottom();
2918						});
2919					}else{
2920						$(".sticky-bar-bottom .sticky-bar-content:eq(" + i + ")")
2921						.animate({"opacity" : "1","z-index":"9998"}, delay)
2922					}
2923					
2924				};
2925				cycleStickyBarBottom();
2926				
2927				var k = 0;
2928				function cycleStickyBarTopMobile(){
2929					var kmax = $(".mobile-sticky-bar-top .sticky-bar-content").length -1;
2930					if(kmax > 0){
2931						$(".mobile-sticky-bar-top .sticky-bar-content:eq(" + k + ")")
2932						.animate({"opacity" : "1","z-index":"9998"} ,400)
2933						.animate({"opacity" : "1","z-index":"9998"}, delay)
2934						.animate({"opacity" : "0","z-index":"9"}, 400, function(){
2935							(k == kmax) ? k=0 : k++;
2936							cycleStickyBarTopMobile();
2937						});
2938					}else{
2939						$(".mobile-sticky-bar-top .sticky-bar-content:eq(" + k + ")")
2940						.animate({"opacity" : "1","z-index":"9998"}, delay)
2941					}
2942				};
2943				cycleStickyBarTopMobile();
2944				
2945				//COUNTDOWN TIMER
2946				$(".sticky-bar-countdown").each(function(){
2947					
2948					var sticky_bar_date = $(this).attr("data-countdown-date").replace(/-/g,'/');
2949					var sticky_bar_countdown_id = $(this).attr("id");
2950					var countDownDate = new Date(sticky_bar_date).getTime();
2951
2952					var x = setInterval(function() {
2953					
2954						var now = new Date().getTime();
2955						
2956						var distance = countDownDate - now;
2957						
2958						var days = Math.floor(distance / (1000 * 60 * 60 * 24));
2959						var hours = Math.floor((distance % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60));
2960						var minutes = Math.floor((distance % (1000 * 60 * 60)) / (1000 * 60));
2961						var seconds = Math.floor((distance % (1000 * 60)) / 1000);
2962						
2963						if(hours<10){
2964							var hours1 = "0"+hours;
2965						}else{
2966							var hours1 = hours;
2967						}
2968						if(minutes<10){
2969							var minutes1 = "0"+minutes;
2970						}else{
2971							var minutes1 = minutes;
2972						}
2973						if(seconds<10){
2974							var seconds1 = "0"+seconds;
2975						}else{
2976							var seconds1 = seconds;
2977						}
2978						
2979						if( $("#" + sticky_bar_countdown_id).length ) {
2980							document.getElementById(sticky_bar_countdown_id).innerHTML = " "+days+ " DAY " + hours1 + ": "
2981						+ minutes1 + ": " + seconds1 + " ";
2982						}
2983						
2984						if (distance < 0) {
2985							clearInterval(x);
2986							//document.getElementById(sticky_bar_countdown_id).innerHTML = "-";
2987							$("#"+sticky_bar_countdown_id).remove();
2988						}
2989					}, 1000);
2990					
2991				 });
2992				
2993			});
2994			 
2995			jQuery.ajaxPrefilter( function( s ) {
2996				if ( s.crossDomain ) {
2997					s.contents.script = false;
2998				}
2999			});
3000			
3001			var loc = window.location.href, index = loc.indexOf('#');
3002			if (index > 0) {
3003				try {
3004					var urlHash = loc.split("#")[1];
3005					if( urlHash ) {
3006						if( $('#' + urlHash).length ) {
3007							$('html,body').animate({
3008								scrollTop: $('#' + urlHash).offset().top
3009							}, 1200);
3010						} else {
3011							window.location = loc.substring(0, index) + "&" + loc.substring(index+1);
3012						}
3013					}
3014				} catch(err) { }
3015			}
3016			
3017			var readyInitPage = 1;
3018			var doAdjust = true;
3019			var doAdjustCounter = 0;
3020			var jsLoadTimeout = null;
3021			var previousWidth = 0;
3022			var maxHeight = 0;
3023			var flipper_random_status = 0;
3024			var float_banner_count = 0;
3025			var lazy = 1;
3026			var transInitial = -280;
3027			var mDistance = 0;
3028					
3029			if (window!= top) top.location.href = location.href;
3030			
3031			//20210713 add menu url target
3032			 $(".pushy-submenu button span").click(function(){
3033				if($(this).attr("target")){
3034					$(this).removeClass("pushy-submenu-parent");
3035					if($(this).parents("li").hasClass("pushy-submenu-open")){
3036						window.open($(this).data("url"),"_blank");
3037					}
3038				}
3039			});
3040
3041			$(".pushy-menu-storename span").click(function(){
3042				$("#myBody").removeClass("pushy-open-left");
3043			});
3044			
3045			function getScript(url,success){
3046			var script = document.createElement('script');
3047			script.type = 'text/javascript';
3048			script.src = url;
3049			var head=document.getElementsByTagName('head')[0], done=false;
3050			script.onload=script.onreadystatechange = function(){
3051			  if ( !done && (!this.readyState || this.readyState == 'loaded' || this.readyState == 'complete') ) {
3052				done=true;
3053				success();
3054				script.onload = script.onreadystatechange = null;
3055				head.removeChild(script);
3056			  }
3057			};
3058			head.appendChild(script);
3059			}
3060						
3061			function getParams(a){var b=document.getElementsByTagName("script");for(var i=0;i<b.length;i++){if(b[i].src.indexOf("/"+a)>-1){var c=b[i].src.split("?").pop().split("&");var p={};for(var j=0;j<c.length;j++){var d=c[j].split("=");p[d[0]]=d[1]}return p}}return{}}
3062			
3063			function adjustBoxHeights() {
3064				maxHeight1 = 270;
3065				maxHeight2 = 270;
3066				maxHeight3 = 270;
3067				maxHeight4 = 270;
3068				maxHeight5 = 270;
3069				
3070				$('.content-top .product-box > div').each(function(){
3071					$(this).height('auto');
3072					if (maxHeight2 < $(this).height()) { maxHeight2 = $(this).height(); }
3073				});
3074				$('.content-top .product-box > div').each(function(){
3075					if( maxHeight2 ) {
3076						$(this).height(maxHeight2);
3077					}
3078				});
3079				
3080				$('.content-bottom .product-box > div').each(function(){
3081					$(this).height('auto');
3082					if (maxHeight3 < $(this).height()) { maxHeight3 = $(this).height(); }
3083				});
3084				$('.content-bottom .product-box > div').each(function(){
3085					if( maxHeight3 ) {
3086						$(this).height(maxHeight3);
3087					}
3088				});
3089				
3090				$('.product-grid > div').each(function(){
3091					var img_src = $(this).find(".image img[src]").attr("src");
3092					try {
3093						var img_src_ext = img_src.split('.').pop().toLowerCase();
3094					} catch(err) {
3095						img_src_ext = "";
3096					}
3097					$(this).height('auto');
3098					if( $( "#myBody" ).hasClass("product-category") ){
3099						img_src_ext = "";
3100					}
3101					if( img_src_ext != "gif" ) {
3102						if (maxHeight1 < $(this).height()) { maxHeight1 = $(this).height(); }
3103					} else {
3104						$(this).addClass("gif-tag");
3105					}
3106				});
3107				var img_gif_height = 0;
3108				$('.product-grid > div').each(function(){
3109					var img_src = $(this).find(".image img[src]").attr("src");
3110					try {
3111						var img_src_ext = img_src.split('.').pop().toLowerCase();
3112					} catch(err) {
3113						img_src_ext = "";
3114					}
3115					if( maxHeight1 ){
3116						$(this).height(maxHeight1);
3117						if( img_src_ext != "gif" ) {
3118							img_gif_height = $(this).find(".image img").height();
3119						}
3120					}
3121				});
3122				$('.product-grid > div.gif-tag').attr("style","");
3123				if( img_gif_height ) {
3124					$('.product-grid > div.gif-tag').find(".image img").attr("style","height:" + img_gif_height + "px;width:auto;");
3125				}
3126				
3127				$('.box-content').each(function(index,elmain){
3128					$(elmain).find('.product-box').each(function(index,el){
3129						maxHeight1 = 0;
3130						$(el).find('.grid-box').each(function(index,el2){
3131							$(el2).height('auto');
3132						});
3133						$(el).find('.grid-box .inner').each(function(index,el2){
3134							if (maxHeight1 < $(el2).height()) { maxHeight1 = $(el2).height(); }
3135						});
3136						maxHeight1 = maxHeight1 + 18;
3137						$(el).find('.grid-box').each(function(index,el2){
3138							if( maxHeight1 ) {
3139								$(el2).height(maxHeight1);
3140							}
3141						});
3142					});
3143				});
3144				
3145				$('#related-products').each(function(index,elmain){
3146					$(elmain).imagesLoaded(function(){
3147						$(this).find('.product-box').each(function(index,el){
3148							maxHeight1 = 0;
3149							$(el).find('.grid-box').each(function(index,el2){
3150								$(el2).height('auto');
3151							});
3152							$(el).find('.grid-box .inner').each(function(index,el2){
3153								if (maxHeight1 < $(el2).height()) { maxHeight1 = $(el2).height(); }
3154							});
3155							maxHeight1 = maxHeight1 + 36;
3156							if( maxHeight1 < 220 ) maxHeight1 = 220;
3157							if( !is.mobile() ) {
3158								if( maxHeight1 < 340 ) maxHeight1 = 340;
3159							}
3160							$(el).find('.grid-box').each(function(index,el2){
3161								if( maxHeight1 ) {
3162									$(el2).height(maxHeight1);
3163								}
3164							});
3165						});
3166					});
3167				});
3168				
3169				$('.content-bottom #related-products').each(function(index,elmain){
3170					var contentset_height = parseInt($('.content-bottom #related-products .contentset').height());
3171					if( contentset_height ) contentset_height = contentset_height + 70;
3172					$(elmain).imagesLoaded(function(){
3173						$(this).find('.product-box').each(function(index,el){
3174							maxHeight1 = 0;
3175							$(el).find('.grid-box').each(function(index,el2){
3176								$(el2).height('auto');
3177							});
3178							$(el).find('.grid-box .inner').each(function(index,el2){
3179								if (maxHeight1 < $(el2).height()) { maxHeight1 = $(el2).height(); }
3180							});
3181							maxHeight1 = maxHeight1 + 36 + contentset_height;
3182							if( maxHeight1 < 220 ) maxHeight1 = 220;
3183							if( !is.mobile() ) {
3184								if( maxHeight1 < 340 ) maxHeight1 = 340;
3185							}
3186							$(el).find('.grid-box').each(function(index,el2){
3187								if( maxHeight1 ) {
3188									$(el2).height(maxHeight1);
3189								}
3190							});
3191						});
3192					});
3193				});
3194				
3195				$('.any-products').each(function(index,el){
3196					
3197					if(is.mobile()){
3198						$(el).find(".grid-box").attr("style","");
3199					}
3200					
3201					maxHeight5 = 0;
3202					$(el).find('.any-box > div').each(function(index,el2){
3203						$(el2).height('auto');
3204						if (maxHeight5 < $(el2).height()) { maxHeight5 = $(el2).height(); }
3205					});
3206					$(el).find('.any-box > div').each(function(index,el2){
3207						if( maxHeight5 ) {
3208							$(el2).height(maxHeight5);
3209						}
3210					});
3211					$(el).find('.grid-box > .inner').each(function(index,el2){
3212						$(el2).css("display", "block");
3213					});
3214				});
3215			}
3216			
3217			var supportsNatural = ( "naturalWidth" in (new Image()) );
3218			
3219			function initDeferImages() {
3220				[].forEach.call(document.querySelectorAll('img[data-src]'), function(img) {
3221					img.setAttribute('src', img.getAttribute('data-src'));
3222					img.onload = function() {
3223						this.removeAttribute('data-src');
3224						if (this.style.opacity !== undefined) {
3225							this.style.opacity = 1;
3226						}
3227						var naturalWidth = supportsNatural ? this.naturalWidth : $(this).width();
3228						if( naturalWidth == 0 ) {
3229							this.src += '?timestamp=' + new Date().getTime();
3230						}
3231					};
3232				});
3233				$(".grid-box img,.product-row img").each(function(){
3234					var _this = $(this);
3235					_this.imagesLoaded(function(){
3236						_this.animate({opacity: 1.0}, 100);
3237						_this.closest('.grid-box').find('.onsale').removeClass("hidden");
3238						_this.closest('.grid-box').find('.name').removeClass("hidden");
3239						_this.closest('.grid-box').find('.price').removeClass("hidden");
3240						_this.closest('.grid-box').find('.label-important').removeClass("hidden");
3241						_this.closest('.grid-box').find('.load-thumb-conver').remove();
3242						_this.closest('.product-row').find('.load-thumb-conver').remove();
3243						try { 
3244							if (typeof _this.data('flipper') !== 'undefined') {
3245								_this.flipper(); 
3246							}
3247						} catch(err) { }
3248						_this.height('auto');
3249						if( (lazy == $(".grid-box img").length) ) { adjustBoxHeights(); }
3250						lazy++;
3251					});
3252				});
3253			}
3254			
3255			function updateCartProductCount() {
3256				$.get("index.php?route=module/cart/GetProductTotal", function(data) {
3257					$("#shopping-cart-list .badge").html(data);
3258					if(data>0){
3259						$("#shopping-cart-list .badge").removeClass("hidden");
3260						$("#shopping-cart-list .badge").removeClass("animated");
3261						$("#shopping-cart-list .badge").addClass("animated bounce");
3262					} else {
3263						$("#shopping-cart-list .badge").addClass("hidden");
3264					}
3265				});
3266			}
3267			
3268			function updateQuantityByProductKey(key, quantity) {
3269				quantity = typeof(quantity) != 'undefined' ? quantity : 1;
3270				$.ajax({
3271					url: 'index.php?route=checkout/cart/updateProductQuantity',
3272					type: 'post',
3273					data: { 'quantity':quantity, 'key': key },
3274					dataType: 'json',
3275					success: function(json) {
3276						$.get( "index.php?route=module/cart/list", function( data ) {
3277							$(".slidePanel .slidePanel-content").html(data);
3278							updateCartProductCount();
3279						});
3280					}
3281				});
3282			}
3283			
3284			function removeProductFromSideCart(key, idx) {
3285				//var newkey = encodeURIComponent(key);
3286				var newkey = key;
3287				$.get("index.php?route=module/cart&remove=" + newkey, function(data) {
3288					$.get( "index.php?route=module/cart/list", function( data ) {
3289						$(".slidePanel .slidePanel-content").html(data);
3290						updateCartProductCount();
3291					});
3292				});
3293				$("#producr-list-" + idx).fadeOut(1200, function() { $(this).remove(); });
3294				return false;
3295			}
3296			
3297			function openSideCart(ta_product_id){
3298				var slidePanelVisible = $(".slidePanel").hasClass("slidePanel-show");
3299				if( slidePanelVisible ) {
3300					$("#content-wrapper").off("click");
3301					$.slidePanel.hide();
3302				} else {
3303					updateCartProductCount();
3304										$.slidePanel.show({
3305						url: 'index.php?route=module/cart/list'
3306					}, {
3307						direction: "left",
3308						duration: '500',
3309						mouseDrag: false,
3310						touchDrag: false,
3311						pointerDrag: false,
3312						loading: {
3313							template: function(options) {
3314								return '<div class="' + options.classes.loading + '"><div class="spinner"><i class="fa fa-circle-o-notch fa-spin fa-3x fa-fw"></i><span class="sr-only">Loading...</span></div></div>';
3315							}
3316						}
3317					});
3318					$("#content-wrapper").on('click', function(event) {
3319						$("#content-wrapper").off("click");
3320						$.slidePanel.hide();
3321						event.preventDefault();
3322						event.stopPropagation();
3323						
3324						var t_url = location.href; 
3325						var c_url = "https://www.tworoad.tw/cart";
3326						
3327						if(t_url == c_url){
3328							location.reload();
3329						}
3330						
3331					});
3332					$(".fancybox-product").on('click', function(event) {
3333						$.slidePanel.hide();
3334						event.preventDefault();
3335						event.stopPropagation();
3336						
3337						var t_url = location.href; 
3338						var c_url = "https://www.tworoad.tw/cart";
3339						
3340						if(t_url == c_url){
3341							location.reload();
3342						}
3343						
3344					});
3345									}
3346			}
3347			
3348			function gaTrackAddToCart(page, product_ids) {
3349				
3350				product_ids.forEach(function(item){
3351					
3352					try {
3353					
3354						// UA
3355						dataLayer.push({
3356						  'event': 'addToCart',
3357						  'ecommerce': {
3358							'currencyCode': '',
3359							'add': {
3360							  'products': [{
3361								'name': item.p_name,
3362								'id': item.p_id,
3363								'price': item.p_prices,
3364								'quantity': item.p_qty
3365							   }]
3366							}
3367						  }
3368						});
3369						
3370						// GA4
3371						dataLayer.push({
3372						  'event': 'add_to_cart',
3373						  'ecommerce': {
3374							'items': [{
3375							  'item_name': item.p_name,
3376							  'item_id': item.p_id,
3377							  'price': item.p_prices,
3378							  'quantity': item.p_qty
3379							}]
3380						  }
3381						});
3382						
3383												global_quuid = QUUID();
3384						var item_p_prices = parseFloat(item.p_prices);
3385						item_p_prices = Number(item_p_prices);
3386						if( isNaN(item_p_prices) ) {
3387							item_p_prices = 0;
3388						}
3389						fbq('track', 'AddToCart', {
3390						  content_name: item.p_name,
3391						  						  value: item_p_prices,
3392						  currency: 'TWD'
3393						}, {eventID: global_quuid + "ccc"});
3394
3395						// fb-capi-coverage Step 2: 用當前 item 覆寫 gecommProductToCart,
3396						// 確保 CAPI AddToCart 送的是「本次迭代商品」而非迴圈結束殘留的最後一品。
3397						gecommProductToCart.product_id = item.p_id;
3398						gecommProductToCart.quantity = item.p_qty;
3399						gecommProductToCart.product_name = item.p_name;
3400						gecommProductToCart.price = item.p_prices;
3401
3402						
3403try { setCookie("qdmfbevent_id", global_quuid + "ccc", 5); } catch (error) { }
3404
3405(function() {
3406	// CAPI AJAX must survive navigation (cart/add → instant_checkout redirect 1s window).
3407	// Prefer navigator.sendBeacon (designed for unload-time delivery); fallback to fetch keepalive.
3408	var url = "https://www.tworoad.tw/index.php?route=pixcel/facebook/capi_add_to_cart&quuid=" + global_quuid + "ccc";
3409	var payload = JSON.stringify(gecommProductToCart);
3410	var sent = false;
3411
3412	if (typeof navigator !== "undefined" && typeof navigator.sendBeacon === "function") {
3413		try {
3414			var blob = new Blob([payload], { type: "text/plain" });
3415			sent = navigator.sendBeacon(url, blob);
3416		} catch (e) { sent = false; }
3417	}
3418
3419	if (!sent && typeof fetch === "function") {
3420		try {
3421			fetch(url, {
3422				method: "POST",
3423				headers: { "Content-Type": "text/plain" },
3424				body: payload,
3425				keepalive: true,
3426				credentials: "include"
3427			}).catch(function() {});
3428		} catch (e) {}
3429	}
3430})();
3431												
3432										
3433					} catch (e) { }
3434					
3435				});
3436
3437			}
3438
3439			// Defers instant-add until the async-loaded $.fancybox exists, so early
3440			// clicks no longer hit an undefined open() and feel dead. One poller at a
3441			// time, latest click wins - repeated clicks don't stack duplicate opens.
3442			// Keep in sync with common/footer_cart.tpl (same guard for '/cart' URLs).
3443			var _fancyboxPendingCb = null;
3444			var _fancyboxPolling = false;
3445			function whenFancyboxReady(callback){
3446				if (typeof $.fancybox !== 'undefined') { callback(); return; }
3447				_fancyboxPendingCb = callback;   // latest click wins if several arrive while waiting
3448				if (_fancyboxPolling) { return; }
3449				_fancyboxPolling = true;
3450				(function poll(attempt){
3451					if (typeof $.fancybox !== 'undefined') {
3452						_fancyboxPolling = false;
3453						var cb = _fancyboxPendingCb;
3454						_fancyboxPendingCb = null;
3455						if (cb) { cb(); }
3456						return;
3457					}
3458					if (attempt < 50) { setTimeout(function(){ poll(attempt + 1); }, 100); return; }
3459					_fancyboxPolling = false;
3460					_fancyboxPendingCb = null;
3461					if (window.console && console.warn) { console.warn('fancybox not ready after 5s; instant add aborted'); }
3462				})(0);
3463			}
3464
3465			function InstantAddToCart(product_id, quantity, promotion_id, free_present_id){
3466				
3467				if( product_id && quantity ) {
3468					
3469					gecommProductToCart.product_id = product_id;
3470					gecommProductToCart.quantity = quantity;
3471					
3472					try {
3473						
3474						var p_name = $("[data-producttlid='"+product_id+"'] .name [itemprop='name']").html();
3475						var p_prices = $("[data-producttlid='"+product_id+"'] .price[data-price]").data("price");
3476						gecommProductToCart.product_name = p_name;
3477						
3478						gecommProductToCart.price = p_prices;
3479						
3480						// UA
3481						dataLayer.push({
3482						  'event': 'addToCart',
3483						  'ecommerce': {
3484							'currencyCode': '',
3485							'add': {
3486							  'products': [{
3487								'name': p_name,
3488								'id': product_id,
3489								'price': p_prices,
3490								'quantity': quantity
3491							   }]
3492							}
3493						  }
3494						});
3495						
3496						// GA4
3497						dataLayer.push({
3498						  'event': 'add_to_cart',
3499						  'ecommerce': {
3500							'items': [{
3501							  'item_name': p_name,
3502							  'item_id': product_id,
3503							  'price': p_prices,
3504							  'quantity': quantity
3505							}]
3506						  }
3507						});
3508						
3509												 var product_category = "";
3510						 $.getJSON( "index.php?route=common/footer/getProductCategory&product_id=" + product_id, function( data ) {
3511							 
3512							 if(data) product_category = data;
3513							 
3514							 if(product_category != ""){
3515								   gtag('event', 'add_to_cart', {
3516									  'value': p_prices, 
3517									  'items': [{
3518									  'id'    : product_id,
3519									  'item_id'   : product_id,
3520									  'item_name'  : p_name,
3521									  'price'   : p_prices,
3522									  'quantity'  : quantity,
3523									  'google_business_vertical': 'retail',
3524									  'item_category': product_category
3525									  }]
3526								   });
3527							   }else{
3528								   gtag('event', 'add_to_cart', {
3529									  'value': p_prices, 
3530									  'items': [{
3531									  'id'    : product_id,
3532									  'item_id'   : product_id,
3533									  'item_name'  : p_name,
3534									  'price'   : p_prices,
3535									  'quantity'  : quantity,
3536									  'google_business_vertical': 'retail'
3537									  }]
3538								   });
3539							   }
3540							 
3541						 });
3542						 
3543												
3544												global_quuid = QUUID();
3545						var item_p_prices = parseFloat(p_prices);
3546						item_p_prices = Number(item_p_prices);
3547						if( isNaN(item_p_prices) ) {
3548							item_p_prices = 0;
3549						}
3550						fbq('track', 'AddToCart', {
3551						  content_name: p_name,
3552						  						  value: item_p_prices,
3553						  currency: 'TWD'
3554						}, {eventID: global_quuid + "ccc"});
3555
3556						
3557try { setCookie("qdmfbevent_id", global_quuid + "ccc", 5); } catch (error) { }
3558
3559(function() {
3560	// CAPI AJAX must survive navigation (cart/add → instant_checkout redirect 1s window).
3561	// Prefer navigator.sendBeacon (designed for unload-time delivery); fallback to fetch keepalive.
3562	var url = "https://www.tworoad.tw/index.php?route=pixcel/facebook/capi_add_to_cart&quuid=" + global_quuid + "ccc";
3563	var payload = JSON.stringify(gecommProductToCart);
3564	var sent = false;
3565
3566	if (typeof navigator !== "undefined" && typeof navigator.sendBeacon === "function") {
3567		try {
3568			var blob = new Blob([payload], { type: "text/plain" });
3569			sent = navigator.sendBeacon(url, blob);
3570		} catch (e) { sent = false; }
3571	}
3572
3573	if (!sent && typeof fetch === "function") {
3574		try {
3575			fetch(url, {
3576				method: "POST",
3577				headers: { "Content-Type": "text/plain" },
3578				body: payload,
3579				keepalive: true,
3580				credentials: "include"
3581			}).catch(function() {});
3582		} catch (e) {}
3583	}
3584})();
3585												
3586												
3587												
3588												
3589						
3590_lt('send', 'cv', {
3591type: 'dpa_cart',
3592itemIds: [gecommProductToCart.product_id.toString()],
3593price: gecommProductToCart.price.toString(), 
3594currency: 'TWD', 
3595quantity: gecommProductToCart.quantity.toString()
3596},
3597{dpa:true},
3598['ca1644dc-2795-476b-9ffa-e1550d80f920&#039;']);
3599
3600_lt('send', 'cv', {
3601 type: 'AddToCart'
3602},['ca1644dc-2795-476b-9ffa-e1550d80f920&#039;']);
3603
3604						
3605						
3606						
3607					} catch (e) { }
3608					
3609				}
3610				
3611				$('[data-toggle="tooltip"], .tooltip').tooltip("hide");
3612				
3613				promotion_id = typeof(promotion_id) != 'undefined' ? promotion_id : -1;
3614				free_present_id = typeof(free_present_id) != 'undefined' ? free_present_id : -1;
3615				
3616				if(free_present_id != "-1"){
3617					quantity = $('input[name="quantity"]').val();
3618					quantity = typeof(quantity) != 'undefined' ? quantity : 1;
3619				}
3620				
3621				var price = $('#price-price-block .price-normal').attr('data-content');
3622		
3623				if(typeof(price) === 'undefined') price = $('#price-price-block .price-new').attr('data-content');
3624				
3625				price = typeof(price) != 'undefined' ? price : 0;
3626				
3627				var instantCartSrc = 'https://www.tworoad.tw/index.php?route=product/instant_add&product_id=' + product_id + '&promotion_id=' + promotion_id + '&quantity=' + quantity +'&price=' + price + '&free_present_id=' + free_present_id;
3628
3629				whenFancyboxReady(function(){
3630					try {
3631						$.fancybox.open({
3632							src  : instantCartSrc,
3633							type : 'iframe',
3634							opts : {
3635								openEffect 			: 'none',
3636								closeEffect 		: 'none',
3637								closeClickOutside 	: true,
3638								iframe : { css : { "max-width" : '332px', "width:": '100%' } },
3639								beforeLoad: function() {
3640									$(".fancybox-container").css("zIndex", 999999993);
3641								}
3642							}
3643						});
3644					} catch (e) { }
3645				});
3646			}
3647			
3648			function InstantAddToCart1(product_id, quantity, key_id, type, position){
3649				
3650				product_id = (typeof product_id !== 'undefined') ?  product_id : 0;
3651				quantity = (typeof quantity !== 'undefined') ?  quantity : 1;
3652				key_id = (typeof key_id !== 'undefined') ?  key_id : "-1";
3653				type = (typeof type !== 'undefined') ?  type : "";
3654				position = (typeof position !== 'undefined') ?  position : "";
3655				
3656				if( product_id && quantity ) {
3657					
3658					gecommProductToCart.product_id = product_id;
3659					gecommProductToCart.quantity = quantity;
3660					
3661					try {
3662						
3663						var p_name = $("[data-producttlid='"+product_id+"'] .name [itemprop='name']").html();
3664						var p_prices = $("[data-producttlid='"+product_id+"'] .price[data-price]").data("price");
3665						gecommProductToCart.product_name = p_name;
3666
3667						gecommProductToCart.price = p_prices;
3668						
3669						// UA
3670						dataLayer.push({
3671						  'event': 'addToCart',
3672						  'ecommerce': {
3673							'currencyCode': '',
3674							'add': {
3675							  'products': [{
3676								'name': p_name,
3677								'id': product_id,
3678								'price': p_prices,
3679								'quantity': quantity
3680							   }]
3681							}
3682						  }
3683						});
3684						
3685						// GA4
3686						dataLayer.push({
3687						  'event': 'add_to_cart',
3688						  'ecommerce': {
3689							'items': [{
3690							  'item_name': p_name,
3691							  'item_id': product_id,
3692							  'price': p_prices,
3693							  'quantity': quantity
3694							}]
3695						  }
3696						});
3697						
3698												global_quuid = QUUID();
3699						var item_p_prices = parseFloat(p_prices);
3700						item_p_prices = Number(item_p_prices);
3701						if( isNaN(item_p_prices) ) {
3702							item_p_prices = 0;
3703						}
3704						fbq('track', 'AddToCart', {
3705						  content_name: p_name,
3706						  						  value: item_p_prices,
3707						  currency: 'TWD'
3708						}, {eventID: global_quuid + "ccc"});
3709
3710						
3711try { setCookie("qdmfbevent_id", global_quuid + "ccc", 5); } catch (error) { }
3712
3713(function() {
3714	// CAPI AJAX must survive navigation (cart/add → instant_checkout redirect 1s window).
3715	// Prefer navigator.sendBeacon (designed for unload-time delivery); fallback to fetch keepalive.
3716	var url = "https://www.tworoad.tw/index.php?route=pixcel/facebook/capi_add_to_cart&quuid=" + global_quuid + "ccc";
3717	var payload = JSON.stringify(gecommProductToCart);
3718	var sent = false;
3719
3720	if (typeof navigator !== "undefined" && typeof navigator.sendBeacon === "function") {
3721		try {
3722			var blob = new Blob([payload], { type: "text/plain" });
3723			sent = navigator.sendBeacon(url, blob);
3724		} catch (e) { sent = false; }
3725	}
3726
3727	if (!sent && typeof fetch === "function") {
3728		try {
3729			fetch(url, {
3730				method: "POST",
3731				headers: { "Content-Type": "text/plain" },
3732				body: payload,
3733				keepalive: true,
3734				credentials: "include"
3735			}).catch(function() {});
3736		} catch (e) {}
3737	}
3738})();
3739												
3740												
3741												
3742						
3743_lt('send', 'cv', {
3744type: 'dpa_cart',
3745itemIds: [gecommProductToCart.product_id.toString()],
3746price: gecommProductToCart.price.toString(), 
3747currency: 'TWD', 
3748quantity: gecommProductToCart.quantity.toString()
3749},
3750{dpa:true},
3751['ca1644dc-2795-476b-9ffa-e1550d80f920&#039;']);
3752
3753_lt('send', 'cv', {
3754 type: 'AddToCart'
3755},['ca1644dc-2795-476b-9ffa-e1550d80f920&#039;']);
3756
3757						
3758												
3759												
3760					} catch (e) { }
3761					
3762				}
3763				
3764				$('[data-toggle="tooltip"], .tooltip').tooltip("hide");
3765				
3766				if(type == "promotion"){
3767					var promotion_id = typeof(key_id) != 'undefined' ? key_id : -1;
3768					var send_value = '&promotion_id=' + promotion_id ;
3769				}
3770				
3771				if(type == "present"){
3772					var free_present_id = typeof(key_id) != 'undefined' ? key_id : -1;
3773					
3774					//if(free_present_id > 0){
3775						quantity = $('input[name="quantity"]').val();
3776						quantity = typeof(quantity) != 'undefined' ? quantity : 1;
3777					//}
3778					
3779					var send_value = '&free_present_id=' + free_present_id +'&position=' + position;
3780				}
3781				
3782				if(type == "buytogether"){
3783					var buy_together_id = typeof(key_id) != 'undefined' ? key_id : -1;
3784					
3785					quantity = $('input[name="quantity"]').val();
3786					quantity = typeof(quantity) != 'undefined' ? quantity : 1;
3787					
3788					var send_value = '&buy_together_id=' + buy_together_id +'&position=' + position;
3789				}
3790				
3791				var price = $('#price-price-block .price-normal').attr('data-content');
3792		
3793				if(typeof(price) === 'undefined') price = $('#price-price-block .price-new').attr('data-content');
3794				
3795				price = typeof(price) != 'undefined' ? price : 0;
3796				
3797				
3798				var instantCart1Src = 'index.php?route=product/instant_add&product_id=' + product_id + '&quantity=' + quantity +'&price=' + price +send_value ;
3799
3800				whenFancyboxReady(function(){
3801					try {
3802						$.fancybox.open({
3803							src  : instantCart1Src,
3804							type : 'iframe',
3805							opts : {
3806								closeClickOutside : true,
3807								iframe : { css : { width : '320px' } },
3808								beforeLoad: function() {
3809									$(".fancybox-container").css("zIndex", 999999993);
3810								}
3811							}
3812						});
3813					} catch (e) { }
3814				});
3815			}
3816			
3817			// Debounced mini-cart reload: every module/cart hit rewrites server-side
3818			// cart state, so a burst of reloads can undo a just-added product.
3819			// Keep in sync with common/footer_cart.tpl -- only one footer renders per page
3820			// (common/footer.php picks a single template), so the two copies never collide.
3821			var miniCartReloadTimer = null;
3822			function reloadMiniCart(immediate){
3823				// One shared timer for every caller; immediate only shortens the wait.
3824				// Bypassing it made add-to-cart fire two overlapping module/cart requests
3825				// (closePopFancybox() and TriggerMyCartList() each trigger mouseover).
3826				// Rescheduling is not a lock, so this is "almost always one", not a guarantee.
3827				clearTimeout(miniCartReloadTimer);
3828				miniCartReloadTimer = setTimeout(loadMiniCart, immediate ? 0 : 300);
3829			}
3830
3831			function loadMiniCart(){
3832				$("#cart").load("index.php?route=module/cart #cart > *", function(){
3833					try { refreshMiniCartScrollBar(); } catch (e) { }
3834				});
3835			}
3836
3837			function closePopFancybox(){
3838				try {
3839					$.fancybox.close();
3840					$.fancybox.destroy();
3841				} catch (e) { }
3842				if( is.desktop() ) {
3843					setTimeout(function(){
3844						$("#cart > .heading a").trigger('mouseover');	
3845						setTimeout(function(){ refreshMiniCartScrollBar(); }, 300);
3846					}, 500);
3847				}
3848			}
3849			
3850			function LastPresentsOption(html,key,qty){
3851				$("#lg_option_"+key).prepend(html);
3852				$('.last_free_presents').trigger('change');
3853				$('.free_present_qty').trigger('change');
3854			}
3855			
3856			function TriggerMyCartList(){
3857				if( is.not.desktop() ){
3858					updateCartProductCount();
3859					setTimeout(function(){
3860						$("#shopping-cart-list .badge").removeClass("animated");
3861						$("#shopping-cart-list .badge").addClass("animated");
3862						$("#shopping-cart-list .badge").addClass("bounce");
3863					}, 800);
3864				} else {
3865					setTimeout(function(){
3866						$("#cart > .heading a").trigger('mouseover');	
3867						setTimeout(function(){ refreshMiniCartScrollBar(); }, 300);
3868					}, 500);
3869				}
3870			}
3871			
3872			function removeCartByProductID(product_id) {
3873				if( is.existy(product_id) ) {
3874				$.ajax({
3875					url: 'index.php?route=module/cart&remove=' + product_id + "%3Anull%3A-1%3A0",
3876					type: 'post',
3877					dataType: 'json',
3878					success: function(json) {
3879						TriggerMyCartList();
3880					}
3881				});
3882				}
3883			}
3884			
3885			function updateQuantityByProductID(product_id, quantity) {
3886				quantity = typeof(quantity) != 'undefined' ? quantity : 1;
3887				$.ajax({
3888					url: 'index.php?route=checkout/cart/updateProductQuantity',
3889					type: 'post',
3890					data: { 'quantity':quantity, 'key': product_id+'%3Anull%3A-1%3A0' },
3891					dataType: 'json',
3892					success: function(json) {
3893						TriggerMyCartList();
3894					}
3895				});
3896			}
3897			
3898			
3899			function bulk_add_to_cart() {
3900				$("select.bulk-add-quantity").change(function() {
3901					var value = $("option:selected", this).val();
3902					var select_idx 	= $(this).data("idx");
3903					var product_id 	= $(this).data("productid");
3904					var prevval 	= $(this).data("prevval");
3905					
3906					if( value == 0 ) { 
3907						$(this).next(".bulk-add-quantity").addClass("no-cart"); 
3908						if(prevval!=0){
3909							removeCartByProductID(product_id);
3910						}
3911					} else { 
3912						$(this).next(".bulk-add-quantity").removeClass("no-cart"); 
3913						
3914						if( value == 999 ) {
3915							InstantAddToCart(product_id, 999); 
3916							$(this).next(".bulk-add-quantity").find(".current").text("+ 9");
3917						} else {
3918							if(prevval==0){
3919								// 第一次加入
3920								InstantAddToCart(product_id, value); 
3921							} else {
3922								// 更新數量
3923								updateQuantityByProductID(product_id, value); 
3924							}
3925						}
3926					}
3927					$(this).data("prevval", value); 
3928					$(this).attr("data-prevval", value); 
3929				});
3930			}
3931			
3932			function downloadJSAtOnload() {
3933				
3934				$("#myBody").removeAttr('style');
3935				
3936				if( is.not.desktop() ) {
3937					$('.any-products').each(function(index,el){
3938						$(el).find('.grid-box').each(function(index,el2){
3939							$(el2).attr('style','');
3940						});
3941					});
3942				}
3943				
3944				try {
3945				getScript("https://cdnjs.cloudflare.com/ajax/libs/izitoast/1.4.0/js/iziToast.min.js",function(){ });
3946				} catch(e) { }
3947				
3948								
3949				var queue = $LAB.queueScript("https://cdn.qdm.cloud/assets/js/core.240901.compressed.js");
3950				queue.queueWait(function(){
3951
3952					// core.js reloads module/cart on EVERY mini-cart hover, unthrottled (10
3953					// requests in 5s observed). Rebind to the debounced reload, keeping
3954					// hover-to-expand behaviour. The mouseleave rebind is like-for-like: in
3955					// core.240901 (the bundle queued above) its body is only
3956					// removeClass("active"). Re-check if that bundle is rebuilt.
3957					// Keep in sync with common/footer_cart.tpl -- it queues a different
3958					// bundle, so verify that claim against ITS bundle.
3959					//
3960					// The ready() wrapper is load-bearing: core.js binds inside its own
3961					// ready() callback, registered while this queued script runs, and jQuery
3962					// fires ready callbacks in registration order -- so off() is guaranteed to
3963					// run after that bind. Calling off() directly here only works if DOM ready
3964					// happens to have fired already; otherwise it removes nothing and BOTH
3965					// handlers stay attached.
3966					$(document).ready(function(){
3967						try {
3968							$(document).off("mouseover", "#cart > .heading");
3969							$(document).on("mouseover", "#cart > .heading", function(e){
3970								$("#cart").addClass("active");
3971								// Programmatic refreshes get here via .trigger('mouseover') (add-to-cart /
3972								// fancybox close / login). Debouncing them delayed the reload past each
3973								// call site's paired setTimeout(refreshMiniCartScrollBar, 300). jQuery
3974								// marks synthetic events with isTrigger; losing that just falls back to
3975								// the debounced path.
3976								reloadMiniCart(e && e.isTrigger);
3977							});
3978							$(document).off("mouseleave", "#cart");
3979							$(document).on("mouseleave", "#cart", function(){
3980								$(this).removeClass("active");
3981							});
3982						} catch (e) {
3983							// Never break the rest of the queued callback, but do not fail
3984							// silently either -- a swallowed error degrades straight back to
3985							// the unthrottled reload.
3986							if (window.console && console.warn) { console.warn("mini-cart rebind failed", e); }
3987						}
3988
3989						// Self-check. off(type, selector) matches on the selector STRING, so a whitespace
3990						// variant alone breaks it: a rebuilt bundle emitting "#cart>.heading" survives our
3991						// off() and BOTH handlers stay attached. Both spellings hit the same element, so
3992						// compare with whitespace stripped -- that covers drift on either side.
3993						// Known limit: whitespace is the ONLY rewrite covered. "#cart .heading", a trailing
3994						// " a", a comma-separated selector or a direct element bind all stay silent.
3995						// A tripwire for the likely case, not proof that the rebind held.
3996						// _data is a jQuery internal, so it gets its own try/catch: if it ever goes away,
3997						// the rebind above is still correct and must not be reported failed.
3998						try {
3999							var miniCartEvents = $._data(document, "events");
4000							var miniCartBound = ((miniCartEvents && miniCartEvents.mouseover) || []).filter(function(h){
4001								return h.selector && h.selector.replace(/\s+/g, "") === "#cart>.heading";
4002							}).length;
4003							if (miniCartBound !== 1 && window.console && console.warn) {
4004								console.warn("mini-cart rebind: expected 1 mouseover handler, found", miniCartBound);
4005							}
4006						} catch (e2) {
4007							if (window.console && console.warn) { console.warn("mini-cart rebind self-check unavailable", e2); }
4008						}
4009					});
4010
4011				
4012										
4013					$(".ajax-popup-link").unbind();
4014					$(".ajax-popup-link").fancybox({
4015						closeBtn    : true,
4016						closeClick  : true,
4017						helpers     : { 
4018							overlay : {closeClick: true} 
4019						},
4020						buttons : [ 'close' ],
4021						clickOutside : 'close',
4022						closeClick  : true,
4023						toolbar : true
4024					});
4025					
4026										
4027					var milliseconds = new Date().getTime();
4028					$.getJSON( "index.php?route=common/header/getLoggedInUserInfo&token=" + milliseconds + "1" + (Math.floor(Math.random() * 999) + 100), function( data ) {
4029						if( is.existy(data) && data.isLogged ) {
4030														$("#header-logged-user").html(data.logged_user_name + data.logged_group_name);
4031							$("#header-mobile-user").html(data.logged_user_name + data.logged_group_name);
4032							$(".header-logged-menu").removeClass("hidden");
4033							$("#header-logged-menu").removeClass("hidden");
4034							$("#header-none-logged-menu").remove();
4035						} else {
4036							$(".header-logged-menu").remove();
4037							$("#header-logged-menu").remove();
4038							$(".header-none-logged-menu").removeClass("hidden");
4039							$("#header-none-logged-menu").removeClass("hidden");
4040						}
4041						
4042						if( is.not.desktop() ){
4043							updateCartProductCount();
4044							setTimeout(function(){
4045								$("#shopping-cart-list .badge").removeClass("animated");
4046								$("#shopping-cart-list .badge").addClass("animated");
4047								$("#shopping-cart-list .badge").addClass("bounce");
4048							}, 800);
4049						} else {
4050							$("#cart > .heading a").trigger('mouseover');
4051							$("section#cart").removeClass("active");	
4052							setTimeout(function(){ $("section#cart").removeClass("active"); }, 50);
4053						}
4054						
4055					});
4056					
4057					setTimeout(function(){
4058						$('.side_float_banner_wrapper').attr("style","");
4059						$('.banner').each(function( index ) {
4060							if( $(this).find("a").length == 1 ) {
4061								$(this).attr("style","");
4062							}
4063						});
4064					}, 2000);
4065					
4066					if (typeof init_inline === 'function') {
4067						if($("#image-additional").length){
4068							$.fancybox.defaults.hash = false;
4069						}
4070						setTimeout(function(){ init_inline(); }, 300);
4071					}
4072
4073					if (typeof init_fullslideshow === 'function') { init_fullslideshow(); }
4074					
4075					$("#contact-block").removeAttr('style');
4076					
4077										if( is.not.desktop() ) {
4078						$('#shopping-cart-list').on('click', function() {
4079							openSideCart();
4080							return false;
4081						});
4082					}
4083										
4084					if ( $("input[name='quantity']").length > 0 ) {
4085						var qtyMin = $("input[name='quantity']").data("min"); 
4086						if(qtyMin=="" || qtyMin==undefined) qtyMin = 1;
4087						$("input[name='quantity']").TouchSpin({
4088							min: qtyMin,
4089							max: 99999
4090						});
4091					}
4092				
4093					$(window).resize(function() {
4094						if( $(window).width() < 992 ){
4095							$("#footer-inner-row").removeClass("offset2");
4096						} else {
4097							var data_count = $("#footer-inner-row").data("count");
4098							if(data_count < 1) {
4099								$("#footer-inner-row").addClass("offset2");	
4100							}
4101						}
4102					});	
4103					
4104					$("#header .flipper").each(function(){
4105						var imgLoad = $(this).imagesLoaded(function(){
4106							try { 
4107								if (typeof $(this).data('flipper') !== 'undefined') {
4108									$(this).flipper(); 
4109								}
4110							} catch(err) { }
4111						});
4112					});
4113					
4114					$('a[href*="#"]').each(function() {
4115						var hash = $(this).attr('href');
4116						if(hash=="##") return;
4117						if(hash=="#") return;
4118						if(hash=="#mobile-menu") return;
4119						$(this).click( function(e) {
4120							var url = $(this).attr('href');
4121							var type = url.split('#');
4122							var hash = '';
4123							if(type.length > 1)
4124							hash = type[1];
4125							if($("[name='"+hash+"']").length){
4126								if(hash && hash != "undefined" && hash != null && hash != undefined){
4127									e.preventDefault(); 
4128									$('html,body').animate({ scrollTop: $("[name='"+hash+"']").offset().top}, 600);
4129									return false;
4130								}
4131							}									
4132						});
4133					});
4134					
4135										
4136										
4137									
4138										
4139					if ( $(".masonry").length > 0 ) {
4140						$(".masonry").each(function(index, value) { 
4141							var $grid = $('.masonry').masonry();
4142							setTimeout(function(){ $grid.masonry('layout'); }, 2000);
4143						});
4144					}
4145					
4146					if ( $(".owl-carousel").length > 0 ) {
4147						$(".owl-carousel").not('[data-exclude]').each(function(index, value) { 
4148						
4149							var autoplay = is.null( $(this).attr('data-autoPlay') ) ? true : $(this).attr('data-autoPlay');
4150							var pagination = is.null( $(this).attr('data-pagination') ) ? false : $(this).attr('data-pagination');
4151							var slideSpeed = is.null( $(this).attr('data-slideSpeed') ) ? 200 : $(this).attr('data-slideSpeed');
4152							var paginationSpeed = is.null( $(this).attr('data-paginationSpeed') ) ? 800 : $(this).attr('data-paginationSpeed');
4153							var singleItem = is.null( $(this).attr('data-singleItem') ) ? true : $(this).attr('data-singleItem');
4154							var transitionStyle = is.null( $(this).attr('data-transitionStyle') ) ? "fade" : $(this).attr('data-transitionStyle');
4155							
4156							$(this).owlCarousel({
4157								autoPlay : Boolean(autoplay),
4158								navigation : false,
4159								pagination : Boolean(pagination),
4160								slideSpeed : slideSpeed,
4161								paginationSpeed : paginationSpeed,
4162								singleItem: Boolean(singleItem),
4163								transitionStyle : transitionStyle,
4164								stopOnHover: true,
4165								autoHeight: true
4166							});
4167							
4168						});
4169					}
4170					
4171										
4172					var vidDefer = document.getElementsByTagName('iframe');
4173					for (var i=0; i<vidDefer.length; i++) {
4174						if(vidDefer[i].getAttribute('data-src')) {
4175							vidDefer[i].setAttribute('src',vidDefer[i].getAttribute('data-src'));
4176						} 
4177					}
4178					
4179					$(".fancybox").fancybox({
4180						closeBtn: false,
4181						padding : 1,
4182						helpers			: {
4183							overlay : {
4184								closeClick : true,
4185								speedOut   : 200,
4186								showEarly  : true,
4187								css        : {},
4188								locked     : true
4189							},
4190							title		: { type : 'inside' },
4191							buttons		: {}
4192						}
4193					});	
4194					
4195										
4196					if( is.not.desktop() ){
4197						$("#footer-inner-row").removeClass("offset2");
4198					} 
4199					
4200					if ( $('#bestseller-products .flexslider').length > 0 ) {
4201						$('#bestseller-products .flexslider').each(function(index, value) {
4202							$(this).flexslider({
4203								animation: "slide",
4204								animationLoop: true,
4205								itemWidth: 182,
4206								itemMargin: 3,
4207								minItems: 2,
4208								maxItems: 6,
4209								animationSpeed: 700,
4210								touch: true,
4211								slideshow: false,								slideshowSpeed: 5000							});
4212						});
4213					}
4214					if ( $('#featured-products .flexslider').length > 0 ) {
4215						$('#featured-products .flexslider').each(function(index, value) { 
4216							$(this).flexslider({
4217								animation: "slide",
4218								animationLoop: true,
4219								itemWidth: 182,
4220								itemMargin: 3,
4221								minItems: 2,
4222								maxItems: 6,
4223								animationSpeed: 700,
4224								touch: true,
4225								slideshow: false,								slideshowSpeed: 5000							});
4226						});
4227					}
4228					if ( $('#latest-products .flexslider').length > 0 ) {
4229						$('#latest-products .flexslider').each(function(index, value) { 
4230							$(this).flexslider({
4231								animation: "slide",
4232								animationLoop: true,
4233								itemWidth: 182,
4234								itemMargin: 3,
4235								minItems: 2,
4236								maxItems: 6,
4237								animationSpeed: 700,
4238								touch: true,
4239								slideshow: false,								slideshowSpeed: 5000							});
4240						});
4241					}
4242					if ( $('#related-products .flexslider').length > 0 ) {
4243						$('#related-products .flexslider').each(function(index, value) { 
4244							$(this).flexslider({
4245								animation: "slide",
4246								animationLoop: true,
4247								itemWidth: 182,
4248								itemMargin: 3,
4249								minItems: 2,
4250								maxItems: 6,
4251								animationSpeed: 700,
4252								touch: true,
4253								slideshow: false,								slideshowSpeed: 5000							});
4254						});
4255					}
4256					if ( $('#special-products .flexslider').length > 0 ) {
4257						$('#special-products .flexslider').each(function(index, value) { 
4258							$(this).flexslider({
4259								animation: "slide",
4260								animationLoop: true,
4261								itemWidth: 182,
4262								itemMargin: 3,
4263								minItems: 2,
4264								maxItems: 6,
4265								animationSpeed: 700,
4266								touch: true,
4267								slideshow: false,								slideshowSpeed: 5000							});
4268						});
4269					}
4270
4271					if ( $('#comingsoon-products .flexslider').length > 0 ) {
4272						$('#comingsoon-products .flexslider').each(function(index, value) {
4273							$(this).flexslider({
4274								animation: "slide",
4275								animationLoop: true,
4276								itemWidth: 182,
4277								itemMargin: 3,
4278								minItems: 2,
4279								maxItems: 6,
4280								animationSpeed: 700,
4281								touch: true,
4282								slideshow: false,								slideshowSpeed: 5000							});
4283						});
4284					}
4285					
4286					jQuery('.flexslider').each( function() {
4287						var $slider = jQuery(this);
4288						var $slides = jQuery(this).children().children('.slides');
4289						if ( -1 === jQuery.inArray( $slider.data('flexslider').vars.animation, [ 'slide', 'swing' ] ) )
4290							return;
4291						$slides.bind( 'mousewheel', function( e ) {
4292							e.preventDefault();
4293							if ( jQuery(this).hasClass('dragging') )
4294								return;
4295							if ( e.originalEvent.deltaY > 0 ) {
4296								$slider.flexslider('next');
4297							}
4298							if ( e.originalEvent.deltaY < 0 ) {
4299								$slider.flexslider('prev');
4300							}
4301							return false;
4302						} );
4303					} );
4304					
4305					if ( $('.any-products').length > 0 ) {
4306						$(window).resize(function() {
4307							
4308							$('.any-products').each(function(index, value) { 
4309								var margin_vertical = $(this).data("marginVertical");
4310								if( is.mobile() ){
4311									$(this).find(".products-box").removeClass(".products-box").addClass("product-box");
4312								} else {
4313									if(margin_vertical){
4314										$(this).find(".product-box").removeClass(".product-box").addClass("products-box");
4315									}
4316								}
4317							});
4318							
4319							if(is.mobile()){
4320								$(".any-products").find(".grid-box").attr("style","");
4321								adjustBoxHeights();
4322							}
4323							
4324						});
4325					}
4326					
4327					if ( $('.banner-carousel').length > 0 ) {
4328						$('.banner-carousel').each(function(index, value) { 
4329							var slideSpeed = is.null( $(this).attr('data-slideSpeed') ) ? 600 : $(this).attr('data-slideSpeed');
4330							if( slideSpeed == undefined ) { slideSpeed = 600; }
4331							var el = "#" + $(this).attr("id");
4332							var items = $(this).data("item");
4333							
4334							var lilen = $(el+" li").length;
4335							var sliderLoop = true;
4336							if(lilen==items){sliderLoop = false;}
4337							
4338							var autoplay = parseInt($(this).data("autoplay"));
4339							var boolAutoplay = false;
4340							if( autoplay ) boolAutoplay = true;
4341							$(el).removeClass("hidden");
4342							$(el).show();
4343							$(el).imagesLoaded( function() {
4344								var el = "#" + $(this).attr("id");
4345								$(el+" img[data-lazy-src]").each(function(index, value) { 
4346									var loadimg = $(this).attr('data-lazy-src');
4347									$(this).attr('src', loadimg);
4348								});
4349								var slider = $(el).lightSlider({
4350									auto: boolAutoplay,
4351									pauseOnHover: true,
4352									pager: false,
4353									item:items,
4354									loop: sliderLoop,
4355									easing: 'cubic-bezier(0.25, 0, 0.25, 1)',
4356									speed: slideSpeed,
4357									onSliderLoad: function() {
4358										$(el).removeClass("hidden");
4359										$(el).show();
4360										$(el).css("height", "auto");
4361									} 
4362								});
4363								slider.refresh();
4364							});
4365						});
4366					}
4367					
4368					
4369					if ( $('.slideshow-container-appear li').length > 0 ) {
4370						$('.slideshow-container-appear').each(function(index, value) { 
4371							var el = "#" + $(this).attr("id");
4372							var full = $(this).data("full");
4373							if(full){
4374								$(this).appendTo('#content-top');
4375							}
4376							
4377							if(is.mobile()){
4378								$(el).find("li.desktop").remove();
4379								$(el).find("li.mobile:first").show();	
4380							} else {
4381								$(el).find("li.mobile").remove();
4382								$(el).find("li.desktop:first").show();	
4383							}						
4384							
4385							$(el).imagesLoaded( function(e) {
4386								
4387								if(is.mobile()){
4388									$(e).closest("li.mobile").attr("style","width:100%");
4389								} else {
4390									$(e).closest("li.desktop").attr("style","width:100%");
4391								}
4392								
4393								var controlNav = $(e).closest(".slideshow-container-appear").data("controlnav");
4394								var directionNav = $(e).closest(".slideshow-container-appear").data("directionnav");
4395								var el = "#" + $(e).attr("id");
4396								var delay = $(e).closest(".slideshow-container-appear").data("delay");
4397								if(delay<300) delay = 300;
4398								
4399								adaptiveHeight = true;
4400								if( is.mobile() ){
4401									//controlNav = false;
4402									//directionNav = false;
4403									adaptiveHeight = false;
4404								}
4405								
4406								var slideshow_img_h = 0;
4407								$(e).closest(".slideshow-container-appear li.mobile img").each(function(index, value) { 
4408									var img_h = $(this).data("height");
4409									if( (img_h > 0) && (slideshow_img_h > 0) && (img_h != slideshow_img_h) ) {
4410										slideshow_img_h = 0;
4411									} else {
4412										slideshow_img_h = img_h;
4413									}
4414								});
4415								
4416								if( is.mobile() && slideshow_img_h == 0 ){
4417									$(e).closest(".slideshow-container-appear").flexslider({
4418										animation: "fade",
4419										slideDirection: "horizontal",
4420										animationLoop: true,
4421										pauseOnHover: true,
4422										pauseOnAction: false,
4423										smoothHeight: false, 
4424										slideshowSpeed: delay,
4425										initDelay: 0, 
4426										slideshow: true,
4427										mousewheel: false,
4428										controlNav: controlNav,
4429										directionNav: directionNav, 
4430										prevText: "",
4431										nextText: "",
4432										start: function(slider) {
4433											var el = "#" + $(this).attr("id");
4434											$(el).removeClass('loading');
4435										}
4436									});
4437								} else {
4438									var slider = $(e).closest(".slides").lightSlider({
4439										auto:true,
4440										loop:true,
4441										pauseOnHover:true,
4442										adaptiveHeight:true,
4443										item:1,
4444										slideMargin:0,
4445										easing: 'cubic-bezier(0.25, 0, 0.25, 1)',
4446										speed:600,
4447										pause:delay,
4448										controls:directionNav,
4449										pager:controlNav
4450									}); 
4451									slider.refresh();
4452									setTimeout(function(){
4453									slider.play(); 
4454									slider.goToNextSlide(); 
4455									slider.goToPrevSlide();
4456									slider.goToPrevSlide(); 
4457									slider.refresh();
4458									}, 700);
4459								}
4460								
4461							});
4462							
4463						});
4464					}
4465					
4466					if( $('.side_float_banner .flipper').length > 0 ) {
4467						try {
4468							$('.side_float_banner .flipper').flipper();
4469						} catch(err) { }
4470					}
4471					
4472					if( $(".flexslider").find("img").length > 0 ) {
4473						$(".flexslider").find("img").trigger('appear');
4474					}
4475					
4476										if( ($("#maincontent").outerHeight(true)-150) > $('.sidebar .smart-menu').outerHeight(true) ){
4477					$('.sidebar .smart-menu').scrollToFixed({ 
4478						marginTop: $('#navbar-top-fixed').outerHeight(true) + 20,
4479						limit: function() {
4480							var limit = $('footer').offset().top - $(".content-bottom").outerHeight(true) - $('.sidebar .smart-menu').outerHeight(true) - 120;
4481							return limit;
4482						},
4483					});
4484					}
4485										
4486										
4487					$('[data-toggle="tooltip"]').tooltip();
4488					
4489					setTimeout(function(){ 
4490						$(window).trigger('resize'); 
4491					}, 300);
4492					
4493					$(".flex-direction-nav").remove();
4494					
4495					adjustBoxHeights();
4496					
4497										
4498					$("#menu-btn").show();
4499					$("#menu-btn").addClass('animated flash');
4500					
4501					setTimeout(function(){
4502					$("#mobile-navbar").removeAttr('style');
4503					}, 1000);
4504					
4505															
4506										
4507										
4508				});
4509				
4510				queue.runQueue();
4511				
4512												(function(d, s, id) {
4513				  var js, fjs = d.getElementsByTagName(s)[0];
4514				  if (d.getElementById(id)) return;
4515				  js = d.createElement(s); js.id = id;
4516				  				  js.src = "https://connect.facebook.net/zh_TW/sdk.js";
4517				  				  fjs.parentNode.insertBefore(js, fjs);
4518				}(document, 'script', 'facebook-jssdk'));
4519				
4520				if (window.location.hash == '#_=_') {
4521					window.location.hash = ''; // for older browsers, leaves a # behind
4522					history.pushState('', document.title, window.location.pathname + window.location.search);
4523				}
4524				
4525			}
4526			// Store subdomains count as same site; separate tenants on the platform domain do not
4527			function qdmIsSameSiteHost(host){
4528				var site = location.hostname.toLowerCase();
4529				host = (host || '').toLowerCase();
4530				if (host === site) {
4531					return true;
4532				}
4533				// Keep in sync with Response::isSameSiteHref() in system/library/response.php
4534				if (/(^|\.)(qdm\.(tw|com\.tw|cloud)|myorganic\.org\.tw)$/.test(site)) {
4535					return false;
4536				}
4537				var apex = site.replace(/^www\./, '');
4538				return host === apex || host.slice(-(apex.length + 1)) === '.' + apex;
4539			}
4540			function sanitizeTargetBlank(){
4541				$('a[rel~=external]').prop('target', '_blank');
4542				$('a[target="_blank"]').each(function(){
4543					var a = $(this);
4544					if(!qdmIsSameSiteHost(this.hostname)){
4545						var originalRel = (this.rel === undefined) ? '' : this.rel;
4546						var newRel = originalRel.split(" ");
4547						if (originalRel.toLowerCase().indexOf('noopener') === -1){
4548							newRel.push('noopener');
4549						}
4550						if (originalRel.toLowerCase().indexOf('noreferrer') === -1){
4551							newRel.push('noreferrer');
4552						}
4553						if (originalRel.toLowerCase().indexOf('nofollow') === -1){
4554							newRel.push('nofollow');
4555						}
4556						a.attr('rel', newRel.join(" ").trim() );
4557					}
4558				});
4559			}
4560			function create_mark(name) {
4561				if (window.performance.mark === undefined) {
4562					console.log("performance.mark Not supported");
4563					return;
4564				}
4565				window.performance.mark(name);
4566			}
4567			function initCoreJS() {
4568				$LAB.setGlobalDefaults({AlwaysPreserveOrder:true});
4569				jQuery.ajaxPrefilter(function(s) {
4570					if ( s.crossDomain ) {
4571						s.contents.script = false;
4572					}
4573				});
4574				$(function() { $('body').removeClass('fade-out'); });
4575				sanitizeTargetBlank();
4576				var def_img_idx = 1;
4577				[].forEach.call(document.querySelectorAll('img[data-src]'), function(img) {
4578					if( def_img_idx <= 12 ) {
4579						if (img.getAttribute('data-src') === null) { } else if (img.getAttribute('data-src') === '') {} else {
4580							img.setAttribute('src', img.getAttribute('data-src'));
4581							img.onload = function() {
4582								img.removeAttribute('data-src');
4583								if (img.style.opacity !== undefined) {
4584									img.style.opacity = 1;
4585								}
4586							};
4587						}
4588					}
4589					def_img_idx++;
4590				});
4591				if ( $('.slideshow .flexslider').length > 0 ) { 
4592					$('.slideshow .flexslider').each(function(index, value) { 
4593						var el = "#" + $(this).attr("id");
4594						var full = $(this).data("full");
4595						if(full){
4596							$(this).find("img").css({'width' : '100%', 'height' : 'auto' });
4597							$(this).closest("div.slideshow").appendTo('#content-top');
4598						}
4599					});
4600				}
4601				$LAB.script("https://cdnjs.cloudflare.com/ajax/libs/jquery.imagesloaded/5.0.0/imagesloaded.pkgd.min.js")
4602					  .script("https://cdnjs.cloudflare.com/ajax/libs/is_js/0.9.0/is.min.js").wait(function(){
4603						  initDeferImages();
4604						loadJS();
4605						downloadJSAtOnload();
4606						create_mark('mark_fully_loaded');
4607						if( $('.wow').eq(0).length ) {
4608							getScript("https://cdnjs.cloudflare.com/ajax/libs/wow/1.1.2/wow.min.js",function(){
4609								new WOW().init();
4610							});
4611						}
4612						if( $('img[usemap]').eq(0).length ) {
4613							getScript("https://cdnjs.cloudflare.com/ajax/libs/jQuery-rwdImageMaps/1.6/jquery.rwdImageMaps.min.js",function(){
4614								try { $('img[usemap]').rwdImageMaps(); } catch (e) { }
4615							});
4616						}
4617												getScript("https://cdnjs.cloudflare.com/ajax/libs/data-layer-helper/0.1.0/data-layer-helper.min.js",function(){ });
4618												
4619					  });
4620						//230117 fix flipper hover
4621						if($(".grid-box, .product-row").find(".flipper").length){
4622							$(".grid-box, .product-row").find(".flipper").hover(function(){
4623								oldSrc = $(this).attr("src");
4624								$(this).attr("src",$(this).attr("data-flipper"));
4625							},function(){
4626								$(this).attr("src",oldSrc);
4627							});
4628						}
4629			}
4630			
4631			initCoreCSS();
4632			setTimeout(function(){ 
4633				initCoreJS();
4634				$.getJSON( "index.php?route=account/account/get_user_track&token=" + (Math.floor(Math.random() * 999) + 100), function( data ) { 
4635					if( data.user_id ) { ga_userId = data.user_id; } 
4636					if( data.uuid ) {
4637						try {
4638							if ('localStorage' in window && window['localStorage'] !== null){
4639								localStorage.removeItem("qdm_user_uuid");
4640								localStorage.setItem("qdm_user_uuid", data.uuid);
4641								qdm_user_uuid = data.uuid;
4642							}
4643						} catch (e) {}
4644					}
4645					if( data.utm_source == "affiliates" ) { ga_utm_source = data.utm_source; }
4646															reportFbqTrack();
4647											
4648				});
4649				var vidDefer = document.getElementsByTagName('iframe');
4650				for (var i=0; i<vidDefer.length; i++) {
4651					if(vidDefer[i].getAttribute('src')) {
4652						vidDefer[i].setAttribute('data-src',vidDefer[i].getAttribute('src'));
4653					} 
4654				}
4655				document.getElementsByTagName("body")[0].style.display = "block";
4656			}, 60);
4657		
4658		</script>
4658 
4658<script>
4659		var lazy = [];
4660		function cleanLazy(){
4661			lazy = Array.prototype.filter.call(lazy, function(l){ return l.getAttribute('data-lazy-src');});
4662		}
4663		function setLazy(){
4664			lazy = document.querySelectorAll('img[data-lazy-src]');
4665			for(var i=0; i<lazy.length; i++){
4666				if (lazy[i].getAttribute('data-lazy-src')){
4667					lazy[i].src = lazy[i].getAttribute('data-lazy-src');
4668					lazy[i].removeAttribute('data-lazy-src');
4669				}
4670				if( i >= 3 ) break;
4671			}
4672			setTimeout(function(){
4673				var elemDefer = document.getElementById("defer-load-spin");
4674				if( elemDefer !=null ) elemDefer.remove();
4675			}, 300);
4676		} 
4677		function isInViewport(el){
4678			var rect = el.getBoundingClientRect();
4679			return (
4680				rect.bottom >= 0 && 
4681				rect.right >= 0 && 
4682				rect.top <= ( (window.innerHeight + 1200) || (document.documentElement.clientHeight + 1200) ) && 
4683				rect.left <= (window.innerWidth || document.documentElement.clientWidth)
4684			 );
4685		}
4686		function lazyLoad(){
4687			lazy = document.querySelectorAll('img[data-lazy-src]');
4688			for(var i=0; i<lazy.length; i++){
4689				if(isInViewport(lazy[i])){
4690					if (lazy[i].getAttribute('data-lazy-src')){
4691						lazy[i].src = lazy[i].getAttribute('data-lazy-src');
4692						lazy[i].removeAttribute('data-lazy-src');
4693					}
4694				}
4695			}
4696		}
4697		function registerListener(event, func) {
4698			if (window.addEventListener) {
4699				window.addEventListener(event, func)
4700			} else {
4701				window.attachEvent('on' + event, func)
4702			}
4703		}
4704		registerListener('scroll', lazyLoad);
4705		registerListener('resize', lazyLoad);
4706		setLazy();
4707		</script>
4707 </body> </html> 
4707<script src="https://cdn.qdm.cloud/assets/js/backend_other.js?v=20260318"></script>
4707 
4707<script>
4708	//2025.11.20 新增貨到通知
4709	const isLogged = 0; //登入檢查
4710	const goods_arrival_notice_allow_guest_notification = 0;
4711	const goods_arrival_notice_sms_status = 0;
4712	(function() {
4713		var s = document.createElement('script');
4714		s.async = true;
4715		s.src = 'https://base.qdm.cloud/qdm_base//catalog/view/theme/default/js/customer/product.js?t=' + new Date().getTime();
4716		var before = document.scripts[document.scripts.length - 1];
4717		before.parentNode.insertBefore(s, before.nextSibling);
4718	})();
4719	document.head.innerHTML += '<link rel="stylesheet" type="text/css" href="https://cdn.qdm.cloud/assets/css/bs_utility.css?v=20260318">';
4720	const elm_StockAlertBtn = document.querySelectorAll('.product-info input[type=\'text\'], .product-info input[type=\'hidden\'], .product-info input[type=\'radio\'], .product-info input[type=\'checkbox\'], .product-info select,.cart input[name=\'promption_id\']');
4721	elm_StockAlertBtn.forEach(element => {
4722		element.addEventListener('change', () => {
4723			showStockAlertBtn(0);
4724		});
4725	});
4726
4727	function showStockAlertBtn(show = 0) {
4728		handleResize();
4729		const notifyArrivalBtns = document.querySelectorAll('.notifyArrival');
4730		if (notifyArrivalBtns.length === 0) return;
4731		if (show == 1) {
4732			notifyArrivalBtns.forEach(btn => {
4733				btn.classList.remove('invisible');
4734			});
4735			document.querySelectorAll('#button-quick-checkout').forEach(element => {
4736				element.classList.add('d-none');
4737			});
4738			if (document.querySelector('#button-instant-checkout')) {
4739				document.querySelector('#button-instant-checkout').classList.add('d-none');
4740			}
4741			if (document.querySelector('#button-cart')) {
4742				document.querySelectorAll('#button-cart').forEach(element => {
4743					element.classList.add('d-none');
4744				});
4745			}
4746		} else {
4747			notifyArrivalBtns.forEach(btn => {
4748				btn.classList.add('invisible');
4749			});
4750			document.querySelectorAll('#button-quick-checkout').forEach(element => {
4751				element.classList.remove('d-none');
4752			});
4753			if (document.querySelector('#button-instant-checkout')) {
4754				document.querySelector('#button-instant-checkout').classList.remove('d-none');
4755			}
4756			if (document.querySelector('#button-cart')) {
4757				document.querySelectorAll('#button-cart').forEach(element => {
4758					element.classList.remove('d-none');
4759				});
4760			}
4761
4762		}
4763	};
4764	//去抖
4765	function debounce(func, delay) {
4766		let timeoutId;
4767		return (...args) => {
4768			clearTimeout(timeoutId);
4769			timeoutId = setTimeout(() => {
4770				func.apply(this, args);
4771			}, delay);
4772		};
4773	}
4774
4775	function handleResize() {
4776
4777
4778		if (getDeviceType() == 'mobile' || getDeviceType() == 'tablet') {
4779
4780			const notifyArrivalBtns = document.querySelectorAll('.notifyArrival');
4781			if (notifyArrivalBtns.length > 0) {
4782				notifyArrivalBtns.forEach(btn => {
4783					btn.classList.add('mobile'); //改變 貨到付款按鈕尺寸
4784				});
4785			}
4786			if (document.querySelector('#button-quick-checkout')) {
4787				document.querySelectorAll('#button-quick-checkout').forEach(element => {
4788					element.classList.add('fix-btn-size');
4789				});
4790			}
4791			if (document.querySelector('#button-instant-checkout')) {
4792				document.querySelector('#button-instant-checkout').classList.add('fix-btn-size');
4793			}
4794			if (document.querySelector('#button-cart')) {
4795				document.querySelectorAll('#button-cart').forEach(element => {
4796					element.classList.add('fix-btn-size');
4797				});
4798			}
4799		} else {
4800
4801			const notifyArrivalBtns = document.querySelectorAll('.notifyArrival');
4802			if (notifyArrivalBtns.length > 0) {
4803				notifyArrivalBtns.forEach(btn => {
4804					btn.classList.remove('mobile');
4805				});
4806			}
4807			if (document.querySelector('#button-quick-checkout')) {
4808				document.querySelectorAll('#button-quick-checkout').forEach(element => {
4809					element.classList.remove('fix-btn-size');
4810				});
4811			}
4812
4813			if (document.querySelector('#button-instant-checkout')) {
4814				document.querySelector('#button-instant-checkout').classList.remove('fix-btn-size');
4815			}
4816			if (document.querySelector('#button-cart')) {
4817				document.querySelectorAll('#button-cart').forEach(element => {
4818					element.classList.remove('fix-btn-size');
4819				});
4820			}
4821		}
4822
4823	}
4824
4825	function hasStockError(message) {
4826		return /庫存/.test(message);
4827	}
4828
4829	const debouncedHandleResize = debounce(handleResize, 250); // 延遲 250 毫秒
4830
4831	// 監聽 resize 事件,並使用去抖過的函式
4832	window.addEventListener('resize', debouncedHandleResize);
4833	window.addEventListener('ContentLoaded', handleResize());
4834
4835	function getDeviceType() {
4836		const width = window.innerWidth;
4837		if (width <= 768) {
4838			return 'mobile';
4839		} else if (width > 768 && width <= 1024) {
4840			return 'tablet';
4841		} else {
4842			return 'desktop';
4843		}
4844	}
4845	//補丁: 圖片選項select 點文字,input可以被選
4846	function enableDataSelectsClick() {
4847
4848		$(document).on('click', '[data-selects]', function(event) {
4849			try {
4850
4851				var targetId = $(this).attr('data-selects');
4852
4853				var $radioInput = $('#' + targetId);
4854				if ($radioInput.length && $radioInput.attr('type') === 'radio') {
4855					$radioInput.trigger('click');
4856				} else {
4857					// 如果找不到目標元素或類型不符,發出警告
4858					console.warn('DataSelects 點擊處理:找不到 ID 為 ' + targetId + ' 的 Radio Input 或類型不符。');
4859				}
4860			} catch (error) {
4861				console.error('DataSelects 點擊處理時發生錯誤:', error);
4862			}
4863		});
4864	}
4865</script>
vendor: 1 bytes, line 4865
4865

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.